From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ganesh Goudar Subject: Re: [PATCH net-next] cxgb4vf: Fix netdev_features flag Date: Fri, 1 Dec 2017 21:28:21 +0530 Message-ID: <20171201155817.GA18552@chelsio.com> References: <1512140371-18062-1-git-send-email-ganeshgr@chelsio.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Netdev , David Miller , nirranjan@chelsio.com, indranil@chelsio.com, venkatesh@chelsio.com, Arjun Vynipadath To: Alexander Duyck Return-path: Received: from stargate.chelsio.com ([12.32.117.8]:44491 "EHLO stargate.chelsio.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752317AbdLAP6W (ORCPT ); Fri, 1 Dec 2017 10:58:22 -0500 Content-Disposition: inline In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: 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 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 > > Signed-off-by: Ganesh Goudar > > --- > > 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