Netdev List
 help / color / mirror / Atom feed
From: "Eilon Greenstein" <eilong@broadcom.com>
To: "Michal Schmidt" <mschmidt@redhat.com>
Cc: "Eric Dumazet" <eric.dumazet@gmail.com>,
	netdev@vger.kernel.org, "Eric Dumazet" <edumazet@google.com>,
	"Yaniv Rosner" <yanivr@broadcom.com>,
	"Yuval Mintz" <yuvalmin@broadcom.com>,
	"Merav Sicron" <meravs@broadcom.com>,
	"Robert Evans" <evansr@google.com>,
	"Tom Herbert" <therbert@google.com>,
	"Willem de Bruijn" <willemb@google.com>,
	"David Miller" <davem@davemloft.net>,
	"Havard Skinnemoen" <hskinnemoen@google.com>
Subject: Re: [PATCH] bnx2x: fix rx checksum validation for IPv6
Date: Fri, 14 Sep 2012 08:20:28 +0300	[thread overview]
Message-ID: <1347600028.23482.1.camel@lb-tlvb-eilong.il.broadcom.com> (raw)
In-Reply-To: <1347578079.8555.141.camel@edumazet-glaptop>

On Fri, 2012-09-14 at 01:14 +0200, Eric Dumazet wrote:
> On Fri, 2012-09-14 at 00:59 +0200, Michal Schmidt wrote:
> > Commit d6cb3e41 "bnx2x: fix checksum validation" caused a performance
> > regression for IPv6. Rx checksum offload does not work. IPv6 packets
> > are passed to the stack with CHECKSUM_NONE.
> > 
> > The hardware obviously cannot perform IP checksum validation for IPv6,
> > because there is no checksum in the IPv6 header. This should not prevent
> > us from setting CHECKSUM_UNNECESSARY.
> > 
> > Tested on BCM57711.
> > 
> > Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
> > ---
> >  drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 12 +++++++-----
> >  1 file changed, 7 insertions(+), 5 deletions(-)
> > 
> > diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
> > index af20c6e..e8e97a7 100644
> > --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
> > +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
> > @@ -662,14 +662,16 @@ void bnx2x_csum_validate(struct sk_buff *skb, union eth_rx_cqe *cqe,
> >  				 struct bnx2x_fastpath *fp,
> >  				 struct bnx2x_eth_q_stats *qstats)
> >  {
> > -	/* Do nothing if no IP/L4 csum validation was done */
> > -
> > +	/* Do nothing if no L4 csum validation was done.
> > +	 * We do not check whether IP csum was validated. For IPv4 we assume
> > +	 * that if the card got as far as validating the L4 csum, it also
> > +	 * validated the IP csum. IPv6 has no IP csum.
> > +	 */
> >  	if (cqe->fast_path_cqe.status_flags &
> > -	    (ETH_FAST_PATH_RX_CQE_IP_XSUM_NO_VALIDATION_FLG |
> > -	     ETH_FAST_PATH_RX_CQE_L4_XSUM_NO_VALIDATION_FLG))
> > +	    ETH_FAST_PATH_RX_CQE_L4_XSUM_NO_VALIDATION_FLG)
> >  		return;
> >  
> > -	/* If both IP/L4 validation were done, check if an error was found. */
> > +	/* If L4 validation was done, check if an error was found. */
> >  
> >  	if (cqe->fast_path_cqe.type_error_flags &
> >  	    (ETH_FAST_PATH_RX_CQE_IP_BAD_XSUM_FLG |
> 
> Thanks for fixing this bug !
> 
> Acked-by: Eric Dumazet <edumazet@google.com>

Indeed - thanks Michal!

Acked-by: Eilon Greenstein <eilong@broadcom.com>

  reply	other threads:[~2012-09-14  5:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-13 22:59 [PATCH] bnx2x: fix rx checksum validation for IPv6 Michal Schmidt
2012-09-13 23:14 ` Eric Dumazet
2012-09-14  5:20   ` Eilon Greenstein [this message]
2012-09-14 17:39     ` Eilon Greenstein
2012-09-18 20:17   ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1347600028.23482.1.camel@lb-tlvb-eilong.il.broadcom.com \
    --to=eilong@broadcom.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=eric.dumazet@gmail.com \
    --cc=evansr@google.com \
    --cc=hskinnemoen@google.com \
    --cc=meravs@broadcom.com \
    --cc=mschmidt@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=therbert@google.com \
    --cc=willemb@google.com \
    --cc=yanivr@broadcom.com \
    --cc=yuvalmin@broadcom.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox