diff options
author | Hyong Youb Kim <hyonkim@cisco.com> | 2019-03-21 08:21:26 -0700 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2019-03-22 12:59:49 +0000 |
commit | a1c175a40d4bc3bf4695ba237efc96a21783232e (patch) | |
tree | ca5f7867b4e0e6b1ed8e55b2255c225844b48e0f /build/external/patches/dpdk_19.02 | |
parent | 5c4b9f1efd1c5d9853a3c508e2a103d0f5679173 (diff) |
dpdk: add ENIC PMD patch to untag default vlan
The ingress vlan rewrite mode affects the vlan header of ingress
packet. The enic driver currently uses the 'passthrough' mode, which
leaves the vlan header intact. As all packets in UCS network are
tagged, this default mode leads to tagged ingress packets in the
following cases where VPP expects untagged packets.
1. Trunk-mode vNIC on UCS standalone server.
A remote device sends an untagged packet to the server. This packet is
ultimately tagged with vlan 0 as it reaches the driver, and VPP sees
an ingress packet tagged with vlan 0.
2. Access-mode vNIC on UCS blade or standalone server.
A remote device sends a packet on the vNIC's default vlan (e.g. 200)
to the server. This tag is untouched, and VPP sees an ingress packet
tagged with the default vlan (e.g. 200).
In both cases, VPP expects to see untagged packets. To work around the
issue, VPP currently enables vlan stripping on VIC interfaces, which
breaks vlan sub-interface features.
To avoid the current workaround, use the "untag default vlan" rewrite
mode. With this mode, the VIC adapter removes the vlan header if it
matches the default vlan. In the cases described above, VPP would see
untagged packets. Packets tagged with non-default vlan (e.g. non-0 for
case 1 and non-200 for case 2) are received with their tags intact, so
VPP sees tagged packets as expected.
The driver currently has no programmatic way to change the rewrite
mode after rte_eal_init. So use this patch to change the mode for the
time being.
Change-Id: Iff6408275363ed52d6016e7516d745214d6b30d4
Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Diffstat (limited to 'build/external/patches/dpdk_19.02')
-rw-r--r-- | build/external/patches/dpdk_19.02/0001-net-enic-untag-default-vlan-by-default.patch | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/build/external/patches/dpdk_19.02/0001-net-enic-untag-default-vlan-by-default.patch b/build/external/patches/dpdk_19.02/0001-net-enic-untag-default-vlan-by-default.patch new file mode 100644 index 00000000000..5c6610e23f4 --- /dev/null +++ b/build/external/patches/dpdk_19.02/0001-net-enic-untag-default-vlan-by-default.patch @@ -0,0 +1,31 @@ +From 85ce89273a8e67375713e154fa84f6da0c7d0bcf Mon Sep 17 00:00:00 2001 +From: Hyong Youb Kim <hyonkim@cisco.com> +Date: Wed, 20 Mar 2019 00:00:20 -0700 +Subject: [PATCH] net/enic: untag default vlan by default + +The current default ingress vlan rewrite mode 'passthrough' is not +suitable for VPP, as it leads to ingress packets tagged with vlan 0 +(trunk-mode vNIC) or native vlan (access-mode vNIC). Change the +default to "untag default vlan" to remove these unwanted tags. + +Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com> +--- + drivers/net/enic/enic_ethdev.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/net/enic/enic_ethdev.c b/drivers/net/enic/enic_ethdev.c +index 8d14d8ac7..87d5c76cb 100644 +--- a/drivers/net/enic/enic_ethdev.c ++++ b/drivers/net/enic/enic_ethdev.c +@@ -1125,7 +1125,7 @@ static int enic_check_devargs(struct rte_eth_dev *dev) + + enic->disable_overlay = false; + enic->enable_avx2_rx = false; +- enic->ig_vlan_rewrite_mode = IG_VLAN_REWRITE_MODE_PASS_THRU; ++ enic->ig_vlan_rewrite_mode = IG_VLAN_REWRITE_MODE_UNTAG_DEFAULT_VLAN; + if (!dev->device->devargs) + return 0; + kvlist = rte_kvargs_parse(dev->device->devargs->args, valid_keys); +-- +2.16.2 + |