[dpdk-dev] [RFC 1/3] ethdev: add ptype as an Rx offload

pbhagavatula at marvell.com pbhagavatula at marvell.com
Tue Aug 6 10:02:02 CEST 2019


From: Pavan Nikhilesh <pbhagavatula at marvell.com>

Add ptype to DEV_RX_OFFLOAD_* flags which can be used to enable/disable
packet type parsing.

Signed-off-by: Pavan Nikhilesh <pbhagavatula at marvell.com>
---
 doc/guides/nics/features.rst   | 3 +++
 lib/librte_ethdev/rte_ethdev.h | 1 +
 2 files changed, 4 insertions(+)

diff --git a/doc/guides/nics/features.rst b/doc/guides/nics/features.rst
index 6f8cac2c8..6b222b270 100644
--- a/doc/guides/nics/features.rst
+++ b/doc/guides/nics/features.rst
@@ -662,6 +662,9 @@ Packet type parsing
 
 Supports packet type parsing and returns a list of supported types.
 
+* **[uses]       rte_eth_rxconf,rte_eth_rxmpde**: ``offloads:DEV_RX_OFFLOAD_PTYPE``.
+* **[provides]   mbuf**: ``mbuf.packet_type``.
+* **[provides]   rte_eth_dev_info**: ``rx_offload_capa,rx_queue_offload_capa:DEV_RX_OFFLOAD_PTYPE``.
 * **[implements] eth_dev_ops**: ``dev_supported_ptypes_get``.
 * **[related]    API**: ``rte_eth_dev_get_supported_ptypes()``.
 
diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
index dc6596bc9..888b766d4 100644
--- a/lib/librte_ethdev/rte_ethdev.h
+++ b/lib/librte_ethdev/rte_ethdev.h
@@ -1013,6 +1013,7 @@ struct rte_eth_conf {
 #define DEV_RX_OFFLOAD_KEEP_CRC		0x00010000
 #define DEV_RX_OFFLOAD_SCTP_CKSUM	0x00020000
 #define DEV_RX_OFFLOAD_OUTER_UDP_CKSUM  0x00040000
+#define DEV_RX_OFFLOAD_PTYPE		0x00080000
 
 #define DEV_RX_OFFLOAD_CHECKSUM (DEV_RX_OFFLOAD_IPV4_CKSUM | \
 				 DEV_RX_OFFLOAD_UDP_CKSUM | \
-- 
2.17.1



More information about the dev mailing list