From: Stephen Hemminger <shemminger@vyatta.com>
To: "Zou, Yi" <yi.zou@intel.com>
Cc: "Kirsher, Jeffrey T" <jeffrey.t.kirsher@intel.com>,
"davem@davemloft.net" <davem@davemloft.net>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"gospo@redhat.com" <gospo@redhat.com>,
"sassmann@redhat.com" <sassmann@redhat.com>
Subject: Re: [net 2/2] net: fix a bug of dropping FCoE frames when disabling tx ip checksum
Date: Wed, 14 Mar 2012 12:32:47 -0700 [thread overview]
Message-ID: <20120314123247.687be130@nehalam.linuxnetplumber.net> (raw)
In-Reply-To: <138EA028228D124A900F5E6746F3C2160F6B0F97@ORSMSX102.amr.corp.intel.com>
On Wed, 14 Mar 2012 18:54:32 +0000
"Zou, Yi" <yi.zou@intel.com> wrote:
> >
> > On Wed, 14 Mar 2012 00:01:58 -0700
> > Jeff Kirsher <jeffrey.t.kirsher@intel.com> wrote:
> >
> > > From: Yi Zou <yi.zou@intel.com>
> > >
> > > Fix a bug when using 'ethtool -K ethx tx off' to turn off tx ip
> > checksum,
> > > FCoE CRC offload should not be impacte. The skb_checksum_help() is
> > needed
> > > only if it's not FCoE traffic for ip checksum, regardless of ethtool
> > toggling
> > > the tx ip checksum on or off.
> > >
> > > Signed-off-by: Yi Zou <yi.zou@intel.com>
> > > Tested-by: Ross Brattain <ross.b.brattain@intel.com>
> > > Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> > > ---
> > > net/core/dev.c | 3 +++
> > > 1 files changed, 3 insertions(+), 0 deletions(-)
> > >
> > > diff --git a/net/core/dev.c b/net/core/dev.c
> > > index 6ca32f6..9e378009 100644
> > > --- a/net/core/dev.c
> > > +++ b/net/core/dev.c
> > > @@ -1913,6 +1913,9 @@ int skb_checksum_help(struct sk_buff *skb)
> > > __wsum csum;
> > > int ret = 0, offset;
> > >
> > > + if (skb->protocol == htons(ETH_P_FCOE))
> > > + goto out;
> > > +
> > > if (skb->ip_summed == CHECKSUM_COMPLETE)
> > > goto out_set_summed;
> > >
> >
> > Shouldn't this be done in the offending driver rather than the core?
> Well, yes and no, the driver is already using NETIF_F_FCOE_CRC to indicate
> the FCoE CRC offload capability, and can_checksum_protocol() indicates that.
> The fcoe protocol stack then uses CHECKSUM_PARTIAL and NETIF_F_FCOE_CRC to
> pass through netdev w/o doing skb_checksum(), which is not captured here
> in dev_hard_start_xmit() as it looks at NETIF_F_ALL_CSUM only before calling
> skb_checksum_help().
But your change would break any code (if there is any) generating this
kind of packet and going through firewall, etc. For example a bridge or
router for FCOE packets.
next prev parent reply other threads:[~2012-03-14 19:32 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-14 7:01 [net 1/2] ixgbe: Fix issues with SR-IOV loopback when flow control is disabled Jeff Kirsher
2012-03-14 7:01 ` [net 2/2] net: fix a bug of dropping FCoE frames when disabling tx ip checksum Jeff Kirsher
2012-03-14 15:25 ` Stephen Hemminger
2012-03-14 18:54 ` Zou, Yi
2012-03-14 19:32 ` Stephen Hemminger [this message]
2012-03-14 20:45 ` Zou, Yi
2012-03-14 20:35 ` Ben Hutchings
2012-03-14 20:48 ` Zou, Yi
2012-03-14 21:53 ` David Miller
2012-03-14 22:04 ` Zou, Yi
2012-03-14 22:17 ` David Miller
2012-03-14 22:30 ` Ben Hutchings
2012-03-14 23:23 ` Zou, Yi
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=20120314123247.687be130@nehalam.linuxnetplumber.net \
--to=shemminger@vyatta.com \
--cc=davem@davemloft.net \
--cc=gospo@redhat.com \
--cc=jeffrey.t.kirsher@intel.com \
--cc=netdev@vger.kernel.org \
--cc=sassmann@redhat.com \
--cc=yi.zou@intel.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;
as well as URLs for NNTP newsgroup(s).