lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1411073324.7106.294.camel@edumazet-glaptop2.roam.corp.google.com>
Date:	Thu, 18 Sep 2014 13:48:44 -0700
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	David Miller <davem@...emloft.net>
Cc:	netdev <netdev@...r.kernel.org>,
	Ariel Elior <ariel.elior@...gic.com>
Subject: [PATCH net-next] bnx2x: set gso_segs in LRO mode

From: Eric Dumazet <edumazet@...gle.com>

In commits cbf1de72324a8 ("bnx2x: fix GRO parameters"), and
ab5777d748302 ("bnx2x: Get gso_segs from FW")
special care was taken for GRO mode.

We can also get proper gso_segs for LRO mode.

This helps to get proper values for these SNMP counters, which should
count number of segments. This also helps qdisc_pkt_len_init() to better
track packet sizes when ingress qdisc is in place.

IpExtInNoECTPkts                63458
IpExtInECT0Pkts                 8772480
IpExtInCEPkts                   1390713

Signed-off-by: Eric Dumazet <edumazet@...gle.com>
---
 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
index 6dc32aee96bf..9c0c0f4bdfc3 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
@@ -537,8 +537,10 @@ static void bnx2x_set_gro_params(struct sk_buff *skb, u16 parsing_flags,
 
 	/* tcp_gro_complete() will copy NAPI_GRO_CB(skb)->count
 	 * to skb_shinfo(skb)->gso_segs
+	 * We also set skb_shinfo(skb)->gso_segs in case we are in LRO mode
 	 */
 	NAPI_GRO_CB(skb)->count = num_of_coalesced_segs;
+	skb_shinfo(skb)->gso_segs = num_of_coalesced_segs;
 }
 
 static int bnx2x_alloc_rx_sge(struct bnx2x *bp, struct bnx2x_fastpath *fp,


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ