summaryrefslogtreecommitdiff
path: root/lib/librte_mbuf
diff options
context:
space:
mode:
authorFerruh Yigit <ferruh.yigit@intel.com>2018-10-03 16:19:12 +0100
committerFerruh Yigit <ferruh.yigit@intel.com>2018-10-11 18:53:49 +0200
commitb2fd0273897e9254d0ae7965fbd4e5f4e9618d1d (patch)
treef1c90cbd8508bcd19754e5304b9aa015696e31b2 /lib/librte_mbuf
parent7e43a32ee06054e7af9de6b9830b61b783df063b (diff)
downloaddpdk-b2fd0273897e9254d0ae7965fbd4e5f4e9618d1d.zip
dpdk-b2fd0273897e9254d0ae7965fbd4e5f4e9618d1d.tar.gz
dpdk-b2fd0273897e9254d0ae7965fbd4e5f4e9618d1d.tar.xz
mbuf: clarify QinQ flag usage
Update implementation that when PKT_RX_QINQ_STRIPPED mbuf ol_flags set by PMD, PKT_RX_QINQ, PKT_RX_VLAN_STRIPPED & PKT_RX_VLAN should be also set. Clarify mbuf documentations that when PKT_RX_QINQ set PKT_RX_VLAN also should be set. So that appllication can rely on PKT_RX_QINQ flag to access both mbuf.vlan_tci & mbuf.vlan_tci_outer Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com> Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com> Acked-by: Olivier Matz <olivier.matz@6wind.com>
Diffstat (limited to 'lib/librte_mbuf')
-rw-r--r--lib/librte_mbuf/rte_mbuf.c1
-rw-r--r--lib/librte_mbuf/rte_mbuf.h5
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/librte_mbuf/rte_mbuf.c b/lib/librte_mbuf/rte_mbuf.c
index e714c5a..05a5a17 100644
--- a/lib/librte_mbuf/rte_mbuf.c
+++ b/lib/librte_mbuf/rte_mbuf.c
@@ -297,6 +297,7 @@ const char *rte_get_rx_ol_flag_name(uint64_t mask)
case PKT_RX_IEEE1588_PTP: return "PKT_RX_IEEE1588_PTP";
case PKT_RX_IEEE1588_TMST: return "PKT_RX_IEEE1588_TMST";
case PKT_RX_QINQ_STRIPPED: return "PKT_RX_QINQ_STRIPPED";
+ case PKT_RX_QINQ: return "PKT_RX_QINQ";
case PKT_RX_LRO: return "PKT_RX_LRO";
case PKT_RX_TIMESTAMP: return "PKT_RX_TIMESTAMP";
case PKT_RX_SEC_OFFLOAD: return "PKT_RX_SEC_OFFLOAD";
diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h
index eb11779..50a7378 100644
--- a/lib/librte_mbuf/rte_mbuf.h
+++ b/lib/librte_mbuf/rte_mbuf.h
@@ -140,7 +140,7 @@ extern "C" {
* The 2 vlans have been stripped by the hardware and their tci are
* saved in mbuf->vlan_tci (inner) and mbuf->vlan_tci_outer (outer).
* This can only happen if vlan stripping is enabled in the RX
- * configuration of the PMD. If this flag is set,
+ * configuration of the PMD.
* When PKT_RX_QINQ_STRIPPED is set, the flags (PKT_RX_VLAN |
* PKT_RX_VLAN_STRIPPED | PKT_RX_QINQ) must also be set.
*/
@@ -170,7 +170,8 @@ extern "C" {
/**
* The RX packet is a double VLAN, and the outer tci has been
- * saved in in mbuf->vlan_tci_outer.
+ * saved in in mbuf->vlan_tci_outer. If PKT_RX_QINQ set, PKT_RX_VLAN
+ * also should be set and inner tci should be saved to mbuf->vlan_tci.
* If the flag PKT_RX_QINQ_STRIPPED is also present, both VLANs
* headers have been stripped from mbuf data, else they are still
* present.