On Fri, Dec 1, 2017 at 6:59 AM, Ganesh Goudar <ganes...@chelsio.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 <ar...@chelsio.com>
> Signed-off-by: Ganesh Goudar <ganes...@chelsio.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

Reply via email to