[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20110104183321.GA22434@rere.qmqm.pl>
Date: Tue, 4 Jan 2011 19:33:21 +0100
From: Michał Mirosław <mirq-linux@...e.qmqm.pl>
To: Ben Hutchings <bhutchings@...arflare.com>
Cc: netdev@...r.kernel.org
Subject: Re: [RFC PATCH 04/12] net: introduce NETIF_F_RXCSUM
On Sun, Dec 19, 2010 at 01:57:15AM +0100, Michał Mirosław wrote:
> On Thu, Dec 16, 2010 at 11:27:29PM +0000, Ben Hutchings wrote:
> > On Wed, 2010-12-15 at 23:24 +0100, Michał Mirosław wrote:
> > > Introduce NETIF_F_RXCSUM to replace device-private flags for RX checksum
> > > offload. Integrate it with ndo_fix_features.
> > >
> > > ethtool_op_get_rx_csum() is removed altogether as nothing in-tree uses it.
> > Not explicitly, but what about drivers that turn TX and RX checksumming
> > on and off together? They are implicitly covered by the case which
> > you're removing:
> > [...]
> > > - case ETHTOOL_GRXCSUM:
> > > - rc = ethtool_get_value(dev, useraddr, ethcmd,
> > > - (dev->ethtool_ops->get_rx_csum ?
> > > - dev->ethtool_ops->get_rx_csum :
> > > - ethtool_op_get_rx_csum));
> > [...]
> I had an impression that drivers not defining get_rx_csum() had no
> RX checksumming or didn't allow it to be toggled. I'll have a closer look
> on this.
All drivers that have set_rx_csum() also define matching get_rx_csum().
Anyway, the code this is removing is broken in that it assumes TX csum
capability implying RX csum capability.
As a side note, GRO receive functions (TCPv4 and v6 - no other protocols
use it) are checking skb->ip_summed != CHECKSUM_NONE before allowing the
packet to be passed on, so it's not even necessary to force disabling GRO
when RX csum is off.
Best Regards,
Michał Mirosław
--
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