Skip to content

Commit 7848418

Browse files
Jakub Kicinskidavem330
authored andcommitted
nfp: separate VXLAN and GRE feature handling
VXLAN and GRE FW features have to currently be both advertised for the driver to enable them. Separate the handling. Signed-off-by: Jakub Kicinski <[email protected]> Reviewed-by: Dirk van der Merwe <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent eebd3fa commit 7848418

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

drivers/net/ethernet/netronome/nfp/nfp_net_common.c

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3762,15 +3762,18 @@ static void nfp_net_netdev_init(struct nfp_net *nn)
37623762
}
37633763
if (nn->cap & NFP_NET_CFG_CTRL_RSS_ANY)
37643764
netdev->hw_features |= NETIF_F_RXHASH;
3765-
if (nn->cap & NFP_NET_CFG_CTRL_VXLAN &&
3766-
nn->cap & NFP_NET_CFG_CTRL_NVGRE) {
3765+
if (nn->cap & NFP_NET_CFG_CTRL_VXLAN) {
37673766
if (nn->cap & NFP_NET_CFG_CTRL_LSO)
3768-
netdev->hw_features |= NETIF_F_GSO_GRE |
3769-
NETIF_F_GSO_UDP_TUNNEL;
3770-
nn->dp.ctrl |= NFP_NET_CFG_CTRL_VXLAN | NFP_NET_CFG_CTRL_NVGRE;
3771-
3772-
netdev->hw_enc_features = netdev->hw_features;
3767+
netdev->hw_features |= NETIF_F_GSO_UDP_TUNNEL;
3768+
nn->dp.ctrl |= NFP_NET_CFG_CTRL_VXLAN;
37733769
}
3770+
if (nn->cap & NFP_NET_CFG_CTRL_NVGRE) {
3771+
if (nn->cap & NFP_NET_CFG_CTRL_LSO)
3772+
netdev->hw_features |= NETIF_F_GSO_GRE;
3773+
nn->dp.ctrl |= NFP_NET_CFG_CTRL_NVGRE;
3774+
}
3775+
if (nn->cap & (NFP_NET_CFG_CTRL_VXLAN | NFP_NET_CFG_CTRL_NVGRE))
3776+
netdev->hw_enc_features = netdev->hw_features;
37743777

37753778
netdev->vlan_features = netdev->hw_features;
37763779

0 commit comments

Comments
 (0)