diff options
author | Hyong Youb Kim <hyonkim@cisco.com> | 2019-03-21 08:33:28 -0700 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2019-03-22 13:04:39 +0000 |
commit | c39a93a83c66f3162ff2aeca809cf825c444fe80 (patch) | |
tree | 9a28c7cfe79e0062f63f7735324ff025e40ef4db /src/plugins/dpdk/device | |
parent | a1c175a40d4bc3bf4695ba237efc96a21783232e (diff) |
dpdk: do not enable VLAN stripping on Cisco VIC adapters by default
With the following local patch, VIC adapters remove default vlan tags
from ingress packets. So, it is no longer necessary to enable VLAN
stripping by default. This change also allows VLAN sub interfaces to
work with VIC adapters.
patches/dpdk_19.02/0001-net-enic-untag-default-vlan-by-default.patch
Change-Id: I2e7d62c62120c351c27d827d90de4a8335efa044
Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Diffstat (limited to 'src/plugins/dpdk/device')
-rw-r--r-- | src/plugins/dpdk/device/init.c | 33 |
1 files changed, 22 insertions, 11 deletions
diff --git a/src/plugins/dpdk/device/init.c b/src/plugins/dpdk/device/init.c index 1a7792bf197..eaeda32f3b7 100644 --- a/src/plugins/dpdk/device/init.c +++ b/src/plugins/dpdk/device/init.c @@ -695,19 +695,30 @@ dpdk_lib_init (dpdk_main_t * dm) } /* - * For cisco VIC vNIC, set default to VLAN strip enabled, unless - * specified otherwise in the startup config. - * For other NICs default to VLAN strip disabled, unless specified + * A note on Cisco VIC (PMD_ENIC) and VLAN: + * + * With Cisco VIC vNIC, every ingress packet is tagged. On a + * trunk vNIC (C series "standalone" server), packets on no VLAN + * are tagged with vlan 0. On an access vNIC (standalone or B + * series "blade" server), packets on the default/native VLAN + * are tagged with that vNIC's VLAN. VPP expects these packets + * to be untagged, and previously enabled VLAN strip on VIC by + * default. But it also broke vlan sub-interfaces. + * + * The VIC adapter has "untag default vlan" ingress VLAN rewrite + * mode, which removes tags from these packets. VPP now includes + * a local patch for the enic driver to use this untag mode, so + * enabling vlan stripping is no longer needed. In future, the + * driver + dpdk will have an API to set the mode after + * rte_eal_init. Then, this note and local patch will be + * removed. + */ + + /* + * VLAN stripping: default to VLAN strip disabled, unless specified * otherwise in the startup config. */ - if (xd->pmd == VNET_DPDK_PMD_ENIC) - { - if (devconf->vlan_strip_offload != DPDK_DEVICE_VLAN_STRIP_OFF) - vlan_strip = 1; /* remove vlan tag from VIC port by default */ - else - dpdk_log_warn ("VLAN strip disabled for interface\n"); - } - else if (devconf->vlan_strip_offload == DPDK_DEVICE_VLAN_STRIP_ON) + if (devconf->vlan_strip_offload == DPDK_DEVICE_VLAN_STRIP_ON) vlan_strip = 1; if (vlan_strip) |