ixgbe: fix AF_XDP tx byte count
Subsystems (2)
PATCH 1/2 ixgbe: fix AF_XDP tx byte count
From: William Tu <[email protected]>
The tx bytecount is done twice. When running './xdpsock -t -N -i eth3' and 'ip -s link show dev eth3' The avg packet size is 120 instead of 60. So remove the extra one.
--- drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c | 1 - 1 file changed, 1 deletion(-)
drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c +0 -1
@@ -704,7 +704,6 @@ bool ixgbe_clean_xdp_tx_irq(struct ixgbe_q_vector *q_vector, xsk_frames++; tx_bi->xdpf =NULL ; - total_bytes += tx_bi->bytecount; tx_bi++; tx_desc++;
PATCH 2/2 ixgbe: fix AF_XDP tx packet count.
From: William Tu <[email protected]>
The total_packets count at ixgbe_clean_xdp_tx_irq is always zero when testing with xdpsock -t -N. Set the gso_segs to 1 to make the tx packet count correct.
--- drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c +1 -0
@@ -640,6 +640,7 @@ static bool ixgbe_xmit_zc(struct ixgbe_ring *xdp_ring, unsigned int budget) tx_bi = &xdp_ring->tx_buffer_info[xdp_ring->next_to_use]; tx_bi->bytecount = len; tx_bi->xdpf =NULL ; + tx_bi->gso_segs =1 ; tx_desc =IXGBE_TX_DESC (xdp_ring, xdp_ring->next_to_use); tx_desc->read.buffer_addr =cpu_to_le64 (dma);
Bowers
PATCH 2/2 ixgbe: fix AF_XDP tx packet count.
Quoted 10 lines
-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On Behalf Of Jeff Kirsher
Sent: Thursday, April 4, 2019 9:37 AM
To: intel-wired-lan at lists.osuosl.org
Cc: William Tu <[email protected]>
Subject: [Intel-wired-lan] [2/2] ixgbe: fixAF_XDPtx packet count.From: William Tu <[email protected]>
Quoted 8 lines
The
total_packetscount atixgbe_clean_xdp_tx_irqis always zero when testing with xdpsock -t -N. Set thegso_segsto 1 to make the tx packet count correct.Signed-off-by William Tu <[email protected]>--- drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c | 1 + 1 file changed, 1 insertion(+)
Bowers
PATCH 1/2 ixgbe: fix AF_XDP tx byte count
In reply to Jeff KirsherQuoted 10 lines
-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On Behalf Of Jeff Kirsher
Sent: Thursday, April 4, 2019 9:37 AM
To: intel-wired-lan at lists.osuosl.org
Cc: William Tu <[email protected]>
Subject: [Intel-wired-lan] [1/2] ixgbe: fixAF_XDPtx byte countFrom: William Tu <[email protected]>
Quoted 8 lines
The tx bytecount is done twice. When running './xdpsock -t -N -i eth3' and 'ip -s link show dev eth3'
The avg packet size is 120 instead of 60. So remove the extra one.Signed-off-by William Tu <[email protected]>--- drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c | 1 - 1 file changed, 1 deletion(-)