Skip to content

Commit

Permalink
enic: Check if hw supports multi wq with vxlan offload
Browse files Browse the repository at this point in the history
Some adaptors do not support vxlan offload when multi wq is configured.

If hw supports multi wq, BIT(2) is set in a1.

Signed-off-by: Govindarajulu Varadarajan <gvaradar@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Govindarajulu Varadarajan authored and David S. Miller committed Mar 4, 2018
1 parent d117909 commit 7e24c64
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/net/ethernet/cisco/enic/enic_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,11 @@ static void enic_udp_tunnel_add(struct net_device *netdev,

goto error;
}
if ((vnic_dev_get_res_count(enic->vdev, RES_TYPE_WQ) != 1) &&
!(enic->vxlan.flags & ENIC_VXLAN_MULTI_WQ)) {
netdev_info(netdev, "vxlan: vxlan offload with multi wq not supported on this adapter");
goto error;
}

err = vnic_dev_overlay_offload_cfg(enic->vdev,
OVERLAY_CFG_VXLAN_PORT_UPDATE,
Expand Down
1 change: 1 addition & 0 deletions drivers/net/ethernet/cisco/enic/vnic_devcmd.h
Original file line number Diff line number Diff line change
Expand Up @@ -699,6 +699,7 @@ enum overlay_ofld_cmd {

#define ENIC_VXLAN_INNER_IPV6 BIT(0)
#define ENIC_VXLAN_OUTER_IPV6 BIT(1)
#define ENIC_VXLAN_MULTI_WQ BIT(2)

/* Use this enum to get the supported versions for each of these features
* If you need to use the devcmd_get_supported_feature_version(), add
Expand Down

0 comments on commit 7e24c64

Please sign in to comment.