summaryrefslogtreecommitdiff
path: root/doc/guides/nics/enic.rst
diff options
context:
space:
mode:
authorHyong Youb Kim <hyonkim@cisco.com>2018-06-29 02:29:35 -0700
committerFerruh Yigit <ferruh.yigit@intel.com>2018-07-03 01:54:15 +0200
commite39c2756e21ad50d5c7e119bb82732ef49af8ef7 (patch)
tree360d8ee9f4567d5e380f7c5c0122c04f894dfb76 /doc/guides/nics/enic.rst
parent9466a38d38db69f3c59406cff2ea8cf3d4665aa3 (diff)
downloaddpdk-e39c2756e21ad50d5c7e119bb82732ef49af8ef7.zip
dpdk-e39c2756e21ad50d5c7e119bb82732ef49af8ef7.tar.gz
dpdk-e39c2756e21ad50d5c7e119bb82732ef49af8ef7.tar.xz
net/enic: add devarg to specify ingress VLAN rewrite mode
Add a new devarg "ig-vlan-rewrite" to allow the user to set non-default rewrite mode. The UCS VIC may add/remove/modify the VLAN header of an ingress packet depending on the ingress VLAN rewrite mode. By default, the driver sets the pass-through mode, which tells the NIC "do not touch VLAN header and preserve it as is". This mode is usually sufficient, but can complicate deployments for certain environments. For example, OVS-DPDK in UCS blade environments may want to use "untag default VLAN mode", which removes the VLAN header from an ingress packet if it matches vNIC's default VLAN. Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com> Reviewed-by: John Daley <johndale@cisco.com>
Diffstat (limited to 'doc/guides/nics/enic.rst')
-rw-r--r--doc/guides/nics/enic.rst15
1 files changed, 12 insertions, 3 deletions
diff --git a/doc/guides/nics/enic.rst b/doc/guides/nics/enic.rst
index d650ba0..7764c86 100644
--- a/doc/guides/nics/enic.rst
+++ b/doc/guides/nics/enic.rst
@@ -351,9 +351,10 @@ Limitations
In test setups where an Ethernet port of a Cisco adapter in TRUNK mode is
connected point-to-point to another adapter port or connected though a router
instead of a switch, all ingress packets will be VLAN tagged. Programs such
- as l3fwd which do not account for VLAN tags in packets will misbehave. The
- solution is to enable VLAN stripping on ingress. The following code fragment is
- an example of how to accomplish this:
+ as l3fwd may not account for VLAN tags in packets and may misbehave. One
+ solution is to enable VLAN stripping on ingress so the VLAN tag is removed
+ from the packet and put into the mbuf->vlan_tci field. Here is an example
+ of how to accomplish this:
.. code-block:: console
@@ -361,6 +362,14 @@ Limitations
vlan_offload |= ETH_VLAN_STRIP_OFFLOAD;
rte_eth_dev_set_vlan_offload(port, vlan_offload);
+Another alternative is modify the adapter's ingress VLAN rewrite mode so that
+packets with the default VLAN tag are stripped by the adapter and presented to
+DPDK as untagged packets. In this case mbuf->vlan_tci and the PKT_RX_VLAN and
+PKT_RX_VLAN_STRIPPED mbuf flags would not be set. This mode is enabled with the
+``devargs`` parameter ``ig-vlan-rewrite=1``. For example::
+
+ -w 12:00.0,ig-vlan-rewrite=1
+
- Limited flow director support on 1200 series and 1300 series Cisco VIC
adapters with old firmware. Please see :ref:`enic-flow-director`.