Skip to content

Commit 7e24c64

Browse files
Govindarajulu Varadarajandavem330
authored andcommitted
enic: Check if hw supports multi wq with vxlan offload
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>
1 parent d117909 commit 7e24c64

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

drivers/net/ethernet/cisco/enic/enic_main.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,11 @@ static void enic_udp_tunnel_add(struct net_device *netdev,
212212

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

216221
err = vnic_dev_overlay_offload_cfg(enic->vdev,
217222
OVERLAY_CFG_VXLAN_PORT_UPDATE,

drivers/net/ethernet/cisco/enic/vnic_devcmd.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -699,6 +699,7 @@ enum overlay_ofld_cmd {
699699

700700
#define ENIC_VXLAN_INNER_IPV6 BIT(0)
701701
#define ENIC_VXLAN_OUTER_IPV6 BIT(1)
702+
#define ENIC_VXLAN_MULTI_WQ BIT(2)
702703

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

0 commit comments

Comments
 (0)