[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20171201155817.GA18552@chelsio.com>
Date: Fri, 1 Dec 2017 21:28:21 +0530
From: Ganesh Goudar <ganeshgr@...lsio.com>
To: Alexander Duyck <alexander.duyck@...il.com>
Cc: Netdev <netdev@...r.kernel.org>,
David Miller <davem@...emloft.net>, nirranjan@...lsio.com,
indranil@...lsio.com, venkatesh@...lsio.com,
Arjun Vynipadath <arjun@...lsio.com>
Subject: Re: [PATCH net-next] cxgb4vf: Fix netdev_features flag
On Friday, December 12/01/17, 2017 at 07:16:38 -0800, Alexander Duyck wrote:
> On Fri, Dec 1, 2017 at 6:59 AM, Ganesh Goudar <ganeshgr@...lsio.com> wrote:
> > GRO is not supported by Chelsio HW when rx_csum is disabled.
> > Update the netdev features flag when rx_csum is modified.
> >
> > Signed-off-by: Arjun Vynipadath <arjun@...lsio.com>
> > Signed-off-by: Ganesh Goudar <ganeshgr@...lsio.com>
> > ---
> > drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c | 4 ++++
> > 1 file changed, 4 insertions(+)
> >
> > diff --git a/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c b/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c
> > index b48361c..8e993ac 100644
> > --- a/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c
> > +++ b/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c
> > @@ -1114,6 +1114,10 @@ static int cxgb4vf_change_mtu(struct net_device *dev, int new_mtu)
> > static netdev_features_t cxgb4vf_fix_features(struct net_device *dev,
> > netdev_features_t features)
> > {
> > + /* Disable GRO, if RX_CSUM is disabled */
> > + if (!(features & NETIF_F_RXCSUM))
> > + features &= ~NETIF_F_GRO;
> > +
> > /*
> > * Since there is no support for separate rx/tx vlan accel
> > * enable/disable make sure tx flag is always in same state as rx.
>
> Wouldn't it make more sense to just put this in netdev_fix_features? I
> would thing GRO cannot be supported on any device if RX_CSUM is
> disabled since GRO depends on checksum validation from the hardware
> before it can aggregate the frame.
>
> - Alex
Makes sense, but let us see what others has to say.
Ganesh
Powered by blists - more mailing lists