When split-header mode is disabled, an RX descriptor contains two data buffers. The driver previously programmed both buffer addresses with the same physical address, causing the second DMA transfer to overwrite the first. Split each iflib receive cluster into two contiguous hardware buffers and program the second descriptor address at the cluster midpoint. Keep the hardware buffer size consistent across attach, MTU changes, initialization and descriptor refill. The important bit here is to make pdata->rx_buf_size authoritative. Update packet-length accounting so a complete non-final descriptor accounts for both buffers and the final descriptor contains only the remaining packet data. Validate the residual length before exposing it to iflib, returning an error when the hardware-reported length cannot fit in the descriptor. Finally, clear the per-descriptor split-header length unconditionally and only read or use it when split-header mode is enabled. Co-authored-by: @J-cztery |
||
|---|---|---|
| .. | ||
| if_axgbe.c | ||
| if_axgbe_pci.c | ||
| xgbe-common.h | ||
| xgbe-dcb.c | ||
| xgbe-desc.c | ||
| xgbe-dev.c | ||
| xgbe-drv.c | ||
| xgbe-i2c.c | ||
| xgbe-mdio.c | ||
| xgbe-phy-v1.c | ||
| xgbe-phy-v2.c | ||
| xgbe-ptp.c | ||
| xgbe-sysctl.c | ||
| xgbe-txrx.c | ||
| xgbe.h | ||
| xgbe_osdep.c | ||
| xgbe_osdep.h | ||