Commit 7848418e authored by Jakub Kicinski's avatar Jakub Kicinski Committed by David S. Miller

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: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: default avatarDirk van der Merwe <dirk.vandermerwe@netronome.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent eebd3faa
...@@ -3762,15 +3762,18 @@ static void nfp_net_netdev_init(struct nfp_net *nn) ...@@ -3762,15 +3762,18 @@ static void nfp_net_netdev_init(struct nfp_net *nn)
} }
if (nn->cap & NFP_NET_CFG_CTRL_RSS_ANY) if (nn->cap & NFP_NET_CFG_CTRL_RSS_ANY)
netdev->hw_features |= NETIF_F_RXHASH; netdev->hw_features |= NETIF_F_RXHASH;
if (nn->cap & NFP_NET_CFG_CTRL_VXLAN && if (nn->cap & NFP_NET_CFG_CTRL_VXLAN) {
nn->cap & NFP_NET_CFG_CTRL_NVGRE) {
if (nn->cap & NFP_NET_CFG_CTRL_LSO) if (nn->cap & NFP_NET_CFG_CTRL_LSO)
netdev->hw_features |= NETIF_F_GSO_GRE | netdev->hw_features |= NETIF_F_GSO_UDP_TUNNEL;
NETIF_F_GSO_UDP_TUNNEL; nn->dp.ctrl |= NFP_NET_CFG_CTRL_VXLAN;
nn->dp.ctrl |= NFP_NET_CFG_CTRL_VXLAN | NFP_NET_CFG_CTRL_NVGRE;
netdev->hw_enc_features = netdev->hw_features;
} }
if (nn->cap & NFP_NET_CFG_CTRL_NVGRE) {
if (nn->cap & NFP_NET_CFG_CTRL_LSO)
netdev->hw_features |= NETIF_F_GSO_GRE;
nn->dp.ctrl |= NFP_NET_CFG_CTRL_NVGRE;
}
if (nn->cap & (NFP_NET_CFG_CTRL_VXLAN | NFP_NET_CFG_CTRL_NVGRE))
netdev->hw_enc_features = netdev->hw_features;
netdev->vlan_features = netdev->hw_features; netdev->vlan_features = netdev->hw_features;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment