Bug 593801 - [RHEL5.5] TCP bandwidth problems with TPA and bnx2x cards
[RHEL5.5] TCP bandwidth problems with TPA and bnx2x cards
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kernel (Show other bugs)
5.5
All Linux
medium Severity medium
: rc
: ---
Assigned To: Stanislaw Gruszka
Network QE
: ZStream
Depends On:
Blocks: 613900
  Show dependency treegraph
 
Reported: 2010-05-19 14:04 EDT by Flavio Leitner
Modified: 2012-02-26 21:09 EST (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-01-13 16:32:59 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Comment 2 Flavio Leitner 2010-05-19 14:13:36 EDT
Public summary:
---------------

The TCP bandwidth is very low when using bnx2x with TPA. After analysis
done at the customer site, the following patch has been identified as
a fix.

Author: Herbert Xu <herbert@gondor.apana.org.au>  2006-09-01 01:11:02
Committer: David S. Miller <davem@sunset.davemloft.net>  2006-09-23 01:18:44
Parent: 3015d5d4e5b15eddea272a697e83391100581932 ([RTNETLINK]: Fix typo causing
wrong skb to be freed)
Child:  a9917c06652165fe4eeb9ab7a5d1e0674e90e508 ([XFRM] STATE: Fix flusing
with hash mask.)
Branches: coal, fixes, link, master, remotes/origin/master, tx
Follows: v2.6.18
Precedes: v2.6.19-rc1

  [TCP]: Fix rcv mss estimate for LRO

  By passing a Linux-generated TSO packet straight back into Linux, Xen
  becomes our first LRO user :) Unfortunately, there is at least one spot
  in our stack that needs to be changed to cope with this.

  The receive MSS estimate is computed from the raw packet size.  This is
  broken if the packet is GSO/LRO.  Fortunately the real MSS can be found
  in gso_size so we simply need to use that if it is non-zero.

  Real LRO NICs should of course set the gso_size field in future.

  Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  Signed-off-by: David S. Miller <davem@davemloft.net>

diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index caf3c41..511b738 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -127,7 +127,7 @@ static void tcp_measure_rcv_mss(struct sock *sk,
      /* skb->len may jitter because of SACKs, even if peer
       * sends good full-sized frames.
       */
-       len = skb->len;
+       len = skb_shinfo(skb)->gso_size ?: skb->len;
      if (len >= icsk->icsk_ack.rcv_mss) {
              icsk->icsk_ack.rcv_mss = len;
      } else {
Comment 3 RHEL Product and Program Management 2010-06-03 07:28:00 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.
Comment 8 Jarod Wilson 2010-07-12 11:46:44 EDT
in kernel-2.6.18-206.el5
You can download this test kernel from http://people.redhat.com/jwilson/el5

Detailed testing feedback is always welcomed.
Comment 18 errata-xmlrpc 2011-01-13 16:32:59 EST
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2011-0017.html

Note You need to log in before you can comment on or make changes to this bug.