summaryrefslogtreecommitdiff
path: root/doc/guides/nics
diff options
context:
space:
mode:
authorPavan Nikhilesh <pbhagavatula@marvell.com>2019-11-11 18:49:05 +0530
committerFerruh Yigit <ferruh.yigit@intel.com>2019-11-11 16:15:36 +0100
commit5d4813acda2c3122c8efc95e600890bad4dc515b (patch)
tree68d76d04a2e81c28ac78cdaf6d1e556f912c1504 /doc/guides/nics
parent328dc5baa767e869417e96695b1f4a80c1dcc166 (diff)
downloaddpdk-5d4813acda2c3122c8efc95e600890bad4dc515b.zip
dpdk-5d4813acda2c3122c8efc95e600890bad4dc515b.tar.gz
dpdk-5d4813acda2c3122c8efc95e600890bad4dc515b.tar.xz
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 <konstantin.ananyev@intel.com> Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com> Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
Diffstat (limited to 'doc/guides/nics')
-rw-r--r--doc/guides/nics/features.rst7
1 files changed, 5 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: