path: root/doc
diff options
authorPavan Nikhilesh <>2019-11-11 18:49:05 +0530
committerFerruh Yigit <>2019-11-11 16:15:36 +0100
commit5d4813acda2c3122c8efc95e600890bad4dc515b (patch)
tree68d76d04a2e81c28ac78cdaf6d1e556f912c1504 /doc
parent328dc5baa767e869417e96695b1f4a80c1dcc166 (diff)
ethdev: add packet type range function
Add `rte_eth_dev_set_ptypes` function that will allow the application to inform the PMD about reduced range of packet types to handle. Based on the ptypes set PMDs can optimize their Rx path. -If application doesn’t want any ptype information it can call `rte_eth_dev_set_ptypes(ethdev_id, RTE_PTYPE_UNKNOWN, NULL, 0)` and PMD may skip packet type processing and set rte_mbuf::packet_type to RTE_PTYPE_UNKNOWN. -If application doesn’t call `rte_eth_dev_set_ptypes` PMD can return `rte_mbuf::packet_type` with `rte_eth_dev_get_supported_ptypes`. -If application is interested only in L2/L3 layer, it can inform the PMD to update `rte_mbuf::packet_type` with L2/L3 ptype by calling `rte_eth_dev_set_ptypes(ethdev_id, RTE_PTYPE_L2_MASK | RTE_PTYPE_L3_MASK, NULL, 0)`. Suggested-by: Konstantin Ananyev <> Signed-off-by: Pavan Nikhilesh <> Reviewed-by: Andrew Rybchenko <>
Diffstat (limited to 'doc')
2 files changed, 13 insertions, 2 deletions
diff --git a/doc/guides/nics/features.rst b/doc/guides/nics/features.rst
index 7a31cf7..f33e8e6 100644
--- a/doc/guides/nics/features.rst
+++ b/doc/guides/nics/features.rst
@@ -583,9 +583,12 @@ Packet type parsing
Supports packet type parsing and returns a list of supported types.
+Allows application to set ptypes it is interested in.
-* **[implements] eth_dev_ops**: ``dev_supported_ptypes_get``.
-* **[related] API**: ``rte_eth_dev_get_supported_ptypes()``.
+* **[implements] eth_dev_ops**: ``dev_supported_ptypes_get``,
+* **[related] API**: ``rte_eth_dev_get_supported_ptypes()``,
+ ``rte_eth_dev_set_ptypes()``, ``dev_ptypes_set``.
+* **[provides] mbuf**: ``mbuf.packet_type``.
.. _nic_features_timesync:
diff --git a/doc/guides/rel_notes/release_19_11.rst b/doc/guides/rel_notes/release_19_11.rst
index da48051..1ec4bf8 100644
--- a/doc/guides/rel_notes/release_19_11.rst
+++ b/doc/guides/rel_notes/release_19_11.rst
@@ -94,6 +94,13 @@ New Features
* Rx metadata is delivered to host via a dynamic field of ``rte_mbuf`` with
+* **Added ethdev API to set supported packet types**
+ * Added new API ``rte_eth_dev_set_ptypes`` that allows an application to
+ inform PMD about about reduced range of packet types to handle.
+ * This scheme will allow PMDs to avoid lookup to internal ptype table on Rx
+ and thereby improve Rx performance if application wishes do so.
* **Updated the enic driver.**
* Added support for Geneve with options offload.
@@ -280,6 +287,7 @@ New Features
See :doc:`../prog_guide/lto` for more information:
Removed Items