lkml.org 
[lkml]   [2018]   [Apr]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.9 159/310] cxgb4: Fix netdev_features flag
    Date
    4.9-stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Arjun Vynipadath <arjun@chelsio.com>


    [ Upstream commit 90592b9a35836bacd34d92a3aba7958756b6a7c0 ]

    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@chelsio.com>
    Signed-off-by: Steve Wise <swise@opengridcomputing.com>
    Signed-off-by: Ganesh Goudar <ganeshgr@chelsio.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    ---
    drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 11 +++++++++++
    1 file changed, 11 insertions(+)

    --- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
    +++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
    @@ -2742,6 +2742,16 @@ static int cxgb_setup_tc(struct net_devi
    return -EOPNOTSUPP;
    }

    +static netdev_features_t cxgb_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;
    +
    + return features;
    +}
    +
    static const struct net_device_ops cxgb4_netdev_ops = {
    .ndo_open = cxgb_open,
    .ndo_stop = cxgb_close,
    @@ -2766,6 +2776,7 @@ static const struct net_device_ops cxgb4
    #endif
    .ndo_set_tx_maxrate = cxgb_set_tx_maxrate,
    .ndo_setup_tc = cxgb_setup_tc,
    + .ndo_fix_features = cxgb_fix_features,
    };

    #ifdef CONFIG_PCI_IOV

    \
     
     \ /
      Last update: 2018-04-11 21:46    [W:2.323 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site