[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKgT0UcG7PoYrqnhvpBycySoRJVCShDo+MiheMy9CUh4sR-hBQ@mail.gmail.com>
Date: Fri, 1 Dec 2017 07:16:38 -0800
From: Alexander Duyck <alexander.duyck@...il.com>
To: Ganesh Goudar <ganeshgr@...lsio.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 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
Powered by blists - more mailing lists