public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Jon Mason <jon.mason@exar•com>
To: "Michał Mirosław" <mirq-linux@rere•qmqm.pl>
Cc: Ramkrishna Vepa <Ramkrishna.Vepa@exar•com>,
	Sivakumar Subramani <Sivakumar.Subramani@exar•com>,
	Sreenivasa Honnur <Sreenivasa.Honnur@exar•com>,
	"netdev@vger•kernel.org" <netdev@vger•kernel.org>,
	Ben Hutchings <bhutchings@solarflare•com>,
	Jesse Gross <jesse@nicira•com>
Subject: Re: [PATCH] net: Fix too optimistic NETIF_F_HW_CSUM features
Date: Tue, 30 Nov 2010 10:12:33 -0600	[thread overview]
Message-ID: <20101130161233.GA26958@exar.com> (raw)
In-Reply-To: <20101130154123.GA27904@rere.qmqm.pl>

On Tue, Nov 30, 2010 at 07:41:23AM -0800, Michał Mirosław wrote:
> On Tue, Nov 30, 2010 at 04:28:38PM +0100, MichałMirosław wrote:
> > On Tue, Nov 30, 2010 at 03:13:25PM +0000, Ben Hutchings wrote:
> > > On Tue, 2010-11-30 at 15:23 +0100, MichałMirosław wrote:
> > > > NETIF_F_HW_CSUM is superset of NETIF_F_IP_CSUM+NETIF_F_IPV6_CSUM, but
> > > > some drivers miss the difference. Fix this and also fix UFO dependency
> > > > on checksumming offload as it makes the same mistake in assumptions.
> [...]
> > > > diff --git a/drivers/net/vxge/vxge-ethtool.c b/drivers/net/vxge/vxge-ethtool.c
> > > > index bc9bd10..5ece50d 100644
> > > > --- a/drivers/net/vxge/vxge-ethtool.c
> > > > +++ b/drivers/net/vxge/vxge-ethtool.c
> > > > @@ -1177,7 +1177,7 @@ static const struct ethtool_ops vxge_ethtool_ops = {
> > > >  	.get_rx_csum		= vxge_get_rx_csum,
> > > >  	.set_rx_csum		= vxge_set_rx_csum,
> > > >  	.get_tx_csum		= ethtool_op_get_tx_csum,
> > > > -	.set_tx_csum		= ethtool_op_set_tx_hw_csum,
> > > > +	.set_tx_csum		= ethtool_op_set_tx_csum,
> > > >  	.get_sg			= ethtool_op_get_sg,
> > > >  	.set_sg			= ethtool_op_set_sg,
> > > >  	.get_tso		= ethtool_op_get_tso,
> > > > diff --git a/drivers/net/vxge/vxge-main.c b/drivers/net/vxge/vxge-main.c
> > > > index a21dae1..9f6d379 100644
> > > > --- a/drivers/net/vxge/vxge-main.c
> > > > +++ b/drivers/net/vxge/vxge-main.c
> > > > @@ -3368,7 +3368,7 @@ static int __devinit vxge_device_register(struct __vxge_hw_device *hldev,
> > > >  
> > > >  	ndev->features |= NETIF_F_SG;
> > > >  
> > > > -	ndev->features |= NETIF_F_HW_CSUM;
> > > > +	ndev->features |= NETIF_F_IP_CSUM;
> > > >  	vxge_debug_init(vxge_hw_device_trace_level_get(hldev),
> > > >  		"%s : checksuming enabled", __func__);
> > > >  
> > > Why are you disabling IPv6 checksum offload?  From a quick look at the
> > > driver, I think the hardware does support it.
> > 
> > In vxge_xmit() (at drivers/net/vxge/vxge-main.c:922 in net-next) there
> > is the following code, that suggested otherwise:
> > 
> >         if (skb->ip_summed == CHECKSUM_PARTIAL)
> >                 vxge_hw_fifo_txdl_cksum_set_bits(dtr,
> >                                         VXGE_HW_FIFO_TXD_TX_CKO_IPV4_EN |
> >                                         VXGE_HW_FIFO_TXD_TX_CKO_TCP_EN |
> >                                         VXGE_HW_FIFO_TXD_TX_CKO_UDP_EN);
> > 
> 
> Lets ask vxge driver maintainters on this.
> 
> Does vxge support IPv6 TCP/UDP checksumming offload?

Yes, the underlying hardware can handle checksumming TCP/UDP in an
IPv6 frame.  So the change in the former code above would revert this.
The latter piece of code is for inserting the IPv4 checksum.

Thanks,
Jon

> 
> Best Regards,
> Michał Mirosław

  reply	other threads:[~2010-11-30 16:12 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-29 18:17 Broken TX checksumming offloads Michał Mirosław
2010-11-29 19:13 ` Ben Hutchings
2010-11-30  2:35   ` Jesse Gross
2010-11-30 14:23     ` MichałMirosław
2010-11-30 14:23       ` [PATCH] net: Move check of checksum features to netdev_fix_features() MichałMirosław
2010-11-30 14:23       ` [PATCH] net: Fix too optimistic NETIF_F_HW_CSUM features MichałMirosław
     [not found]         ` <1291130005.21077.18.camel@bwh-desktop>
2010-11-30 15:28           ` MichałMirosław
2010-11-30 15:41             ` Michał Mirosław
2010-11-30 16:12               ` Jon Mason [this message]
2010-11-30 15:51             ` Ben Hutchings
2010-11-30 16:18               ` MichałMirosław
2010-11-30 16:38         ` [PATCH v2] " MichałMirosław
2010-11-30 16:53           ` Eric Dumazet
2010-11-30 17:07             ` MichałMirosław
2010-11-30 17:15               ` MichałMirosław
2010-11-30 17:17                 ` Eric Dumazet
2010-12-02  0:44           ` Jon Mason
2010-12-06 21:01           ` David Miller
2010-11-30 14:23       ` [PATCH] net: Fix drivers advertising HW_CSUM feature to use csum_start MichałMirosław

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=20101130161233.GA26958@exar.com \
    --to=jon.mason@exar$(echo .)com \
    --cc=Ramkrishna.Vepa@exar$(echo .)com \
    --cc=Sivakumar.Subramani@exar$(echo .)com \
    --cc=Sreenivasa.Honnur@exar$(echo .)com \
    --cc=bhutchings@solarflare$(echo .)com \
    --cc=jesse@nicira$(echo .)com \
    --cc=mirq-linux@rere$(echo .)qmqm.pl \
    --cc=netdev@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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