DPDK-dev Archive on lore.kernel.org
 help / color / Atom feed
* [dpdk-dev]  [PATCH v2 0/7] ethdev: add new Rx offload flags
@ 2019-08-21 20:47 pbhagavatula
  2019-08-21 20:47 ` [dpdk-dev] [PATCH v2 1/7] ethdev: add set ptype function pbhagavatula
                   ` (7 more replies)
  0 siblings, 8 replies; 245+ messages in thread
From: pbhagavatula @ 2019-08-21 20:47 UTC (permalink / raw)
  To: arybchenko, jerinj; +Cc: dev, Pavan Nikhilesh

From: Pavan Nikhilesh <pbhagavatula@marvell.com>

Add new Rx offload flags `DEV_RX_OFFLOAD_RSS_HASH` and
`DEV_RX_OFFLOAD_FLOW_MARK`. These flags can be used to
enable/disable PMD writes to rte_mbuf fields `hash.rss` and `hash.fdir.hi`
and also `ol_flags:PKT_RX_RSS` and `ol_flags:PKT_RX_FDIR`.

Add new packet type set function `rte_eth_dev_set_supported_ptypes`,
allows application to inform PMDs about the packet types it is interested in.
Based on ptypes requested by application PMDs can optimize the Rx path.

For example, if a given PMD doesn't support any packet types that the
application is interested in then the application can disable[1] writes to
`mbuf.packet_type` done by the PMD and use a software ptype parser.
	[1] rte_eth_dev_set_supported_ptypes(*port_id*, 0);

v2 Changes:
----------
- Update release notes. (Andrew)
- Redo commit logs. (Andrew)
- Disable ptype parsing for unsupported examples. (Jerin)
- Disable RSS write only in generic mode eventdev_pipeline. (Jerin)
- Modify set_supported_ptypes function to return successfuly set mask
  instead of failure.
- Dropped set_supported_ptypes to drivers by handling in library layer,
  interested PMD can add it in.


Pavan Nikhilesh (7):
  ethdev: add set ptype function
  ethdev: add mbuf RSS update as an offload
  ethdev: add flow action type update as an offload
  drivers/net: update Rx RSS hash offload capabilities
  drivers/net: update Rx flow flag and mark offload capabilities
  examples/eventdev_pipeline: add new Rx RSS hash offload
  examples: disable Rx packet type parsing

 doc/guides/nics/features.rst                  |  24 +++-
 doc/guides/rel_notes/release_19_11.rst        |   7 ++
 drivers/net/bnxt/bnxt_ethdev.c                |   4 +-
 drivers/net/cxgbe/cxgbe.h                     |   3 +-
 drivers/net/dpaa/dpaa_ethdev.c                |   3 +-
 drivers/net/dpaa2/dpaa2_ethdev.c              |   3 +-
 drivers/net/e1000/igb_rxtx.c                  |   3 +-
 drivers/net/enic/enic_res.c                   |   4 +-
 drivers/net/fm10k/fm10k_ethdev.c              |   3 +-
 drivers/net/hinic/hinic_pmd_ethdev.c          |   3 +-
 drivers/net/i40e/i40e_ethdev.c                |   4 +-
 drivers/net/iavf/iavf_ethdev.c                |   4 +-
 drivers/net/ice/ice_ethdev.c                  |   4 +-
 drivers/net/ixgbe/ixgbe_rxtx.c                |   4 +-
 drivers/net/liquidio/lio_ethdev.c             |   3 +-
 drivers/net/mlx4/mlx4_rxq.c                   |   3 +-
 drivers/net/mlx5/mlx5_rxq.c                   |   4 +-
 drivers/net/netvsc/hn_rndis.c                 |   3 +-
 drivers/net/nfp/nfp_net.c                     |   3 +-
 drivers/net/octeontx2/otx2_ethdev.c           |   3 +-
 drivers/net/octeontx2/otx2_ethdev.h           |  16 +--
 drivers/net/octeontx2/otx2_flow_parse.c       |   3 +-
 drivers/net/qede/qede_ethdev.c                |   3 +-
 drivers/net/sfc/sfc_ef10_essb_rx.c            |   3 +-
 drivers/net/sfc/sfc_ef10_rx.c                 |   3 +-
 drivers/net/sfc/sfc_rx.c                      |   4 +-
 drivers/net/thunderx/nicvf_ethdev.h           |   3 +-
 drivers/net/vmxnet3/vmxnet3_ethdev.c          |   3 +-
 examples/bbdev_app/main.c                     |   1 +
 examples/bond/main.c                          |   2 +
 examples/distributor/Makefile                 |   1 +
 examples/distributor/main.c                   |   1 +
 examples/eventdev_pipeline/main.c             | 114 +----------------
 .../pipeline_worker_generic.c                 | 118 ++++++++++++++++++
 .../eventdev_pipeline/pipeline_worker_tx.c    | 114 +++++++++++++++++
 examples/exception_path/Makefile              |   1 +
 examples/exception_path/main.c                |   1 +
 examples/flow_classify/flow_classify.c        |   1 +
 examples/flow_filtering/Makefile              |   1 +
 examples/flow_filtering/main.c                |   1 +
 examples/ip_pipeline/link.c                   |   1 +
 examples/ip_reassembly/Makefile               |   1 +
 examples/ip_reassembly/main.c                 |   1 +
 examples/ipsec-secgw/ipsec-secgw.c            |   1 +
 examples/ipv4_multicast/Makefile              |   1 +
 examples/ipv4_multicast/main.c                |   1 +
 examples/kni/main.c                           |   1 +
 examples/l2fwd-cat/Makefile                   |   1 +
 examples/l2fwd-cat/l2fwd-cat.c                |   1 +
 examples/l2fwd-crypto/main.c                  |   1 +
 examples/l2fwd-jobstats/Makefile              |   1 +
 examples/l2fwd-jobstats/main.c                |   1 +
 examples/l2fwd-keepalive/Makefile             |   1 +
 examples/l2fwd-keepalive/main.c               |   1 +
 examples/l2fwd/Makefile                       |   1 +
 examples/l2fwd/main.c                         |   1 +
 examples/l3fwd-acl/Makefile                   |   1 +
 examples/l3fwd-acl/main.c                     |   1 +
 examples/l3fwd-power/main.c                   |   1 +
 examples/l3fwd-vf/Makefile                    |   1 +
 examples/l3fwd-vf/main.c                      |   1 +
 examples/link_status_interrupt/Makefile       |   1 +
 examples/link_status_interrupt/main.c         |   1 +
 examples/load_balancer/Makefile               |   1 +
 examples/load_balancer/init.c                 |   1 +
 examples/packet_ordering/Makefile             |   1 +
 examples/packet_ordering/main.c               |   1 +
 examples/ptpclient/Makefile                   |   1 +
 examples/ptpclient/ptpclient.c                |   1 +
 examples/qos_meter/Makefile                   |   1 +
 examples/qos_meter/main.c                     |   2 +
 examples/qos_sched/Makefile                   |   1 +
 examples/qos_sched/init.c                     |   1 +
 examples/quota_watermark/qw/Makefile          |   1 +
 examples/quota_watermark/qw/init.c            |   1 +
 examples/rxtx_callbacks/main.c                |   1 +
 examples/server_node_efd/server/Makefile      |   1 +
 examples/server_node_efd/server/init.c        |   1 +
 examples/skeleton/Makefile                    |   1 +
 examples/skeleton/basicfwd.c                  |   1 +
 examples/tep_termination/Makefile             |   1 +
 examples/tep_termination/vxlan_setup.c        |   1 +
 examples/vhost/Makefile                       |   1 +
 examples/vhost/main.c                         |   1 +
 examples/vm_power_manager/Makefile            |   1 +
 examples/vm_power_manager/main.c              |   1 +
 examples/vmdq/Makefile                        |   1 +
 examples/vmdq/main.c                          |   1 +
 examples/vmdq_dcb/Makefile                    |   1 +
 examples/vmdq_dcb/main.c                      |   1 +
 lib/librte_ethdev/rte_ethdev.c                |  34 +++++
 lib/librte_ethdev/rte_ethdev.h                |  17 +++
 lib/librte_ethdev/rte_ethdev_core.h           |   6 +
 lib/librte_ethdev/rte_ethdev_version.map      |   3 +
 lib/librte_ethdev/rte_flow.h                  |   6 +-
 95 files changed, 453 insertions(+), 150 deletions(-)

--
2.22.0


^ permalink raw reply	[flat|nested] 245+ messages in thread

* [dpdk-dev]  [PATCH v2 1/7] ethdev: add set ptype function
  2019-08-21 20:47 [dpdk-dev] [PATCH v2 0/7] ethdev: add new Rx offload flags pbhagavatula
@ 2019-08-21 20:47 ` pbhagavatula
  2019-08-23  9:44   ` Andrew Rybchenko
  2019-10-01 14:54   ` Jerin Jacob
  2019-08-21 20:47 ` [dpdk-dev] [PATCH v2 2/7] ethdev: add mbuf RSS update as an offload pbhagavatula
                   ` (6 subsequent siblings)
  7 siblings, 2 replies; 245+ messages in thread
From: pbhagavatula @ 2019-08-21 20:47 UTC (permalink / raw)
  To: arybchenko, jerinj, John McNamara, Marko Kovacevic,
	Thomas Monjalon, Ferruh Yigit
  Cc: dev, Pavan Nikhilesh

From: Pavan Nikhilesh <pbhagavatula@marvell.com>

Add `rte_eth_dev_set_supported_ptypes` function that will allow the
application to inform the PMD the packet types it is interested in.
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_supported_ptypes(ethdev_id, RTE_PTYPE_UNKNOWN)` and PMD
will set rte_mbuf::packet_type to 0.

-If application doesn’t call `rte_eth_dev_set_supported_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_supported_ptypes(ethdev_id,
		RTE_PTYPE_L2_MASK | RTE_PTYPE_L3_MASK)`.

Suggested-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
 doc/guides/nics/features.rst             | 12 ++++++---
 doc/guides/rel_notes/release_19_11.rst   |  7 ++++++
 lib/librte_ethdev/rte_ethdev.c           | 32 ++++++++++++++++++++++++
 lib/librte_ethdev/rte_ethdev.h           | 16 ++++++++++++
 lib/librte_ethdev/rte_ethdev_core.h      |  6 +++++
 lib/librte_ethdev/rte_ethdev_version.map |  3 +++
 6 files changed, 72 insertions(+), 4 deletions(-)

diff --git a/doc/guides/nics/features.rst b/doc/guides/nics/features.rst
index c4e128d2f..d4d55f721 100644
--- a/doc/guides/nics/features.rst
+++ b/doc/guides/nics/features.rst
@@ -582,10 +582,14 @@ Supports inner packet L4 checksum.
 Packet type parsing
 -------------------
 
-Supports packet type parsing and returns a list of supported types.
-
-* **[implements] eth_dev_ops**: ``dev_supported_ptypes_get``.
-* **[related]    API**: ``rte_eth_dev_get_supported_ptypes()``.
+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``,
+  ``dev_supported_ptypes_set``.
+* **[related]    API**: ``rte_eth_dev_get_supported_ptypes()``,
+  ``rte_eth_dev_set_supported_ptypes()``.
+* **[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 8490d897c..a7cec1fe8 100644
--- a/doc/guides/rel_notes/release_19_11.rst
+++ b/doc/guides/rel_notes/release_19_11.rst
@@ -56,6 +56,13 @@ New Features
      Also, make sure to start the actual text at the margin.
      =========================================================
 
+* **Added API in ethdev to set supported packet types**
+
+  *  Added new API ``rte_eth_dev_set_supported_ptypes`` that allows an
+     application to request PMD to set specific ptypes defined
+     through ``rte_eth_dev_set_supported_ptypes`` in ``rte_mbuf::packet_type``.
+  *  This scheme will allow PMDs to avoid lookup to internal ptype table on Rx
+     and thereby improve Rx performance if application wishes do so.
 
 Removed Items
 -------------
diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
index 17d183e1f..f529cbe9f 100644
--- a/lib/librte_ethdev/rte_ethdev.c
+++ b/lib/librte_ethdev/rte_ethdev.c
@@ -2602,6 +2602,38 @@ rte_eth_dev_get_supported_ptypes(uint16_t port_id, uint32_t ptype_mask,
 	return j;
 }
 
+uint32_t
+rte_eth_dev_set_supported_ptypes(uint16_t port_id, uint32_t ptype_mask)
+{
+	int i;
+	struct rte_eth_dev *dev;
+	const uint32_t *all_ptypes;
+	uint32_t all_ptype_mask = 0;
+	uint32_t supp_ptype_mask = 0;
+
+	RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
+	dev = &rte_eth_devices[port_id];
+	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_supported_ptypes_get, 0);
+
+	if (ptype_mask == 0) {
+		RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_supported_ptypes_set,
+					0);
+		return (*dev->dev_ops->dev_supported_ptypes_set)(dev,
+				ptype_mask);
+	}
+
+	all_ptypes = (*dev->dev_ops->dev_supported_ptypes_get)(dev);
+	if (all_ptypes == NULL)
+		return 0;
+
+	for (i = 0; all_ptypes[i] != RTE_PTYPE_UNKNOWN; ++i)
+		all_ptype_mask |= all_ptypes[i];
+
+	supp_ptype_mask = all_ptype_mask & ptype_mask;
+
+	return (*dev->dev_ops->dev_supported_ptypes_set)(dev, supp_ptype_mask);
+}
+
 void
 rte_eth_macaddr_get(uint16_t port_id, struct rte_ether_addr *mac_addr)
 {
diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
index dc6596bc9..1ab0af4d8 100644
--- a/lib/librte_ethdev/rte_ethdev.h
+++ b/lib/librte_ethdev/rte_ethdev.h
@@ -2431,6 +2431,22 @@ int rte_eth_dev_fw_version_get(uint16_t port_id,
  */
 int rte_eth_dev_get_supported_ptypes(uint16_t port_id, uint32_t ptype_mask,
 				     uint32_t *ptypes, int num);
+/**
+ * Request Ethernet device to set only specific packet types in the packet.
+ *
+ * Application can use this function to set only specific ptypes that it's
+ * interested. This information can be used by the PMD to optimize Rx path.
+ *
+ * @param port_id
+ *   The port identifier of the Ethernet device.
+ * @param ptype_mask
+ *   The ptype family that application is interested in.
+ * @return
+ *   - (>=0) Ptype mask that has been set successfully.
+ */
+__rte_experimental
+uint32_t rte_eth_dev_set_supported_ptypes(uint16_t port_id,
+					  uint32_t ptype_mask);
 
 /**
  * Retrieve the MTU of an Ethernet device.
diff --git a/lib/librte_ethdev/rte_ethdev_core.h b/lib/librte_ethdev/rte_ethdev_core.h
index 2922d5b7c..e65ae983d 100644
--- a/lib/librte_ethdev/rte_ethdev_core.h
+++ b/lib/librte_ethdev/rte_ethdev_core.h
@@ -110,6 +110,10 @@ typedef void (*eth_dev_infos_get_t)(struct rte_eth_dev *dev,
 typedef const uint32_t *(*eth_dev_supported_ptypes_get_t)(struct rte_eth_dev *dev);
 /**< @internal Get supported ptypes of an Ethernet device. */
 
+typedef uint32_t (*eth_dev_supported_ptypes_set_t)(struct rte_eth_dev *dev,
+					      uint32_t ptype_mask);
+/**< @internal Set required ptypes of an Ethernet device. */
+
 typedef int (*eth_queue_start_t)(struct rte_eth_dev *dev,
 				    uint16_t queue_id);
 /**< @internal Start rx and tx of a queue of an Ethernet device. */
@@ -421,6 +425,8 @@ struct eth_dev_ops {
 	eth_fw_version_get_t       fw_version_get; /**< Get firmware version. */
 	eth_dev_supported_ptypes_get_t dev_supported_ptypes_get;
 	/**< Get packet types supported and identified by device. */
+	eth_dev_supported_ptypes_set_t dev_supported_ptypes_set;
+	/**< Inform device about the interested ptypes. */
 
 	vlan_filter_set_t          vlan_filter_set; /**< Filter VLAN Setup. */
 	vlan_tpid_set_t            vlan_tpid_set; /**< Outer/Inner VLAN TPID Setup. */
diff --git a/lib/librte_ethdev/rte_ethdev_version.map b/lib/librte_ethdev/rte_ethdev_version.map
index 6df42a47b..e14745b9c 100644
--- a/lib/librte_ethdev/rte_ethdev_version.map
+++ b/lib/librte_ethdev/rte_ethdev_version.map
@@ -283,4 +283,7 @@ EXPERIMENTAL {
 
 	# added in 19.08
 	rte_eth_read_clock;
+
+	# added in 19.11
+	rte_eth_dev_set_supported_ptypes;
 };
-- 
2.22.0


^ permalink raw reply	[flat|nested] 245+ messages in thread

* [dpdk-dev] [PATCH v2 2/7] ethdev: add mbuf RSS update as an offload
  2019-08-21 20:47 [dpdk-dev] [PATCH v2 0/7] ethdev: add new Rx offload flags pbhagavatula
  2019-08-21 20:47 ` [dpdk-dev] [PATCH v2 1/7] ethdev: add set ptype function pbhagavatula
@ 2019-08-21 20:47 ` pbhagavatula
  2019-08-23  1:19   ` Stephen Hemminger
  2019-08-23  9:49   ` Andrew Rybchenko
  2019-08-21 20:47 ` [dpdk-dev] [PATCH v2 3/7] ethdev: add flow action type " pbhagavatula
                   ` (5 subsequent siblings)
  7 siblings, 2 replies; 245+ messages in thread
From: pbhagavatula @ 2019-08-21 20:47 UTC (permalink / raw)
  To: arybchenko, jerinj, John McNamara, Marko Kovacevic,
	Thomas Monjalon, Ferruh Yigit
  Cc: dev, Pavan Nikhilesh

From: Pavan Nikhilesh <pbhagavatula@marvell.com>

Add new Rx offload flag `DEV_RX_OFFLOAD_RSS_HASH` which can be used to
enable/disable PMDs write to `rte_mbuf::hash::rss`.
PMDs notify the validity of `rte_mbuf::hash:rss` to the applcation
by enabling `PKT_RX_RSS_HASH ` flag in `rte_mbuf::ol_flags`.

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

diff --git a/doc/guides/nics/features.rst b/doc/guides/nics/features.rst
index d4d55f721..f79b69b38 100644
--- a/doc/guides/nics/features.rst
+++ b/doc/guides/nics/features.rst
@@ -274,6 +274,7 @@ Supports RSS hashing on RX.
 
 * **[uses]     user config**: ``dev_conf.rxmode.mq_mode`` = ``ETH_MQ_RX_RSS_FLAG``.
 * **[uses]     user config**: ``dev_conf.rx_adv_conf.rss_conf``.
+* **[uses]     rte_eth_rxconf,rte_eth_rxmode**: ``offloads:DEV_RX_OFFLOAD_RSS_HASH``.
 * **[provides] rte_eth_dev_info**: ``flow_type_rss_offloads``.
 * **[provides] mbuf**: ``mbuf.ol_flags:PKT_RX_RSS_HASH``, ``mbuf.rss``.
 
@@ -286,6 +287,7 @@ Inner RSS
 Supports RX RSS hashing on Inner headers.
 
 * **[uses]    rte_flow_action_rss**: ``level``.
+* **[uses]    rte_eth_rxconf,rte_eth_rxmode**: ``offloads:DEV_RX_OFFLOAD_RSS_HASH``.
 * **[provides] mbuf**: ``mbuf.ol_flags:PKT_RX_RSS_HASH``, ``mbuf.rss``.
 
 
diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
index f529cbe9f..9c5517d5f 100644
--- a/lib/librte_ethdev/rte_ethdev.c
+++ b/lib/librte_ethdev/rte_ethdev.c
@@ -129,6 +129,7 @@ static const struct {
 	RTE_RX_OFFLOAD_BIT2STR(KEEP_CRC),
 	RTE_RX_OFFLOAD_BIT2STR(SCTP_CKSUM),
 	RTE_RX_OFFLOAD_BIT2STR(OUTER_UDP_CKSUM),
+	RTE_RX_OFFLOAD_BIT2STR(RSS_HASH),
 };
 
 #undef RTE_RX_OFFLOAD_BIT2STR
diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
index 1ab0af4d8..836b30074 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_RSS_HASH		0x00080000
 
 #define DEV_RX_OFFLOAD_CHECKSUM (DEV_RX_OFFLOAD_IPV4_CKSUM | \
 				 DEV_RX_OFFLOAD_UDP_CKSUM | \
-- 
2.22.0


^ permalink raw reply	[flat|nested] 245+ messages in thread

* [dpdk-dev] [PATCH v2 3/7] ethdev: add flow action type update as an offload
  2019-08-21 20:47 [dpdk-dev] [PATCH v2 0/7] ethdev: add new Rx offload flags pbhagavatula
  2019-08-21 20:47 ` [dpdk-dev] [PATCH v2 1/7] ethdev: add set ptype function pbhagavatula
  2019-08-21 20:47 ` [dpdk-dev] [PATCH v2 2/7] ethdev: add mbuf RSS update as an offload pbhagavatula
@ 2019-08-21 20:47 ` " pbhagavatula
  2019-08-23 10:00   ` Andrew Rybchenko
  2019-08-21 20:47 ` [dpdk-dev] [PATCH v2 4/7] drivers/net: update Rx RSS hash offload capabilities pbhagavatula
                   ` (4 subsequent siblings)
  7 siblings, 1 reply; 245+ messages in thread
From: pbhagavatula @ 2019-08-21 20:47 UTC (permalink / raw)
  To: arybchenko, jerinj, John McNamara, Marko Kovacevic,
	Thomas Monjalon, Ferruh Yigit, Adrien Mazarguil
  Cc: dev, Pavan Nikhilesh

From: Pavan Nikhilesh <pbhagavatula@marvell.com>

Add new Rx offload flag `DEV_RX_OFFLOAD_FLOW_MARK` that can be used to
enable/disable PMDs write to `rte_mbuf::hash::fdir::hi` and
`rte_mbuf::ol_flags` when flow actions `RTE_FLOW_ACTION_MARK` and
`RTE_FLOW_ACTION_FLAG` are enabled.

PMDs notify the validity of `rte_mbuf::hash:fdir::hi` to the applcation
by enabling `PKT_RX_FDIR_ID` flag in `rte_mbuf::ol_flags`.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
 doc/guides/nics/features.rst   | 12 ++++++++++++
 lib/librte_ethdev/rte_ethdev.c |  1 +
 lib/librte_ethdev/rte_ethdev.h |  1 +
 lib/librte_ethdev/rte_flow.h   |  6 ++++--
 4 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/doc/guides/nics/features.rst b/doc/guides/nics/features.rst
index f79b69b38..338b19e03 100644
--- a/doc/guides/nics/features.rst
+++ b/doc/guides/nics/features.rst
@@ -594,6 +594,18 @@ application to set ptypes it is interested in.
 * **[provides]   mbuf**: ``mbuf.packet_type``.
 
 
+.. _nic_features_flow_flag_mark:
+
+Flow flag/mark update
+---------------------
+
+Supports flow action type update to ``mbuf.ol_flags`` and ``mbuf.hash.fdir.hi``.
+
+* **[uses]     rte_eth_rxconf,rte_eth_rxmode**: ``offloads:DEV_RX_OFFLOAD_FLOW_MARK``.
+* **[provides] mbuf**: ``mbuf.ol_flags:PKT_RX_FDIR``, ``mbuf.ol_flags:PKT_RX_FDIR_ID;``,
+  ``mbuf.hash.fdir.hi``
+
+
 .. _nic_features_timesync:
 
 Timesync
diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
index 9c5517d5f..bcbe06c5c 100644
--- a/lib/librte_ethdev/rte_ethdev.c
+++ b/lib/librte_ethdev/rte_ethdev.c
@@ -130,6 +130,7 @@ static const struct {
 	RTE_RX_OFFLOAD_BIT2STR(SCTP_CKSUM),
 	RTE_RX_OFFLOAD_BIT2STR(OUTER_UDP_CKSUM),
 	RTE_RX_OFFLOAD_BIT2STR(RSS_HASH),
+	RTE_RX_OFFLOAD_BIT2STR(FLOW_MARK),
 };
 
 #undef RTE_RX_OFFLOAD_BIT2STR
diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
index 836b30074..44686ec21 100644
--- a/lib/librte_ethdev/rte_ethdev.h
+++ b/lib/librte_ethdev/rte_ethdev.h
@@ -1014,6 +1014,7 @@ struct rte_eth_conf {
 #define DEV_RX_OFFLOAD_SCTP_CKSUM	0x00020000
 #define DEV_RX_OFFLOAD_OUTER_UDP_CKSUM  0x00040000
 #define DEV_RX_OFFLOAD_RSS_HASH		0x00080000
+#define DEV_RX_OFFLOAD_FLOW_MARK	0x00100000
 
 #define DEV_RX_OFFLOAD_CHECKSUM (DEV_RX_OFFLOAD_IPV4_CKSUM | \
 				 DEV_RX_OFFLOAD_UDP_CKSUM | \
diff --git a/lib/librte_ethdev/rte_flow.h b/lib/librte_ethdev/rte_flow.h
index b66bf1495..5d9d88d76 100644
--- a/lib/librte_ethdev/rte_flow.h
+++ b/lib/librte_ethdev/rte_flow.h
@@ -1316,7 +1316,8 @@ enum rte_flow_action_type {
 
 	/**
 	 * Attaches an integer value to packets and sets PKT_RX_FDIR and
-	 * PKT_RX_FDIR_ID mbuf flags.
+	 * PKT_RX_FDIR_ID mbuf flags when
+	 * `rx_mode:offloads:DEV_RX_OFFLOAD_FLOW_MARK` is set.
 	 *
 	 * See struct rte_flow_action_mark.
 	 */
@@ -1324,7 +1325,8 @@ enum rte_flow_action_type {
 
 	/**
 	 * Flags packets. Similar to MARK without a specific value; only
-	 * sets the PKT_RX_FDIR mbuf flag.
+	 * sets the PKT_RX_FDIR mbuf flag when
+	 * `rx_mode:offloads:DEV_RX_OFFLOAD_FLOW_MARK` is set
 	 *
 	 * No associated configuration structure.
 	 */
-- 
2.22.0


^ permalink raw reply	[flat|nested] 245+ messages in thread

* [dpdk-dev] [PATCH v2 4/7] drivers/net: update Rx RSS hash offload capabilities
  2019-08-21 20:47 [dpdk-dev] [PATCH v2 0/7] ethdev: add new Rx offload flags pbhagavatula
                   ` (2 preceding siblings ...)
  2019-08-21 20:47 ` [dpdk-dev] [PATCH v2 3/7] ethdev: add flow action type " pbhagavatula
@ 2019-08-21 20:47 ` pbhagavatula
  2019-10-01 14:43   ` Jerin Jacob
  2019-10-01 15:40   ` Ajit Khaparde
  2019-08-21 20:47 ` [dpdk-dev] [PATCH v2 5/7] drivers/net: update Rx flow flag and mark capabilities pbhagavatula
                   ` (3 subsequent siblings)
  7 siblings, 2 replies; 245+ messages in thread
From: pbhagavatula @ 2019-08-21 20:47 UTC (permalink / raw)
  To: arybchenko, jerinj, Ajit Khaparde, Somnath Kotur,
	Rahul Lakkireddy, Hemant Agrawal, Sachin Saxena, Wenzhuo Lu,
	John Daley, Hyong Youb Kim, Qi Zhang, Xiao Wang, Ziyang Xuan,
	Xiaoyun Wang, Guoyang Zhou, Beilei Xing, Jingjing Wu,
	Qiming Yang, Konstantin Ananyev, Shijith Thotton,
	Srisivasubramanian Srinivasan, Matan Azrad, Shahaf Shuler,
	Yongseok Koh, Viacheslav Ovsiienko, Stephen Hemminger,
	K. Y. Srinivasan, Haiyang Zhang, Alejandro Lucero,
	Nithin Dabilpuram, Kiran Kumar K, Rasesh Mody, Shahed Shaikh,
	Maciej Czekaj, Yong Wang
  Cc: dev, Pavan Nikhilesh

From: Pavan Nikhilesh <pbhagavatula@marvell.com>

Add DEV_RX_OFFLOAD_RSS_HASH flag for all PMDs that support RSS hash
delivery.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
 drivers/net/bnxt/bnxt_ethdev.c       |  3 ++-
 drivers/net/cxgbe/cxgbe.h            |  3 ++-
 drivers/net/dpaa/dpaa_ethdev.c       |  3 ++-
 drivers/net/dpaa2/dpaa2_ethdev.c     |  3 ++-
 drivers/net/e1000/igb_rxtx.c         |  3 ++-
 drivers/net/enic/enic_res.c          |  3 ++-
 drivers/net/fm10k/fm10k_ethdev.c     |  3 ++-
 drivers/net/hinic/hinic_pmd_ethdev.c |  3 ++-
 drivers/net/i40e/i40e_ethdev.c       |  3 ++-
 drivers/net/iavf/iavf_ethdev.c       |  3 ++-
 drivers/net/ice/ice_ethdev.c         |  3 ++-
 drivers/net/ixgbe/ixgbe_rxtx.c       |  3 ++-
 drivers/net/liquidio/lio_ethdev.c    |  3 ++-
 drivers/net/mlx4/mlx4_rxq.c          |  3 ++-
 drivers/net/mlx5/mlx5_rxq.c          |  3 ++-
 drivers/net/netvsc/hn_rndis.c        |  3 ++-
 drivers/net/nfp/nfp_net.c            |  3 ++-
 drivers/net/octeontx2/otx2_ethdev.c  |  3 ++-
 drivers/net/octeontx2/otx2_ethdev.h  | 15 ++++++++-------
 drivers/net/qede/qede_ethdev.c       |  3 ++-
 drivers/net/sfc/sfc_ef10_essb_rx.c   |  2 +-
 drivers/net/sfc/sfc_ef10_rx.c        |  3 ++-
 drivers/net/sfc/sfc_rx.c             |  3 ++-
 drivers/net/thunderx/nicvf_ethdev.h  |  3 ++-
 drivers/net/vmxnet3/vmxnet3_ethdev.c |  3 ++-
 25 files changed, 55 insertions(+), 31 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 6685ee7d9..6c106baf7 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -160,7 +160,8 @@ static const struct rte_pci_id bnxt_pci_id_map[] = {
 				     DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM | \
 				     DEV_RX_OFFLOAD_JUMBO_FRAME | \
 				     DEV_RX_OFFLOAD_KEEP_CRC | \
-				     DEV_RX_OFFLOAD_TCP_LRO)
+				     DEV_RX_OFFLOAD_TCP_LRO | \
+				     DEV_RX_OFFLOAD_RSS_HASH)
 
 static int bnxt_vlan_offload_set_op(struct rte_eth_dev *dev, int mask);
 static void bnxt_print_link_info(struct rte_eth_dev *eth_dev);
diff --git a/drivers/net/cxgbe/cxgbe.h b/drivers/net/cxgbe/cxgbe.h
index 3f97fa58b..22e61a55c 100644
--- a/drivers/net/cxgbe/cxgbe.h
+++ b/drivers/net/cxgbe/cxgbe.h
@@ -47,7 +47,8 @@
 			   DEV_RX_OFFLOAD_UDP_CKSUM | \
 			   DEV_RX_OFFLOAD_TCP_CKSUM | \
 			   DEV_RX_OFFLOAD_JUMBO_FRAME | \
-			   DEV_RX_OFFLOAD_SCATTER)
+			   DEV_RX_OFFLOAD_SCATTER | \
+			   DEV_RX_OFFLOAD_RSS_HASH)
 
 
 #define CXGBE_DEVARG_KEEP_OVLAN "keep_ovlan"
diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
index 7154fb9b4..18c7bd0d5 100644
--- a/drivers/net/dpaa/dpaa_ethdev.c
+++ b/drivers/net/dpaa/dpaa_ethdev.c
@@ -49,7 +49,8 @@
 /* Supported Rx offloads */
 static uint64_t dev_rx_offloads_sup =
 		DEV_RX_OFFLOAD_JUMBO_FRAME |
-		DEV_RX_OFFLOAD_SCATTER;
+		DEV_RX_OFFLOAD_SCATTER |
+		DEV_RX_OFFLOAD_RSS_HASH;
 
 /* Rx offloads which cannot be disabled */
 static uint64_t dev_rx_offloads_nodis =
diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c
index dd6a78f9f..55a1c4455 100644
--- a/drivers/net/dpaa2/dpaa2_ethdev.c
+++ b/drivers/net/dpaa2/dpaa2_ethdev.c
@@ -38,7 +38,8 @@ static uint64_t dev_rx_offloads_sup =
 		DEV_RX_OFFLOAD_TCP_CKSUM |
 		DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM |
 		DEV_RX_OFFLOAD_VLAN_FILTER |
-		DEV_RX_OFFLOAD_JUMBO_FRAME;
+		DEV_RX_OFFLOAD_JUMBO_FRAME |
+		DEV_RX_OFFLOAD_RSS_HASH;
 
 /* Rx offloads which cannot be disabled */
 static uint64_t dev_rx_offloads_nodis =
diff --git a/drivers/net/e1000/igb_rxtx.c b/drivers/net/e1000/igb_rxtx.c
index c5606de5d..684fa4ad8 100644
--- a/drivers/net/e1000/igb_rxtx.c
+++ b/drivers/net/e1000/igb_rxtx.c
@@ -1646,7 +1646,8 @@ igb_get_rx_port_offloads_capa(struct rte_eth_dev *dev)
 			  DEV_RX_OFFLOAD_TCP_CKSUM   |
 			  DEV_RX_OFFLOAD_JUMBO_FRAME |
 			  DEV_RX_OFFLOAD_KEEP_CRC    |
-			  DEV_RX_OFFLOAD_SCATTER;
+			  DEV_RX_OFFLOAD_SCATTER     |
+			  DEV_RX_OFFLOAD_RSS_HASH;
 
 	return rx_offload_capa;
 }
diff --git a/drivers/net/enic/enic_res.c b/drivers/net/enic/enic_res.c
index 9405e1933..607a085f8 100644
--- a/drivers/net/enic/enic_res.c
+++ b/drivers/net/enic/enic_res.c
@@ -198,7 +198,8 @@ int enic_get_vnic_config(struct enic *enic)
 		DEV_RX_OFFLOAD_VLAN_STRIP |
 		DEV_RX_OFFLOAD_IPV4_CKSUM |
 		DEV_RX_OFFLOAD_UDP_CKSUM |
-		DEV_RX_OFFLOAD_TCP_CKSUM;
+		DEV_RX_OFFLOAD_TCP_CKSUM |
+		DEV_RX_OFFLOAD_RSS_HASH;
 	enic->tx_offload_mask =
 		PKT_TX_IPV6 |
 		PKT_TX_IPV4 |
diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c
index db4d72129..ba9b174cf 100644
--- a/drivers/net/fm10k/fm10k_ethdev.c
+++ b/drivers/net/fm10k/fm10k_ethdev.c
@@ -1797,7 +1797,8 @@ static uint64_t fm10k_get_rx_port_offloads_capa(struct rte_eth_dev *dev)
 			   DEV_RX_OFFLOAD_UDP_CKSUM   |
 			   DEV_RX_OFFLOAD_TCP_CKSUM   |
 			   DEV_RX_OFFLOAD_JUMBO_FRAME |
-			   DEV_RX_OFFLOAD_HEADER_SPLIT);
+			   DEV_RX_OFFLOAD_HEADER_SPLIT |
+			   DEV_RX_OFFLOAD_RSS_HASH);
 }
 
 static int
diff --git a/drivers/net/hinic/hinic_pmd_ethdev.c b/drivers/net/hinic/hinic_pmd_ethdev.c
index 044af9053..53bd2b9ae 100644
--- a/drivers/net/hinic/hinic_pmd_ethdev.c
+++ b/drivers/net/hinic/hinic_pmd_ethdev.c
@@ -680,7 +680,8 @@ hinic_dev_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *info)
 	info->rx_offload_capa = DEV_RX_OFFLOAD_VLAN_STRIP |
 				DEV_RX_OFFLOAD_IPV4_CKSUM |
 				DEV_RX_OFFLOAD_UDP_CKSUM |
-				DEV_RX_OFFLOAD_TCP_CKSUM;
+				DEV_RX_OFFLOAD_TCP_CKSUM |
+				DEV_RX_OFFLOAD_RSS_HASH;
 
 	info->tx_queue_offload_capa = 0;
 	info->tx_offload_capa = DEV_TX_OFFLOAD_VLAN_INSERT |
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 4e40b7ab5..7058e0213 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -3511,7 +3511,8 @@ i40e_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 		DEV_RX_OFFLOAD_SCATTER |
 		DEV_RX_OFFLOAD_VLAN_EXTEND |
 		DEV_RX_OFFLOAD_VLAN_FILTER |
-		DEV_RX_OFFLOAD_JUMBO_FRAME;
+		DEV_RX_OFFLOAD_JUMBO_FRAME |
+		DEV_RX_OFFLOAD_RSS_HASH;
 
 	dev_info->tx_queue_offload_capa = DEV_TX_OFFLOAD_MBUF_FAST_FREE;
 	dev_info->tx_offload_capa =
diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index 8f3907378..aef91a79b 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -517,7 +517,8 @@ iavf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 		DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM |
 		DEV_RX_OFFLOAD_SCATTER |
 		DEV_RX_OFFLOAD_JUMBO_FRAME |
-		DEV_RX_OFFLOAD_VLAN_FILTER;
+		DEV_RX_OFFLOAD_VLAN_FILTER |
+		DEV_RX_OFFLOAD_RSS_HASH;
 	dev_info->tx_offload_capa =
 		DEV_TX_OFFLOAD_VLAN_INSERT |
 		DEV_TX_OFFLOAD_QINQ_INSERT |
diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index 44a14cb8a..fc0f0003f 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -2133,7 +2133,8 @@ ice_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 			DEV_RX_OFFLOAD_TCP_CKSUM |
 			DEV_RX_OFFLOAD_QINQ_STRIP |
 			DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM |
-			DEV_RX_OFFLOAD_VLAN_EXTEND;
+			DEV_RX_OFFLOAD_VLAN_EXTEND |
+			DEV_RX_OFFLOAD_RSS_HASH;
 		dev_info->tx_offload_capa |=
 			DEV_TX_OFFLOAD_QINQ_INSERT |
 			DEV_TX_OFFLOAD_IPV4_CKSUM |
diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c
index edcfa60ce..fa572d184 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx.c
@@ -2872,7 +2872,8 @@ ixgbe_get_rx_port_offloads(struct rte_eth_dev *dev)
 		   DEV_RX_OFFLOAD_KEEP_CRC    |
 		   DEV_RX_OFFLOAD_JUMBO_FRAME |
 		   DEV_RX_OFFLOAD_VLAN_FILTER |
-		   DEV_RX_OFFLOAD_SCATTER;
+		   DEV_RX_OFFLOAD_SCATTER |
+		   DEV_RX_OFFLOAD_RSS_HASH;
 
 	if (hw->mac.type == ixgbe_mac_82598EB)
 		offloads |= DEV_RX_OFFLOAD_VLAN_STRIP;
diff --git a/drivers/net/liquidio/lio_ethdev.c b/drivers/net/liquidio/lio_ethdev.c
index c25dab00c..ff118586e 100644
--- a/drivers/net/liquidio/lio_ethdev.c
+++ b/drivers/net/liquidio/lio_ethdev.c
@@ -406,7 +406,8 @@ lio_dev_info_get(struct rte_eth_dev *eth_dev,
 	devinfo->rx_offload_capa = (DEV_RX_OFFLOAD_IPV4_CKSUM		|
 				    DEV_RX_OFFLOAD_UDP_CKSUM		|
 				    DEV_RX_OFFLOAD_TCP_CKSUM		|
-				    DEV_RX_OFFLOAD_VLAN_STRIP);
+				    DEV_RX_OFFLOAD_VLAN_STRIP		|
+				    DEV_RX_OFFLOAD_RSS_HASH);
 	devinfo->tx_offload_capa = (DEV_TX_OFFLOAD_IPV4_CKSUM		|
 				    DEV_TX_OFFLOAD_UDP_CKSUM		|
 				    DEV_TX_OFFLOAD_TCP_CKSUM		|
diff --git a/drivers/net/mlx4/mlx4_rxq.c b/drivers/net/mlx4/mlx4_rxq.c
index f45c1ff85..4a6fbd922 100644
--- a/drivers/net/mlx4/mlx4_rxq.c
+++ b/drivers/net/mlx4/mlx4_rxq.c
@@ -685,7 +685,8 @@ mlx4_get_rx_queue_offloads(struct mlx4_priv *priv)
 {
 	uint64_t offloads = DEV_RX_OFFLOAD_SCATTER |
 			    DEV_RX_OFFLOAD_KEEP_CRC |
-			    DEV_RX_OFFLOAD_JUMBO_FRAME;
+			    DEV_RX_OFFLOAD_JUMBO_FRAME |
+			    DEV_RX_OFFLOAD_RSS_HASH;
 
 	if (priv->hw_csum)
 		offloads |= DEV_RX_OFFLOAD_CHECKSUM;
diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
index a1fdeef2a..b5fd57693 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -368,7 +368,8 @@ mlx5_get_rx_queue_offloads(struct rte_eth_dev *dev)
 	struct mlx5_dev_config *config = &priv->config;
 	uint64_t offloads = (DEV_RX_OFFLOAD_SCATTER |
 			     DEV_RX_OFFLOAD_TIMESTAMP |
-			     DEV_RX_OFFLOAD_JUMBO_FRAME);
+			     DEV_RX_OFFLOAD_JUMBO_FRAME |
+			     DEV_RX_OFFLOAD_RSS_HASH);
 
 	if (config->hw_fcs_strip)
 		offloads |= DEV_RX_OFFLOAD_KEEP_CRC;
diff --git a/drivers/net/netvsc/hn_rndis.c b/drivers/net/netvsc/hn_rndis.c
index a67bc7a79..2b4714042 100644
--- a/drivers/net/netvsc/hn_rndis.c
+++ b/drivers/net/netvsc/hn_rndis.c
@@ -897,7 +897,8 @@ int hn_rndis_get_offload(struct hn_data *hv,
 	    == HN_NDIS_LSOV2_CAP_IP6)
 		dev_info->tx_offload_capa |= DEV_TX_OFFLOAD_TCP_TSO;
 
-	dev_info->rx_offload_capa = DEV_RX_OFFLOAD_VLAN_STRIP;
+	dev_info->rx_offload_capa = DEV_RX_OFFLOAD_VLAN_STRIP |
+				    DEV_RX_OFFLOAD_RSS_HASH;
 
 	if (hwcaps.ndis_csum.ndis_ip4_rxcsum & NDIS_RXCSUM_CAP_IP4)
 		dev_info->rx_offload_capa |= DEV_RX_OFFLOAD_IPV4_CKSUM;
diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
index f1a3ef2f9..230d64c8a 100644
--- a/drivers/net/nfp/nfp_net.c
+++ b/drivers/net/nfp/nfp_net.c
@@ -1226,7 +1226,8 @@ nfp_net_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 					     DEV_RX_OFFLOAD_UDP_CKSUM |
 					     DEV_RX_OFFLOAD_TCP_CKSUM;
 
-	dev_info->rx_offload_capa |= DEV_RX_OFFLOAD_JUMBO_FRAME;
+	dev_info->rx_offload_capa |= DEV_RX_OFFLOAD_JUMBO_FRAME |
+				     DEV_RX_OFFLOAD_RSS_HASH;
 
 	if (hw->cap & NFP_NET_CFG_CTRL_TXVLAN)
 		dev_info->tx_offload_capa = DEV_TX_OFFLOAD_VLAN_INSERT;
diff --git a/drivers/net/octeontx2/otx2_ethdev.c b/drivers/net/octeontx2/otx2_ethdev.c
index b84128fef..2e88d1844 100644
--- a/drivers/net/octeontx2/otx2_ethdev.c
+++ b/drivers/net/octeontx2/otx2_ethdev.c
@@ -569,7 +569,8 @@ nix_rx_offload_flags(struct rte_eth_dev *eth_dev)
 	struct rte_eth_rxmode *rxmode = &conf->rxmode;
 	uint16_t flags = 0;
 
-	if (rxmode->mq_mode == ETH_MQ_RX_RSS)
+	if (rxmode->mq_mode == ETH_MQ_RX_RSS &&
+			(dev->rx_offloads & DEV_RX_OFFLOAD_RSS_HASH))
 		flags |= NIX_RX_OFFLOAD_RSS_F;
 
 	if (dev->rx_offloads & (DEV_RX_OFFLOAD_TCP_CKSUM |
diff --git a/drivers/net/octeontx2/otx2_ethdev.h b/drivers/net/octeontx2/otx2_ethdev.h
index 7b15d6bc8..0cca6746d 100644
--- a/drivers/net/octeontx2/otx2_ethdev.h
+++ b/drivers/net/octeontx2/otx2_ethdev.h
@@ -122,8 +122,8 @@
 	DEV_TX_OFFLOAD_MT_LOCKFREE	| \
 	DEV_TX_OFFLOAD_VLAN_INSERT	| \
 	DEV_TX_OFFLOAD_QINQ_INSERT	| \
-	DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM | \
-	DEV_TX_OFFLOAD_OUTER_UDP_CKSUM  | \
+	DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM	| \
+	DEV_TX_OFFLOAD_OUTER_UDP_CKSUM	| \
 	DEV_TX_OFFLOAD_TCP_CKSUM	| \
 	DEV_TX_OFFLOAD_UDP_CKSUM	| \
 	DEV_TX_OFFLOAD_SCTP_CKSUM	| \
@@ -136,11 +136,12 @@
 	DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM | \
 	DEV_RX_OFFLOAD_SCATTER		| \
 	DEV_RX_OFFLOAD_JUMBO_FRAME	| \
-	DEV_RX_OFFLOAD_OUTER_UDP_CKSUM | \
-	DEV_RX_OFFLOAD_VLAN_STRIP | \
-	DEV_RX_OFFLOAD_VLAN_FILTER | \
-	DEV_RX_OFFLOAD_QINQ_STRIP | \
-	DEV_RX_OFFLOAD_TIMESTAMP)
+	DEV_RX_OFFLOAD_OUTER_UDP_CKSUM	| \
+	DEV_RX_OFFLOAD_VLAN_STRIP	| \
+	DEV_RX_OFFLOAD_VLAN_FILTER	| \
+	DEV_RX_OFFLOAD_QINQ_STRIP	| \
+	DEV_RX_OFFLOAD_TIMESTAMP	| \
+	DEV_RX_OFFLOAD_RSS_HASH)
 
 #define NIX_DEFAULT_RSS_CTX_GROUP  0
 #define NIX_DEFAULT_RSS_MCAM_IDX  -1
diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index 528b33e8c..da25b26df 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -1291,7 +1291,8 @@ qede_dev_info_get(struct rte_eth_dev *eth_dev,
 				     DEV_RX_OFFLOAD_SCATTER	|
 				     DEV_RX_OFFLOAD_JUMBO_FRAME |
 				     DEV_RX_OFFLOAD_VLAN_FILTER |
-				     DEV_RX_OFFLOAD_VLAN_STRIP);
+				     DEV_RX_OFFLOAD_VLAN_STRIP  |
+				     DEV_RX_OFFLOAD_RSS_HASH);
 	dev_info->rx_queue_offload_capa = 0;
 
 	/* TX offloads are on a per-packet basis, so it is applicable
diff --git a/drivers/net/sfc/sfc_ef10_essb_rx.c b/drivers/net/sfc/sfc_ef10_essb_rx.c
index 63da807ea..220ef0e47 100644
--- a/drivers/net/sfc/sfc_ef10_essb_rx.c
+++ b/drivers/net/sfc/sfc_ef10_essb_rx.c
@@ -716,7 +716,7 @@ struct sfc_dp_rx sfc_ef10_essb_rx = {
 	.features		= SFC_DP_RX_FEAT_FLOW_FLAG |
 				  SFC_DP_RX_FEAT_FLOW_MARK,
 	.dev_offload_capa	= DEV_RX_OFFLOAD_CHECKSUM,
-	.queue_offload_capa	= 0,
+	.queue_offload_capa	= DEV_RX_OFFLOAD_RSS_HASH,
 	.get_dev_info		= sfc_ef10_essb_rx_get_dev_info,
 	.pool_ops_supported	= sfc_ef10_essb_rx_pool_ops_supported,
 	.qsize_up_rings		= sfc_ef10_essb_rx_qsize_up_rings,
diff --git a/drivers/net/sfc/sfc_ef10_rx.c b/drivers/net/sfc/sfc_ef10_rx.c
index f2fc6e70a..85b5df466 100644
--- a/drivers/net/sfc/sfc_ef10_rx.c
+++ b/drivers/net/sfc/sfc_ef10_rx.c
@@ -797,7 +797,8 @@ struct sfc_dp_rx sfc_ef10_rx = {
 				  SFC_DP_RX_FEAT_INTR,
 	.dev_offload_capa	= DEV_RX_OFFLOAD_CHECKSUM |
 				  DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM,
-	.queue_offload_capa	= DEV_RX_OFFLOAD_SCATTER,
+	.queue_offload_capa	= DEV_RX_OFFLOAD_SCATTER |
+				  DEV_RX_OFFLOAD_RSS_HASH,
 	.get_dev_info		= sfc_ef10_rx_get_dev_info,
 	.qsize_up_rings		= sfc_ef10_rx_qsize_up_rings,
 	.qcreate		= sfc_ef10_rx_qcreate,
diff --git a/drivers/net/sfc/sfc_rx.c b/drivers/net/sfc/sfc_rx.c
index e6809bb64..695580b22 100644
--- a/drivers/net/sfc/sfc_rx.c
+++ b/drivers/net/sfc/sfc_rx.c
@@ -618,7 +618,8 @@ struct sfc_dp_rx sfc_efx_rx = {
 	},
 	.features		= SFC_DP_RX_FEAT_INTR,
 	.dev_offload_capa	= DEV_RX_OFFLOAD_CHECKSUM,
-	.queue_offload_capa	= DEV_RX_OFFLOAD_SCATTER,
+	.queue_offload_capa	= DEV_RX_OFFLOAD_SCATTER |
+				  DEV_RX_OFFLOAD_RSS_HASH,
 	.qsize_up_rings		= sfc_efx_rx_qsize_up_rings,
 	.qcreate		= sfc_efx_rx_qcreate,
 	.qdestroy		= sfc_efx_rx_qdestroy,
diff --git a/drivers/net/thunderx/nicvf_ethdev.h b/drivers/net/thunderx/nicvf_ethdev.h
index c0bfbf848..391411799 100644
--- a/drivers/net/thunderx/nicvf_ethdev.h
+++ b/drivers/net/thunderx/nicvf_ethdev.h
@@ -41,7 +41,8 @@
 	DEV_RX_OFFLOAD_CHECKSUM    | \
 	DEV_RX_OFFLOAD_VLAN_STRIP  | \
 	DEV_RX_OFFLOAD_JUMBO_FRAME | \
-	DEV_RX_OFFLOAD_SCATTER)
+	DEV_RX_OFFLOAD_SCATTER     | \
+	DEV_RX_OFFLOAD_RSS_HASH)
 
 #define NICVF_DEFAULT_RX_FREE_THRESH    224
 #define NICVF_DEFAULT_TX_FREE_THRESH    224
diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c
index 57feb3773..a1bdf3482 100644
--- a/drivers/net/vmxnet3/vmxnet3_ethdev.c
+++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c
@@ -58,7 +58,8 @@
 	 DEV_RX_OFFLOAD_UDP_CKSUM |	\
 	 DEV_RX_OFFLOAD_TCP_CKSUM |	\
 	 DEV_RX_OFFLOAD_TCP_LRO |	\
-	 DEV_RX_OFFLOAD_JUMBO_FRAME)
+	 DEV_RX_OFFLOAD_JUMBO_FRAME |   \
+	 DEV_RX_OFFLOAD_RSS_HASH)
 
 static int eth_vmxnet3_dev_init(struct rte_eth_dev *eth_dev);
 static int eth_vmxnet3_dev_uninit(struct rte_eth_dev *eth_dev);
-- 
2.22.0


^ permalink raw reply	[flat|nested] 245+ messages in thread

* [dpdk-dev] [PATCH v2 5/7] drivers/net: update Rx flow flag and mark capabilities
  2019-08-21 20:47 [dpdk-dev] [PATCH v2 0/7] ethdev: add new Rx offload flags pbhagavatula
                   ` (3 preceding siblings ...)
  2019-08-21 20:47 ` [dpdk-dev] [PATCH v2 4/7] drivers/net: update Rx RSS hash offload capabilities pbhagavatula
@ 2019-08-21 20:47 ` pbhagavatula
  2019-08-23 10:03   ` Andrew Rybchenko
  2019-10-01 14:48   ` Jerin Jacob
  2019-08-21 20:47 ` [dpdk-dev] [PATCH v2 6/7] examples/eventdev_pipeline: add new Rx RSS hash offload pbhagavatula
                   ` (2 subsequent siblings)
  7 siblings, 2 replies; 245+ messages in thread
From: pbhagavatula @ 2019-08-21 20:47 UTC (permalink / raw)
  To: arybchenko, jerinj, Ajit Khaparde, Somnath Kotur, John Daley,
	Hyong Youb Kim, Beilei Xing, Qi Zhang, Jingjing Wu, Wenzhuo Lu,
	Qiming Yang, Konstantin Ananyev, Shahaf Shuler, Yongseok Koh,
	Viacheslav Ovsiienko, Nithin Dabilpuram, Kiran Kumar K
  Cc: dev, Pavan Nikhilesh

From: Pavan Nikhilesh <pbhagavatula@marvell.com>

Add DEV_RX_OFFLOAD_FLOW_MARK flag for all PMDs that support flow action
flag and mark.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
 drivers/net/bnxt/bnxt_ethdev.c          | 3 ++-
 drivers/net/enic/enic_res.c             | 3 ++-
 drivers/net/i40e/i40e_ethdev.c          | 3 ++-
 drivers/net/iavf/iavf_ethdev.c          | 3 ++-
 drivers/net/ice/ice_ethdev.c            | 3 ++-
 drivers/net/ixgbe/ixgbe_rxtx.c          | 3 ++-
 drivers/net/mlx5/mlx5_rxq.c             | 3 ++-
 drivers/net/octeontx2/otx2_ethdev.h     | 3 ++-
 drivers/net/octeontx2/otx2_flow_parse.c | 3 ++-
 drivers/net/sfc/sfc_ef10_essb_rx.c      | 3 ++-
 drivers/net/sfc/sfc_rx.c                | 3 ++-
 11 files changed, 22 insertions(+), 11 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 6c106baf7..fd1fb7eda 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -161,7 +161,8 @@ static const struct rte_pci_id bnxt_pci_id_map[] = {
 				     DEV_RX_OFFLOAD_JUMBO_FRAME | \
 				     DEV_RX_OFFLOAD_KEEP_CRC | \
 				     DEV_RX_OFFLOAD_TCP_LRO | \
-				     DEV_RX_OFFLOAD_RSS_HASH)
+				     DEV_RX_OFFLOAD_RSS_HASH | \
+				     DEV_RX_OFFLOAD_FLOW_MARK)
 
 static int bnxt_vlan_offload_set_op(struct rte_eth_dev *dev, int mask);
 static void bnxt_print_link_info(struct rte_eth_dev *eth_dev);
diff --git a/drivers/net/enic/enic_res.c b/drivers/net/enic/enic_res.c
index 607a085f8..3503d5d7e 100644
--- a/drivers/net/enic/enic_res.c
+++ b/drivers/net/enic/enic_res.c
@@ -199,7 +199,8 @@ int enic_get_vnic_config(struct enic *enic)
 		DEV_RX_OFFLOAD_IPV4_CKSUM |
 		DEV_RX_OFFLOAD_UDP_CKSUM |
 		DEV_RX_OFFLOAD_TCP_CKSUM |
-		DEV_RX_OFFLOAD_RSS_HASH;
+		DEV_RX_OFFLOAD_RSS_HASH |
+		DEV_RX_OFFLOAD_FLOW_MARK;
 	enic->tx_offload_mask =
 		PKT_TX_IPV6 |
 		PKT_TX_IPV4 |
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 7058e0213..6311943be 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -3512,7 +3512,8 @@ i40e_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 		DEV_RX_OFFLOAD_VLAN_EXTEND |
 		DEV_RX_OFFLOAD_VLAN_FILTER |
 		DEV_RX_OFFLOAD_JUMBO_FRAME |
-		DEV_RX_OFFLOAD_RSS_HASH;
+		DEV_RX_OFFLOAD_RSS_HASH |
+		DEV_RX_OFFLOAD_FLOW_MARK;
 
 	dev_info->tx_queue_offload_capa = DEV_TX_OFFLOAD_MBUF_FAST_FREE;
 	dev_info->tx_offload_capa =
diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index aef91a79b..7bdaa87b1 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -518,7 +518,8 @@ iavf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 		DEV_RX_OFFLOAD_SCATTER |
 		DEV_RX_OFFLOAD_JUMBO_FRAME |
 		DEV_RX_OFFLOAD_VLAN_FILTER |
-		DEV_RX_OFFLOAD_RSS_HASH;
+		DEV_RX_OFFLOAD_RSS_HASH |
+		DEV_RX_OFFLOAD_FLOW_MARK;
 	dev_info->tx_offload_capa =
 		DEV_TX_OFFLOAD_VLAN_INSERT |
 		DEV_TX_OFFLOAD_QINQ_INSERT |
diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index fc0f0003f..8b8d55e4a 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -2134,7 +2134,8 @@ ice_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 			DEV_RX_OFFLOAD_QINQ_STRIP |
 			DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM |
 			DEV_RX_OFFLOAD_VLAN_EXTEND |
-			DEV_RX_OFFLOAD_RSS_HASH;
+			DEV_RX_OFFLOAD_RSS_HASH |
+			DEV_RX_OFFLOAD_FLOW_MARK;
 		dev_info->tx_offload_capa |=
 			DEV_TX_OFFLOAD_QINQ_INSERT |
 			DEV_TX_OFFLOAD_IPV4_CKSUM |
diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c
index fa572d184..1481e2426 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx.c
@@ -2873,7 +2873,8 @@ ixgbe_get_rx_port_offloads(struct rte_eth_dev *dev)
 		   DEV_RX_OFFLOAD_JUMBO_FRAME |
 		   DEV_RX_OFFLOAD_VLAN_FILTER |
 		   DEV_RX_OFFLOAD_SCATTER |
-		   DEV_RX_OFFLOAD_RSS_HASH;
+		   DEV_RX_OFFLOAD_RSS_HASH |
+		   DEV_RX_OFFLOAD_FLOW_MARK;
 
 	if (hw->mac.type == ixgbe_mac_82598EB)
 		offloads |= DEV_RX_OFFLOAD_VLAN_STRIP;
diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
index b5fd57693..1bf01bda3 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -369,7 +369,8 @@ mlx5_get_rx_queue_offloads(struct rte_eth_dev *dev)
 	uint64_t offloads = (DEV_RX_OFFLOAD_SCATTER |
 			     DEV_RX_OFFLOAD_TIMESTAMP |
 			     DEV_RX_OFFLOAD_JUMBO_FRAME |
-			     DEV_RX_OFFLOAD_RSS_HASH);
+			     DEV_RX_OFFLOAD_RSS_HASH |
+			     DEV_RX_OFFLOAD_FLOW_MARK);
 
 	if (config->hw_fcs_strip)
 		offloads |= DEV_RX_OFFLOAD_KEEP_CRC;
diff --git a/drivers/net/octeontx2/otx2_ethdev.h b/drivers/net/octeontx2/otx2_ethdev.h
index 0cca6746d..97c1a636a 100644
--- a/drivers/net/octeontx2/otx2_ethdev.h
+++ b/drivers/net/octeontx2/otx2_ethdev.h
@@ -141,7 +141,8 @@
 	DEV_RX_OFFLOAD_VLAN_FILTER	| \
 	DEV_RX_OFFLOAD_QINQ_STRIP	| \
 	DEV_RX_OFFLOAD_TIMESTAMP	| \
-	DEV_RX_OFFLOAD_RSS_HASH)
+	DEV_RX_OFFLOAD_RSS_HASH		| \
+	DEV_RX_OFFLOAD_FLOW_MARK)
 
 #define NIX_DEFAULT_RSS_CTX_GROUP  0
 #define NIX_DEFAULT_RSS_MCAM_IDX  -1
diff --git a/drivers/net/octeontx2/otx2_flow_parse.c b/drivers/net/octeontx2/otx2_flow_parse.c
index 6670c1a70..6eb69a8b2 100644
--- a/drivers/net/octeontx2/otx2_flow_parse.c
+++ b/drivers/net/octeontx2/otx2_flow_parse.c
@@ -979,7 +979,8 @@ otx2_flow_parse_actions(struct rte_eth_dev *dev,
 	if (mark)
 		flow->npc_action |= (uint64_t)mark << 40;
 
-	if (rte_atomic32_read(&npc->mark_actions) == 1) {
+	if (rte_atomic32_read(&npc->mark_actions) == 1 &&
+			(hw->rx_offloads & DEV_RX_OFFLOAD_FLOW_MARK)) {
 		hw->rx_offload_flags |=
 			NIX_RX_OFFLOAD_MARK_UPDATE_F;
 		otx2_eth_set_rx_function(dev);
diff --git a/drivers/net/sfc/sfc_ef10_essb_rx.c b/drivers/net/sfc/sfc_ef10_essb_rx.c
index 220ef0e47..1887731e2 100644
--- a/drivers/net/sfc/sfc_ef10_essb_rx.c
+++ b/drivers/net/sfc/sfc_ef10_essb_rx.c
@@ -716,7 +716,8 @@ struct sfc_dp_rx sfc_ef10_essb_rx = {
 	.features		= SFC_DP_RX_FEAT_FLOW_FLAG |
 				  SFC_DP_RX_FEAT_FLOW_MARK,
 	.dev_offload_capa	= DEV_RX_OFFLOAD_CHECKSUM,
-	.queue_offload_capa	= DEV_RX_OFFLOAD_RSS_HASH,
+	.queue_offload_capa	= DEV_RX_OFFLOAD_RSS_HASH |
+				  DEV_RX_OFFLOAD_FLOW_MARK,
 	.get_dev_info		= sfc_ef10_essb_rx_get_dev_info,
 	.pool_ops_supported	= sfc_ef10_essb_rx_pool_ops_supported,
 	.qsize_up_rings		= sfc_ef10_essb_rx_qsize_up_rings,
diff --git a/drivers/net/sfc/sfc_rx.c b/drivers/net/sfc/sfc_rx.c
index 695580b22..0f842e9e9 100644
--- a/drivers/net/sfc/sfc_rx.c
+++ b/drivers/net/sfc/sfc_rx.c
@@ -619,7 +619,8 @@ struct sfc_dp_rx sfc_efx_rx = {
 	.features		= SFC_DP_RX_FEAT_INTR,
 	.dev_offload_capa	= DEV_RX_OFFLOAD_CHECKSUM,
 	.queue_offload_capa	= DEV_RX_OFFLOAD_SCATTER |
-				  DEV_RX_OFFLOAD_RSS_HASH,
+				  DEV_RX_OFFLOAD_RSS_HASH |
+				  DEV_RX_OFFLOAD_FLOW_MARK,
 	.qsize_up_rings		= sfc_efx_rx_qsize_up_rings,
 	.qcreate		= sfc_efx_rx_qcreate,
 	.qdestroy		= sfc_efx_rx_qdestroy,
-- 
2.22.0


^ permalink raw reply	[flat|nested] 245+ messages in thread

* [dpdk-dev] [PATCH v2 6/7] examples/eventdev_pipeline: add new Rx RSS hash offload
  2019-08-21 20:47 [dpdk-dev] [PATCH v2 0/7] ethdev: add new Rx offload flags pbhagavatula
                   ` (4 preceding siblings ...)
  2019-08-21 20:47 ` [dpdk-dev] [PATCH v2 5/7] drivers/net: update Rx flow flag and mark capabilities pbhagavatula
@ 2019-08-21 20:47 ` pbhagavatula
  2019-08-21 20:47 ` [dpdk-dev] [PATCH v2 7/7] examples: disable Rx packet type parsing pbhagavatula
  2019-09-29 21:19 ` [dpdk-dev] [PATCH v3 0/7] ethdev: add new Rx offload flags pbhagavatula
  7 siblings, 0 replies; 245+ messages in thread
From: pbhagavatula @ 2019-08-21 20:47 UTC (permalink / raw)
  To: arybchenko, jerinj, Harry van Haaren; +Cc: dev, Pavan Nikhilesh

From: Pavan Nikhilesh <pbhagavatula@marvell.com>

Since pipeline_generic uses `rte_mbuf::hash::rss` add the new Rx offload
flag `DEV_RX_OFFLOAD_RSS_HASH` to inform PMD to copy the RSS hash result
into the mbuf.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
 Currently, there is no means to retrieve set configuration from an ethdev
 without touching the internal structures of `rte_ethdev`. So, moving port
 configuration into specific pipeline models is the only way.

 examples/eventdev_pipeline/main.c             | 113 -----------------
 .../pipeline_worker_generic.c                 | 118 ++++++++++++++++++
 .../eventdev_pipeline/pipeline_worker_tx.c    | 114 +++++++++++++++++
 3 files changed, 232 insertions(+), 113 deletions(-)

diff --git a/examples/eventdev_pipeline/main.c b/examples/eventdev_pipeline/main.c
index f4e57f541..a73b61d59 100644
--- a/examples/eventdev_pipeline/main.c
+++ b/examples/eventdev_pipeline/main.c
@@ -242,118 +242,6 @@ parse_app_args(int argc, char **argv)
 	}
 }

-/*
- * Initializes a given port using global settings and with the RX buffers
- * coming from the mbuf_pool passed as a parameter.
- */
-static inline int
-port_init(uint8_t port, struct rte_mempool *mbuf_pool)
-{
-	struct rte_eth_rxconf rx_conf;
-	static const struct rte_eth_conf port_conf_default = {
-		.rxmode = {
-			.mq_mode = ETH_MQ_RX_RSS,
-			.max_rx_pkt_len = RTE_ETHER_MAX_LEN,
-		},
-		.rx_adv_conf = {
-			.rss_conf = {
-				.rss_hf = ETH_RSS_IP |
-					  ETH_RSS_TCP |
-					  ETH_RSS_UDP,
-			}
-		}
-	};
-	const uint16_t rx_rings = 1, tx_rings = 1;
-	const uint16_t rx_ring_size = 512, tx_ring_size = 512;
-	struct rte_eth_conf port_conf = port_conf_default;
-	int retval;
-	uint16_t q;
-	struct rte_eth_dev_info dev_info;
-	struct rte_eth_txconf txconf;
-
-	if (!rte_eth_dev_is_valid_port(port))
-		return -1;
-
-	rte_eth_dev_info_get(port, &dev_info);
-	if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_MBUF_FAST_FREE)
-		port_conf.txmode.offloads |=
-			DEV_TX_OFFLOAD_MBUF_FAST_FREE;
-	rx_conf = dev_info.default_rxconf;
-	rx_conf.offloads = port_conf.rxmode.offloads;
-
-	port_conf.rx_adv_conf.rss_conf.rss_hf &=
-		dev_info.flow_type_rss_offloads;
-	if (port_conf.rx_adv_conf.rss_conf.rss_hf !=
-			port_conf_default.rx_adv_conf.rss_conf.rss_hf) {
-		printf("Port %u modified RSS hash function based on hardware support,"
-			"requested:%#"PRIx64" configured:%#"PRIx64"\n",
-			port,
-			port_conf_default.rx_adv_conf.rss_conf.rss_hf,
-			port_conf.rx_adv_conf.rss_conf.rss_hf);
-	}
-
-	/* Configure the Ethernet device. */
-	retval = rte_eth_dev_configure(port, rx_rings, tx_rings, &port_conf);
-	if (retval != 0)
-		return retval;
-
-	/* Allocate and set up 1 RX queue per Ethernet port. */
-	for (q = 0; q < rx_rings; q++) {
-		retval = rte_eth_rx_queue_setup(port, q, rx_ring_size,
-				rte_eth_dev_socket_id(port), &rx_conf,
-				mbuf_pool);
-		if (retval < 0)
-			return retval;
-	}
-
-	txconf = dev_info.default_txconf;
-	txconf.offloads = port_conf_default.txmode.offloads;
-	/* Allocate and set up 1 TX queue per Ethernet port. */
-	for (q = 0; q < tx_rings; q++) {
-		retval = rte_eth_tx_queue_setup(port, q, tx_ring_size,
-				rte_eth_dev_socket_id(port), &txconf);
-		if (retval < 0)
-			return retval;
-	}
-
-	/* Display the port MAC address. */
-	struct rte_ether_addr addr;
-	rte_eth_macaddr_get(port, &addr);
-	printf("Port %u MAC: %02" PRIx8 " %02" PRIx8 " %02" PRIx8
-			   " %02" PRIx8 " %02" PRIx8 " %02" PRIx8 "\n",
-			(unsigned int)port,
-			addr.addr_bytes[0], addr.addr_bytes[1],
-			addr.addr_bytes[2], addr.addr_bytes[3],
-			addr.addr_bytes[4], addr.addr_bytes[5]);
-
-	/* Enable RX in promiscuous mode for the Ethernet device. */
-	rte_eth_promiscuous_enable(port);
-
-	return 0;
-}
-
-static int
-init_ports(uint16_t num_ports)
-{
-	uint16_t portid;
-
-	if (!cdata.num_mbuf)
-		cdata.num_mbuf = 16384 * num_ports;
-
-	struct rte_mempool *mp = rte_pktmbuf_pool_create("packet_pool",
-			/* mbufs */ cdata.num_mbuf,
-			/* cache_size */ 512,
-			/* priv_size*/ 0,
-			/* data_room_size */ RTE_MBUF_DEFAULT_BUF_SIZE,
-			rte_socket_id());
-
-	RTE_ETH_FOREACH_DEV(portid)
-		if (port_init(portid, mp) != 0)
-			rte_exit(EXIT_FAILURE, "Cannot init port %"PRIu16 "\n",
-					portid);
-
-	return 0;
-}

 static void
 do_capability_setup(uint8_t eventdev_id)
@@ -501,7 +389,6 @@ main(int argc, char **argv)
 	if (dev_id < 0)
 		rte_exit(EXIT_FAILURE, "Error setting up eventdev\n");

-	init_ports(num_ports);
 	fdata->cap.adptr_setup(num_ports);

 	/* Start the Ethernet port. */
diff --git a/examples/eventdev_pipeline/pipeline_worker_generic.c b/examples/eventdev_pipeline/pipeline_worker_generic.c
index 766c8e958..aa1678fe7 100644
--- a/examples/eventdev_pipeline/pipeline_worker_generic.c
+++ b/examples/eventdev_pipeline/pipeline_worker_generic.c
@@ -271,6 +271,123 @@ setup_eventdev_generic(struct worker_data *worker_data)
 	return dev_id;
 }

+/*
+ * Initializes a given port using global settings and with the RX buffers
+ * coming from the mbuf_pool passed as a parameter.
+ */
+static inline int
+port_init(uint8_t port, struct rte_mempool *mbuf_pool)
+{
+	struct rte_eth_rxconf rx_conf;
+	static const struct rte_eth_conf port_conf_default = {
+		.rxmode = {
+			.mq_mode = ETH_MQ_RX_RSS,
+			.max_rx_pkt_len = RTE_ETHER_MAX_LEN,
+		},
+		.rx_adv_conf = {
+			.rss_conf = {
+				.rss_hf = ETH_RSS_IP |
+					  ETH_RSS_TCP |
+					  ETH_RSS_UDP,
+			}
+		}
+	};
+	const uint16_t rx_rings = 1, tx_rings = 1;
+	const uint16_t rx_ring_size = 512, tx_ring_size = 512;
+	struct rte_eth_conf port_conf = port_conf_default;
+	int retval;
+	uint16_t q;
+	struct rte_eth_dev_info dev_info;
+	struct rte_eth_txconf txconf;
+
+	if (!rte_eth_dev_is_valid_port(port))
+		return -1;
+
+	rte_eth_dev_info_get(port, &dev_info);
+	if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_MBUF_FAST_FREE)
+		port_conf.txmode.offloads |=
+			DEV_TX_OFFLOAD_MBUF_FAST_FREE;
+
+	if (dev_info.rx_offload_capa & DEV_RX_OFFLOAD_RSS_HASH)
+		port_conf.rxmode.offloads |= DEV_RX_OFFLOAD_RSS_HASH;
+
+	rx_conf = dev_info.default_rxconf;
+	rx_conf.offloads = port_conf.rxmode.offloads;
+
+	port_conf.rx_adv_conf.rss_conf.rss_hf &=
+		dev_info.flow_type_rss_offloads;
+	if (port_conf.rx_adv_conf.rss_conf.rss_hf !=
+			port_conf_default.rx_adv_conf.rss_conf.rss_hf) {
+		printf("Port %u modified RSS hash function based on hardware support,"
+			"requested:%#"PRIx64" configured:%#"PRIx64"\n",
+			port,
+			port_conf_default.rx_adv_conf.rss_conf.rss_hf,
+			port_conf.rx_adv_conf.rss_conf.rss_hf);
+	}
+
+	/* Configure the Ethernet device. */
+	retval = rte_eth_dev_configure(port, rx_rings, tx_rings, &port_conf);
+	if (retval != 0)
+		return retval;
+
+	/* Allocate and set up 1 RX queue per Ethernet port. */
+	for (q = 0; q < rx_rings; q++) {
+		retval = rte_eth_rx_queue_setup(port, q, rx_ring_size,
+				rte_eth_dev_socket_id(port), &rx_conf,
+				mbuf_pool);
+		if (retval < 0)
+			return retval;
+	}
+
+	txconf = dev_info.default_txconf;
+	txconf.offloads = port_conf_default.txmode.offloads;
+	/* Allocate and set up 1 TX queue per Ethernet port. */
+	for (q = 0; q < tx_rings; q++) {
+		retval = rte_eth_tx_queue_setup(port, q, tx_ring_size,
+				rte_eth_dev_socket_id(port), &txconf);
+		if (retval < 0)
+			return retval;
+	}
+
+	/* Display the port MAC address. */
+	struct rte_ether_addr addr;
+	rte_eth_macaddr_get(port, &addr);
+	printf("Port %u MAC: %02" PRIx8 " %02" PRIx8 " %02" PRIx8
+			   " %02" PRIx8 " %02" PRIx8 " %02" PRIx8 "\n",
+			(unsigned int)port,
+			addr.addr_bytes[0], addr.addr_bytes[1],
+			addr.addr_bytes[2], addr.addr_bytes[3],
+			addr.addr_bytes[4], addr.addr_bytes[5]);
+
+	/* Enable RX in promiscuous mode for the Ethernet device. */
+	rte_eth_promiscuous_enable(port);
+
+	return 0;
+}
+
+static int
+init_ports(uint16_t num_ports)
+{
+	uint16_t portid;
+
+	if (!cdata.num_mbuf)
+		cdata.num_mbuf = 16384 * num_ports;
+
+	struct rte_mempool *mp = rte_pktmbuf_pool_create("packet_pool",
+			/* mbufs */ cdata.num_mbuf,
+			/* cache_size */ 512,
+			/* priv_size*/ 0,
+			/* data_room_size */ RTE_MBUF_DEFAULT_BUF_SIZE,
+			rte_socket_id());
+
+	RTE_ETH_FOREACH_DEV(portid)
+		if (port_init(portid, mp) != 0)
+			rte_exit(EXIT_FAILURE, "Cannot init port %"PRIu16 "\n",
+					portid);
+
+	return 0;
+}
+
 static void
 init_adapters(uint16_t nb_ports)
 {
@@ -297,6 +414,7 @@ init_adapters(uint16_t nb_ports)
 		adptr_p_conf.enqueue_depth =
 			dev_info.max_event_port_enqueue_depth;

+	init_ports(nb_ports);
 	/* Create one adapter for all the ethernet ports. */
 	ret = rte_event_eth_rx_adapter_create(cdata.rx_adapter_id, evdev_id,
 			&adptr_p_conf);
diff --git a/examples/eventdev_pipeline/pipeline_worker_tx.c b/examples/eventdev_pipeline/pipeline_worker_tx.c
index 8961cd656..52a1b4174 100644
--- a/examples/eventdev_pipeline/pipeline_worker_tx.c
+++ b/examples/eventdev_pipeline/pipeline_worker_tx.c
@@ -603,6 +603,119 @@ service_rx_adapter(void *arg)
 	return 0;
 }

+/*
+ * Initializes a given port using global settings and with the RX buffers
+ * coming from the mbuf_pool passed as a parameter.
+ */
+static inline int
+port_init(uint8_t port, struct rte_mempool *mbuf_pool)
+{
+	struct rte_eth_rxconf rx_conf;
+	static const struct rte_eth_conf port_conf_default = {
+		.rxmode = {
+			.mq_mode = ETH_MQ_RX_RSS,
+			.max_rx_pkt_len = RTE_ETHER_MAX_LEN,
+		},
+		.rx_adv_conf = {
+			.rss_conf = {
+				.rss_hf = ETH_RSS_IP |
+					  ETH_RSS_TCP |
+					  ETH_RSS_UDP,
+			}
+		}
+	};
+	const uint16_t rx_rings = 1, tx_rings = 1;
+	const uint16_t rx_ring_size = 512, tx_ring_size = 512;
+	struct rte_eth_conf port_conf = port_conf_default;
+	int retval;
+	uint16_t q;
+	struct rte_eth_dev_info dev_info;
+	struct rte_eth_txconf txconf;
+
+	if (!rte_eth_dev_is_valid_port(port))
+		return -1;
+
+	rte_eth_dev_info_get(port, &dev_info);
+	if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_MBUF_FAST_FREE)
+		port_conf.txmode.offloads |=
+			DEV_TX_OFFLOAD_MBUF_FAST_FREE;
+	rx_conf = dev_info.default_rxconf;
+	rx_conf.offloads = port_conf.rxmode.offloads;
+
+	port_conf.rx_adv_conf.rss_conf.rss_hf &=
+		dev_info.flow_type_rss_offloads;
+	if (port_conf.rx_adv_conf.rss_conf.rss_hf !=
+			port_conf_default.rx_adv_conf.rss_conf.rss_hf) {
+		printf("Port %u modified RSS hash function based on hardware support,"
+			"requested:%#"PRIx64" configured:%#"PRIx64"\n",
+			port,
+			port_conf_default.rx_adv_conf.rss_conf.rss_hf,
+			port_conf.rx_adv_conf.rss_conf.rss_hf);
+	}
+
+	/* Configure the Ethernet device. */
+	retval = rte_eth_dev_configure(port, rx_rings, tx_rings, &port_conf);
+	if (retval != 0)
+		return retval;
+
+	/* Allocate and set up 1 RX queue per Ethernet port. */
+	for (q = 0; q < rx_rings; q++) {
+		retval = rte_eth_rx_queue_setup(port, q, rx_ring_size,
+				rte_eth_dev_socket_id(port), &rx_conf,
+				mbuf_pool);
+		if (retval < 0)
+			return retval;
+	}
+
+	txconf = dev_info.default_txconf;
+	txconf.offloads = port_conf_default.txmode.offloads;
+	/* Allocate and set up 1 TX queue per Ethernet port. */
+	for (q = 0; q < tx_rings; q++) {
+		retval = rte_eth_tx_queue_setup(port, q, tx_ring_size,
+				rte_eth_dev_socket_id(port), &txconf);
+		if (retval < 0)
+			return retval;
+	}
+
+	/* Display the port MAC address. */
+	struct rte_ether_addr addr;
+	rte_eth_macaddr_get(port, &addr);
+	printf("Port %u MAC: %02" PRIx8 " %02" PRIx8 " %02" PRIx8
+			   " %02" PRIx8 " %02" PRIx8 " %02" PRIx8 "\n",
+			(unsigned int)port,
+			addr.addr_bytes[0], addr.addr_bytes[1],
+			addr.addr_bytes[2], addr.addr_bytes[3],
+			addr.addr_bytes[4], addr.addr_bytes[5]);
+
+	/* Enable RX in promiscuous mode for the Ethernet device. */
+	rte_eth_promiscuous_enable(port);
+
+	return 0;
+}
+
+static int
+init_ports(uint16_t num_ports)
+{
+	uint16_t portid;
+
+	if (!cdata.num_mbuf)
+		cdata.num_mbuf = 16384 * num_ports;
+
+	struct rte_mempool *mp = rte_pktmbuf_pool_create("packet_pool",
+			/* mbufs */ cdata.num_mbuf,
+			/* cache_size */ 512,
+			/* priv_size*/ 0,
+			/* data_room_size */ RTE_MBUF_DEFAULT_BUF_SIZE,
+			rte_socket_id());
+
+	RTE_ETH_FOREACH_DEV(portid)
+		if (port_init(portid, mp) != 0)
+			rte_exit(EXIT_FAILURE, "Cannot init port %"PRIu16 "\n",
+					portid);
+
+	return 0;
+}
+
 static void
 init_adapters(uint16_t nb_ports)
 {
@@ -621,6 +734,7 @@ init_adapters(uint16_t nb_ports)
 		.new_event_threshold = 4096,
 	};

+	init_ports(nb_ports);
 	if (adptr_p_conf.new_event_threshold > dev_info.max_num_events)
 		adptr_p_conf.new_event_threshold = dev_info.max_num_events;
 	if (adptr_p_conf.dequeue_depth > dev_info.max_event_port_dequeue_depth)
--
2.22.0


^ permalink raw reply	[flat|nested] 245+ messages in thread

* [dpdk-dev] [PATCH v2 7/7] examples: disable Rx packet type parsing
  2019-08-21 20:47 [dpdk-dev] [PATCH v2 0/7] ethdev: add new Rx offload flags pbhagavatula
                   ` (5 preceding siblings ...)
  2019-08-21 20:47 ` [dpdk-dev] [PATCH v2 6/7] examples/eventdev_pipeline: add new Rx RSS hash offload pbhagavatula
@ 2019-08-21 20:47 ` pbhagavatula
  2019-08-23 10:10   ` Andrew Rybchenko
  2019-09-29 21:19 ` [dpdk-dev] [PATCH v3 0/7] ethdev: add new Rx offload flags pbhagavatula
  7 siblings, 1 reply; 245+ messages in thread
From: pbhagavatula @ 2019-08-21 20:47 UTC (permalink / raw)
  To: arybchenko, jerinj, Nicolas Chautru, Chas Williams, David Hunt,
	Harry van Haaren, Marko Kovacevic, Ori Kam, Bruce Richardson,
	Pablo de Lara, Radu Nicolau, Akhil Goyal, Tomasz Kantecki,
	Bernard Iremonger, Cristian Dumitrescu, Konstantin Ananyev,
	Ferruh Yigit, Declan Doherty, Reshma Pattan, John McNamara,
	Xiaoyun Li, Jasvinder Singh, Byron Marohn, Maxime Coquelin,
	Tiwei Bie, Zhihong Wang
  Cc: dev, Pavan Nikhilesh

From: Pavan Nikhilesh <pbhagavatula@marvell.com>

Disable packet type parsing in examples that don't use
`rte_mbuf::packet_type` by setting ptype_mask as 0 in
`rte_eth_dev_set_supported_ptypes`

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
 examples/bbdev_app/main.c                  | 1 +
 examples/bond/main.c                       | 2 ++
 examples/distributor/Makefile              | 1 +
 examples/distributor/main.c                | 1 +
 examples/distributor/meson.build           | 1 +
 examples/eventdev_pipeline/main.c          | 1 +
 examples/eventdev_pipeline/meson.build     | 1 +
 examples/exception_path/Makefile           | 1 +
 examples/exception_path/main.c             | 1 +
 examples/exception_path/meson.build        | 1 +
 examples/flow_classify/flow_classify.c     | 1 +
 examples/flow_filtering/Makefile           | 1 +
 examples/flow_filtering/main.c             | 1 +
 examples/flow_filtering/meson.build        | 1 +
 examples/ip_pipeline/link.c                | 1 +
 examples/ip_reassembly/Makefile            | 1 +
 examples/ip_reassembly/main.c              | 1 +
 examples/ip_reassembly/meson.build         | 1 +
 examples/ipsec-secgw/ipsec-secgw.c         | 1 +
 examples/ipv4_multicast/Makefile           | 1 +
 examples/ipv4_multicast/main.c             | 1 +
 examples/ipv4_multicast/meson.build        | 1 +
 examples/kni/main.c                        | 1 +
 examples/l2fwd-cat/Makefile                | 1 +
 examples/l2fwd-cat/l2fwd-cat.c             | 1 +
 examples/l2fwd-cat/meson.build             | 1 +
 examples/l2fwd-crypto/main.c               | 1 +
 examples/l2fwd-jobstats/Makefile           | 1 +
 examples/l2fwd-jobstats/main.c             | 1 +
 examples/l2fwd-jobstats/meson.build        | 1 +
 examples/l2fwd-keepalive/Makefile          | 1 +
 examples/l2fwd-keepalive/main.c            | 1 +
 examples/l2fwd-keepalive/meson.build       | 1 +
 examples/l2fwd/Makefile                    | 1 +
 examples/l2fwd/main.c                      | 1 +
 examples/l2fwd/meson.build                 | 1 +
 examples/l3fwd-acl/Makefile                | 1 +
 examples/l3fwd-acl/main.c                  | 1 +
 examples/l3fwd-acl/meson.build             | 1 +
 examples/l3fwd-power/main.c                | 1 +
 examples/l3fwd-vf/Makefile                 | 1 +
 examples/l3fwd-vf/main.c                   | 1 +
 examples/l3fwd-vf/meson.build              | 1 +
 examples/link_status_interrupt/Makefile    | 1 +
 examples/link_status_interrupt/main.c      | 1 +
 examples/link_status_interrupt/meson.build | 1 +
 examples/load_balancer/Makefile            | 1 +
 examples/load_balancer/init.c              | 1 +
 examples/load_balancer/meson.build         | 1 +
 examples/packet_ordering/Makefile          | 1 +
 examples/packet_ordering/main.c            | 1 +
 examples/packet_ordering/meson.build       | 1 +
 examples/ptpclient/Makefile                | 1 +
 examples/ptpclient/meson.build             | 1 +
 examples/ptpclient/ptpclient.c             | 1 +
 examples/qos_meter/Makefile                | 1 +
 examples/qos_meter/main.c                  | 2 ++
 examples/qos_meter/meson.build             | 1 +
 examples/qos_sched/Makefile                | 1 +
 examples/qos_sched/init.c                  | 1 +
 examples/qos_sched/meson.build             | 1 +
 examples/quota_watermark/qw/Makefile       | 1 +
 examples/quota_watermark/qw/init.c         | 1 +
 examples/rxtx_callbacks/main.c             | 1 +
 examples/server_node_efd/server/Makefile   | 1 +
 examples/server_node_efd/server/init.c     | 1 +
 examples/skeleton/Makefile                 | 1 +
 examples/skeleton/basicfwd.c               | 1 +
 examples/skeleton/meson.build              | 1 +
 examples/tep_termination/Makefile          | 1 +
 examples/tep_termination/meson.build       | 1 +
 examples/tep_termination/vxlan_setup.c     | 1 +
 examples/vhost/Makefile                    | 1 +
 examples/vhost/main.c                      | 1 +
 examples/vm_power_manager/Makefile         | 1 +
 examples/vm_power_manager/main.c           | 1 +
 examples/vm_power_manager/meson.build      | 1 +
 examples/vmdq/Makefile                     | 1 +
 examples/vmdq/main.c                       | 1 +
 examples/vmdq/meson.build                  | 1 +
 examples/vmdq_dcb/Makefile                 | 1 +
 examples/vmdq_dcb/main.c                   | 1 +
 examples/vmdq_dcb/meson.build              | 1 +
 83 files changed, 85 insertions(+)

diff --git a/examples/bbdev_app/main.c b/examples/bbdev_app/main.c
index 9acf666dc..8ae6e4972 100644
--- a/examples/bbdev_app/main.c
+++ b/examples/bbdev_app/main.c
@@ -478,6 +478,7 @@ initialize_ports(struct app_config_params *app_params,
 	}
 
 	rte_eth_promiscuous_enable(port_id);
+	rte_eth_dev_set_supported_ptypes(port_id, 0);
 
 	rte_eth_macaddr_get(port_id, &bbdev_port_eth_addr);
 	print_mac(port_id, &bbdev_port_eth_addr);
diff --git a/examples/bond/main.c b/examples/bond/main.c
index 1c0df9d46..ffb911fc5 100644
--- a/examples/bond/main.c
+++ b/examples/bond/main.c
@@ -195,6 +195,7 @@ slave_port_init(uint16_t portid, struct rte_mempool *mbuf_pool)
 		rte_exit(retval, "port %u: TX queue 0 setup failed (res=%d)",
 				portid, retval);
 
+	rte_eth_dev_set_supported_ptypes(portid, 0);
 	retval  = rte_eth_dev_start(portid);
 	if (retval < 0)
 		rte_exit(retval,
@@ -271,6 +272,7 @@ bond_port_init(struct rte_mempool *mbuf_pool)
 		rte_exit(retval, "port %u: TX queue 0 setup failed (res=%d)",
 				BOND_PORT, retval);
 
+	rte_eth_dev_set_supported_ptypes(BOND_PORT, 0);
 	retval  = rte_eth_dev_start(BOND_PORT);
 	if (retval < 0)
 		rte_exit(retval, "Start port %d failed (res=%d)", BOND_PORT, retval);
diff --git a/examples/distributor/Makefile b/examples/distributor/Makefile
index bac8d5578..a2a477279 100644
--- a/examples/distributor/Makefile
+++ b/examples/distributor/Makefile
@@ -50,6 +50,7 @@ RTE_TARGET ?= $(notdir $(abspath $(dir $(firstword $(wildcard $(RTE_SDK)/*/.conf
 include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 # workaround for a gcc bug with noreturn attribute
 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603
diff --git a/examples/distributor/main.c b/examples/distributor/main.c
index 81d7ca61d..173e0a8b5 100644
--- a/examples/distributor/main.c
+++ b/examples/distributor/main.c
@@ -162,6 +162,7 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool)
 			return retval;
 	}
 
+	rte_eth_dev_set_supported_ptypes(port, 0);
 	retval = rte_eth_dev_start(port);
 	if (retval < 0)
 		return retval;
diff --git a/examples/distributor/meson.build b/examples/distributor/meson.build
index 26f108d65..c2976f6bd 100644
--- a/examples/distributor/meson.build
+++ b/examples/distributor/meson.build
@@ -10,6 +10,7 @@
 build = dpdk_conf.has('RTE_LIBRTE_POWER')
 
 deps += ['distributor', 'power']
+allow_experimental_apis = true
 sources = files(
 	'main.c'
 )
diff --git a/examples/eventdev_pipeline/main.c b/examples/eventdev_pipeline/main.c
index a73b61d59..6e8fd8006 100644
--- a/examples/eventdev_pipeline/main.c
+++ b/examples/eventdev_pipeline/main.c
@@ -393,6 +393,7 @@ main(int argc, char **argv)
 
 	/* Start the Ethernet port. */
 	RTE_ETH_FOREACH_DEV(portid) {
+		rte_eth_dev_set_supported_ptypes(portid, 0);
 		err = rte_eth_dev_start(portid);
 		if (err < 0)
 			rte_exit(EXIT_FAILURE, "Error starting ethdev %d\n",
diff --git a/examples/eventdev_pipeline/meson.build b/examples/eventdev_pipeline/meson.build
index a54c35aa7..0fc916b05 100644
--- a/examples/eventdev_pipeline/meson.build
+++ b/examples/eventdev_pipeline/meson.build
@@ -7,6 +7,7 @@
 # DPDK instance, use 'make'
 
 deps += 'eventdev'
+allow_experimental_apis = true
 sources = files(
 	'main.c',
 	'pipeline_worker_generic.c',
diff --git a/examples/exception_path/Makefile b/examples/exception_path/Makefile
index 90c7f133a..a7c961276 100644
--- a/examples/exception_path/Makefile
+++ b/examples/exception_path/Makefile
@@ -51,6 +51,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 include $(RTE_SDK)/mk/rte.extapp.mk
 
diff --git a/examples/exception_path/main.c b/examples/exception_path/main.c
index 0d79e5a24..1b190509a 100644
--- a/examples/exception_path/main.c
+++ b/examples/exception_path/main.c
@@ -464,6 +464,7 @@ init_port(uint16_t port)
 		FATAL_ERROR("Could not setup up TX queue for port%u (%d)",
 				port, ret);
 
+	rte_eth_dev_set_supported_ptypes(port, 0);
 	ret = rte_eth_dev_start(port);
 	if (ret < 0)
 		FATAL_ERROR("Could not start port%u (%d)", port, ret);
diff --git a/examples/exception_path/meson.build b/examples/exception_path/meson.build
index c34e11e36..2b0a25036 100644
--- a/examples/exception_path/meson.build
+++ b/examples/exception_path/meson.build
@@ -6,6 +6,7 @@
 # To build this example as a standalone application with an already-installed
 # DPDK instance, use 'make'
 
+allow_experimental_apis = true
 sources = files(
 	'main.c'
 )
diff --git a/examples/flow_classify/flow_classify.c b/examples/flow_classify/flow_classify.c
index bc7f43ea9..5140b0fed 100644
--- a/examples/flow_classify/flow_classify.c
+++ b/examples/flow_classify/flow_classify.c
@@ -231,6 +231,7 @@ port_init(uint8_t port, struct rte_mempool *mbuf_pool)
 	}
 
 	/* Start the Ethernet port. */
+	rte_eth_dev_set_supported_ptypes(port, 0);
 	retval = rte_eth_dev_start(port);
 	if (retval < 0)
 		return retval;
diff --git a/examples/flow_filtering/Makefile b/examples/flow_filtering/Makefile
index a63a75555..793a08fae 100644
--- a/examples/flow_filtering/Makefile
+++ b/examples/flow_filtering/Makefile
@@ -49,6 +49,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 include $(RTE_SDK)/mk/rte.extapp.mk
 
diff --git a/examples/flow_filtering/main.c b/examples/flow_filtering/main.c
index a0487be77..9802c8fe2 100644
--- a/examples/flow_filtering/main.c
+++ b/examples/flow_filtering/main.c
@@ -176,6 +176,7 @@ init_port(void)
 	}
 
 	rte_eth_promiscuous_enable(port_id);
+	rte_eth_dev_set_supported_ptypes(port_id, 0);
 	ret = rte_eth_dev_start(port_id);
 	if (ret < 0) {
 		rte_exit(EXIT_FAILURE,
diff --git a/examples/flow_filtering/meson.build b/examples/flow_filtering/meson.build
index 407795c42..6f5d1b08a 100644
--- a/examples/flow_filtering/meson.build
+++ b/examples/flow_filtering/meson.build
@@ -6,6 +6,7 @@
 # To build this example as a standalone application with an already-installed
 # DPDK instance, use 'make'
 
+allow_experimental_apis = true
 sources = files(
 	'main.c',
 )
diff --git a/examples/ip_pipeline/link.c b/examples/ip_pipeline/link.c
index 787eb866a..15a5a5715 100644
--- a/examples/ip_pipeline/link.c
+++ b/examples/ip_pipeline/link.c
@@ -205,6 +205,7 @@ link_create(const char *name, struct link_params *params)
 			return NULL;
 	}
 
+	rte_eth_dev_set_supported_ptypes(port_id, 0);
 	/* Port start */
 	status = rte_eth_dev_start(port_id);
 	if (status < 0)
diff --git a/examples/ip_reassembly/Makefile b/examples/ip_reassembly/Makefile
index 0b1a904e0..19c462388 100644
--- a/examples/ip_reassembly/Makefile
+++ b/examples/ip_reassembly/Makefile
@@ -52,6 +52,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 # workaround for a gcc bug with noreturn attribute
 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603
diff --git a/examples/ip_reassembly/main.c b/examples/ip_reassembly/main.c
index 38b39be6b..08b710cf6 100644
--- a/examples/ip_reassembly/main.c
+++ b/examples/ip_reassembly/main.c
@@ -1158,6 +1158,7 @@ main(int argc, char **argv)
 		if ((enabled_port_mask & (1 << portid)) == 0) {
 			continue;
 		}
+		rte_eth_dev_set_supported_ptypes(portid, 0);
 		/* Start device */
 		ret = rte_eth_dev_start(portid);
 		if (ret < 0)
diff --git a/examples/ip_reassembly/meson.build b/examples/ip_reassembly/meson.build
index 8ebd48291..8a667c265 100644
--- a/examples/ip_reassembly/meson.build
+++ b/examples/ip_reassembly/meson.build
@@ -7,6 +7,7 @@
 # DPDK instance, use 'make'
 
 deps += ['lpm', 'ip_frag']
+allow_experimental_apis = true
 sources = files(
 	'main.c'
 )
diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c
index 0d1fd6af6..3de98d96c 100644
--- a/examples/ipsec-secgw/ipsec-secgw.c
+++ b/examples/ipsec-secgw/ipsec-secgw.c
@@ -2448,6 +2448,7 @@ main(int32_t argc, char **argv)
 		if ((enabled_port_mask & (1 << portid)) == 0)
 			continue;
 
+		rte_eth_dev_set_supported_ptypes(portid, 0);
 		/*
 		 * Start device
 		 * note: device must be started before a flow rule
diff --git a/examples/ipv4_multicast/Makefile b/examples/ipv4_multicast/Makefile
index 5f8a67dd4..5171f7ab2 100644
--- a/examples/ipv4_multicast/Makefile
+++ b/examples/ipv4_multicast/Makefile
@@ -52,6 +52,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 # workaround for a gcc bug with noreturn attribute
 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603
diff --git a/examples/ipv4_multicast/main.c b/examples/ipv4_multicast/main.c
index 72eaadc51..69f88f066 100644
--- a/examples/ipv4_multicast/main.c
+++ b/examples/ipv4_multicast/main.c
@@ -765,6 +765,7 @@ main(int argc, char **argv)
 			qconf->tx_queue_id[portid] = queueid;
 			queueid++;
 		}
+		rte_eth_dev_set_supported_ptypes(portid, 0);
 		rte_eth_allmulticast_enable(portid);
 		/* Start device */
 		ret = rte_eth_dev_start(portid);
diff --git a/examples/ipv4_multicast/meson.build b/examples/ipv4_multicast/meson.build
index d9e4c7c21..6969e2c54 100644
--- a/examples/ipv4_multicast/meson.build
+++ b/examples/ipv4_multicast/meson.build
@@ -7,6 +7,7 @@
 # DPDK instance, use 'make'
 
 deps += 'hash'
+allow_experimental_apis = true
 sources = files(
 	'main.c'
 )
diff --git a/examples/kni/main.c b/examples/kni/main.c
index 4710d7176..c415dbc01 100644
--- a/examples/kni/main.c
+++ b/examples/kni/main.c
@@ -625,6 +625,7 @@ init_port(uint16_t port)
 		rte_exit(EXIT_FAILURE, "Could not setup up TX queue for "
 				"port%u (%d)\n", (unsigned)port, ret);
 
+	rte_eth_dev_set_supported_ptypes(port, 0);
 	ret = rte_eth_dev_start(port);
 	if (ret < 0)
 		rte_exit(EXIT_FAILURE, "Could not start port%u (%d)\n",
diff --git a/examples/l2fwd-cat/Makefile b/examples/l2fwd-cat/Makefile
index c1960d6d3..d6a25e42a 100644
--- a/examples/l2fwd-cat/Makefile
+++ b/examples/l2fwd-cat/Makefile
@@ -66,6 +66,7 @@ endif
 EXTRA_CFLAGS += -O3 -g -Wfatal-errors
 
 CFLAGS += -I$(PQOS_INSTALL_PATH)/../include
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 LDLIBS += -L$(PQOS_INSTALL_PATH)
 LDLIBS += -lpqos
diff --git a/examples/l2fwd-cat/l2fwd-cat.c b/examples/l2fwd-cat/l2fwd-cat.c
index b34b40a00..dfffbbe38 100644
--- a/examples/l2fwd-cat/l2fwd-cat.c
+++ b/examples/l2fwd-cat/l2fwd-cat.c
@@ -67,6 +67,7 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool)
 			return retval;
 	}
 
+	rte_eth_dev_set_supported_ptypes(port, 0);
 	/* Start the Ethernet port. */
 	retval = rte_eth_dev_start(port);
 	if (retval < 0)
diff --git a/examples/l2fwd-cat/meson.build b/examples/l2fwd-cat/meson.build
index 4e2777a03..37c96040d 100644
--- a/examples/l2fwd-cat/meson.build
+++ b/examples/l2fwd-cat/meson.build
@@ -10,6 +10,7 @@ pqos = cc.find_library('pqos', required: false)
 build = pqos.found()
 ext_deps += pqos
 cflags += '-I/usr/local/include' # assume pqos lib installed in /usr/local
+allow_experimental_apis = true
 sources = files(
 	'cat.c', 'l2fwd-cat.c'
 )
diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c
index 3fe2ba725..2fb059073 100644
--- a/examples/l2fwd-crypto/main.c
+++ b/examples/l2fwd-crypto/main.c
@@ -2559,6 +2559,7 @@ initialize_ports(struct l2fwd_crypto_options *options)
 			return -1;
 		}
 
+		rte_eth_dev_set_supported_ptypes(portid, 0);
 		/* Start device */
 		retval = rte_eth_dev_start(portid);
 		if (retval < 0) {
diff --git a/examples/l2fwd-jobstats/Makefile b/examples/l2fwd-jobstats/Makefile
index 729a39e93..09834e979 100644
--- a/examples/l2fwd-jobstats/Makefile
+++ b/examples/l2fwd-jobstats/Makefile
@@ -52,6 +52,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 include $(RTE_SDK)/mk/rte.extapp.mk
 endif
diff --git a/examples/l2fwd-jobstats/main.c b/examples/l2fwd-jobstats/main.c
index 77e44dc82..34088982f 100644
--- a/examples/l2fwd-jobstats/main.c
+++ b/examples/l2fwd-jobstats/main.c
@@ -902,6 +902,7 @@ main(int argc, char **argv)
 			"Cannot set error callback for tx buffer on port %u\n",
 				 portid);
 
+		rte_eth_dev_set_supported_ptypes(portid, 0);
 		/* Start device */
 		ret = rte_eth_dev_start(portid);
 		if (ret < 0)
diff --git a/examples/l2fwd-jobstats/meson.build b/examples/l2fwd-jobstats/meson.build
index 1ffd484e2..3653aa7ec 100644
--- a/examples/l2fwd-jobstats/meson.build
+++ b/examples/l2fwd-jobstats/meson.build
@@ -7,6 +7,7 @@
 # DPDK instance, use 'make'
 
 deps += ['jobstats', 'timer']
+allow_experimental_apis = true
 sources = files(
 	'main.c'
 )
diff --git a/examples/l2fwd-keepalive/Makefile b/examples/l2fwd-keepalive/Makefile
index 37de27a6f..584257ae2 100644
--- a/examples/l2fwd-keepalive/Makefile
+++ b/examples/l2fwd-keepalive/Makefile
@@ -53,6 +53,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 LDFLAGS += -lrt
 
 include $(RTE_SDK)/mk/rte.extapp.mk
diff --git a/examples/l2fwd-keepalive/main.c b/examples/l2fwd-keepalive/main.c
index 9831a4323..40bef617f 100644
--- a/examples/l2fwd-keepalive/main.c
+++ b/examples/l2fwd-keepalive/main.c
@@ -696,6 +696,7 @@ main(int argc, char **argv)
 			"Cannot set error callback for tx buffer on port %u\n",
 				 portid);
 
+		rte_eth_dev_set_supported_ptypes(portid, 0);
 		/* Start device */
 		ret = rte_eth_dev_start(portid);
 		if (ret < 0)
diff --git a/examples/l2fwd-keepalive/meson.build b/examples/l2fwd-keepalive/meson.build
index 6f7b007e1..2dffffaaa 100644
--- a/examples/l2fwd-keepalive/meson.build
+++ b/examples/l2fwd-keepalive/meson.build
@@ -8,6 +8,7 @@
 
 ext_deps += cc.find_library('rt')
 deps += 'timer'
+allow_experimental_apis = true
 sources = files(
 	'main.c', 'shm.c'
 )
diff --git a/examples/l2fwd/Makefile b/examples/l2fwd/Makefile
index 230352093..123e6161c 100644
--- a/examples/l2fwd/Makefile
+++ b/examples/l2fwd/Makefile
@@ -51,6 +51,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 include $(RTE_SDK)/mk/rte.extapp.mk
 endif
diff --git a/examples/l2fwd/main.c b/examples/l2fwd/main.c
index 1e2b14297..1adda3f9e 100644
--- a/examples/l2fwd/main.c
+++ b/examples/l2fwd/main.c
@@ -694,6 +694,7 @@ main(int argc, char **argv)
 			"Cannot set error callback for tx buffer on port %u\n",
 				 portid);
 
+		rte_eth_dev_set_supported_ptypes(portid, 0);
 		/* Start device */
 		ret = rte_eth_dev_start(portid);
 		if (ret < 0)
diff --git a/examples/l2fwd/meson.build b/examples/l2fwd/meson.build
index c34e11e36..2b0a25036 100644
--- a/examples/l2fwd/meson.build
+++ b/examples/l2fwd/meson.build
@@ -6,6 +6,7 @@
 # To build this example as a standalone application with an already-installed
 # DPDK instance, use 'make'
 
+allow_experimental_apis = true
 sources = files(
 	'main.c'
 )
diff --git a/examples/l3fwd-acl/Makefile b/examples/l3fwd-acl/Makefile
index e2c989f71..df590f8e9 100644
--- a/examples/l3fwd-acl/Makefile
+++ b/examples/l3fwd-acl/Makefile
@@ -51,6 +51,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 # workaround for a gcc bug with noreturn attribute
 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603
diff --git a/examples/l3fwd-acl/main.c b/examples/l3fwd-acl/main.c
index 0c44df767..d666176e2 100644
--- a/examples/l3fwd-acl/main.c
+++ b/examples/l3fwd-acl/main.c
@@ -2056,6 +2056,7 @@ main(int argc, char **argv)
 		if ((enabled_port_mask & (1 << portid)) == 0)
 			continue;
 
+		rte_eth_dev_set_supported_ptypes(portid, 0);
 		/* Start device */
 		ret = rte_eth_dev_start(portid);
 		if (ret < 0)
diff --git a/examples/l3fwd-acl/meson.build b/examples/l3fwd-acl/meson.build
index 7096e00c1..68cebd6ce 100644
--- a/examples/l3fwd-acl/meson.build
+++ b/examples/l3fwd-acl/meson.build
@@ -7,6 +7,7 @@
 # DPDK instance, use 'make'
 
 deps += ['acl', 'lpm', 'hash']
+allow_experimental_apis = true
 sources = files(
 	'main.c'
 )
diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c
index fd8d9528f..76c6a55cd 100644
--- a/examples/l3fwd-power/main.c
+++ b/examples/l3fwd-power/main.c
@@ -2426,6 +2426,7 @@ main(int argc, char **argv)
 		if ((enabled_port_mask & (1 << portid)) == 0) {
 			continue;
 		}
+		rte_eth_dev_set_supported_ptypes(portid, 0);
 		/* Start device */
 		ret = rte_eth_dev_start(portid);
 		if (ret < 0)
diff --git a/examples/l3fwd-vf/Makefile b/examples/l3fwd-vf/Makefile
index 7b186a23c..db7f51f2f 100644
--- a/examples/l3fwd-vf/Makefile
+++ b/examples/l3fwd-vf/Makefile
@@ -51,6 +51,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += -O3 $(USER_FLAGS)
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 # workaround for a gcc bug with noreturn attribute
 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603
diff --git a/examples/l3fwd-vf/main.c b/examples/l3fwd-vf/main.c
index 572e74cf5..eace6c953 100644
--- a/examples/l3fwd-vf/main.c
+++ b/examples/l3fwd-vf/main.c
@@ -1051,6 +1051,7 @@ main(int argc, char **argv)
 		if ((enabled_port_mask & (1 << portid)) == 0) {
 			continue;
 		}
+		rte_eth_dev_set_supported_ptypes(portid, 0);
 		/* Start device */
 		ret = rte_eth_dev_start(portid);
 		if (ret < 0)
diff --git a/examples/l3fwd-vf/meson.build b/examples/l3fwd-vf/meson.build
index 226286e74..00f3c38f4 100644
--- a/examples/l3fwd-vf/meson.build
+++ b/examples/l3fwd-vf/meson.build
@@ -7,6 +7,7 @@
 # DPDK instance, use 'make'
 
 deps += ['lpm', 'hash']
+allow_experimental_apis = true
 sources = files(
 	'main.c'
 )
diff --git a/examples/link_status_interrupt/Makefile b/examples/link_status_interrupt/Makefile
index 97e5a14a8..6ddedd4de 100644
--- a/examples/link_status_interrupt/Makefile
+++ b/examples/link_status_interrupt/Makefile
@@ -51,6 +51,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 include $(RTE_SDK)/mk/rte.extapp.mk
 endif
diff --git a/examples/link_status_interrupt/main.c b/examples/link_status_interrupt/main.c
index 9cd4dc7a6..ef3e3126a 100644
--- a/examples/link_status_interrupt/main.c
+++ b/examples/link_status_interrupt/main.c
@@ -676,6 +676,7 @@ main(int argc, char **argv)
 			rte_exit(EXIT_FAILURE, "Cannot set error callback for "
 					"tx buffer on port %u\n", (unsigned) portid);
 
+		rte_eth_dev_set_supported_ptypes(portid, 0);
 		/* Start device */
 		ret = rte_eth_dev_start(portid);
 		if (ret < 0)
diff --git a/examples/link_status_interrupt/meson.build b/examples/link_status_interrupt/meson.build
index c34e11e36..2b0a25036 100644
--- a/examples/link_status_interrupt/meson.build
+++ b/examples/link_status_interrupt/meson.build
@@ -6,6 +6,7 @@
 # To build this example as a standalone application with an already-installed
 # DPDK instance, use 'make'
 
+allow_experimental_apis = true
 sources = files(
 	'main.c'
 )
diff --git a/examples/load_balancer/Makefile b/examples/load_balancer/Makefile
index caae8a107..dcba9194c 100644
--- a/examples/load_balancer/Makefile
+++ b/examples/load_balancer/Makefile
@@ -51,6 +51,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += -O3 -g
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 # workaround for a gcc bug with noreturn attribute
 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603
diff --git a/examples/load_balancer/init.c b/examples/load_balancer/init.c
index 3ab7d0211..1fade7ccd 100644
--- a/examples/load_balancer/init.c
+++ b/examples/load_balancer/init.c
@@ -496,6 +496,7 @@ app_init_nics(void)
 			}
 		}
 
+		rte_eth_dev_set_supported_ptypes(port, 0);
 		/* Start port */
 		ret = rte_eth_dev_start(port);
 		if (ret < 0) {
diff --git a/examples/load_balancer/meson.build b/examples/load_balancer/meson.build
index 4f7ac3999..19708974c 100644
--- a/examples/load_balancer/meson.build
+++ b/examples/load_balancer/meson.build
@@ -7,6 +7,7 @@
 # DPDK instance, use 'make'
 
 deps += 'lpm'
+allow_experimental_apis = true
 sources = files(
 	'config.c', 'init.c', 'main.c', 'runtime.c'
 )
diff --git a/examples/packet_ordering/Makefile b/examples/packet_ordering/Makefile
index 51acaf7eb..9ba3fa9e8 100644
--- a/examples/packet_ordering/Makefile
+++ b/examples/packet_ordering/Makefile
@@ -51,6 +51,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 include $(RTE_SDK)/mk/rte.extapp.mk
 endif
diff --git a/examples/packet_ordering/main.c b/examples/packet_ordering/main.c
index 030e92299..efc5ef196 100644
--- a/examples/packet_ordering/main.c
+++ b/examples/packet_ordering/main.c
@@ -312,6 +312,7 @@ configure_eth_port(uint16_t port_id)
 			return ret;
 	}
 
+	rte_eth_dev_set_supported_ptypes(port_id, 0);
 	ret = rte_eth_dev_start(port_id);
 	if (ret < 0)
 		return ret;
diff --git a/examples/packet_ordering/meson.build b/examples/packet_ordering/meson.build
index 6c2fccdcb..a3776946f 100644
--- a/examples/packet_ordering/meson.build
+++ b/examples/packet_ordering/meson.build
@@ -7,6 +7,7 @@
 # DPDK instance, use 'make'
 
 deps += 'reorder'
+allow_experimental_apis = true
 sources = files(
 	'main.c'
 )
diff --git a/examples/ptpclient/Makefile b/examples/ptpclient/Makefile
index 89e2bacbd..f158d96b9 100644
--- a/examples/ptpclient/Makefile
+++ b/examples/ptpclient/Makefile
@@ -50,6 +50,7 @@ RTE_TARGET ?= $(notdir $(abspath $(dir $(firstword $(wildcard $(RTE_SDK)/*/.conf
 include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += -O3
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 CFLAGS += $(WERROR_FLAGS)
 
 # workaround for a gcc bug with noreturn attribute
diff --git a/examples/ptpclient/meson.build b/examples/ptpclient/meson.build
index fa0cbe93c..d4171a218 100644
--- a/examples/ptpclient/meson.build
+++ b/examples/ptpclient/meson.build
@@ -6,6 +6,7 @@
 # To build this example as a standalone application with an already-installed
 # DPDK instance, use 'make'
 
+allow_experimental_apis = true
 sources = files(
 	'ptpclient.c'
 )
diff --git a/examples/ptpclient/ptpclient.c b/examples/ptpclient/ptpclient.c
index 31778fd95..0c14ac763 100644
--- a/examples/ptpclient/ptpclient.c
+++ b/examples/ptpclient/ptpclient.c
@@ -227,6 +227,7 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool)
 			return retval;
 	}
 
+	rte_eth_dev_set_supported_ptypes(port, 0);
 	/* Start the Ethernet port. */
 	retval = rte_eth_dev_start(port);
 	if (retval < 0)
diff --git a/examples/qos_meter/Makefile b/examples/qos_meter/Makefile
index e5217cf7c..a1533d08f 100644
--- a/examples/qos_meter/Makefile
+++ b/examples/qos_meter/Makefile
@@ -52,6 +52,7 @@ RTE_TARGET ?= $(notdir $(abspath $(dir $(firstword $(wildcard $(RTE_SDK)/*/.conf
 include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += -O3
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 CFLAGS += $(WERROR_FLAGS)
 
 # workaround for a gcc bug with noreturn attribute
diff --git a/examples/qos_meter/main.c b/examples/qos_meter/main.c
index da7afe8be..f73b48772 100644
--- a/examples/qos_meter/main.c
+++ b/examples/qos_meter/main.c
@@ -419,10 +419,12 @@ main(int argc, char **argv)
 
 	rte_eth_tx_buffer_init(tx_buffer, PKT_TX_BURST_MAX);
 
+	rte_eth_dev_set_supported_ptypes(port_rx, 0);
 	ret = rte_eth_dev_start(port_rx);
 	if (ret < 0)
 		rte_exit(EXIT_FAILURE, "Port %d start error (%d)\n", port_rx, ret);
 
+	rte_eth_dev_set_supported_ptypes(port_tx, 0);
 	ret = rte_eth_dev_start(port_tx);
 	if (ret < 0)
 		rte_exit(EXIT_FAILURE, "Port %d start error (%d)\n", port_tx, ret);
diff --git a/examples/qos_meter/meson.build b/examples/qos_meter/meson.build
index ef7779f2f..10cd4bc79 100644
--- a/examples/qos_meter/meson.build
+++ b/examples/qos_meter/meson.build
@@ -7,6 +7,7 @@
 # DPDK instance, use 'make'
 
 deps += 'meter'
+allow_experimental_apis = true
 sources = files(
 	'main.c', 'rte_policer.c'
 )
diff --git a/examples/qos_sched/Makefile b/examples/qos_sched/Makefile
index ce2d25371..7d3d3019f 100644
--- a/examples/qos_sched/Makefile
+++ b/examples/qos_sched/Makefile
@@ -58,6 +58,7 @@ else
 
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 include $(RTE_SDK)/mk/rte.extapp.mk
 
diff --git a/examples/qos_sched/init.c b/examples/qos_sched/init.c
index b05206d5a..d9b7030d0 100644
--- a/examples/qos_sched/init.c
+++ b/examples/qos_sched/init.c
@@ -138,6 +138,7 @@ app_init_port(uint16_t portid, struct rte_mempool *mp)
 			 "rte_eth_tx_queue_setup: err=%d, port=%u queue=%d\n",
 			 ret, portid, 0);
 
+	rte_eth_dev_set_supported_ptypes(portid, 0);
 	/* Start device */
 	ret = rte_eth_dev_start(portid);
 	if (ret < 0)
diff --git a/examples/qos_sched/meson.build b/examples/qos_sched/meson.build
index 289b81ce8..5101652af 100644
--- a/examples/qos_sched/meson.build
+++ b/examples/qos_sched/meson.build
@@ -7,6 +7,7 @@
 # DPDK instance, use 'make'
 
 deps += ['sched', 'cfgfile']
+allow_experimental_apis = true
 sources = files(
 	'app_thread.c', 'args.c', 'cfg_file.c', 'cmdline.c',
 	'init.c', 'main.c', 'stats.c'
diff --git a/examples/quota_watermark/qw/Makefile b/examples/quota_watermark/qw/Makefile
index 3f10f01c3..e06f4482b 100644
--- a/examples/quota_watermark/qw/Makefile
+++ b/examples/quota_watermark/qw/Makefile
@@ -18,5 +18,6 @@ SRCS-y := args.c init.c main.c
 
 CFLAGS += -O3 -DQW_SOFTWARE_FC
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 include $(RTE_SDK)/mk/rte.extapp.mk
diff --git a/examples/quota_watermark/qw/init.c b/examples/quota_watermark/qw/init.c
index 5a0f64f45..4f4e38fff 100644
--- a/examples/quota_watermark/qw/init.c
+++ b/examples/quota_watermark/qw/init.c
@@ -96,6 +96,7 @@ void configure_eth_port(uint16_t port_id)
 				"Failed to setup hardware flow control on port %u (error %d)\n",
 				(unsigned int) port_id, ret);
 
+	rte_eth_dev_set_supported_ptypes(port_id, 0);
 	/* Start the port */
 	ret = rte_eth_dev_start(port_id);
 	if (ret < 0)
diff --git a/examples/rxtx_callbacks/main.c b/examples/rxtx_callbacks/main.c
index dbcd9f4fc..ec550d4e4 100644
--- a/examples/rxtx_callbacks/main.c
+++ b/examples/rxtx_callbacks/main.c
@@ -152,6 +152,7 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool)
 			return retval;
 	}
 
+	rte_eth_dev_set_supported_ptypes(port, 0);
 	retval  = rte_eth_dev_start(port);
 	if (retval < 0)
 		return retval;
diff --git a/examples/server_node_efd/server/Makefile b/examples/server_node_efd/server/Makefile
index 4837bd3ea..acbd12ae2 100644
--- a/examples/server_node_efd/server/Makefile
+++ b/examples/server_node_efd/server/Makefile
@@ -25,5 +25,6 @@ INC := $(sort $(wildcard *.h))
 
 CFLAGS += $(WERROR_FLAGS) -O3
 CFLAGS += -I$(SRCDIR)/../shared
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 include $(RTE_SDK)/mk/rte.extapp.mk
diff --git a/examples/server_node_efd/server/init.c b/examples/server_node_efd/server/init.c
index af5a18e28..a584d6750 100644
--- a/examples/server_node_efd/server/init.c
+++ b/examples/server_node_efd/server/init.c
@@ -149,6 +149,7 @@ init_port(uint16_t port_num)
 
 	rte_eth_promiscuous_enable(port_num);
 
+	rte_eth_dev_set_supported_ptypes(port_num, 0);
 	retval = rte_eth_dev_start(port_num);
 	if (retval < 0)
 		return retval;
diff --git a/examples/skeleton/Makefile b/examples/skeleton/Makefile
index c5ac26029..0037d6b25 100644
--- a/examples/skeleton/Makefile
+++ b/examples/skeleton/Makefile
@@ -50,6 +50,7 @@ RTE_TARGET ?= $(notdir $(abspath $(dir $(firstword $(wildcard $(RTE_SDK)/*/.conf
 include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 # workaround for a gcc bug with noreturn attribute
 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603
diff --git a/examples/skeleton/basicfwd.c b/examples/skeleton/basicfwd.c
index a8a8e98f0..0d3d397f0 100644
--- a/examples/skeleton/basicfwd.c
+++ b/examples/skeleton/basicfwd.c
@@ -76,6 +76,7 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool)
 			return retval;
 	}
 
+	rte_eth_dev_set_supported_ptypes(port, 0);
 	/* Start the Ethernet port. */
 	retval = rte_eth_dev_start(port);
 	if (retval < 0)
diff --git a/examples/skeleton/meson.build b/examples/skeleton/meson.build
index 9bb9ec329..ef46b187e 100644
--- a/examples/skeleton/meson.build
+++ b/examples/skeleton/meson.build
@@ -6,6 +6,7 @@
 # To build this example as a standalone application with an already-installed
 # DPDK instance, use 'make'
 
+allow_experimental_apis = true
 sources = files(
 	'basicfwd.c'
 )
diff --git a/examples/tep_termination/Makefile b/examples/tep_termination/Makefile
index 31165bd92..586838676 100644
--- a/examples/tep_termination/Makefile
+++ b/examples/tep_termination/Makefile
@@ -61,6 +61,7 @@ endif
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
 CFLAGS += -Wno-deprecated-declarations
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 include $(RTE_SDK)/mk/rte.extapp.mk
 endif
diff --git a/examples/tep_termination/meson.build b/examples/tep_termination/meson.build
index f65d68980..f40b1c0b8 100644
--- a/examples/tep_termination/meson.build
+++ b/examples/tep_termination/meson.build
@@ -11,6 +11,7 @@ if not is_linux
 endif
 deps += ['hash', 'vhost']
 cflags += '-Wno-deprecated-declarations'
+allow_experimental_apis = true
 sources = files(
 	'main.c', 'vxlan.c', 'vxlan_setup.c'
 )
diff --git a/examples/tep_termination/vxlan_setup.c b/examples/tep_termination/vxlan_setup.c
index 9a0880002..fc8c2d5fa 100644
--- a/examples/tep_termination/vxlan_setup.c
+++ b/examples/tep_termination/vxlan_setup.c
@@ -167,6 +167,7 @@ vxlan_port_init(uint16_t port, struct rte_mempool *mbuf_pool)
 			return retval;
 	}
 
+	rte_eth_dev_set_supported_ptypes(port, 0);
 	/* Start the device. */
 	retval  = rte_eth_dev_start(port);
 	if (retval < 0)
diff --git a/examples/vhost/Makefile b/examples/vhost/Makefile
index f84b7f017..7722e81c7 100644
--- a/examples/vhost/Makefile
+++ b/examples/vhost/Makefile
@@ -62,6 +62,7 @@ else
 CFLAGS += -DALLOW_EXPERIMENTAL_API
 CFLAGS += -O2 -D_FILE_OFFSET_BITS=64
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 include $(RTE_SDK)/mk/rte.extapp.mk
 
diff --git a/examples/vhost/main.c b/examples/vhost/main.c
index 0961db080..fce61d9ed 100644
--- a/examples/vhost/main.c
+++ b/examples/vhost/main.c
@@ -321,6 +321,7 @@ port_init(uint16_t port)
 		}
 	}
 
+	rte_eth_dev_set_supported_ptypes(port, 0);
 	/* Start the device. */
 	retval  = rte_eth_dev_start(port);
 	if (retval < 0) {
diff --git a/examples/vm_power_manager/Makefile b/examples/vm_power_manager/Makefile
index 2fdb991d7..65c2ad179 100644
--- a/examples/vm_power_manager/Makefile
+++ b/examples/vm_power_manager/Makefile
@@ -28,6 +28,7 @@ endif
 
 CFLAGS += -O3 -I$(RTE_SDK)/lib/librte_power/
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 LDLIBS += -lvirt
 
diff --git a/examples/vm_power_manager/main.c b/examples/vm_power_manager/main.c
index 54c704610..b5ad0d96b 100644
--- a/examples/vm_power_manager/main.c
+++ b/examples/vm_power_manager/main.c
@@ -99,6 +99,7 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool)
 			return retval;
 	}
 
+	rte_eth_dev_set_supported_ptypes(port, 0);
 	/* Start the Ethernet port. */
 	retval = rte_eth_dev_start(port);
 	if (retval < 0)
diff --git a/examples/vm_power_manager/meson.build b/examples/vm_power_manager/meson.build
index 20a4a05b3..54e2b584f 100644
--- a/examples/vm_power_manager/meson.build
+++ b/examples/vm_power_manager/meson.build
@@ -25,6 +25,7 @@ if dpdk_conf.has('RTE_LIBRTE_IXGBE_PMD')
 	deps += ['pmd_ixgbe']
 endif
 
+allow_experimental_apis = true
 sources = files(
 	'channel_manager.c', 'channel_monitor.c', 'main.c', 'parse.c', 'power_manager.c', 'vm_power_cli.c'
 )
diff --git a/examples/vmdq/Makefile b/examples/vmdq/Makefile
index 1557ee86b..2168747cc 100644
--- a/examples/vmdq/Makefile
+++ b/examples/vmdq/Makefile
@@ -50,6 +50,7 @@ RTE_TARGET ?= $(notdir $(abspath $(dir $(firstword $(wildcard $(RTE_SDK)/*/.conf
 include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 EXTRA_CFLAGS += -O3
 
diff --git a/examples/vmdq/main.c b/examples/vmdq/main.c
index 7281ffd7f..675faaf17 100644
--- a/examples/vmdq/main.c
+++ b/examples/vmdq/main.c
@@ -258,6 +258,7 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool)
 		}
 	}
 
+	rte_eth_dev_set_supported_ptypes(port, 0);
 	retval  = rte_eth_dev_start(port);
 	if (retval < 0) {
 		printf("port %d start failed\n", port);
diff --git a/examples/vmdq/meson.build b/examples/vmdq/meson.build
index c34e11e36..2b0a25036 100644
--- a/examples/vmdq/meson.build
+++ b/examples/vmdq/meson.build
@@ -6,6 +6,7 @@
 # To build this example as a standalone application with an already-installed
 # DPDK instance, use 'make'
 
+allow_experimental_apis = true
 sources = files(
 	'main.c'
 )
diff --git a/examples/vmdq_dcb/Makefile b/examples/vmdq_dcb/Makefile
index 391096cfb..ea1574d91 100644
--- a/examples/vmdq_dcb/Makefile
+++ b/examples/vmdq_dcb/Makefile
@@ -50,6 +50,7 @@ RTE_TARGET ?= $(notdir $(abspath $(dir $(firstword $(wildcard $(RTE_SDK)/*/.conf
 include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 # workaround for a gcc bug with noreturn attribute
 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603
diff --git a/examples/vmdq_dcb/main.c b/examples/vmdq_dcb/main.c
index 389000327..3300e0a1f 100644
--- a/examples/vmdq_dcb/main.c
+++ b/examples/vmdq_dcb/main.c
@@ -313,6 +313,7 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool)
 		}
 	}
 
+	rte_eth_dev_set_supported_ptypes(port, 0);
 	retval  = rte_eth_dev_start(port);
 	if (retval < 0) {
 		printf("port %d start failed\n", port);
diff --git a/examples/vmdq_dcb/meson.build b/examples/vmdq_dcb/meson.build
index c34e11e36..2b0a25036 100644
--- a/examples/vmdq_dcb/meson.build
+++ b/examples/vmdq_dcb/meson.build
@@ -6,6 +6,7 @@
 # To build this example as a standalone application with an already-installed
 # DPDK instance, use 'make'
 
+allow_experimental_apis = true
 sources = files(
 	'main.c'
 )
-- 
2.22.0


^ permalink raw reply	[flat|nested] 245+ messages in thread

* Re: [dpdk-dev] [PATCH v2 2/7] ethdev: add mbuf RSS update as an offload
  2019-08-21 20:47 ` [dpdk-dev] [PATCH v2 2/7] ethdev: add mbuf RSS update as an offload pbhagavatula
@ 2019-08-23  1:19   ` Stephen Hemminger
  2019-08-27 13:44     ` Andrew Rybchenko
  2019-08-23  9:49   ` Andrew Rybchenko
  1 sibling, 1 reply; 245+ messages in thread
From: Stephen Hemminger @ 2019-08-23  1:19 UTC (permalink / raw)
  To: pbhagavatula
  Cc: arybchenko, jerinj, John McNamara, Marko Kovacevic,
	Thomas Monjalon, Ferruh Yigit, dev

On Thu, 22 Aug 2019 02:17:50 +0530
<pbhagavatula@marvell.com> wrote:

> From: Pavan Nikhilesh <pbhagavatula@marvell.com>
> 
> Add new Rx offload flag `DEV_RX_OFFLOAD_RSS_HASH` which can be used to
> enable/disable PMDs write to `rte_mbuf::hash::rss`.
> PMDs notify the validity of `rte_mbuf::hash:rss` to the applcation
> by enabling `PKT_RX_RSS_HASH ` flag in `rte_mbuf::ol_flags`.
> 
> Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
> Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>

Is this really a good idea?
Every bit of hardware that works on Windows with RSS is required to
supply the hash (for software steering).  So if adding an additional
capability, just adds another bit of complexity, code coverage, and one
more thing that won't be tested by everyone.

If hardware has it why not set it? Adding a branch is more expensive than
an unused assignment.


^ permalink raw reply	[flat|nested] 245+ messages in thread

* Re: [dpdk-dev] [PATCH v2 1/7] ethdev: add set ptype function
  2019-08-21 20:47 ` [dpdk-dev] [PATCH v2 1/7] ethdev: add set ptype function pbhagavatula
@ 2019-08-23  9:44   ` Andrew Rybchenko
  2019-10-01 14:54   ` Jerin Jacob
  1 sibling, 0 replies; 245+ messages in thread
From: Andrew Rybchenko @ 2019-08-23  9:44 UTC (permalink / raw)
  To: pbhagavatula, jerinj, John McNamara, Marko Kovacevic,
	Thomas Monjalon, Ferruh Yigit
  Cc: dev

On 8/21/19 11:47 PM, pbhagavatula@marvell.com wrote:
> From: Pavan Nikhilesh <pbhagavatula@marvell.com>
>
> Add `rte_eth_dev_set_supported_ptypes` function that will allow the
> application to inform the PMD the packet types it is interested in.
> 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_supported_ptypes(ethdev_id, RTE_PTYPE_UNKNOWN)` and PMD
> will set rte_mbuf::packet_type to 0.

I would say that "... and PMD may skip packet type processing and just set
rte_mbuf::packet_type to RTE_PTYPE_UNKNOWN."

I.e. PMD is not obligated to skip packet type processing, it just has
permission to do it.

> -If application doesn’t call `rte_eth_dev_set_supported_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_supported_ptypes(ethdev_id,
> 		RTE_PTYPE_L2_MASK | RTE_PTYPE_L3_MASK)`.
>
> Suggested-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
> Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
> ---
>   doc/guides/nics/features.rst             | 12 ++++++---
>   doc/guides/rel_notes/release_19_11.rst   |  7 ++++++
>   lib/librte_ethdev/rte_ethdev.c           | 32 ++++++++++++++++++++++++
>   lib/librte_ethdev/rte_ethdev.h           | 16 ++++++++++++
>   lib/librte_ethdev/rte_ethdev_core.h      |  6 +++++
>   lib/librte_ethdev/rte_ethdev_version.map |  3 +++
>   6 files changed, 72 insertions(+), 4 deletions(-)
>
> diff --git a/doc/guides/nics/features.rst b/doc/guides/nics/features.rst
> index c4e128d2f..d4d55f721 100644
> --- a/doc/guides/nics/features.rst
> +++ b/doc/guides/nics/features.rst
> @@ -582,10 +582,14 @@ Supports inner packet L4 checksum.
>   Packet type parsing
>   -------------------
>   
> -Supports packet type parsing and returns a list of supported types.
> -
> -* **[implements] eth_dev_ops**: ``dev_supported_ptypes_get``.
> -* **[related]    API**: ``rte_eth_dev_get_supported_ptypes()``.
> +Supports packet type parsing and returns a list of supported types. Allows
> +application to set ptypes it is interested in.

It is better to start new sentence from new line. It will keep the first 
line
untouched.

> +
> +* **[implements] eth_dev_ops**: ``dev_supported_ptypes_get``,
> +  ``dev_supported_ptypes_set``.
> +* **[related]    API**: ``rte_eth_dev_get_supported_ptypes()``,
> +  ``rte_eth_dev_set_supported_ptypes()``.
> +* **[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 8490d897c..a7cec1fe8 100644
> --- a/doc/guides/rel_notes/release_19_11.rst
> +++ b/doc/guides/rel_notes/release_19_11.rst
> @@ -56,6 +56,13 @@ New Features
>        Also, make sure to start the actual text at the margin.
>        =========================================================
>   
> +* **Added API in ethdev to set supported packet types**

May I suggest:
Added ethdev API to set supported packet types.

> +
> +  *  Added new API ``rte_eth_dev_set_supported_ptypes`` that allows an
> +     application to request PMD to set specific ptypes defined
> +     through ``rte_eth_dev_set_supported_ptypes`` in ``rte_mbuf::packet_type``.

Consider:
Added new API ``rte_eth_dev_set_supported_ptypes`` that allows an
application to inform PMD about packet types classification the application
is interested in.

> +  *  This scheme will allow PMDs to avoid lookup to internal ptype table on Rx
> +     and thereby improve Rx performance if application wishes do so.
>   
>   Removed Items
>   -------------
> diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
> index 17d183e1f..f529cbe9f 100644
> --- a/lib/librte_ethdev/rte_ethdev.c
> +++ b/lib/librte_ethdev/rte_ethdev.c
> @@ -2602,6 +2602,38 @@ rte_eth_dev_get_supported_ptypes(uint16_t port_id, uint32_t ptype_mask,
>   	return j;
>   }
>   
> +uint32_t
> +rte_eth_dev_set_supported_ptypes(uint16_t port_id, uint32_t ptype_mask)
> +{
> +	int i;
> +	struct rte_eth_dev *dev;
> +	const uint32_t *all_ptypes;
> +	uint32_t all_ptype_mask = 0;
> +	uint32_t supp_ptype_mask = 0;
> +
> +	RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);

We should either return 0 or change prototype to return successfully
set ptypes in optional (may be NULL) output parameter.
I would change the prototype.

> +	dev = &rte_eth_devices[port_id];
> +	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_supported_ptypes_get, 0);

Since API is not mandatory and provides just hits for optimizations, I think
it should return error in really unexpected cases only. It looks like 
invalid
port_id is the only case.

> +	if (ptype_mask == 0) {
> +		RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_supported_ptypes_set,
> +					0);
> +		return (*dev->dev_ops->dev_supported_ptypes_set)(dev,
> +				ptype_mask);
> +	}
> +
> +	all_ptypes = (*dev->dev_ops->dev_supported_ptypes_get)(dev);
> +	if (all_ptypes == NULL)
> +		return 0;
> +
> +	for (i = 0; all_ptypes[i] != RTE_PTYPE_UNKNOWN; ++i)
> +		all_ptype_mask |= all_ptypes[i];
> +
> +	supp_ptype_mask = all_ptype_mask & ptype_mask;

I think it is not that useful to do here. Moreover, it is invalid in a 
way how
it is implemented right now. E.g. if get returns:
RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4 | RTE_PTYPE_L4_TCP
RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4 | RTE_PTYPE_L4_UDP
RTE_PTYPE_L2_ARP
and mask is RTE_PTYPE_L2_MASK | RTE_PTYPE_L3_MASK | RTE_PTYPE_L4_MASK
the result will be:
RTE_PTYPE_L2_ARP | RTE_PTYPE_L3_IPV4 | RTE_PTYPE_L4_FRAG


> +	return (*dev->dev_ops->dev_supported_ptypes_set)(dev, supp_ptype_mask);

It is not checked that  dev_supported_ptypes_set is not NULL.

> +}
> +
>   void
>   rte_eth_macaddr_get(uint16_t port_id, struct rte_ether_addr *mac_addr)
>   {
> diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
> index dc6596bc9..1ab0af4d8 100644
> --- a/lib/librte_ethdev/rte_ethdev.h
> +++ b/lib/librte_ethdev/rte_ethdev.h
> @@ -2431,6 +2431,22 @@ int rte_eth_dev_fw_version_get(uint16_t port_id,
>    */
>   int rte_eth_dev_get_supported_ptypes(uint16_t port_id, uint32_t ptype_mask,
>   				     uint32_t *ptypes, int num);
> +/**

Missing:
  * @warning
  * @b EXPERIMENTAL: this API may change without prior notice.

> + * Request Ethernet device to set only specific packet types in the packet.

Request sounds mandatory. Consider:
Inform Ethernet device of the packet types classification in which
the recipient is interested.

> + *
> + * Application can use this function to set only specific ptypes that it's
> + * interested. This information can be used by the PMD to optimize Rx path.
> + *
> + * @param port_id
> + *   The port identifier of the Ethernet device.
> + * @param ptype_mask
> + *   The ptype family that application is interested in.

It should be highligted that for each layer it should be either
full mask (e.g. RTE_PTYPE_L4_MASK) or only one specific type
(e.g. RTE_PTYPE_L4_TCP) since otherwise caller may try
RTE_PTYPE_L4_TCP|RTE_PTYPE_L4_UDP which is RTE_PTYPE_L4_FRAG
in fact.

> + * @return
> + *   - (>=0) Ptype mask that has been set successfully.

uint32_t is always >=0, so I think (>=0) should be removed.
However, in fact I think it should be:
Negative errno value on error, 0 on success.

I think that "Ptype mask that has been set successfully" could be
misleading since for each layer it is not a bit mark, but enum.
The output should be supported_ptype_get-slyle. I.e. an array
which is terminated by RTE_PTYPE_UNKNOWN entry.

> + */
> +__rte_experimental
> +uint32_t rte_eth_dev_set_supported_ptypes(uint16_t port_id,
> +					  uint32_t ptype_mask);
>   
>   /**
>    * Retrieve the MTU of an Ethernet device.
> diff --git a/lib/librte_ethdev/rte_ethdev_core.h b/lib/librte_ethdev/rte_ethdev_core.h
> index 2922d5b7c..e65ae983d 100644
> --- a/lib/librte_ethdev/rte_ethdev_core.h
> +++ b/lib/librte_ethdev/rte_ethdev_core.h
> @@ -110,6 +110,10 @@ typedef void (*eth_dev_infos_get_t)(struct rte_eth_dev *dev,
>   typedef const uint32_t *(*eth_dev_supported_ptypes_get_t)(struct rte_eth_dev *dev);
>   /**< @internal Get supported ptypes of an Ethernet device. */
>   
> +typedef uint32_t (*eth_dev_supported_ptypes_set_t)(struct rte_eth_dev *dev,
> +					      uint32_t ptype_mask);
> +/**< @internal Set required ptypes of an Ethernet device. */

Consider:
Inform device about packet types in which the recipient is interested.

> +
>   typedef int (*eth_queue_start_t)(struct rte_eth_dev *dev,
>   				    uint16_t queue_id);
>   /**< @internal Start rx and tx of a queue of an Ethernet device. */
> @@ -421,6 +425,8 @@ struct eth_dev_ops {
>   	eth_fw_version_get_t       fw_version_get; /**< Get firmware version. */
>   	eth_dev_supported_ptypes_get_t dev_supported_ptypes_get;
>   	/**< Get packet types supported and identified by device. */
> +	eth_dev_supported_ptypes_set_t dev_supported_ptypes_set;
> +	/**< Inform device about the interested ptypes. */

Consider
Inform device about packet types in which the recipient is interested.

>   
>   	vlan_filter_set_t          vlan_filter_set; /**< Filter VLAN Setup. */
>   	vlan_tpid_set_t            vlan_tpid_set; /**< Outer/Inner VLAN TPID Setup. */

<snip>


^ permalink raw reply	[flat|nested] 245+ messages in thread

* Re: [dpdk-dev] [PATCH v2 2/7] ethdev: add mbuf RSS update as an offload
  2019-08-21 20:47 ` [dpdk-dev] [PATCH v2 2/7] ethdev: add mbuf RSS update as an offload pbhagavatula
  2019-08-23  1:19   ` Stephen Hemminger
@ 2019-08-23  9:49   ` Andrew Rybchenko
  1 sibling, 0 replies; 245+ messages in thread
From: Andrew Rybchenko @ 2019-08-23  9:49 UTC (permalink / raw)
  To: pbhagavatula, jerinj, John McNamara, Marko Kovacevic,
	Thomas Monjalon, Ferruh Yigit
  Cc: dev

On 8/21/19 11:47 PM, pbhagavatula@marvell.com wrote:
> From: Pavan Nikhilesh <pbhagavatula@marvell.com>
>
> Add new Rx offload flag `DEV_RX_OFFLOAD_RSS_HASH` which can be used to
> enable/disable PMDs write to `rte_mbuf::hash::rss`.
> PMDs notify the validity of `rte_mbuf::hash:rss` to the applcation
> by enabling `PKT_RX_RSS_HASH ` flag in `rte_mbuf::ol_flags`.
>
> Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
> Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>

LGTM, but release notes are missing.


^ permalink raw reply	[flat|nested] 245+ messages in thread

* Re: [dpdk-dev] [PATCH v2 3/7] ethdev: add flow action type update as an offload
  2019-08-21 20:47 ` [dpdk-dev] [PATCH v2 3/7] ethdev: add flow action type " pbhagavatula
@ 2019-08-23 10:00   ` Andrew Rybchenko
  0 siblings, 0 replies; 245+ messages in thread
From: Andrew Rybchenko @ 2019-08-23 10:00 UTC (permalink / raw)
  To: pbhagavatula, jerinj, John McNamara, Marko Kovacevic,
	Thomas Monjalon, Ferruh Yigit, Adrien Mazarguil
  Cc: dev

On 8/21/19 11:47 PM, pbhagavatula@marvell.com wrote:
> From: Pavan Nikhilesh <pbhagavatula@marvell.com>
>
> Add new Rx offload flag `DEV_RX_OFFLOAD_FLOW_MARK` that can be used to
> enable/disable PMDs write to `rte_mbuf::hash::fdir::hi` and
> `rte_mbuf::ol_flags` when flow actions `RTE_FLOW_ACTION_MARK` and
> `RTE_FLOW_ACTION_FLAG` are enabled.
>
> PMDs notify the validity of `rte_mbuf::hash:fdir::hi` to the applcation
> by enabling `PKT_RX_FDIR_ID` flag in `rte_mbuf::ol_flags`.
>
> Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>

LGTM, few minor notes below, otherwise

Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>

However, it is a long discussion of it in v1 which should be taken into 
account.

<snip>

> diff --git a/lib/librte_ethdev/rte_flow.h b/lib/librte_ethdev/rte_flow.h
> index b66bf1495..5d9d88d76 100644
> --- a/lib/librte_ethdev/rte_flow.h
> +++ b/lib/librte_ethdev/rte_flow.h
> @@ -1316,7 +1316,8 @@ enum rte_flow_action_type {
>   
>   	/**
>   	 * Attaches an integer value to packets and sets PKT_RX_FDIR and
> -	 * PKT_RX_FDIR_ID mbuf flags.
> +	 * PKT_RX_FDIR_ID mbuf flags when
> +	 * `rx_mode:offloads:DEV_RX_OFFLOAD_FLOW_MARK` is set.

I'd not concentrate on rx_mode offloads here. I'd say:
when Rx offload DEV_RX_OFFLOAD_FLOW_MARK is enabled.

>   	 *
>   	 * See struct rte_flow_action_mark.
>   	 */
> @@ -1324,7 +1325,8 @@ enum rte_flow_action_type {
>   
>   	/**
>   	 * Flags packets. Similar to MARK without a specific value; only
> -	 * sets the PKT_RX_FDIR mbuf flag.
> +	 * sets the PKT_RX_FDIR mbuf flag when
> +	 * `rx_mode:offloads:DEV_RX_OFFLOAD_FLOW_MARK` is set

Same as above.

>   	 *
>   	 * No associated configuration structure.
>   	 */


^ permalink raw reply	[flat|nested] 245+ messages in thread

* Re: [dpdk-dev] [PATCH v2 5/7] drivers/net: update Rx flow flag and mark capabilities
  2019-08-21 20:47 ` [dpdk-dev] [PATCH v2 5/7] drivers/net: update Rx flow flag and mark capabilities pbhagavatula
@ 2019-08-23 10:03   ` Andrew Rybchenko
  2019-10-01 14:48   ` Jerin Jacob
  1 sibling, 0 replies; 245+ messages in thread
From: Andrew Rybchenko @ 2019-08-23 10:03 UTC (permalink / raw)
  To: pbhagavatula, jerinj, Ajit Khaparde, Somnath Kotur, John Daley,
	Hyong Youb Kim, Beilei Xing, Qi Zhang, Jingjing Wu, Wenzhuo Lu,
	Qiming Yang, Konstantin Ananyev, Shahaf Shuler, Yongseok Koh,
	Viacheslav Ovsiienko, Nithin Dabilpuram, Kiran Kumar K
  Cc: dev

On 8/21/19 11:47 PM, pbhagavatula@marvell.com wrote:
> From: Pavan Nikhilesh <pbhagavatula@marvell.com>
>
> Add DEV_RX_OFFLOAD_FLOW_MARK flag for all PMDs that support flow action
> flag and mark.
>
> Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>

<snip>

> diff --git a/drivers/net/sfc/sfc_rx.c b/drivers/net/sfc/sfc_rx.c
> index 695580b22..0f842e9e9 100644
> --- a/drivers/net/sfc/sfc_rx.c
> +++ b/drivers/net/sfc/sfc_rx.c
> @@ -619,7 +619,8 @@ struct sfc_dp_rx sfc_efx_rx = {
>   	.features		= SFC_DP_RX_FEAT_INTR,
>   	.dev_offload_capa	= DEV_RX_OFFLOAD_CHECKSUM,
>   	.queue_offload_capa	= DEV_RX_OFFLOAD_SCATTER |
> -				  DEV_RX_OFFLOAD_RSS_HASH,
> +				  DEV_RX_OFFLOAD_RSS_HASH |
> +				  DEV_RX_OFFLOAD_FLOW_MARK,
>   	.qsize_up_rings		= sfc_efx_rx_qsize_up_rings,
>   	.qcreate		= sfc_efx_rx_qcreate,
>   	.qdestroy		= sfc_efx_rx_qdestroy,

The change should be dropped since libefx-datapath does not
support flow mark.

Also when flow rule with MARK/FLAG is validated it is required
to check that the offload is enabled, but don't worry about it,
it is not trivial and we'll care about it and provide the patch.

Thanks.


^ permalink raw reply	[flat|nested] 245+ messages in thread

* Re: [dpdk-dev] [PATCH v2 7/7] examples: disable Rx packet type parsing
  2019-08-21 20:47 ` [dpdk-dev] [PATCH v2 7/7] examples: disable Rx packet type parsing pbhagavatula
@ 2019-08-23 10:10   ` Andrew Rybchenko
  0 siblings, 0 replies; 245+ messages in thread
From: Andrew Rybchenko @ 2019-08-23 10:10 UTC (permalink / raw)
  To: pbhagavatula, jerinj, Nicolas Chautru, Chas Williams, David Hunt,
	Harry van Haaren, Marko Kovacevic, Ori Kam, Bruce Richardson,
	Pablo de Lara, Radu Nicolau, Akhil Goyal, Tomasz Kantecki,
	Bernard Iremonger, Cristian Dumitrescu, Konstantin Ananyev,
	Ferruh Yigit, Declan Doherty, Reshma Pattan, John McNamara,
	Xiaoyun Li, Jasvinder Singh, Byron Marohn, Maxime Coquelin,
	Tiwei Bie, Zhihong Wang
  Cc: dev

On 8/21/19 11:47 PM, pbhagavatula@marvell.com wrote:
> From: Pavan Nikhilesh <pbhagavatula@marvell.com>
>
> Disable packet type parsing in examples that don't use
> `rte_mbuf::packet_type` by setting ptype_mask as 0 in
> `rte_eth_dev_set_supported_ptypes`
>
> Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>

<snip>

> diff --git a/examples/bbdev_app/main.c b/examples/bbdev_app/main.c
> index 9acf666dc..8ae6e4972 100644
> --- a/examples/bbdev_app/main.c
> +++ b/examples/bbdev_app/main.c
> @@ -478,6 +478,7 @@ initialize_ports(struct app_config_params *app_params,
>   	}
>   
>   	rte_eth_promiscuous_enable(port_id);
> +	rte_eth_dev_set_supported_ptypes(port_id, 0);

Release notes and 1/7 patch description say that RTE_PTYPE_UNKNOWN
may be set in this case and may be it is even better vs 0.

>   
>   	rte_eth_macaddr_get(port_id, &bbdev_port_eth_addr);
>   	print_mac(port_id, &bbdev_port_eth_addr);
>

<snip>


^ permalink raw reply	[flat|nested] 245+ messages in thread

* Re: [dpdk-dev] [PATCH v2 2/7] ethdev: add mbuf RSS update as an offload
  2019-08-23  1:19   ` Stephen Hemminger
@ 2019-08-27 13:44     ` Andrew Rybchenko
  0 siblings, 0 replies; 245+ messages in thread
From: Andrew Rybchenko @ 2019-08-27 13:44 UTC (permalink / raw)
  To: Stephen Hemminger, pbhagavatula
  Cc: jerinj, John McNamara, Marko Kovacevic, Thomas Monjalon,
	Ferruh Yigit, dev

On 8/23/19 4:19 AM, Stephen Hemminger wrote:
> On Thu, 22 Aug 2019 02:17:50 +0530
> <pbhagavatula@marvell.com> wrote:
>
>> From: Pavan Nikhilesh <pbhagavatula@marvell.com>
>>
>> Add new Rx offload flag `DEV_RX_OFFLOAD_RSS_HASH` which can be used to
>> enable/disable PMDs write to `rte_mbuf::hash::rss`.
>> PMDs notify the validity of `rte_mbuf::hash:rss` to the applcation
>> by enabling `PKT_RX_RSS_HASH ` flag in `rte_mbuf::ol_flags`.
>>
>> Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
>> Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
> Is this really a good idea?
> Every bit of hardware that works on Windows with RSS is required to
> supply the hash (for software steering).  So if adding an additional
> capability, just adds another bit of complexity, code coverage, and one
> more thing that won't be tested by everyone.
>
> If hardware has it why not set it? Adding a branch is more expensive than
> an unused assignment.

If a PMD sees no gain in disabling the offload and addition branches,
nothing obligates PMD to do. Just keep as is - no problem.
However, it opens the door to skip delivery of the RSS hash
from NIC HW to host CPU if the hash is not required.
Why should it be delivered to CPU and eat PCIe bandwidth if
the information is not required?


^ permalink raw reply	[flat|nested] 245+ messages in thread

* [dpdk-dev]  [PATCH v3 0/7] ethdev: add new Rx offload flags
  2019-08-21 20:47 [dpdk-dev] [PATCH v2 0/7] ethdev: add new Rx offload flags pbhagavatula
                   ` (6 preceding siblings ...)
  2019-08-21 20:47 ` [dpdk-dev] [PATCH v2 7/7] examples: disable Rx packet type parsing pbhagavatula
@ 2019-09-29 21:19 ` pbhagavatula
  2019-09-29 21:19   ` [dpdk-dev] [PATCH v3 1/7] ethdev: add set ptype function pbhagavatula
                     ` (7 more replies)
  7 siblings, 8 replies; 245+ messages in thread
From: pbhagavatula @ 2019-09-29 21:19 UTC (permalink / raw)
  To: arybchenko, jerinj; +Cc: dev, Pavan Nikhilesh

From: Pavan Nikhilesh <pbhagavatula@marvell.com>

Add new Rx offload flags `DEV_RX_OFFLOAD_RSS_HASH` and
`DEV_RX_OFFLOAD_FLOW_MARK`. These flags can be used to
enable/disable PMD writes to rte_mbuf fields `hash.rss` and `hash.fdir.hi`
and also `ol_flags:PKT_RX_RSS` and `ol_flags:PKT_RX_FDIR`.

Add new packet type set function `rte_eth_dev_set_supported_ptypes`,
allows application to inform PMDs about the packet types it is interested
in. Based on ptypes requested by application PMDs can optimize the Rx path.

For example, if a given PMD doesn't support any packet types that the
application is interested in then the application can disable[1] writes to
`mbuf.packet_type` done by the PMD and use a software ptype parser.
     [1] rte_eth_dev_set_supported_ptypes(*port_id*, RTE_PTYPE_UNKNOWN);

v3 Changes:
----------
- Add missing release notes. (Andrew)
- Re-word various descriptions.
- Fix ptype set logic.

v2 Changes:
----------
- Update release notes. (Andrew)
- Redo commit logs. (Andrew)
- Disable ptype parsing for unsupported examples. (Jerin)
- Disable RSS write only in generic mode eventdev_pipeline. (Jerin)
- Modify set_supported_ptypes function to return successfuly set mask
  instead of failure.
- Dropped set_supported_ptypes to drivers by handling in library
  layer, interested PMD can add it in.


Pavan Nikhilesh (7):
  ethdev: add set ptype function
  ethdev: add mbuf RSS update as an offload
  ethdev: add flow action type update as an offload
  drivers/net: update Rx RSS hash offload capabilities
  drivers/net: update Rx flow flag and mark capabilities
  examples/eventdev_pipeline: add new Rx RSS hash offload
  examples: disable Rx packet type parsing

 doc/guides/nics/features.rst                  |  22 +++-
 doc/guides/rel_notes/release_19_11.rst        |  23 ++++
 drivers/net/bnxt/bnxt_ethdev.c                |   4 +-
 drivers/net/cxgbe/cxgbe.h                     |   3 +-
 drivers/net/dpaa/dpaa_ethdev.c                |   3 +-
 drivers/net/dpaa2/dpaa2_ethdev.c              |   3 +-
 drivers/net/e1000/igb_rxtx.c                  |   3 +-
 drivers/net/enic/enic_res.c                   |   4 +-
 drivers/net/fm10k/fm10k_ethdev.c              |   3 +-
 drivers/net/hinic/hinic_pmd_ethdev.c          |   3 +-
 drivers/net/i40e/i40e_ethdev.c                |   4 +-
 drivers/net/iavf/iavf_ethdev.c                |   4 +-
 drivers/net/ice/ice_ethdev.c                  |   4 +-
 drivers/net/ixgbe/ixgbe_rxtx.c                |   4 +-
 drivers/net/liquidio/lio_ethdev.c             |   3 +-
 drivers/net/mlx4/mlx4_rxq.c                   |   3 +-
 drivers/net/mlx5/mlx5_rxq.c                   |   4 +-
 drivers/net/netvsc/hn_rndis.c                 |   3 +-
 drivers/net/nfp/nfp_net.c                     |   3 +-
 drivers/net/octeontx2/otx2_ethdev.c           |   3 +-
 drivers/net/octeontx2/otx2_ethdev.h           |  16 +--
 drivers/net/octeontx2/otx2_flow_parse.c       |   3 +-
 drivers/net/qede/qede_ethdev.c                |   3 +-
 drivers/net/sfc/sfc_ef10_essb_rx.c            |   3 +-
 drivers/net/sfc/sfc_ef10_rx.c                 |   3 +-
 drivers/net/sfc/sfc_rx.c                      |   3 +-
 drivers/net/thunderx/nicvf_ethdev.h           |   3 +-
 drivers/net/vmxnet3/vmxnet3_ethdev.c          |   3 +-
 examples/bbdev_app/main.c                     |   1 +
 examples/bond/main.c                          |   2 +
 examples/distributor/Makefile                 |   1 +
 examples/distributor/main.c                   |   1 +
 examples/distributor/meson.build              |   1 +
 examples/eventdev_pipeline/main.c             | 114 +----------------
 examples/eventdev_pipeline/meson.build        |   1 +
 .../pipeline_worker_generic.c                 | 118 ++++++++++++++++++
 .../eventdev_pipeline/pipeline_worker_tx.c    | 114 +++++++++++++++++
 examples/exception_path/Makefile              |   1 +
 examples/exception_path/main.c                |   1 +
 examples/exception_path/meson.build           |   1 +
 examples/flow_classify/flow_classify.c        |   1 +
 examples/flow_filtering/Makefile              |   1 +
 examples/flow_filtering/main.c                |   1 +
 examples/flow_filtering/meson.build           |   1 +
 examples/ip_pipeline/link.c                   |   1 +
 examples/ip_reassembly/Makefile               |   1 +
 examples/ip_reassembly/main.c                 |   1 +
 examples/ip_reassembly/meson.build            |   1 +
 examples/ipsec-secgw/ipsec-secgw.c            |   1 +
 examples/ipv4_multicast/Makefile              |   1 +
 examples/ipv4_multicast/main.c                |   1 +
 examples/ipv4_multicast/meson.build           |   1 +
 examples/kni/main.c                           |   1 +
 examples/l2fwd-cat/Makefile                   |   1 +
 examples/l2fwd-cat/l2fwd-cat.c                |   1 +
 examples/l2fwd-cat/meson.build                |   1 +
 examples/l2fwd-crypto/main.c                  |   1 +
 examples/l2fwd-jobstats/Makefile              |   1 +
 examples/l2fwd-jobstats/main.c                |   1 +
 examples/l2fwd-jobstats/meson.build           |   1 +
 examples/l2fwd-keepalive/Makefile             |   1 +
 examples/l2fwd-keepalive/main.c               |   1 +
 examples/l2fwd-keepalive/meson.build          |   1 +
 examples/l2fwd/Makefile                       |   1 +
 examples/l2fwd/main.c                         |   1 +
 examples/l2fwd/meson.build                    |   1 +
 examples/l3fwd-acl/Makefile                   |   1 +
 examples/l3fwd-acl/main.c                     |   1 +
 examples/l3fwd-acl/meson.build                |   1 +
 examples/l3fwd-power/main.c                   |   1 +
 examples/l3fwd-vf/Makefile                    |   1 +
 examples/l3fwd-vf/main.c                      |   1 +
 examples/l3fwd-vf/meson.build                 |   1 +
 examples/link_status_interrupt/Makefile       |   1 +
 examples/link_status_interrupt/main.c         |   1 +
 examples/link_status_interrupt/meson.build    |   1 +
 examples/load_balancer/Makefile               |   1 +
 examples/load_balancer/init.c                 |   1 +
 examples/load_balancer/meson.build            |   1 +
 examples/packet_ordering/Makefile             |   1 +
 examples/packet_ordering/main.c               |   1 +
 examples/packet_ordering/meson.build          |   1 +
 examples/ptpclient/Makefile                   |   1 +
 examples/ptpclient/meson.build                |   1 +
 examples/ptpclient/ptpclient.c                |   1 +
 examples/qos_meter/Makefile                   |   1 +
 examples/qos_meter/main.c                     |   2 +
 examples/qos_meter/meson.build                |   1 +
 examples/qos_sched/Makefile                   |   1 +
 examples/qos_sched/init.c                     |   1 +
 examples/qos_sched/meson.build                |   1 +
 examples/quota_watermark/qw/Makefile          |   1 +
 examples/quota_watermark/qw/init.c            |   1 +
 examples/rxtx_callbacks/main.c                |   1 +
 examples/server_node_efd/server/Makefile      |   1 +
 examples/server_node_efd/server/init.c        |   1 +
 examples/skeleton/Makefile                    |   1 +
 examples/skeleton/basicfwd.c                  |   1 +
 examples/skeleton/meson.build                 |   1 +
 examples/tep_termination/Makefile             |   1 +
 examples/tep_termination/meson.build          |   1 +
 examples/tep_termination/vxlan_setup.c        |   1 +
 examples/vhost/Makefile                       |   1 +
 examples/vhost/main.c                         |   1 +
 examples/vm_power_manager/Makefile            |   1 +
 examples/vm_power_manager/main.c              |   1 +
 examples/vm_power_manager/meson.build         |   1 +
 examples/vmdq/Makefile                        |   1 +
 examples/vmdq/main.c                          |   1 +
 examples/vmdq/meson.build                     |   1 +
 examples/vmdq_dcb/Makefile                    |   1 +
 examples/vmdq_dcb/main.c                      |   1 +
 examples/vmdq_dcb/meson.build                 |   1 +
 lib/librte_ethdev/rte_ethdev.c                |  37 ++++++
 lib/librte_ethdev/rte_ethdev.h                |  23 ++++
 lib/librte_ethdev/rte_ethdev_core.h           |   8 ++
 lib/librte_ethdev/rte_ethdev_version.map      |   3 +
 lib/librte_ethdev/rte_flow.h                  |   6 +-
 118 files changed, 501 insertions(+), 149 deletions(-)

--
2.17.1


^ permalink raw reply	[flat|nested] 245+ messages in thread

* [dpdk-dev]  [PATCH v3 1/7] ethdev: add set ptype function
  2019-09-29 21:19 ` [dpdk-dev] [PATCH v3 0/7] ethdev: add new Rx offload flags pbhagavatula
@ 2019-09-29 21:19   ` pbhagavatula
  2019-09-29 21:19   ` [dpdk-dev] [PATCH v3 2/7] ethdev: add mbuf RSS update as an offload pbhagavatula
                     ` (6 subsequent siblings)
  7 siblings, 0 replies; 245+ messages in thread
From: pbhagavatula @ 2019-09-29 21:19 UTC (permalink / raw)
  To: arybchenko, jerinj, John McNamara, Marko Kovacevic,
	Thomas Monjalon, Ferruh Yigit
  Cc: dev, Pavan Nikhilesh

From: Pavan Nikhilesh <pbhagavatula@marvell.com>

Add `rte_eth_dev_set_supported_ptypes` function that will allow the
application to inform the PMD the packet types it is interested in.
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_supported_ptypes(ethdev_id, RTE_PTYPE_UNKNOWN)` 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_supported_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_supported_ptypes(ethdev_id,
		RTE_PTYPE_L2_MASK | RTE_PTYPE_L3_MASK)`.

Suggested-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
 doc/guides/nics/features.rst             |  8 ++++--
 doc/guides/rel_notes/release_19_11.rst   |  7 +++++
 lib/librte_ethdev/rte_ethdev.c           | 33 ++++++++++++++++++++++++
 lib/librte_ethdev/rte_ethdev.h           | 26 +++++++++++++++++++
 lib/librte_ethdev/rte_ethdev_core.h      |  6 +++++
 lib/librte_ethdev/rte_ethdev_version.map |  3 +++
 6 files changed, 81 insertions(+), 2 deletions(-)

diff --git a/doc/guides/nics/features.rst b/doc/guides/nics/features.rst
index c4e128d2f..1756fa73a 100644
--- a/doc/guides/nics/features.rst
+++ b/doc/guides/nics/features.rst
@@ -583,9 +583,13 @@ 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``,
+  ``dev_supported_ptypes_set``.
+* **[related]    API**: ``rte_eth_dev_get_supported_ptypes()``,
+  ``rte_eth_dev_set_supported_ptypes()``.
+* **[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 27cfbd9e3..7e31b9401 100644
--- a/doc/guides/rel_notes/release_19_11.rst
+++ b/doc/guides/rel_notes/release_19_11.rst
@@ -56,6 +56,13 @@ New Features
      Also, make sure to start the actual text at the margin.
      =========================================================
 
+* **Added ethdev API to set supported packet types**
+
+  *  Added new API ``rte_eth_dev_set_supported_ptypes`` that allows an
+     application to inform PMD about packet types classification the application
+     is interested in
+  *  This scheme will allow PMDs to avoid lookup to internal ptype table on Rx
+     and thereby improve Rx performance if application wishes do so.
 
 Removed Items
 -------------
diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
index 17d183e1f..7bd937b62 100644
--- a/lib/librte_ethdev/rte_ethdev.c
+++ b/lib/librte_ethdev/rte_ethdev.c
@@ -2602,6 +2602,39 @@ rte_eth_dev_get_supported_ptypes(uint16_t port_id, uint32_t ptype_mask,
 	return j;
 }
 
+int
+rte_eth_dev_set_supported_ptypes(uint16_t port_id, uint32_t ptype_mask,
+				 uint32_t *set_ptypes, int num)
+{
+	int i, j;
+	struct rte_eth_dev *dev;
+	const uint32_t *all_ptypes;
+
+	RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
+	dev = &rte_eth_devices[port_id];
+	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_supported_ptypes_get, 0);
+	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_supported_ptypes_set, 0);
+
+	if (ptype_mask == 0)
+		return (*dev->dev_ops->dev_supported_ptypes_set)(dev,
+				ptype_mask);
+
+	all_ptypes = (*dev->dev_ops->dev_supported_ptypes_get)(dev);
+	if (all_ptypes == NULL)
+		return 0;
+
+	for (i = 0, j = 0; set_ptypes && (all_ptypes[i] != RTE_PTYPE_UNKNOWN);
+									++i) {
+		if (ptype_mask & all_ptypes[i]) {
+			if (j < num)
+				set_ptypes[j] = all_ptypes[i];
+			j++;
+		}
+	}
+
+	return (*dev->dev_ops->dev_supported_ptypes_set)(dev, ptype_mask);
+}
+
 void
 rte_eth_macaddr_get(uint16_t port_id, struct rte_ether_addr *mac_addr)
 {
diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
index d9871782e..d5f4c1170 100644
--- a/lib/librte_ethdev/rte_ethdev.h
+++ b/lib/librte_ethdev/rte_ethdev.h
@@ -2431,6 +2431,32 @@ int rte_eth_dev_fw_version_get(uint16_t port_id,
  */
 int rte_eth_dev_get_supported_ptypes(uint16_t port_id, uint32_t ptype_mask,
 				     uint32_t *ptypes, int num);
+/**
+ * @warning
+ * @b EXPERIMENTAL: this API may change without prior notice.
+ *
+ * Inform Ethernet device of the packet types classification in which
+ * the recipient is interested.
+ *
+ * Application can use this function to set only specific ptypes that it's
+ * interested. This information can be used by the PMD to optimize Rx path.
+ *
+ * @param port_id
+ *   The port identifier of the Ethernet device.
+ * @param ptype_mask
+ *   The ptype family that application is interested in.
+ * @param set_ptypes
+ *   An array pointer to store set packet types, allocated by caller.
+ * @param num
+ *   Size of the array pointed by param ptypes.
+ * @return
+ *   - (0) if Success
+ *   - (-ENODEV) if *port_id* invalid.
+ *   - (-EINVAL) if *ptype_mask* is invalid.
+ */
+__rte_experimental
+int rte_eth_dev_set_supported_ptypes(uint16_t port_id, uint32_t ptype_mask,
+				     uint32_t *set_ptypes, int num);
 
 /**
  * Retrieve the MTU of an Ethernet device.
diff --git a/lib/librte_ethdev/rte_ethdev_core.h b/lib/librte_ethdev/rte_ethdev_core.h
index 2922d5b7c..93bc34480 100644
--- a/lib/librte_ethdev/rte_ethdev_core.h
+++ b/lib/librte_ethdev/rte_ethdev_core.h
@@ -110,6 +110,10 @@ typedef void (*eth_dev_infos_get_t)(struct rte_eth_dev *dev,
 typedef const uint32_t *(*eth_dev_supported_ptypes_get_t)(struct rte_eth_dev *dev);
 /**< @internal Get supported ptypes of an Ethernet device. */
 
+typedef uint32_t (*eth_dev_supported_ptypes_set_t)(struct rte_eth_dev *dev,
+					      uint32_t ptype_mask);
+/**< @internal Inform device about packet types in which the recipient is interested. */
+
 typedef int (*eth_queue_start_t)(struct rte_eth_dev *dev,
 				    uint16_t queue_id);
 /**< @internal Start rx and tx of a queue of an Ethernet device. */
@@ -421,6 +425,8 @@ struct eth_dev_ops {
 	eth_fw_version_get_t       fw_version_get; /**< Get firmware version. */
 	eth_dev_supported_ptypes_get_t dev_supported_ptypes_get;
 	/**< Get packet types supported and identified by device. */
+	eth_dev_supported_ptypes_set_t dev_supported_ptypes_set;
+	/**< Inform device about packet types in which the recipient is interested. */
 
 	vlan_filter_set_t          vlan_filter_set; /**< Filter VLAN Setup. */
 	vlan_tpid_set_t            vlan_tpid_set; /**< Outer/Inner VLAN TPID Setup. */
diff --git a/lib/librte_ethdev/rte_ethdev_version.map b/lib/librte_ethdev/rte_ethdev_version.map
index 6df42a47b..e14745b9c 100644
--- a/lib/librte_ethdev/rte_ethdev_version.map
+++ b/lib/librte_ethdev/rte_ethdev_version.map
@@ -283,4 +283,7 @@ EXPERIMENTAL {
 
 	# added in 19.08
 	rte_eth_read_clock;
+
+	# added in 19.11
+	rte_eth_dev_set_supported_ptypes;
 };
-- 
2.17.1


^ permalink raw reply	[flat|nested] 245+ messages in thread

* [dpdk-dev] [PATCH v3 2/7] ethdev: add mbuf RSS update as an offload
  2019-09-29 21:19 ` [dpdk-dev] [PATCH v3 0/7] ethdev: add new Rx offload flags pbhagavatula
  2019-09-29 21:19   ` [dpdk-dev] [PATCH v3 1/7] ethdev: add set ptype function pbhagavatula
@ 2019-09-29 21:19   ` pbhagavatula
  2019-09-29 21:19   ` [dpdk-dev] [PATCH v3 3/7] ethdev: add flow action type " pbhagavatula
                     ` (5 subsequent siblings)
  7 siblings, 0 replies; 245+ messages in thread
From: pbhagavatula @ 2019-09-29 21:19 UTC (permalink / raw)
  To: arybchenko, jerinj, John McNamara, Marko Kovacevic,
	Thomas Monjalon, Ferruh Yigit
  Cc: dev, Pavan Nikhilesh

From: Pavan Nikhilesh <pbhagavatula@marvell.com>

Add new Rx offload flag `DEV_RX_OFFLOAD_RSS_HASH` which can be used to
enable/disable PMDs write to `rte_mbuf::hash::rss`.
PMDs notify the validity of `rte_mbuf::hash:rss` to the applcation
by enabling `PKT_RX_RSS_HASH ` flag in `rte_mbuf::ol_flags`.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 doc/guides/nics/features.rst           | 2 ++
 doc/guides/rel_notes/release_19_11.rst | 7 +++++++
 lib/librte_ethdev/rte_ethdev.c         | 1 +
 lib/librte_ethdev/rte_ethdev.h         | 1 +
 4 files changed, 11 insertions(+)

diff --git a/doc/guides/nics/features.rst b/doc/guides/nics/features.rst
index 1756fa73a..f7c6d918f 100644
--- a/doc/guides/nics/features.rst
+++ b/doc/guides/nics/features.rst
@@ -274,6 +274,7 @@ Supports RSS hashing on RX.
 
 * **[uses]     user config**: ``dev_conf.rxmode.mq_mode`` = ``ETH_MQ_RX_RSS_FLAG``.
 * **[uses]     user config**: ``dev_conf.rx_adv_conf.rss_conf``.
+* **[uses]     rte_eth_rxconf,rte_eth_rxmode**: ``offloads:DEV_RX_OFFLOAD_RSS_HASH``.
 * **[provides] rte_eth_dev_info**: ``flow_type_rss_offloads``.
 * **[provides] mbuf**: ``mbuf.ol_flags:PKT_RX_RSS_HASH``, ``mbuf.rss``.
 
@@ -286,6 +287,7 @@ Inner RSS
 Supports RX RSS hashing on Inner headers.
 
 * **[uses]    rte_flow_action_rss**: ``level``.
+* **[uses]    rte_eth_rxconf,rte_eth_rxmode**: ``offloads:DEV_RX_OFFLOAD_RSS_HASH``.
 * **[provides] mbuf**: ``mbuf.ol_flags:PKT_RX_RSS_HASH``, ``mbuf.rss``.
 
 
diff --git a/doc/guides/rel_notes/release_19_11.rst b/doc/guides/rel_notes/release_19_11.rst
index 7e31b9401..78ce0bc0e 100644
--- a/doc/guides/rel_notes/release_19_11.rst
+++ b/doc/guides/rel_notes/release_19_11.rst
@@ -64,6 +64,13 @@ New Features
   *  This scheme will allow PMDs to avoid lookup to internal ptype table on Rx
      and thereby improve Rx performance if application wishes do so.
 
+* **Added Rx offload flag to enable or disable RSS update**
+
+  *  Added new Rx offload flag `DEV_RX_OFFLOAD_RSS_HASH` which can be used to
+     enable/disable PMDs write to `rte_mbuf::hash::rss`.
+  *  PMDs notify the validity of `rte_mbuf::hash:rss` to the applcation
+     by enabling `PKT_RX_RSS_HASH ` flag in `rte_mbuf::ol_flags`.
+
 Removed Items
 -------------
 
diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
index 7bd937b62..d99060845 100644
--- a/lib/librte_ethdev/rte_ethdev.c
+++ b/lib/librte_ethdev/rte_ethdev.c
@@ -129,6 +129,7 @@ static const struct {
 	RTE_RX_OFFLOAD_BIT2STR(KEEP_CRC),
 	RTE_RX_OFFLOAD_BIT2STR(SCTP_CKSUM),
 	RTE_RX_OFFLOAD_BIT2STR(OUTER_UDP_CKSUM),
+	RTE_RX_OFFLOAD_BIT2STR(RSS_HASH),
 };
 
 #undef RTE_RX_OFFLOAD_BIT2STR
diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
index d5f4c1170..08e72e39f 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_RSS_HASH		0x00080000
 
 #define DEV_RX_OFFLOAD_CHECKSUM (DEV_RX_OFFLOAD_IPV4_CKSUM | \
 				 DEV_RX_OFFLOAD_UDP_CKSUM | \
-- 
2.17.1


^ permalink raw reply	[flat|nested] 245+ messages in thread

* [dpdk-dev] [PATCH v3 3/7] ethdev: add flow action type update as an offload
  2019-09-29 21:19 ` [dpdk-dev] [PATCH v3 0/7] ethdev: add new Rx offload flags pbhagavatula
  2019-09-29 21:19   ` [dpdk-dev] [PATCH v3 1/7] ethdev: add set ptype function pbhagavatula
  2019-09-29 21:19   ` [dpdk-dev] [PATCH v3 2/7] ethdev: add mbuf RSS update as an offload pbhagavatula
@ 2019-09-29 21:19   ` " pbhagavatula
  2019-09-29 21:19   ` [dpdk-dev] [PATCH v3 4/7] drivers/net: update Rx RSS hash offload capabilities pbhagavatula
                     ` (4 subsequent siblings)
  7 siblings, 0 replies; 245+ messages in thread
From: pbhagavatula @ 2019-09-29 21:19 UTC (permalink / raw)
  To: arybchenko, jerinj, John McNamara, Marko Kovacevic,
	Thomas Monjalon, Ferruh Yigit, Adrien Mazarguil
  Cc: dev, Pavan Nikhilesh

From: Pavan Nikhilesh <pbhagavatula@marvell.com>

Add new Rx offload flag `DEV_RX_OFFLOAD_FLOW_MARK` that can be used to
enable/disable PMDs write to `rte_mbuf::hash::fdir::hi` and
`rte_mbuf::ol_flags` when flow actions `RTE_FLOW_ACTION_MARK` and
`RTE_FLOW_ACTION_FLAG` are enabled.

PMDs notify the validity of `rte_mbuf::hash:fdir::hi` to the applcation
by enabling `PKT_RX_FDIR_ID` flag in `rte_mbuf::ol_flags`.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 doc/guides/nics/features.rst           | 12 ++++++++++++
 doc/guides/rel_notes/release_19_11.rst |  9 +++++++++
 lib/librte_ethdev/rte_ethdev.c         |  1 +
 lib/librte_ethdev/rte_ethdev.h         |  1 +
 lib/librte_ethdev/rte_flow.h           |  6 ++++--
 5 files changed, 27 insertions(+), 2 deletions(-)

diff --git a/doc/guides/nics/features.rst b/doc/guides/nics/features.rst
index f7c6d918f..9737ff7a1 100644
--- a/doc/guides/nics/features.rst
+++ b/doc/guides/nics/features.rst
@@ -594,6 +594,18 @@ Allows application to set ptypes it is interested in.
 * **[provides]   mbuf**: ``mbuf.packet_type``.
 
 
+.. _nic_features_flow_flag_mark:
+
+Flow flag/mark update
+---------------------
+
+Supports flow action type update to ``mbuf.ol_flags`` and ``mbuf.hash.fdir.hi``.
+
+* **[uses]     rte_eth_rxconf,rte_eth_rxmode**: ``offloads:DEV_RX_OFFLOAD_FLOW_MARK``.
+* **[provides] mbuf**: ``mbuf.ol_flags:PKT_RX_FDIR``, ``mbuf.ol_flags:PKT_RX_FDIR_ID;``,
+  ``mbuf.hash.fdir.hi``
+
+
 .. _nic_features_timesync:
 
 Timesync
diff --git a/doc/guides/rel_notes/release_19_11.rst b/doc/guides/rel_notes/release_19_11.rst
index 78ce0bc0e..2ec521165 100644
--- a/doc/guides/rel_notes/release_19_11.rst
+++ b/doc/guides/rel_notes/release_19_11.rst
@@ -71,6 +71,15 @@ New Features
   *  PMDs notify the validity of `rte_mbuf::hash:rss` to the applcation
      by enabling `PKT_RX_RSS_HASH ` flag in `rte_mbuf::ol_flags`.
 
+* **Added Rx offload flag to enable or diable flow action type update**
+
+  *  Add new Rx offload flag `DEV_RX_OFFLOAD_FLOW_MARK` that can be used to
+     enable/disable PMDs write to `rte_mbuf::hash::fdir::hi` and
+     `rte_mbuf::ol_flags` when flow actions `RTE_FLOW_ACTION_MARK` and
+     `RTE_FLOW_ACTION_FLAG` are enabled.
+  *  PMDs notify the validity of `rte_mbuf::hash:fdir::hi` to the applcation
+     by enabling `PKT_RX_FDIR_ID` flag in `rte_mbuf::ol_flags`.
+
 Removed Items
 -------------
 
diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
index d99060845..907174186 100644
--- a/lib/librte_ethdev/rte_ethdev.c
+++ b/lib/librte_ethdev/rte_ethdev.c
@@ -130,6 +130,7 @@ static const struct {
 	RTE_RX_OFFLOAD_BIT2STR(SCTP_CKSUM),
 	RTE_RX_OFFLOAD_BIT2STR(OUTER_UDP_CKSUM),
 	RTE_RX_OFFLOAD_BIT2STR(RSS_HASH),
+	RTE_RX_OFFLOAD_BIT2STR(FLOW_MARK),
 };
 
 #undef RTE_RX_OFFLOAD_BIT2STR
diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
index 08e72e39f..73f2df119 100644
--- a/lib/librte_ethdev/rte_ethdev.h
+++ b/lib/librte_ethdev/rte_ethdev.h
@@ -1014,6 +1014,7 @@ struct rte_eth_conf {
 #define DEV_RX_OFFLOAD_SCTP_CKSUM	0x00020000
 #define DEV_RX_OFFLOAD_OUTER_UDP_CKSUM  0x00040000
 #define DEV_RX_OFFLOAD_RSS_HASH		0x00080000
+#define DEV_RX_OFFLOAD_FLOW_MARK	0x00100000
 
 #define DEV_RX_OFFLOAD_CHECKSUM (DEV_RX_OFFLOAD_IPV4_CKSUM | \
 				 DEV_RX_OFFLOAD_UDP_CKSUM | \
diff --git a/lib/librte_ethdev/rte_flow.h b/lib/librte_ethdev/rte_flow.h
index 354cb1dd0..5d62686c0 100644
--- a/lib/librte_ethdev/rte_flow.h
+++ b/lib/librte_ethdev/rte_flow.h
@@ -1316,7 +1316,8 @@ enum rte_flow_action_type {
 
 	/**
 	 * Attaches an integer value to packets and sets PKT_RX_FDIR and
-	 * PKT_RX_FDIR_ID mbuf flags.
+	 * PKT_RX_FDIR_ID mbuf flags when
+	 * `rx_mode:offloads:DEV_RX_OFFLOAD_FLOW_MARK` is enabled.
 	 *
 	 * See struct rte_flow_action_mark.
 	 */
@@ -1324,7 +1325,8 @@ enum rte_flow_action_type {
 
 	/**
 	 * Flags packets. Similar to MARK without a specific value; only
-	 * sets the PKT_RX_FDIR mbuf flag.
+	 * sets the PKT_RX_FDIR mbuf flag when
+	 * `rx_mode:offloads:DEV_RX_OFFLOAD_FLOW_MARK` is enabled.
 	 *
 	 * No associated configuration structure.
 	 */
-- 
2.17.1


^ permalink raw reply	[flat|nested] 245+ messages in thread

* [dpdk-dev] [PATCH v3 4/7] drivers/net: update Rx RSS hash offload capabilities
  2019-09-29 21:19 ` [dpdk-dev] [PATCH v3 0/7] ethdev: add new Rx offload flags pbhagavatula
                     ` (2 preceding siblings ...)
  2019-09-29 21:19   ` [dpdk-dev] [PATCH v3 3/7] ethdev: add flow action type " pbhagavatula
@ 2019-09-29 21:19   ` pbhagavatula
  2019-09-29 21:19   ` [dpdk-dev] [PATCH v3 5/7] drivers/net: update Rx flow flag and mark capabilities pbhagavatula
                     ` (3 subsequent siblings)
  7 siblings, 0 replies; 245+ messages in thread
From: pbhagavatula @ 2019-09-29 21:19 UTC (permalink / raw)
  To: arybchenko, jerinj, Ajit Khaparde, Somnath Kotur,
	Rahul Lakkireddy, Hemant Agrawal, Sachin Saxena, Wenzhuo Lu,
	John Daley, Hyong Youb Kim, Qi Zhang, Xiao Wang, Ziyang Xuan,
	Xiaoyun Wang, Guoyang Zhou, Beilei Xing, Jingjing Wu,
	Qiming Yang, Konstantin Ananyev, Shijith Thotton,
	Srisivasubramanian Srinivasan, Matan Azrad, Shahaf Shuler,
	Viacheslav Ovsiienko, Stephen Hemminger, K. Y. Srinivasan,
	Haiyang Zhang, Alejandro Lucero, Nithin Dabilpuram,
	Kiran Kumar K, Rasesh Mody, Shahed Shaikh, Maciej Czekaj,
	Yong Wang
  Cc: dev, Pavan Nikhilesh

From: Pavan Nikhilesh <pbhagavatula@marvell.com>

Add DEV_RX_OFFLOAD_RSS_HASH flag for all PMDs that support RSS hash
delivery.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
 drivers/net/bnxt/bnxt_ethdev.c       |  3 ++-
 drivers/net/cxgbe/cxgbe.h            |  3 ++-
 drivers/net/dpaa/dpaa_ethdev.c       |  3 ++-
 drivers/net/dpaa2/dpaa2_ethdev.c     |  3 ++-
 drivers/net/e1000/igb_rxtx.c         |  3 ++-
 drivers/net/enic/enic_res.c          |  3 ++-
 drivers/net/fm10k/fm10k_ethdev.c     |  3 ++-
 drivers/net/hinic/hinic_pmd_ethdev.c |  3 ++-
 drivers/net/i40e/i40e_ethdev.c       |  3 ++-
 drivers/net/iavf/iavf_ethdev.c       |  3 ++-
 drivers/net/ice/ice_ethdev.c         |  3 ++-
 drivers/net/ixgbe/ixgbe_rxtx.c       |  3 ++-
 drivers/net/liquidio/lio_ethdev.c    |  3 ++-
 drivers/net/mlx4/mlx4_rxq.c          |  3 ++-
 drivers/net/mlx5/mlx5_rxq.c          |  3 ++-
 drivers/net/netvsc/hn_rndis.c        |  3 ++-
 drivers/net/nfp/nfp_net.c            |  3 ++-
 drivers/net/octeontx2/otx2_ethdev.c  |  3 ++-
 drivers/net/octeontx2/otx2_ethdev.h  | 15 ++++++++-------
 drivers/net/qede/qede_ethdev.c       |  3 ++-
 drivers/net/sfc/sfc_ef10_essb_rx.c   |  2 +-
 drivers/net/sfc/sfc_ef10_rx.c        |  3 ++-
 drivers/net/sfc/sfc_rx.c             |  3 ++-
 drivers/net/thunderx/nicvf_ethdev.h  |  3 ++-
 drivers/net/vmxnet3/vmxnet3_ethdev.c |  3 ++-
 25 files changed, 55 insertions(+), 31 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 6685ee7d9..6c106baf7 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -160,7 +160,8 @@ static const struct rte_pci_id bnxt_pci_id_map[] = {
 				     DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM | \
 				     DEV_RX_OFFLOAD_JUMBO_FRAME | \
 				     DEV_RX_OFFLOAD_KEEP_CRC | \
-				     DEV_RX_OFFLOAD_TCP_LRO)
+				     DEV_RX_OFFLOAD_TCP_LRO | \
+				     DEV_RX_OFFLOAD_RSS_HASH)
 
 static int bnxt_vlan_offload_set_op(struct rte_eth_dev *dev, int mask);
 static void bnxt_print_link_info(struct rte_eth_dev *eth_dev);
diff --git a/drivers/net/cxgbe/cxgbe.h b/drivers/net/cxgbe/cxgbe.h
index 3f97fa58b..22e61a55c 100644
--- a/drivers/net/cxgbe/cxgbe.h
+++ b/drivers/net/cxgbe/cxgbe.h
@@ -47,7 +47,8 @@
 			   DEV_RX_OFFLOAD_UDP_CKSUM | \
 			   DEV_RX_OFFLOAD_TCP_CKSUM | \
 			   DEV_RX_OFFLOAD_JUMBO_FRAME | \
-			   DEV_RX_OFFLOAD_SCATTER)
+			   DEV_RX_OFFLOAD_SCATTER | \
+			   DEV_RX_OFFLOAD_RSS_HASH)
 
 
 #define CXGBE_DEVARG_KEEP_OVLAN "keep_ovlan"
diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
index 7154fb9b4..18c7bd0d5 100644
--- a/drivers/net/dpaa/dpaa_ethdev.c
+++ b/drivers/net/dpaa/dpaa_ethdev.c
@@ -49,7 +49,8 @@
 /* Supported Rx offloads */
 static uint64_t dev_rx_offloads_sup =
 		DEV_RX_OFFLOAD_JUMBO_FRAME |
-		DEV_RX_OFFLOAD_SCATTER;
+		DEV_RX_OFFLOAD_SCATTER |
+		DEV_RX_OFFLOAD_RSS_HASH;
 
 /* Rx offloads which cannot be disabled */
 static uint64_t dev_rx_offloads_nodis =
diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c
index dd6a78f9f..55a1c4455 100644
--- a/drivers/net/dpaa2/dpaa2_ethdev.c
+++ b/drivers/net/dpaa2/dpaa2_ethdev.c
@@ -38,7 +38,8 @@ static uint64_t dev_rx_offloads_sup =
 		DEV_RX_OFFLOAD_TCP_CKSUM |
 		DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM |
 		DEV_RX_OFFLOAD_VLAN_FILTER |
-		DEV_RX_OFFLOAD_JUMBO_FRAME;
+		DEV_RX_OFFLOAD_JUMBO_FRAME |
+		DEV_RX_OFFLOAD_RSS_HASH;
 
 /* Rx offloads which cannot be disabled */
 static uint64_t dev_rx_offloads_nodis =
diff --git a/drivers/net/e1000/igb_rxtx.c b/drivers/net/e1000/igb_rxtx.c
index c5606de5d..684fa4ad8 100644
--- a/drivers/net/e1000/igb_rxtx.c
+++ b/drivers/net/e1000/igb_rxtx.c
@@ -1646,7 +1646,8 @@ igb_get_rx_port_offloads_capa(struct rte_eth_dev *dev)
 			  DEV_RX_OFFLOAD_TCP_CKSUM   |
 			  DEV_RX_OFFLOAD_JUMBO_FRAME |
 			  DEV_RX_OFFLOAD_KEEP_CRC    |
-			  DEV_RX_OFFLOAD_SCATTER;
+			  DEV_RX_OFFLOAD_SCATTER     |
+			  DEV_RX_OFFLOAD_RSS_HASH;
 
 	return rx_offload_capa;
 }
diff --git a/drivers/net/enic/enic_res.c b/drivers/net/enic/enic_res.c
index 9405e1933..607a085f8 100644
--- a/drivers/net/enic/enic_res.c
+++ b/drivers/net/enic/enic_res.c
@@ -198,7 +198,8 @@ int enic_get_vnic_config(struct enic *enic)
 		DEV_RX_OFFLOAD_VLAN_STRIP |
 		DEV_RX_OFFLOAD_IPV4_CKSUM |
 		DEV_RX_OFFLOAD_UDP_CKSUM |
-		DEV_RX_OFFLOAD_TCP_CKSUM;
+		DEV_RX_OFFLOAD_TCP_CKSUM |
+		DEV_RX_OFFLOAD_RSS_HASH;
 	enic->tx_offload_mask =
 		PKT_TX_IPV6 |
 		PKT_TX_IPV4 |
diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c
index db4d72129..ba9b174cf 100644
--- a/drivers/net/fm10k/fm10k_ethdev.c
+++ b/drivers/net/fm10k/fm10k_ethdev.c
@@ -1797,7 +1797,8 @@ static uint64_t fm10k_get_rx_port_offloads_capa(struct rte_eth_dev *dev)
 			   DEV_RX_OFFLOAD_UDP_CKSUM   |
 			   DEV_RX_OFFLOAD_TCP_CKSUM   |
 			   DEV_RX_OFFLOAD_JUMBO_FRAME |
-			   DEV_RX_OFFLOAD_HEADER_SPLIT);
+			   DEV_RX_OFFLOAD_HEADER_SPLIT |
+			   DEV_RX_OFFLOAD_RSS_HASH);
 }
 
 static int
diff --git a/drivers/net/hinic/hinic_pmd_ethdev.c b/drivers/net/hinic/hinic_pmd_ethdev.c
index 044af9053..53bd2b9ae 100644
--- a/drivers/net/hinic/hinic_pmd_ethdev.c
+++ b/drivers/net/hinic/hinic_pmd_ethdev.c
@@ -680,7 +680,8 @@ hinic_dev_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *info)
 	info->rx_offload_capa = DEV_RX_OFFLOAD_VLAN_STRIP |
 				DEV_RX_OFFLOAD_IPV4_CKSUM |
 				DEV_RX_OFFLOAD_UDP_CKSUM |
-				DEV_RX_OFFLOAD_TCP_CKSUM;
+				DEV_RX_OFFLOAD_TCP_CKSUM |
+				DEV_RX_OFFLOAD_RSS_HASH;
 
 	info->tx_queue_offload_capa = 0;
 	info->tx_offload_capa = DEV_TX_OFFLOAD_VLAN_INSERT |
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 4e40b7ab5..7058e0213 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -3511,7 +3511,8 @@ i40e_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 		DEV_RX_OFFLOAD_SCATTER |
 		DEV_RX_OFFLOAD_VLAN_EXTEND |
 		DEV_RX_OFFLOAD_VLAN_FILTER |
-		DEV_RX_OFFLOAD_JUMBO_FRAME;
+		DEV_RX_OFFLOAD_JUMBO_FRAME |
+		DEV_RX_OFFLOAD_RSS_HASH;
 
 	dev_info->tx_queue_offload_capa = DEV_TX_OFFLOAD_MBUF_FAST_FREE;
 	dev_info->tx_offload_capa =
diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index 8f3907378..aef91a79b 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -517,7 +517,8 @@ iavf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 		DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM |
 		DEV_RX_OFFLOAD_SCATTER |
 		DEV_RX_OFFLOAD_JUMBO_FRAME |
-		DEV_RX_OFFLOAD_VLAN_FILTER;
+		DEV_RX_OFFLOAD_VLAN_FILTER |
+		DEV_RX_OFFLOAD_RSS_HASH;
 	dev_info->tx_offload_capa =
 		DEV_TX_OFFLOAD_VLAN_INSERT |
 		DEV_TX_OFFLOAD_QINQ_INSERT |
diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index 63997fdfb..2e2a6b2af 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -2145,7 +2145,8 @@ ice_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 			DEV_RX_OFFLOAD_TCP_CKSUM |
 			DEV_RX_OFFLOAD_QINQ_STRIP |
 			DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM |
-			DEV_RX_OFFLOAD_VLAN_EXTEND;
+			DEV_RX_OFFLOAD_VLAN_EXTEND |
+			DEV_RX_OFFLOAD_RSS_HASH;
 		dev_info->tx_offload_capa |=
 			DEV_TX_OFFLOAD_QINQ_INSERT |
 			DEV_TX_OFFLOAD_IPV4_CKSUM |
diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c
index edcfa60ce..fa572d184 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx.c
@@ -2872,7 +2872,8 @@ ixgbe_get_rx_port_offloads(struct rte_eth_dev *dev)
 		   DEV_RX_OFFLOAD_KEEP_CRC    |
 		   DEV_RX_OFFLOAD_JUMBO_FRAME |
 		   DEV_RX_OFFLOAD_VLAN_FILTER |
-		   DEV_RX_OFFLOAD_SCATTER;
+		   DEV_RX_OFFLOAD_SCATTER |
+		   DEV_RX_OFFLOAD_RSS_HASH;
 
 	if (hw->mac.type == ixgbe_mac_82598EB)
 		offloads |= DEV_RX_OFFLOAD_VLAN_STRIP;
diff --git a/drivers/net/liquidio/lio_ethdev.c b/drivers/net/liquidio/lio_ethdev.c
index c25dab00c..ff118586e 100644
--- a/drivers/net/liquidio/lio_ethdev.c
+++ b/drivers/net/liquidio/lio_ethdev.c
@@ -406,7 +406,8 @@ lio_dev_info_get(struct rte_eth_dev *eth_dev,
 	devinfo->rx_offload_capa = (DEV_RX_OFFLOAD_IPV4_CKSUM		|
 				    DEV_RX_OFFLOAD_UDP_CKSUM		|
 				    DEV_RX_OFFLOAD_TCP_CKSUM		|
-				    DEV_RX_OFFLOAD_VLAN_STRIP);
+				    DEV_RX_OFFLOAD_VLAN_STRIP		|
+				    DEV_RX_OFFLOAD_RSS_HASH);
 	devinfo->tx_offload_capa = (DEV_TX_OFFLOAD_IPV4_CKSUM		|
 				    DEV_TX_OFFLOAD_UDP_CKSUM		|
 				    DEV_TX_OFFLOAD_TCP_CKSUM		|
diff --git a/drivers/net/mlx4/mlx4_rxq.c b/drivers/net/mlx4/mlx4_rxq.c
index f45c1ff85..4a6fbd922 100644
--- a/drivers/net/mlx4/mlx4_rxq.c
+++ b/drivers/net/mlx4/mlx4_rxq.c
@@ -685,7 +685,8 @@ mlx4_get_rx_queue_offloads(struct mlx4_priv *priv)
 {
 	uint64_t offloads = DEV_RX_OFFLOAD_SCATTER |
 			    DEV_RX_OFFLOAD_KEEP_CRC |
-			    DEV_RX_OFFLOAD_JUMBO_FRAME;
+			    DEV_RX_OFFLOAD_JUMBO_FRAME |
+			    DEV_RX_OFFLOAD_RSS_HASH;
 
 	if (priv->hw_csum)
 		offloads |= DEV_RX_OFFLOAD_CHECKSUM;
diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
index a1fdeef2a..b5fd57693 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -368,7 +368,8 @@ mlx5_get_rx_queue_offloads(struct rte_eth_dev *dev)
 	struct mlx5_dev_config *config = &priv->config;
 	uint64_t offloads = (DEV_RX_OFFLOAD_SCATTER |
 			     DEV_RX_OFFLOAD_TIMESTAMP |
-			     DEV_RX_OFFLOAD_JUMBO_FRAME);
+			     DEV_RX_OFFLOAD_JUMBO_FRAME |
+			     DEV_RX_OFFLOAD_RSS_HASH);
 
 	if (config->hw_fcs_strip)
 		offloads |= DEV_RX_OFFLOAD_KEEP_CRC;
diff --git a/drivers/net/netvsc/hn_rndis.c b/drivers/net/netvsc/hn_rndis.c
index a67bc7a79..2b4714042 100644
--- a/drivers/net/netvsc/hn_rndis.c
+++ b/drivers/net/netvsc/hn_rndis.c
@@ -897,7 +897,8 @@ int hn_rndis_get_offload(struct hn_data *hv,
 	    == HN_NDIS_LSOV2_CAP_IP6)
 		dev_info->tx_offload_capa |= DEV_TX_OFFLOAD_TCP_TSO;
 
-	dev_info->rx_offload_capa = DEV_RX_OFFLOAD_VLAN_STRIP;
+	dev_info->rx_offload_capa = DEV_RX_OFFLOAD_VLAN_STRIP |
+				    DEV_RX_OFFLOAD_RSS_HASH;
 
 	if (hwcaps.ndis_csum.ndis_ip4_rxcsum & NDIS_RXCSUM_CAP_IP4)
 		dev_info->rx_offload_capa |= DEV_RX_OFFLOAD_IPV4_CKSUM;
diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
index f1a3ef2f9..230d64c8a 100644
--- a/drivers/net/nfp/nfp_net.c
+++ b/drivers/net/nfp/nfp_net.c
@@ -1226,7 +1226,8 @@ nfp_net_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 					     DEV_RX_OFFLOAD_UDP_CKSUM |
 					     DEV_RX_OFFLOAD_TCP_CKSUM;
 
-	dev_info->rx_offload_capa |= DEV_RX_OFFLOAD_JUMBO_FRAME;
+	dev_info->rx_offload_capa |= DEV_RX_OFFLOAD_JUMBO_FRAME |
+				     DEV_RX_OFFLOAD_RSS_HASH;
 
 	if (hw->cap & NFP_NET_CFG_CTRL_TXVLAN)
 		dev_info->tx_offload_capa = DEV_TX_OFFLOAD_VLAN_INSERT;
diff --git a/drivers/net/octeontx2/otx2_ethdev.c b/drivers/net/octeontx2/otx2_ethdev.c
index b84128fef..2e88d1844 100644
--- a/drivers/net/octeontx2/otx2_ethdev.c
+++ b/drivers/net/octeontx2/otx2_ethdev.c
@@ -569,7 +569,8 @@ nix_rx_offload_flags(struct rte_eth_dev *eth_dev)
 	struct rte_eth_rxmode *rxmode = &conf->rxmode;
 	uint16_t flags = 0;
 
-	if (rxmode->mq_mode == ETH_MQ_RX_RSS)
+	if (rxmode->mq_mode == ETH_MQ_RX_RSS &&
+			(dev->rx_offloads & DEV_RX_OFFLOAD_RSS_HASH))
 		flags |= NIX_RX_OFFLOAD_RSS_F;
 
 	if (dev->rx_offloads & (DEV_RX_OFFLOAD_TCP_CKSUM |
diff --git a/drivers/net/octeontx2/otx2_ethdev.h b/drivers/net/octeontx2/otx2_ethdev.h
index 7b15d6bc8..0cca6746d 100644
--- a/drivers/net/octeontx2/otx2_ethdev.h
+++ b/drivers/net/octeontx2/otx2_ethdev.h
@@ -122,8 +122,8 @@
 	DEV_TX_OFFLOAD_MT_LOCKFREE	| \
 	DEV_TX_OFFLOAD_VLAN_INSERT	| \
 	DEV_TX_OFFLOAD_QINQ_INSERT	| \
-	DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM | \
-	DEV_TX_OFFLOAD_OUTER_UDP_CKSUM  | \
+	DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM	| \
+	DEV_TX_OFFLOAD_OUTER_UDP_CKSUM	| \
 	DEV_TX_OFFLOAD_TCP_CKSUM	| \
 	DEV_TX_OFFLOAD_UDP_CKSUM	| \
 	DEV_TX_OFFLOAD_SCTP_CKSUM	| \
@@ -136,11 +136,12 @@
 	DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM | \
 	DEV_RX_OFFLOAD_SCATTER		| \
 	DEV_RX_OFFLOAD_JUMBO_FRAME	| \
-	DEV_RX_OFFLOAD_OUTER_UDP_CKSUM | \
-	DEV_RX_OFFLOAD_VLAN_STRIP | \
-	DEV_RX_OFFLOAD_VLAN_FILTER | \
-	DEV_RX_OFFLOAD_QINQ_STRIP | \
-	DEV_RX_OFFLOAD_TIMESTAMP)
+	DEV_RX_OFFLOAD_OUTER_UDP_CKSUM	| \
+	DEV_RX_OFFLOAD_VLAN_STRIP	| \
+	DEV_RX_OFFLOAD_VLAN_FILTER	| \
+	DEV_RX_OFFLOAD_QINQ_STRIP	| \
+	DEV_RX_OFFLOAD_TIMESTAMP	| \
+	DEV_RX_OFFLOAD_RSS_HASH)
 
 #define NIX_DEFAULT_RSS_CTX_GROUP  0
 #define NIX_DEFAULT_RSS_MCAM_IDX  -1
diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index 528b33e8c..da25b26df 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -1291,7 +1291,8 @@ qede_dev_info_get(struct rte_eth_dev *eth_dev,
 				     DEV_RX_OFFLOAD_SCATTER	|
 				     DEV_RX_OFFLOAD_JUMBO_FRAME |
 				     DEV_RX_OFFLOAD_VLAN_FILTER |
-				     DEV_RX_OFFLOAD_VLAN_STRIP);
+				     DEV_RX_OFFLOAD_VLAN_STRIP  |
+				     DEV_RX_OFFLOAD_RSS_HASH);
 	dev_info->rx_queue_offload_capa = 0;
 
 	/* TX offloads are on a per-packet basis, so it is applicable
diff --git a/drivers/net/sfc/sfc_ef10_essb_rx.c b/drivers/net/sfc/sfc_ef10_essb_rx.c
index 63da807ea..220ef0e47 100644
--- a/drivers/net/sfc/sfc_ef10_essb_rx.c
+++ b/drivers/net/sfc/sfc_ef10_essb_rx.c
@@ -716,7 +716,7 @@ struct sfc_dp_rx sfc_ef10_essb_rx = {
 	.features		= SFC_DP_RX_FEAT_FLOW_FLAG |
 				  SFC_DP_RX_FEAT_FLOW_MARK,
 	.dev_offload_capa	= DEV_RX_OFFLOAD_CHECKSUM,
-	.queue_offload_capa	= 0,
+	.queue_offload_capa	= DEV_RX_OFFLOAD_RSS_HASH,
 	.get_dev_info		= sfc_ef10_essb_rx_get_dev_info,
 	.pool_ops_supported	= sfc_ef10_essb_rx_pool_ops_supported,
 	.qsize_up_rings		= sfc_ef10_essb_rx_qsize_up_rings,
diff --git a/drivers/net/sfc/sfc_ef10_rx.c b/drivers/net/sfc/sfc_ef10_rx.c
index f2fc6e70a..85b5df466 100644
--- a/drivers/net/sfc/sfc_ef10_rx.c
+++ b/drivers/net/sfc/sfc_ef10_rx.c
@@ -797,7 +797,8 @@ struct sfc_dp_rx sfc_ef10_rx = {
 				  SFC_DP_RX_FEAT_INTR,
 	.dev_offload_capa	= DEV_RX_OFFLOAD_CHECKSUM |
 				  DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM,
-	.queue_offload_capa	= DEV_RX_OFFLOAD_SCATTER,
+	.queue_offload_capa	= DEV_RX_OFFLOAD_SCATTER |
+				  DEV_RX_OFFLOAD_RSS_HASH,
 	.get_dev_info		= sfc_ef10_rx_get_dev_info,
 	.qsize_up_rings		= sfc_ef10_rx_qsize_up_rings,
 	.qcreate		= sfc_ef10_rx_qcreate,
diff --git a/drivers/net/sfc/sfc_rx.c b/drivers/net/sfc/sfc_rx.c
index e6809bb64..695580b22 100644
--- a/drivers/net/sfc/sfc_rx.c
+++ b/drivers/net/sfc/sfc_rx.c
@@ -618,7 +618,8 @@ struct sfc_dp_rx sfc_efx_rx = {
 	},
 	.features		= SFC_DP_RX_FEAT_INTR,
 	.dev_offload_capa	= DEV_RX_OFFLOAD_CHECKSUM,
-	.queue_offload_capa	= DEV_RX_OFFLOAD_SCATTER,
+	.queue_offload_capa	= DEV_RX_OFFLOAD_SCATTER |
+				  DEV_RX_OFFLOAD_RSS_HASH,
 	.qsize_up_rings		= sfc_efx_rx_qsize_up_rings,
 	.qcreate		= sfc_efx_rx_qcreate,
 	.qdestroy		= sfc_efx_rx_qdestroy,
diff --git a/drivers/net/thunderx/nicvf_ethdev.h b/drivers/net/thunderx/nicvf_ethdev.h
index c0bfbf848..391411799 100644
--- a/drivers/net/thunderx/nicvf_ethdev.h
+++ b/drivers/net/thunderx/nicvf_ethdev.h
@@ -41,7 +41,8 @@
 	DEV_RX_OFFLOAD_CHECKSUM    | \
 	DEV_RX_OFFLOAD_VLAN_STRIP  | \
 	DEV_RX_OFFLOAD_JUMBO_FRAME | \
-	DEV_RX_OFFLOAD_SCATTER)
+	DEV_RX_OFFLOAD_SCATTER     | \
+	DEV_RX_OFFLOAD_RSS_HASH)
 
 #define NICVF_DEFAULT_RX_FREE_THRESH    224
 #define NICVF_DEFAULT_TX_FREE_THRESH    224
diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c
index 9cd5eb65b..da768ced7 100644
--- a/drivers/net/vmxnet3/vmxnet3_ethdev.c
+++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c
@@ -56,7 +56,8 @@
 	 DEV_RX_OFFLOAD_UDP_CKSUM |	\
 	 DEV_RX_OFFLOAD_TCP_CKSUM |	\
 	 DEV_RX_OFFLOAD_TCP_LRO |	\
-	 DEV_RX_OFFLOAD_JUMBO_FRAME)
+	 DEV_RX_OFFLOAD_JUMBO_FRAME |   \
+	 DEV_RX_OFFLOAD_RSS_HASH)
 
 static int eth_vmxnet3_dev_init(struct rte_eth_dev *eth_dev);
 static int eth_vmxnet3_dev_uninit(struct rte_eth_dev *eth_dev);
-- 
2.17.1


^ permalink raw reply	[flat|nested] 245+ messages in thread

* [dpdk-dev] [PATCH v3 5/7] drivers/net: update Rx flow flag and mark capabilities
  2019-09-29 21:19 ` [dpdk-dev] [PATCH v3 0/7] ethdev: add new Rx offload flags pbhagavatula
                     ` (3 preceding siblings ...)
  2019-09-29 21:19   ` [dpdk-dev] [PATCH v3 4/7] drivers/net: update Rx RSS hash offload capabilities pbhagavatula
@ 2019-09-29 21:19   ` pbhagavatula
  2019-09-29 21:19   ` [dpdk-dev] [PATCH v3 6/7] examples/eventdev_pipeline: add new Rx RSS hash offload pbhagavatula
                     ` (2 subsequent siblings)
  7 siblings, 0 replies; 245+ messages in thread
From: pbhagavatula @ 2019-09-29 21:19 UTC (permalink / raw)
  To: arybchenko, jerinj, Ajit Khaparde, Somnath Kotur, John Daley,
	Hyong Youb Kim, Beilei Xing, Qi Zhang, Jingjing Wu, Wenzhuo Lu,
	Qiming Yang, Konstantin Ananyev, Matan Azrad, Shahaf Shuler,
	Viacheslav Ovsiienko, Nithin Dabilpuram, Kiran Kumar K
  Cc: dev, Pavan Nikhilesh

From: Pavan Nikhilesh <pbhagavatula@marvell.com>

Add DEV_RX_OFFLOAD_FLOW_MARK flag for all PMDs that support flow action
flag and mark.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
 drivers/net/bnxt/bnxt_ethdev.c          | 3 ++-
 drivers/net/enic/enic_res.c             | 3 ++-
 drivers/net/i40e/i40e_ethdev.c          | 3 ++-
 drivers/net/iavf/iavf_ethdev.c          | 3 ++-
 drivers/net/ice/ice_ethdev.c            | 3 ++-
 drivers/net/ixgbe/ixgbe_rxtx.c          | 3 ++-
 drivers/net/mlx5/mlx5_rxq.c             | 3 ++-
 drivers/net/octeontx2/otx2_ethdev.h     | 3 ++-
 drivers/net/octeontx2/otx2_flow_parse.c | 3 ++-
 drivers/net/sfc/sfc_ef10_essb_rx.c      | 3 ++-
 10 files changed, 20 insertions(+), 10 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 6c106baf7..fd1fb7eda 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -161,7 +161,8 @@ static const struct rte_pci_id bnxt_pci_id_map[] = {
 				     DEV_RX_OFFLOAD_JUMBO_FRAME | \
 				     DEV_RX_OFFLOAD_KEEP_CRC | \
 				     DEV_RX_OFFLOAD_TCP_LRO | \
-				     DEV_RX_OFFLOAD_RSS_HASH)
+				     DEV_RX_OFFLOAD_RSS_HASH | \
+				     DEV_RX_OFFLOAD_FLOW_MARK)
 
 static int bnxt_vlan_offload_set_op(struct rte_eth_dev *dev, int mask);
 static void bnxt_print_link_info(struct rte_eth_dev *eth_dev);
diff --git a/drivers/net/enic/enic_res.c b/drivers/net/enic/enic_res.c
index 607a085f8..3503d5d7e 100644
--- a/drivers/net/enic/enic_res.c
+++ b/drivers/net/enic/enic_res.c
@@ -199,7 +199,8 @@ int enic_get_vnic_config(struct enic *enic)
 		DEV_RX_OFFLOAD_IPV4_CKSUM |
 		DEV_RX_OFFLOAD_UDP_CKSUM |
 		DEV_RX_OFFLOAD_TCP_CKSUM |
-		DEV_RX_OFFLOAD_RSS_HASH;
+		DEV_RX_OFFLOAD_RSS_HASH |
+		DEV_RX_OFFLOAD_FLOW_MARK;
 	enic->tx_offload_mask =
 		PKT_TX_IPV6 |
 		PKT_TX_IPV4 |
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 7058e0213..6311943be 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -3512,7 +3512,8 @@ i40e_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 		DEV_RX_OFFLOAD_VLAN_EXTEND |
 		DEV_RX_OFFLOAD_VLAN_FILTER |
 		DEV_RX_OFFLOAD_JUMBO_FRAME |
-		DEV_RX_OFFLOAD_RSS_HASH;
+		DEV_RX_OFFLOAD_RSS_HASH |
+		DEV_RX_OFFLOAD_FLOW_MARK;
 
 	dev_info->tx_queue_offload_capa = DEV_TX_OFFLOAD_MBUF_FAST_FREE;
 	dev_info->tx_offload_capa =
diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index aef91a79b..7bdaa87b1 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -518,7 +518,8 @@ iavf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 		DEV_RX_OFFLOAD_SCATTER |
 		DEV_RX_OFFLOAD_JUMBO_FRAME |
 		DEV_RX_OFFLOAD_VLAN_FILTER |
-		DEV_RX_OFFLOAD_RSS_HASH;
+		DEV_RX_OFFLOAD_RSS_HASH |
+		DEV_RX_OFFLOAD_FLOW_MARK;
 	dev_info->tx_offload_capa =
 		DEV_TX_OFFLOAD_VLAN_INSERT |
 		DEV_TX_OFFLOAD_QINQ_INSERT |
diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index 2e2a6b2af..984af659f 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -2146,7 +2146,8 @@ ice_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 			DEV_RX_OFFLOAD_QINQ_STRIP |
 			DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM |
 			DEV_RX_OFFLOAD_VLAN_EXTEND |
-			DEV_RX_OFFLOAD_RSS_HASH;
+			DEV_RX_OFFLOAD_RSS_HASH |
+			DEV_RX_OFFLOAD_FLOW_MARK;
 		dev_info->tx_offload_capa |=
 			DEV_TX_OFFLOAD_QINQ_INSERT |
 			DEV_TX_OFFLOAD_IPV4_CKSUM |
diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c
index fa572d184..1481e2426 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx.c
@@ -2873,7 +2873,8 @@ ixgbe_get_rx_port_offloads(struct rte_eth_dev *dev)
 		   DEV_RX_OFFLOAD_JUMBO_FRAME |
 		   DEV_RX_OFFLOAD_VLAN_FILTER |
 		   DEV_RX_OFFLOAD_SCATTER |
-		   DEV_RX_OFFLOAD_RSS_HASH;
+		   DEV_RX_OFFLOAD_RSS_HASH |
+		   DEV_RX_OFFLOAD_FLOW_MARK;
 
 	if (hw->mac.type == ixgbe_mac_82598EB)
 		offloads |= DEV_RX_OFFLOAD_VLAN_STRIP;
diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
index b5fd57693..1bf01bda3 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -369,7 +369,8 @@ mlx5_get_rx_queue_offloads(struct rte_eth_dev *dev)
 	uint64_t offloads = (DEV_RX_OFFLOAD_SCATTER |
 			     DEV_RX_OFFLOAD_TIMESTAMP |
 			     DEV_RX_OFFLOAD_JUMBO_FRAME |
-			     DEV_RX_OFFLOAD_RSS_HASH);
+			     DEV_RX_OFFLOAD_RSS_HASH |
+			     DEV_RX_OFFLOAD_FLOW_MARK);
 
 	if (config->hw_fcs_strip)
 		offloads |= DEV_RX_OFFLOAD_KEEP_CRC;
diff --git a/drivers/net/octeontx2/otx2_ethdev.h b/drivers/net/octeontx2/otx2_ethdev.h
index 0cca6746d..97c1a636a 100644
--- a/drivers/net/octeontx2/otx2_ethdev.h
+++ b/drivers/net/octeontx2/otx2_ethdev.h
@@ -141,7 +141,8 @@
 	DEV_RX_OFFLOAD_VLAN_FILTER	| \
 	DEV_RX_OFFLOAD_QINQ_STRIP	| \
 	DEV_RX_OFFLOAD_TIMESTAMP	| \
-	DEV_RX_OFFLOAD_RSS_HASH)
+	DEV_RX_OFFLOAD_RSS_HASH		| \
+	DEV_RX_OFFLOAD_FLOW_MARK)
 
 #define NIX_DEFAULT_RSS_CTX_GROUP  0
 #define NIX_DEFAULT_RSS_MCAM_IDX  -1
diff --git a/drivers/net/octeontx2/otx2_flow_parse.c b/drivers/net/octeontx2/otx2_flow_parse.c
index 6670c1a70..6eb69a8b2 100644
--- a/drivers/net/octeontx2/otx2_flow_parse.c
+++ b/drivers/net/octeontx2/otx2_flow_parse.c
@@ -979,7 +979,8 @@ otx2_flow_parse_actions(struct rte_eth_dev *dev,
 	if (mark)
 		flow->npc_action |= (uint64_t)mark << 40;
 
-	if (rte_atomic32_read(&npc->mark_actions) == 1) {
+	if (rte_atomic32_read(&npc->mark_actions) == 1 &&
+			(hw->rx_offloads & DEV_RX_OFFLOAD_FLOW_MARK)) {
 		hw->rx_offload_flags |=
 			NIX_RX_OFFLOAD_MARK_UPDATE_F;
 		otx2_eth_set_rx_function(dev);
diff --git a/drivers/net/sfc/sfc_ef10_essb_rx.c b/drivers/net/sfc/sfc_ef10_essb_rx.c
index 220ef0e47..1887731e2 100644
--- a/drivers/net/sfc/sfc_ef10_essb_rx.c
+++ b/drivers/net/sfc/sfc_ef10_essb_rx.c
@@ -716,7 +716,8 @@ struct sfc_dp_rx sfc_ef10_essb_rx = {
 	.features		= SFC_DP_RX_FEAT_FLOW_FLAG |
 				  SFC_DP_RX_FEAT_FLOW_MARK,
 	.dev_offload_capa	= DEV_RX_OFFLOAD_CHECKSUM,
-	.queue_offload_capa	= DEV_RX_OFFLOAD_RSS_HASH,
+	.queue_offload_capa	= DEV_RX_OFFLOAD_RSS_HASH |
+				  DEV_RX_OFFLOAD_FLOW_MARK,
 	.get_dev_info		= sfc_ef10_essb_rx_get_dev_info,
 	.pool_ops_supported	= sfc_ef10_essb_rx_pool_ops_supported,
 	.qsize_up_rings		= sfc_ef10_essb_rx_qsize_up_rings,
-- 
2.17.1


^ permalink raw reply	[flat|nested] 245+ messages in thread

* [dpdk-dev] [PATCH v3 6/7] examples/eventdev_pipeline: add new Rx RSS hash offload
  2019-09-29 21:19 ` [dpdk-dev] [PATCH v3 0/7] ethdev: add new Rx offload flags pbhagavatula
                     ` (4 preceding siblings ...)
  2019-09-29 21:19   ` [dpdk-dev] [PATCH v3 5/7] drivers/net: update Rx flow flag and mark capabilities pbhagavatula
@ 2019-09-29 21:19   ` pbhagavatula
  2019-09-29 21:19   ` [dpdk-dev] [PATCH v3 7/7] examples: disable Rx packet type parsing pbhagavatula
  2019-10-01  6:34   ` [dpdk-dev] [PATCH v4 0/7] ethdev: add new Rx offload flags pbhagavatula
  7 siblings, 0 replies; 245+ messages in thread
From: pbhagavatula @ 2019-09-29 21:19 UTC (permalink / raw)
  To: arybchenko, jerinj, Harry van Haaren; +Cc: dev, Pavan Nikhilesh

From: Pavan Nikhilesh <pbhagavatula@marvell.com>

Since pipeline_generic uses `rte_mbuf::hash::rss` add the new Rx offload
flag `DEV_RX_OFFLOAD_RSS_HASH` to inform PMD to copy the RSS hash result
into the mbuf.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
 examples/eventdev_pipeline/main.c             | 113 -----------------
 .../pipeline_worker_generic.c                 | 118 ++++++++++++++++++
 .../eventdev_pipeline/pipeline_worker_tx.c    | 114 +++++++++++++++++
 3 files changed, 232 insertions(+), 113 deletions(-)

diff --git a/examples/eventdev_pipeline/main.c b/examples/eventdev_pipeline/main.c
index f4e57f541..a73b61d59 100644
--- a/examples/eventdev_pipeline/main.c
+++ b/examples/eventdev_pipeline/main.c
@@ -242,118 +242,6 @@ parse_app_args(int argc, char **argv)
 	}
 }
 
-/*
- * Initializes a given port using global settings and with the RX buffers
- * coming from the mbuf_pool passed as a parameter.
- */
-static inline int
-port_init(uint8_t port, struct rte_mempool *mbuf_pool)
-{
-	struct rte_eth_rxconf rx_conf;
-	static const struct rte_eth_conf port_conf_default = {
-		.rxmode = {
-			.mq_mode = ETH_MQ_RX_RSS,
-			.max_rx_pkt_len = RTE_ETHER_MAX_LEN,
-		},
-		.rx_adv_conf = {
-			.rss_conf = {
-				.rss_hf = ETH_RSS_IP |
-					  ETH_RSS_TCP |
-					  ETH_RSS_UDP,
-			}
-		}
-	};
-	const uint16_t rx_rings = 1, tx_rings = 1;
-	const uint16_t rx_ring_size = 512, tx_ring_size = 512;
-	struct rte_eth_conf port_conf = port_conf_default;
-	int retval;
-	uint16_t q;
-	struct rte_eth_dev_info dev_info;
-	struct rte_eth_txconf txconf;
-
-	if (!rte_eth_dev_is_valid_port(port))
-		return -1;
-
-	rte_eth_dev_info_get(port, &dev_info);
-	if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_MBUF_FAST_FREE)
-		port_conf.txmode.offloads |=
-			DEV_TX_OFFLOAD_MBUF_FAST_FREE;
-	rx_conf = dev_info.default_rxconf;
-	rx_conf.offloads = port_conf.rxmode.offloads;
-
-	port_conf.rx_adv_conf.rss_conf.rss_hf &=
-		dev_info.flow_type_rss_offloads;
-	if (port_conf.rx_adv_conf.rss_conf.rss_hf !=
-			port_conf_default.rx_adv_conf.rss_conf.rss_hf) {
-		printf("Port %u modified RSS hash function based on hardware support,"
-			"requested:%#"PRIx64" configured:%#"PRIx64"\n",
-			port,
-			port_conf_default.rx_adv_conf.rss_conf.rss_hf,
-			port_conf.rx_adv_conf.rss_conf.rss_hf);
-	}
-
-	/* Configure the Ethernet device. */
-	retval = rte_eth_dev_configure(port, rx_rings, tx_rings, &port_conf);
-	if (retval != 0)
-		return retval;
-
-	/* Allocate and set up 1 RX queue per Ethernet port. */
-	for (q = 0; q < rx_rings; q++) {
-		retval = rte_eth_rx_queue_setup(port, q, rx_ring_size,
-				rte_eth_dev_socket_id(port), &rx_conf,
-				mbuf_pool);
-		if (retval < 0)
-			return retval;
-	}
-
-	txconf = dev_info.default_txconf;
-	txconf.offloads = port_conf_default.txmode.offloads;
-	/* Allocate and set up 1 TX queue per Ethernet port. */
-	for (q = 0; q < tx_rings; q++) {
-		retval = rte_eth_tx_queue_setup(port, q, tx_ring_size,
-				rte_eth_dev_socket_id(port), &txconf);
-		if (retval < 0)
-			return retval;
-	}
-
-	/* Display the port MAC address. */
-	struct rte_ether_addr addr;
-	rte_eth_macaddr_get(port, &addr);
-	printf("Port %u MAC: %02" PRIx8 " %02" PRIx8 " %02" PRIx8
-			   " %02" PRIx8 " %02" PRIx8 " %02" PRIx8 "\n",
-			(unsigned int)port,
-			addr.addr_bytes[0], addr.addr_bytes[1],
-			addr.addr_bytes[2], addr.addr_bytes[3],
-			addr.addr_bytes[4], addr.addr_bytes[5]);
-
-	/* Enable RX in promiscuous mode for the Ethernet device. */
-	rte_eth_promiscuous_enable(port);
-
-	return 0;
-}
-
-static int
-init_ports(uint16_t num_ports)
-{
-	uint16_t portid;
-
-	if (!cdata.num_mbuf)
-		cdata.num_mbuf = 16384 * num_ports;
-
-	struct rte_mempool *mp = rte_pktmbuf_pool_create("packet_pool",
-			/* mbufs */ cdata.num_mbuf,
-			/* cache_size */ 512,
-			/* priv_size*/ 0,
-			/* data_room_size */ RTE_MBUF_DEFAULT_BUF_SIZE,
-			rte_socket_id());
-
-	RTE_ETH_FOREACH_DEV(portid)
-		if (port_init(portid, mp) != 0)
-			rte_exit(EXIT_FAILURE, "Cannot init port %"PRIu16 "\n",
-					portid);
-
-	return 0;
-}
 
 static void
 do_capability_setup(uint8_t eventdev_id)
@@ -501,7 +389,6 @@ main(int argc, char **argv)
 	if (dev_id < 0)
 		rte_exit(EXIT_FAILURE, "Error setting up eventdev\n");
 
-	init_ports(num_ports);
 	fdata->cap.adptr_setup(num_ports);
 
 	/* Start the Ethernet port. */
diff --git a/examples/eventdev_pipeline/pipeline_worker_generic.c b/examples/eventdev_pipeline/pipeline_worker_generic.c
index 766c8e958..aa1678fe7 100644
--- a/examples/eventdev_pipeline/pipeline_worker_generic.c
+++ b/examples/eventdev_pipeline/pipeline_worker_generic.c
@@ -271,6 +271,123 @@ setup_eventdev_generic(struct worker_data *worker_data)
 	return dev_id;
 }
 
+/*
+ * Initializes a given port using global settings and with the RX buffers
+ * coming from the mbuf_pool passed as a parameter.
+ */
+static inline int
+port_init(uint8_t port, struct rte_mempool *mbuf_pool)
+{
+	struct rte_eth_rxconf rx_conf;
+	static const struct rte_eth_conf port_conf_default = {
+		.rxmode = {
+			.mq_mode = ETH_MQ_RX_RSS,
+			.max_rx_pkt_len = RTE_ETHER_MAX_LEN,
+		},
+		.rx_adv_conf = {
+			.rss_conf = {
+				.rss_hf = ETH_RSS_IP |
+					  ETH_RSS_TCP |
+					  ETH_RSS_UDP,
+			}
+		}
+	};
+	const uint16_t rx_rings = 1, tx_rings = 1;
+	const uint16_t rx_ring_size = 512, tx_ring_size = 512;
+	struct rte_eth_conf port_conf = port_conf_default;
+	int retval;
+	uint16_t q;
+	struct rte_eth_dev_info dev_info;
+	struct rte_eth_txconf txconf;
+
+	if (!rte_eth_dev_is_valid_port(port))
+		return -1;
+
+	rte_eth_dev_info_get(port, &dev_info);
+	if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_MBUF_FAST_FREE)
+		port_conf.txmode.offloads |=
+			DEV_TX_OFFLOAD_MBUF_FAST_FREE;
+
+	if (dev_info.rx_offload_capa & DEV_RX_OFFLOAD_RSS_HASH)
+		port_conf.rxmode.offloads |= DEV_RX_OFFLOAD_RSS_HASH;
+
+	rx_conf = dev_info.default_rxconf;
+	rx_conf.offloads = port_conf.rxmode.offloads;
+
+	port_conf.rx_adv_conf.rss_conf.rss_hf &=
+		dev_info.flow_type_rss_offloads;
+	if (port_conf.rx_adv_conf.rss_conf.rss_hf !=
+			port_conf_default.rx_adv_conf.rss_conf.rss_hf) {
+		printf("Port %u modified RSS hash function based on hardware support,"
+			"requested:%#"PRIx64" configured:%#"PRIx64"\n",
+			port,
+			port_conf_default.rx_adv_conf.rss_conf.rss_hf,
+			port_conf.rx_adv_conf.rss_conf.rss_hf);
+	}
+
+	/* Configure the Ethernet device. */
+	retval = rte_eth_dev_configure(port, rx_rings, tx_rings, &port_conf);
+	if (retval != 0)
+		return retval;
+
+	/* Allocate and set up 1 RX queue per Ethernet port. */
+	for (q = 0; q < rx_rings; q++) {
+		retval = rte_eth_rx_queue_setup(port, q, rx_ring_size,
+				rte_eth_dev_socket_id(port), &rx_conf,
+				mbuf_pool);
+		if (retval < 0)
+			return retval;
+	}
+
+	txconf = dev_info.default_txconf;
+	txconf.offloads = port_conf_default.txmode.offloads;
+	/* Allocate and set up 1 TX queue per Ethernet port. */
+	for (q = 0; q < tx_rings; q++) {
+		retval = rte_eth_tx_queue_setup(port, q, tx_ring_size,
+				rte_eth_dev_socket_id(port), &txconf);
+		if (retval < 0)
+			return retval;
+	}
+
+	/* Display the port MAC address. */
+	struct rte_ether_addr addr;
+	rte_eth_macaddr_get(port, &addr);
+	printf("Port %u MAC: %02" PRIx8 " %02" PRIx8 " %02" PRIx8
+			   " %02" PRIx8 " %02" PRIx8 " %02" PRIx8 "\n",
+			(unsigned int)port,
+			addr.addr_bytes[0], addr.addr_bytes[1],
+			addr.addr_bytes[2], addr.addr_bytes[3],
+			addr.addr_bytes[4], addr.addr_bytes[5]);
+
+	/* Enable RX in promiscuous mode for the Ethernet device. */
+	rte_eth_promiscuous_enable(port);
+
+	return 0;
+}
+
+static int
+init_ports(uint16_t num_ports)
+{
+	uint16_t portid;
+
+	if (!cdata.num_mbuf)
+		cdata.num_mbuf = 16384 * num_ports;
+
+	struct rte_mempool *mp = rte_pktmbuf_pool_create("packet_pool",
+			/* mbufs */ cdata.num_mbuf,
+			/* cache_size */ 512,
+			/* priv_size*/ 0,
+			/* data_room_size */ RTE_MBUF_DEFAULT_BUF_SIZE,
+			rte_socket_id());
+
+	RTE_ETH_FOREACH_DEV(portid)
+		if (port_init(portid, mp) != 0)
+			rte_exit(EXIT_FAILURE, "Cannot init port %"PRIu16 "\n",
+					portid);
+
+	return 0;
+}
+
 static void
 init_adapters(uint16_t nb_ports)
 {
@@ -297,6 +414,7 @@ init_adapters(uint16_t nb_ports)
 		adptr_p_conf.enqueue_depth =
 			dev_info.max_event_port_enqueue_depth;
 
+	init_ports(nb_ports);
 	/* Create one adapter for all the ethernet ports. */
 	ret = rte_event_eth_rx_adapter_create(cdata.rx_adapter_id, evdev_id,
 			&adptr_p_conf);
diff --git a/examples/eventdev_pipeline/pipeline_worker_tx.c b/examples/eventdev_pipeline/pipeline_worker_tx.c
index 8961cd656..52a1b4174 100644
--- a/examples/eventdev_pipeline/pipeline_worker_tx.c
+++ b/examples/eventdev_pipeline/pipeline_worker_tx.c
@@ -603,6 +603,119 @@ service_rx_adapter(void *arg)
 	return 0;
 }
 
+/*
+ * Initializes a given port using global settings and with the RX buffers
+ * coming from the mbuf_pool passed as a parameter.
+ */
+static inline int
+port_init(uint8_t port, struct rte_mempool *mbuf_pool)
+{
+	struct rte_eth_rxconf rx_conf;
+	static const struct rte_eth_conf port_conf_default = {
+		.rxmode = {
+			.mq_mode = ETH_MQ_RX_RSS,
+			.max_rx_pkt_len = RTE_ETHER_MAX_LEN,
+		},
+		.rx_adv_conf = {
+			.rss_conf = {
+				.rss_hf = ETH_RSS_IP |
+					  ETH_RSS_TCP |
+					  ETH_RSS_UDP,
+			}
+		}
+	};
+	const uint16_t rx_rings = 1, tx_rings = 1;
+	const uint16_t rx_ring_size = 512, tx_ring_size = 512;
+	struct rte_eth_conf port_conf = port_conf_default;
+	int retval;
+	uint16_t q;
+	struct rte_eth_dev_info dev_info;
+	struct rte_eth_txconf txconf;
+
+	if (!rte_eth_dev_is_valid_port(port))
+		return -1;
+
+	rte_eth_dev_info_get(port, &dev_info);
+	if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_MBUF_FAST_FREE)
+		port_conf.txmode.offloads |=
+			DEV_TX_OFFLOAD_MBUF_FAST_FREE;
+	rx_conf = dev_info.default_rxconf;
+	rx_conf.offloads = port_conf.rxmode.offloads;
+
+	port_conf.rx_adv_conf.rss_conf.rss_hf &=
+		dev_info.flow_type_rss_offloads;
+	if (port_conf.rx_adv_conf.rss_conf.rss_hf !=
+			port_conf_default.rx_adv_conf.rss_conf.rss_hf) {
+		printf("Port %u modified RSS hash function based on hardware support,"
+			"requested:%#"PRIx64" configured:%#"PRIx64"\n",
+			port,
+			port_conf_default.rx_adv_conf.rss_conf.rss_hf,
+			port_conf.rx_adv_conf.rss_conf.rss_hf);
+	}
+
+	/* Configure the Ethernet device. */
+	retval = rte_eth_dev_configure(port, rx_rings, tx_rings, &port_conf);
+	if (retval != 0)
+		return retval;
+
+	/* Allocate and set up 1 RX queue per Ethernet port. */
+	for (q = 0; q < rx_rings; q++) {
+		retval = rte_eth_rx_queue_setup(port, q, rx_ring_size,
+				rte_eth_dev_socket_id(port), &rx_conf,
+				mbuf_pool);
+		if (retval < 0)
+			return retval;
+	}
+
+	txconf = dev_info.default_txconf;
+	txconf.offloads = port_conf_default.txmode.offloads;
+	/* Allocate and set up 1 TX queue per Ethernet port. */
+	for (q = 0; q < tx_rings; q++) {
+		retval = rte_eth_tx_queue_setup(port, q, tx_ring_size,
+				rte_eth_dev_socket_id(port), &txconf);
+		if (retval < 0)
+			return retval;
+	}
+
+	/* Display the port MAC address. */
+	struct rte_ether_addr addr;
+	rte_eth_macaddr_get(port, &addr);
+	printf("Port %u MAC: %02" PRIx8 " %02" PRIx8 " %02" PRIx8
+			   " %02" PRIx8 " %02" PRIx8 " %02" PRIx8 "\n",
+			(unsigned int)port,
+			addr.addr_bytes[0], addr.addr_bytes[1],
+			addr.addr_bytes[2], addr.addr_bytes[3],
+			addr.addr_bytes[4], addr.addr_bytes[5]);
+
+	/* Enable RX in promiscuous mode for the Ethernet device. */
+	rte_eth_promiscuous_enable(port);
+
+	return 0;
+}
+
+static int
+init_ports(uint16_t num_ports)
+{
+	uint16_t portid;
+
+	if (!cdata.num_mbuf)
+		cdata.num_mbuf = 16384 * num_ports;
+
+	struct rte_mempool *mp = rte_pktmbuf_pool_create("packet_pool",
+			/* mbufs */ cdata.num_mbuf,
+			/* cache_size */ 512,
+			/* priv_size*/ 0,
+			/* data_room_size */ RTE_MBUF_DEFAULT_BUF_SIZE,
+			rte_socket_id());
+
+	RTE_ETH_FOREACH_DEV(portid)
+		if (port_init(portid, mp) != 0)
+			rte_exit(EXIT_FAILURE, "Cannot init port %"PRIu16 "\n",
+					portid);
+
+	return 0;
+}
+
 static void
 init_adapters(uint16_t nb_ports)
 {
@@ -621,6 +734,7 @@ init_adapters(uint16_t nb_ports)
 		.new_event_threshold = 4096,
 	};
 
+	init_ports(nb_ports);
 	if (adptr_p_conf.new_event_threshold > dev_info.max_num_events)
 		adptr_p_conf.new_event_threshold = dev_info.max_num_events;
 	if (adptr_p_conf.dequeue_depth > dev_info.max_event_port_dequeue_depth)
-- 
2.17.1


^ permalink raw reply	[flat|nested] 245+ messages in thread

* [dpdk-dev] [PATCH v3 7/7] examples: disable Rx packet type parsing
  2019-09-29 21:19 ` [dpdk-dev] [PATCH v3 0/7] ethdev: add new Rx offload flags pbhagavatula
                     ` (5 preceding siblings ...)
  2019-09-29 21:19   ` [dpdk-dev] [PATCH v3 6/7] examples/eventdev_pipeline: add new Rx RSS hash offload pbhagavatula
@ 2019-09-29 21:19   ` pbhagavatula
  2019-09-30 17:47     ` Aaron Conole
  2019-10-01  6:34   ` [dpdk-dev] [PATCH v4 0/7] ethdev: add new Rx offload flags pbhagavatula
  7 siblings, 1 reply; 245+ messages in thread
From: pbhagavatula @ 2019-09-29 21:19 UTC (permalink / raw)
  To: arybchenko, jerinj, Nicolas Chautru, Chas Williams, David Hunt,
	Harry van Haaren, Marko Kovacevic, Ori Kam, Bruce Richardson,
	Radu Nicolau, Akhil Goyal, Tomasz Kantecki, Bernard Iremonger,
	Cristian Dumitrescu, Konstantin Ananyev, Ferruh Yigit,
	Declan Doherty, Reshma Pattan, John McNamara, Xiaoyun Li,
	Jasvinder Singh, Byron Marohn, Yipeng Wang, Maxime Coquelin,
	Tiwei Bie, Zhihong Wang
  Cc: dev, Pavan Nikhilesh

From: Pavan Nikhilesh <pbhagavatula@marvell.com>

Disable packet type parsing in examples that don't use
`rte_mbuf::packet_type` by setting ptype_mask as 0 in
`rte_eth_dev_set_supported_ptypes`

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
 examples/bbdev_app/main.c                  | 1 +
 examples/bond/main.c                       | 2 ++
 examples/distributor/Makefile              | 1 +
 examples/distributor/main.c                | 1 +
 examples/distributor/meson.build           | 1 +
 examples/eventdev_pipeline/main.c          | 1 +
 examples/eventdev_pipeline/meson.build     | 1 +
 examples/exception_path/Makefile           | 1 +
 examples/exception_path/main.c             | 1 +
 examples/exception_path/meson.build        | 1 +
 examples/flow_classify/flow_classify.c     | 1 +
 examples/flow_filtering/Makefile           | 1 +
 examples/flow_filtering/main.c             | 1 +
 examples/flow_filtering/meson.build        | 1 +
 examples/ip_pipeline/link.c                | 1 +
 examples/ip_reassembly/Makefile            | 1 +
 examples/ip_reassembly/main.c              | 1 +
 examples/ip_reassembly/meson.build         | 1 +
 examples/ipsec-secgw/ipsec-secgw.c         | 1 +
 examples/ipv4_multicast/Makefile           | 1 +
 examples/ipv4_multicast/main.c             | 1 +
 examples/ipv4_multicast/meson.build        | 1 +
 examples/kni/main.c                        | 1 +
 examples/l2fwd-cat/Makefile                | 1 +
 examples/l2fwd-cat/l2fwd-cat.c             | 1 +
 examples/l2fwd-cat/meson.build             | 1 +
 examples/l2fwd-crypto/main.c               | 1 +
 examples/l2fwd-jobstats/Makefile           | 1 +
 examples/l2fwd-jobstats/main.c             | 1 +
 examples/l2fwd-jobstats/meson.build        | 1 +
 examples/l2fwd-keepalive/Makefile          | 1 +
 examples/l2fwd-keepalive/main.c            | 1 +
 examples/l2fwd-keepalive/meson.build       | 1 +
 examples/l2fwd/Makefile                    | 1 +
 examples/l2fwd/main.c                      | 1 +
 examples/l2fwd/meson.build                 | 1 +
 examples/l3fwd-acl/Makefile                | 1 +
 examples/l3fwd-acl/main.c                  | 1 +
 examples/l3fwd-acl/meson.build             | 1 +
 examples/l3fwd-power/main.c                | 1 +
 examples/l3fwd-vf/Makefile                 | 1 +
 examples/l3fwd-vf/main.c                   | 1 +
 examples/l3fwd-vf/meson.build              | 1 +
 examples/link_status_interrupt/Makefile    | 1 +
 examples/link_status_interrupt/main.c      | 1 +
 examples/link_status_interrupt/meson.build | 1 +
 examples/load_balancer/Makefile            | 1 +
 examples/load_balancer/init.c              | 1 +
 examples/load_balancer/meson.build         | 1 +
 examples/packet_ordering/Makefile          | 1 +
 examples/packet_ordering/main.c            | 1 +
 examples/packet_ordering/meson.build       | 1 +
 examples/ptpclient/Makefile                | 1 +
 examples/ptpclient/meson.build             | 1 +
 examples/ptpclient/ptpclient.c             | 1 +
 examples/qos_meter/Makefile                | 1 +
 examples/qos_meter/main.c                  | 2 ++
 examples/qos_meter/meson.build             | 1 +
 examples/qos_sched/Makefile                | 1 +
 examples/qos_sched/init.c                  | 1 +
 examples/qos_sched/meson.build             | 1 +
 examples/quota_watermark/qw/Makefile       | 1 +
 examples/quota_watermark/qw/init.c         | 1 +
 examples/rxtx_callbacks/main.c             | 1 +
 examples/server_node_efd/server/Makefile   | 1 +
 examples/server_node_efd/server/init.c     | 1 +
 examples/skeleton/Makefile                 | 1 +
 examples/skeleton/basicfwd.c               | 1 +
 examples/skeleton/meson.build              | 1 +
 examples/tep_termination/Makefile          | 1 +
 examples/tep_termination/meson.build       | 1 +
 examples/tep_termination/vxlan_setup.c     | 1 +
 examples/vhost/Makefile                    | 1 +
 examples/vhost/main.c                      | 1 +
 examples/vm_power_manager/Makefile         | 1 +
 examples/vm_power_manager/main.c           | 1 +
 examples/vm_power_manager/meson.build      | 1 +
 examples/vmdq/Makefile                     | 1 +
 examples/vmdq/main.c                       | 1 +
 examples/vmdq/meson.build                  | 1 +
 examples/vmdq_dcb/Makefile                 | 1 +
 examples/vmdq_dcb/main.c                   | 1 +
 examples/vmdq_dcb/meson.build              | 1 +
 83 files changed, 85 insertions(+)

diff --git a/examples/bbdev_app/main.c b/examples/bbdev_app/main.c
index 9acf666dc..a32f63187 100644
--- a/examples/bbdev_app/main.c
+++ b/examples/bbdev_app/main.c
@@ -478,6 +478,7 @@ initialize_ports(struct app_config_params *app_params,
 	}
 
 	rte_eth_promiscuous_enable(port_id);
+	rte_eth_dev_set_supported_ptypes(port_id, RTE_PTYPE_UNKNOWN);
 
 	rte_eth_macaddr_get(port_id, &bbdev_port_eth_addr);
 	print_mac(port_id, &bbdev_port_eth_addr);
diff --git a/examples/bond/main.c b/examples/bond/main.c
index 1c0df9d46..8beb1dc14 100644
--- a/examples/bond/main.c
+++ b/examples/bond/main.c
@@ -195,6 +195,7 @@ slave_port_init(uint16_t portid, struct rte_mempool *mbuf_pool)
 		rte_exit(retval, "port %u: TX queue 0 setup failed (res=%d)",
 				portid, retval);
 
+	rte_eth_dev_set_supported_ptypes(portid, RTE_PTYPE_UNKNOWN);
 	retval  = rte_eth_dev_start(portid);
 	if (retval < 0)
 		rte_exit(retval,
@@ -271,6 +272,7 @@ bond_port_init(struct rte_mempool *mbuf_pool)
 		rte_exit(retval, "port %u: TX queue 0 setup failed (res=%d)",
 				BOND_PORT, retval);
 
+	rte_eth_dev_set_supported_ptypes(BOND_PORT, RTE_PTYPE_UNKNOWN);
 	retval  = rte_eth_dev_start(BOND_PORT);
 	if (retval < 0)
 		rte_exit(retval, "Start port %d failed (res=%d)", BOND_PORT, retval);
diff --git a/examples/distributor/Makefile b/examples/distributor/Makefile
index bac8d5578..a2a477279 100644
--- a/examples/distributor/Makefile
+++ b/examples/distributor/Makefile
@@ -50,6 +50,7 @@ RTE_TARGET ?= $(notdir $(abspath $(dir $(firstword $(wildcard $(RTE_SDK)/*/.conf
 include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 # workaround for a gcc bug with noreturn attribute
 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603
diff --git a/examples/distributor/main.c b/examples/distributor/main.c
index 81d7ca61d..bc945d862 100644
--- a/examples/distributor/main.c
+++ b/examples/distributor/main.c
@@ -162,6 +162,7 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool)
 			return retval;
 	}
 
+	rte_eth_dev_set_supported_ptypes(port, RTE_PTYPE_UNKNOWN);
 	retval = rte_eth_dev_start(port);
 	if (retval < 0)
 		return retval;
diff --git a/examples/distributor/meson.build b/examples/distributor/meson.build
index 26f108d65..c2976f6bd 100644
--- a/examples/distributor/meson.build
+++ b/examples/distributor/meson.build
@@ -10,6 +10,7 @@
 build = dpdk_conf.has('RTE_LIBRTE_POWER')
 
 deps += ['distributor', 'power']
+allow_experimental_apis = true
 sources = files(
 	'main.c'
 )
diff --git a/examples/eventdev_pipeline/main.c b/examples/eventdev_pipeline/main.c
index a73b61d59..9f9968cf8 100644
--- a/examples/eventdev_pipeline/main.c
+++ b/examples/eventdev_pipeline/main.c
@@ -393,6 +393,7 @@ main(int argc, char **argv)
 
 	/* Start the Ethernet port. */
 	RTE_ETH_FOREACH_DEV(portid) {
+		rte_eth_dev_set_supported_ptypes(portid, RTE_PTYPE_UNKNOWN);
 		err = rte_eth_dev_start(portid);
 		if (err < 0)
 			rte_exit(EXIT_FAILURE, "Error starting ethdev %d\n",
diff --git a/examples/eventdev_pipeline/meson.build b/examples/eventdev_pipeline/meson.build
index a54c35aa7..0fc916b05 100644
--- a/examples/eventdev_pipeline/meson.build
+++ b/examples/eventdev_pipeline/meson.build
@@ -7,6 +7,7 @@
 # DPDK instance, use 'make'
 
 deps += 'eventdev'
+allow_experimental_apis = true
 sources = files(
 	'main.c',
 	'pipeline_worker_generic.c',
diff --git a/examples/exception_path/Makefile b/examples/exception_path/Makefile
index 90c7f133a..a7c961276 100644
--- a/examples/exception_path/Makefile
+++ b/examples/exception_path/Makefile
@@ -51,6 +51,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 include $(RTE_SDK)/mk/rte.extapp.mk
 
diff --git a/examples/exception_path/main.c b/examples/exception_path/main.c
index 0d79e5a24..7dbc0970a 100644
--- a/examples/exception_path/main.c
+++ b/examples/exception_path/main.c
@@ -464,6 +464,7 @@ init_port(uint16_t port)
 		FATAL_ERROR("Could not setup up TX queue for port%u (%d)",
 				port, ret);
 
+	rte_eth_dev_set_supported_ptypes(port, RTE_PTYPE_UNKNOWN);
 	ret = rte_eth_dev_start(port);
 	if (ret < 0)
 		FATAL_ERROR("Could not start port%u (%d)", port, ret);
diff --git a/examples/exception_path/meson.build b/examples/exception_path/meson.build
index c34e11e36..2b0a25036 100644
--- a/examples/exception_path/meson.build
+++ b/examples/exception_path/meson.build
@@ -6,6 +6,7 @@
 # To build this example as a standalone application with an already-installed
 # DPDK instance, use 'make'
 
+allow_experimental_apis = true
 sources = files(
 	'main.c'
 )
diff --git a/examples/flow_classify/flow_classify.c b/examples/flow_classify/flow_classify.c
index bc7f43ea9..aa25218a3 100644
--- a/examples/flow_classify/flow_classify.c
+++ b/examples/flow_classify/flow_classify.c
@@ -231,6 +231,7 @@ port_init(uint8_t port, struct rte_mempool *mbuf_pool)
 	}
 
 	/* Start the Ethernet port. */
+	rte_eth_dev_set_supported_ptypes(port, RTE_PTYPE_UNKNOWN);
 	retval = rte_eth_dev_start(port);
 	if (retval < 0)
 		return retval;
diff --git a/examples/flow_filtering/Makefile b/examples/flow_filtering/Makefile
index a63a75555..793a08fae 100644
--- a/examples/flow_filtering/Makefile
+++ b/examples/flow_filtering/Makefile
@@ -49,6 +49,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 include $(RTE_SDK)/mk/rte.extapp.mk
 
diff --git a/examples/flow_filtering/main.c b/examples/flow_filtering/main.c
index a0487be77..fbd1b6cc2 100644
--- a/examples/flow_filtering/main.c
+++ b/examples/flow_filtering/main.c
@@ -176,6 +176,7 @@ init_port(void)
 	}
 
 	rte_eth_promiscuous_enable(port_id);
+	rte_eth_dev_set_supported_ptypes(port_id, RTE_PTYPE_UNKNOWN);
 	ret = rte_eth_dev_start(port_id);
 	if (ret < 0) {
 		rte_exit(EXIT_FAILURE,
diff --git a/examples/flow_filtering/meson.build b/examples/flow_filtering/meson.build
index 407795c42..6f5d1b08a 100644
--- a/examples/flow_filtering/meson.build
+++ b/examples/flow_filtering/meson.build
@@ -6,6 +6,7 @@
 # To build this example as a standalone application with an already-installed
 # DPDK instance, use 'make'
 
+allow_experimental_apis = true
 sources = files(
 	'main.c',
 )
diff --git a/examples/ip_pipeline/link.c b/examples/ip_pipeline/link.c
index 787eb866a..9f8b5b2ae 100644
--- a/examples/ip_pipeline/link.c
+++ b/examples/ip_pipeline/link.c
@@ -205,6 +205,7 @@ link_create(const char *name, struct link_params *params)
 			return NULL;
 	}
 
+	rte_eth_dev_set_supported_ptypes(port_id, RTE_PTYPE_UNKNOWN);
 	/* Port start */
 	status = rte_eth_dev_start(port_id);
 	if (status < 0)
diff --git a/examples/ip_reassembly/Makefile b/examples/ip_reassembly/Makefile
index 0b1a904e0..19c462388 100644
--- a/examples/ip_reassembly/Makefile
+++ b/examples/ip_reassembly/Makefile
@@ -52,6 +52,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 # workaround for a gcc bug with noreturn attribute
 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603
diff --git a/examples/ip_reassembly/main.c b/examples/ip_reassembly/main.c
index 38b39be6b..ff5407892 100644
--- a/examples/ip_reassembly/main.c
+++ b/examples/ip_reassembly/main.c
@@ -1158,6 +1158,7 @@ main(int argc, char **argv)
 		if ((enabled_port_mask & (1 << portid)) == 0) {
 			continue;
 		}
+		rte_eth_dev_set_supported_ptypes(portid, RTE_PTYPE_UNKNOWN);
 		/* Start device */
 		ret = rte_eth_dev_start(portid);
 		if (ret < 0)
diff --git a/examples/ip_reassembly/meson.build b/examples/ip_reassembly/meson.build
index 8ebd48291..8a667c265 100644
--- a/examples/ip_reassembly/meson.build
+++ b/examples/ip_reassembly/meson.build
@@ -7,6 +7,7 @@
 # DPDK instance, use 'make'
 
 deps += ['lpm', 'ip_frag']
+allow_experimental_apis = true
 sources = files(
 	'main.c'
 )
diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c
index 0d1fd6af6..619d248c8 100644
--- a/examples/ipsec-secgw/ipsec-secgw.c
+++ b/examples/ipsec-secgw/ipsec-secgw.c
@@ -2448,6 +2448,7 @@ main(int32_t argc, char **argv)
 		if ((enabled_port_mask & (1 << portid)) == 0)
 			continue;
 
+		rte_eth_dev_set_supported_ptypes(portid, RTE_PTYPE_UNKNOWN);
 		/*
 		 * Start device
 		 * note: device must be started before a flow rule
diff --git a/examples/ipv4_multicast/Makefile b/examples/ipv4_multicast/Makefile
index 5f8a67dd4..5171f7ab2 100644
--- a/examples/ipv4_multicast/Makefile
+++ b/examples/ipv4_multicast/Makefile
@@ -52,6 +52,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 # workaround for a gcc bug with noreturn attribute
 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603
diff --git a/examples/ipv4_multicast/main.c b/examples/ipv4_multicast/main.c
index 72eaadc51..29b3fed9c 100644
--- a/examples/ipv4_multicast/main.c
+++ b/examples/ipv4_multicast/main.c
@@ -765,6 +765,7 @@ main(int argc, char **argv)
 			qconf->tx_queue_id[portid] = queueid;
 			queueid++;
 		}
+		rte_eth_dev_set_supported_ptypes(portid, RTE_PTYPE_UNKNOWN);
 		rte_eth_allmulticast_enable(portid);
 		/* Start device */
 		ret = rte_eth_dev_start(portid);
diff --git a/examples/ipv4_multicast/meson.build b/examples/ipv4_multicast/meson.build
index d9e4c7c21..6969e2c54 100644
--- a/examples/ipv4_multicast/meson.build
+++ b/examples/ipv4_multicast/meson.build
@@ -7,6 +7,7 @@
 # DPDK instance, use 'make'
 
 deps += 'hash'
+allow_experimental_apis = true
 sources = files(
 	'main.c'
 )
diff --git a/examples/kni/main.c b/examples/kni/main.c
index 4710d7176..3163087ff 100644
--- a/examples/kni/main.c
+++ b/examples/kni/main.c
@@ -625,6 +625,7 @@ init_port(uint16_t port)
 		rte_exit(EXIT_FAILURE, "Could not setup up TX queue for "
 				"port%u (%d)\n", (unsigned)port, ret);
 
+	rte_eth_dev_set_supported_ptypes(port, RTE_PTYPE_UNKNOWN);
 	ret = rte_eth_dev_start(port);
 	if (ret < 0)
 		rte_exit(EXIT_FAILURE, "Could not start port%u (%d)\n",
diff --git a/examples/l2fwd-cat/Makefile b/examples/l2fwd-cat/Makefile
index c1960d6d3..d6a25e42a 100644
--- a/examples/l2fwd-cat/Makefile
+++ b/examples/l2fwd-cat/Makefile
@@ -66,6 +66,7 @@ endif
 EXTRA_CFLAGS += -O3 -g -Wfatal-errors
 
 CFLAGS += -I$(PQOS_INSTALL_PATH)/../include
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 LDLIBS += -L$(PQOS_INSTALL_PATH)
 LDLIBS += -lpqos
diff --git a/examples/l2fwd-cat/l2fwd-cat.c b/examples/l2fwd-cat/l2fwd-cat.c
index b34b40a00..ddd9888b1 100644
--- a/examples/l2fwd-cat/l2fwd-cat.c
+++ b/examples/l2fwd-cat/l2fwd-cat.c
@@ -67,6 +67,7 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool)
 			return retval;
 	}
 
+	rte_eth_dev_set_supported_ptypes(port, RTE_PTYPE_UNKNOWN);
 	/* Start the Ethernet port. */
 	retval = rte_eth_dev_start(port);
 	if (retval < 0)
diff --git a/examples/l2fwd-cat/meson.build b/examples/l2fwd-cat/meson.build
index 4e2777a03..37c96040d 100644
--- a/examples/l2fwd-cat/meson.build
+++ b/examples/l2fwd-cat/meson.build
@@ -10,6 +10,7 @@ pqos = cc.find_library('pqos', required: false)
 build = pqos.found()
 ext_deps += pqos
 cflags += '-I/usr/local/include' # assume pqos lib installed in /usr/local
+allow_experimental_apis = true
 sources = files(
 	'cat.c', 'l2fwd-cat.c'
 )
diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c
index 3fe2ba725..6aad08b06 100644
--- a/examples/l2fwd-crypto/main.c
+++ b/examples/l2fwd-crypto/main.c
@@ -2559,6 +2559,7 @@ initialize_ports(struct l2fwd_crypto_options *options)
 			return -1;
 		}
 
+		rte_eth_dev_set_supported_ptypes(portid, RTE_PTYPE_UNKNOWN);
 		/* Start device */
 		retval = rte_eth_dev_start(portid);
 		if (retval < 0) {
diff --git a/examples/l2fwd-jobstats/Makefile b/examples/l2fwd-jobstats/Makefile
index 729a39e93..09834e979 100644
--- a/examples/l2fwd-jobstats/Makefile
+++ b/examples/l2fwd-jobstats/Makefile
@@ -52,6 +52,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 include $(RTE_SDK)/mk/rte.extapp.mk
 endif
diff --git a/examples/l2fwd-jobstats/main.c b/examples/l2fwd-jobstats/main.c
index 77e44dc82..61ad8e759 100644
--- a/examples/l2fwd-jobstats/main.c
+++ b/examples/l2fwd-jobstats/main.c
@@ -902,6 +902,7 @@ main(int argc, char **argv)
 			"Cannot set error callback for tx buffer on port %u\n",
 				 portid);
 
+		rte_eth_dev_set_supported_ptypes(portid, RTE_PTYPE_UNKNOWN);
 		/* Start device */
 		ret = rte_eth_dev_start(portid);
 		if (ret < 0)
diff --git a/examples/l2fwd-jobstats/meson.build b/examples/l2fwd-jobstats/meson.build
index 1ffd484e2..3653aa7ec 100644
--- a/examples/l2fwd-jobstats/meson.build
+++ b/examples/l2fwd-jobstats/meson.build
@@ -7,6 +7,7 @@
 # DPDK instance, use 'make'
 
 deps += ['jobstats', 'timer']
+allow_experimental_apis = true
 sources = files(
 	'main.c'
 )
diff --git a/examples/l2fwd-keepalive/Makefile b/examples/l2fwd-keepalive/Makefile
index 37de27a6f..584257ae2 100644
--- a/examples/l2fwd-keepalive/Makefile
+++ b/examples/l2fwd-keepalive/Makefile
@@ -53,6 +53,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 LDFLAGS += -lrt
 
 include $(RTE_SDK)/mk/rte.extapp.mk
diff --git a/examples/l2fwd-keepalive/main.c b/examples/l2fwd-keepalive/main.c
index 9831a4323..bf662bd37 100644
--- a/examples/l2fwd-keepalive/main.c
+++ b/examples/l2fwd-keepalive/main.c
@@ -696,6 +696,7 @@ main(int argc, char **argv)
 			"Cannot set error callback for tx buffer on port %u\n",
 				 portid);
 
+		rte_eth_dev_set_supported_ptypes(portid, RTE_PTYPE_UNKNOWN);
 		/* Start device */
 		ret = rte_eth_dev_start(portid);
 		if (ret < 0)
diff --git a/examples/l2fwd-keepalive/meson.build b/examples/l2fwd-keepalive/meson.build
index 6f7b007e1..2dffffaaa 100644
--- a/examples/l2fwd-keepalive/meson.build
+++ b/examples/l2fwd-keepalive/meson.build
@@ -8,6 +8,7 @@
 
 ext_deps += cc.find_library('rt')
 deps += 'timer'
+allow_experimental_apis = true
 sources = files(
 	'main.c', 'shm.c'
 )
diff --git a/examples/l2fwd/Makefile b/examples/l2fwd/Makefile
index 230352093..123e6161c 100644
--- a/examples/l2fwd/Makefile
+++ b/examples/l2fwd/Makefile
@@ -51,6 +51,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 include $(RTE_SDK)/mk/rte.extapp.mk
 endif
diff --git a/examples/l2fwd/main.c b/examples/l2fwd/main.c
index 1e2b14297..1b940038f 100644
--- a/examples/l2fwd/main.c
+++ b/examples/l2fwd/main.c
@@ -694,6 +694,7 @@ main(int argc, char **argv)
 			"Cannot set error callback for tx buffer on port %u\n",
 				 portid);
 
+		rte_eth_dev_set_supported_ptypes(portid, RTE_PTYPE_UNKNOWN);
 		/* Start device */
 		ret = rte_eth_dev_start(portid);
 		if (ret < 0)
diff --git a/examples/l2fwd/meson.build b/examples/l2fwd/meson.build
index c34e11e36..2b0a25036 100644
--- a/examples/l2fwd/meson.build
+++ b/examples/l2fwd/meson.build
@@ -6,6 +6,7 @@
 # To build this example as a standalone application with an already-installed
 # DPDK instance, use 'make'
 
+allow_experimental_apis = true
 sources = files(
 	'main.c'
 )
diff --git a/examples/l3fwd-acl/Makefile b/examples/l3fwd-acl/Makefile
index e2c989f71..df590f8e9 100644
--- a/examples/l3fwd-acl/Makefile
+++ b/examples/l3fwd-acl/Makefile
@@ -51,6 +51,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 # workaround for a gcc bug with noreturn attribute
 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603
diff --git a/examples/l3fwd-acl/main.c b/examples/l3fwd-acl/main.c
index 0c44df767..1a0c09c1d 100644
--- a/examples/l3fwd-acl/main.c
+++ b/examples/l3fwd-acl/main.c
@@ -2056,6 +2056,7 @@ main(int argc, char **argv)
 		if ((enabled_port_mask & (1 << portid)) == 0)
 			continue;
 
+		rte_eth_dev_set_supported_ptypes(portid, RTE_PTYPE_UNKNOWN);
 		/* Start device */
 		ret = rte_eth_dev_start(portid);
 		if (ret < 0)
diff --git a/examples/l3fwd-acl/meson.build b/examples/l3fwd-acl/meson.build
index 7096e00c1..68cebd6ce 100644
--- a/examples/l3fwd-acl/meson.build
+++ b/examples/l3fwd-acl/meson.build
@@ -7,6 +7,7 @@
 # DPDK instance, use 'make'
 
 deps += ['acl', 'lpm', 'hash']
+allow_experimental_apis = true
 sources = files(
 	'main.c'
 )
diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c
index fd8d9528f..136f446b3 100644
--- a/examples/l3fwd-power/main.c
+++ b/examples/l3fwd-power/main.c
@@ -2426,6 +2426,7 @@ main(int argc, char **argv)
 		if ((enabled_port_mask & (1 << portid)) == 0) {
 			continue;
 		}
+		rte_eth_dev_set_supported_ptypes(portid, RTE_PTYPE_UNKNOWN);
 		/* Start device */
 		ret = rte_eth_dev_start(portid);
 		if (ret < 0)
diff --git a/examples/l3fwd-vf/Makefile b/examples/l3fwd-vf/Makefile
index 7b186a23c..db7f51f2f 100644
--- a/examples/l3fwd-vf/Makefile
+++ b/examples/l3fwd-vf/Makefile
@@ -51,6 +51,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += -O3 $(USER_FLAGS)
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 # workaround for a gcc bug with noreturn attribute
 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603
diff --git a/examples/l3fwd-vf/main.c b/examples/l3fwd-vf/main.c
index 572e74cf5..387d2426c 100644
--- a/examples/l3fwd-vf/main.c
+++ b/examples/l3fwd-vf/main.c
@@ -1051,6 +1051,7 @@ main(int argc, char **argv)
 		if ((enabled_port_mask & (1 << portid)) == 0) {
 			continue;
 		}
+		rte_eth_dev_set_supported_ptypes(portid, RTE_PTYPE_UNKNOWN);
 		/* Start device */
 		ret = rte_eth_dev_start(portid);
 		if (ret < 0)
diff --git a/examples/l3fwd-vf/meson.build b/examples/l3fwd-vf/meson.build
index 226286e74..00f3c38f4 100644
--- a/examples/l3fwd-vf/meson.build
+++ b/examples/l3fwd-vf/meson.build
@@ -7,6 +7,7 @@
 # DPDK instance, use 'make'
 
 deps += ['lpm', 'hash']
+allow_experimental_apis = true
 sources = files(
 	'main.c'
 )
diff --git a/examples/link_status_interrupt/Makefile b/examples/link_status_interrupt/Makefile
index 97e5a14a8..6ddedd4de 100644
--- a/examples/link_status_interrupt/Makefile
+++ b/examples/link_status_interrupt/Makefile
@@ -51,6 +51,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 include $(RTE_SDK)/mk/rte.extapp.mk
 endif
diff --git a/examples/link_status_interrupt/main.c b/examples/link_status_interrupt/main.c
index 9cd4dc7a6..abd84b862 100644
--- a/examples/link_status_interrupt/main.c
+++ b/examples/link_status_interrupt/main.c
@@ -676,6 +676,7 @@ main(int argc, char **argv)
 			rte_exit(EXIT_FAILURE, "Cannot set error callback for "
 					"tx buffer on port %u\n", (unsigned) portid);
 
+		rte_eth_dev_set_supported_ptypes(portid, RTE_PTYPE_UNKNOWN);
 		/* Start device */
 		ret = rte_eth_dev_start(portid);
 		if (ret < 0)
diff --git a/examples/link_status_interrupt/meson.build b/examples/link_status_interrupt/meson.build
index c34e11e36..2b0a25036 100644
--- a/examples/link_status_interrupt/meson.build
+++ b/examples/link_status_interrupt/meson.build
@@ -6,6 +6,7 @@
 # To build this example as a standalone application with an already-installed
 # DPDK instance, use 'make'
 
+allow_experimental_apis = true
 sources = files(
 	'main.c'
 )
diff --git a/examples/load_balancer/Makefile b/examples/load_balancer/Makefile
index caae8a107..dcba9194c 100644
--- a/examples/load_balancer/Makefile
+++ b/examples/load_balancer/Makefile
@@ -51,6 +51,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += -O3 -g
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 # workaround for a gcc bug with noreturn attribute
 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603
diff --git a/examples/load_balancer/init.c b/examples/load_balancer/init.c
index 3ab7d0211..52f677fd4 100644
--- a/examples/load_balancer/init.c
+++ b/examples/load_balancer/init.c
@@ -496,6 +496,7 @@ app_init_nics(void)
 			}
 		}
 
+		rte_eth_dev_set_supported_ptypes(port, RTE_PTYPE_UNKNOWN);
 		/* Start port */
 		ret = rte_eth_dev_start(port);
 		if (ret < 0) {
diff --git a/examples/load_balancer/meson.build b/examples/load_balancer/meson.build
index 4f7ac3999..19708974c 100644
--- a/examples/load_balancer/meson.build
+++ b/examples/load_balancer/meson.build
@@ -7,6 +7,7 @@
 # DPDK instance, use 'make'
 
 deps += 'lpm'
+allow_experimental_apis = true
 sources = files(
 	'config.c', 'init.c', 'main.c', 'runtime.c'
 )
diff --git a/examples/packet_ordering/Makefile b/examples/packet_ordering/Makefile
index 51acaf7eb..9ba3fa9e8 100644
--- a/examples/packet_ordering/Makefile
+++ b/examples/packet_ordering/Makefile
@@ -51,6 +51,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 include $(RTE_SDK)/mk/rte.extapp.mk
 endif
diff --git a/examples/packet_ordering/main.c b/examples/packet_ordering/main.c
index 030e92299..41295690d 100644
--- a/examples/packet_ordering/main.c
+++ b/examples/packet_ordering/main.c
@@ -312,6 +312,7 @@ configure_eth_port(uint16_t port_id)
 			return ret;
 	}
 
+	rte_eth_dev_set_supported_ptypes(port_id, RTE_PTYPE_UNKNOWN);
 	ret = rte_eth_dev_start(port_id);
 	if (ret < 0)
 		return ret;
diff --git a/examples/packet_ordering/meson.build b/examples/packet_ordering/meson.build
index 6c2fccdcb..a3776946f 100644
--- a/examples/packet_ordering/meson.build
+++ b/examples/packet_ordering/meson.build
@@ -7,6 +7,7 @@
 # DPDK instance, use 'make'
 
 deps += 'reorder'
+allow_experimental_apis = true
 sources = files(
 	'main.c'
 )
diff --git a/examples/ptpclient/Makefile b/examples/ptpclient/Makefile
index 89e2bacbd..f158d96b9 100644
--- a/examples/ptpclient/Makefile
+++ b/examples/ptpclient/Makefile
@@ -50,6 +50,7 @@ RTE_TARGET ?= $(notdir $(abspath $(dir $(firstword $(wildcard $(RTE_SDK)/*/.conf
 include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += -O3
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 CFLAGS += $(WERROR_FLAGS)
 
 # workaround for a gcc bug with noreturn attribute
diff --git a/examples/ptpclient/meson.build b/examples/ptpclient/meson.build
index fa0cbe93c..d4171a218 100644
--- a/examples/ptpclient/meson.build
+++ b/examples/ptpclient/meson.build
@@ -6,6 +6,7 @@
 # To build this example as a standalone application with an already-installed
 # DPDK instance, use 'make'
 
+allow_experimental_apis = true
 sources = files(
 	'ptpclient.c'
 )
diff --git a/examples/ptpclient/ptpclient.c b/examples/ptpclient/ptpclient.c
index 31778fd95..351596fc3 100644
--- a/examples/ptpclient/ptpclient.c
+++ b/examples/ptpclient/ptpclient.c
@@ -227,6 +227,7 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool)
 			return retval;
 	}
 
+	rte_eth_dev_set_supported_ptypes(port, RTE_PTYPE_UNKNOWN);
 	/* Start the Ethernet port. */
 	retval = rte_eth_dev_start(port);
 	if (retval < 0)
diff --git a/examples/qos_meter/Makefile b/examples/qos_meter/Makefile
index e5217cf7c..a1533d08f 100644
--- a/examples/qos_meter/Makefile
+++ b/examples/qos_meter/Makefile
@@ -52,6 +52,7 @@ RTE_TARGET ?= $(notdir $(abspath $(dir $(firstword $(wildcard $(RTE_SDK)/*/.conf
 include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += -O3
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 CFLAGS += $(WERROR_FLAGS)
 
 # workaround for a gcc bug with noreturn attribute
diff --git a/examples/qos_meter/main.c b/examples/qos_meter/main.c
index da7afe8be..2accbc9b6 100644
--- a/examples/qos_meter/main.c
+++ b/examples/qos_meter/main.c
@@ -419,10 +419,12 @@ main(int argc, char **argv)
 
 	rte_eth_tx_buffer_init(tx_buffer, PKT_TX_BURST_MAX);
 
+	rte_eth_dev_set_supported_ptypes(port_rx, RTE_PTYPE_UNKNOWN);
 	ret = rte_eth_dev_start(port_rx);
 	if (ret < 0)
 		rte_exit(EXIT_FAILURE, "Port %d start error (%d)\n", port_rx, ret);
 
+	rte_eth_dev_set_supported_ptypes(port_tx, RTE_PTYPE_UNKNOWN);
 	ret = rte_eth_dev_start(port_tx);
 	if (ret < 0)
 		rte_exit(EXIT_FAILURE, "Port %d start error (%d)\n", port_tx, ret);
diff --git a/examples/qos_meter/meson.build b/examples/qos_meter/meson.build
index ef7779f2f..10cd4bc79 100644
--- a/examples/qos_meter/meson.build
+++ b/examples/qos_meter/meson.build
@@ -7,6 +7,7 @@
 # DPDK instance, use 'make'
 
 deps += 'meter'
+allow_experimental_apis = true
 sources = files(
 	'main.c', 'rte_policer.c'
 )
diff --git a/examples/qos_sched/Makefile b/examples/qos_sched/Makefile
index ce2d25371..7d3d3019f 100644
--- a/examples/qos_sched/Makefile
+++ b/examples/qos_sched/Makefile
@@ -58,6 +58,7 @@ else
 
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 include $(RTE_SDK)/mk/rte.extapp.mk
 
diff --git a/examples/qos_sched/init.c b/examples/qos_sched/init.c
index b05206d5a..35e4c90a2 100644
--- a/examples/qos_sched/init.c
+++ b/examples/qos_sched/init.c
@@ -138,6 +138,7 @@ app_init_port(uint16_t portid, struct rte_mempool *mp)
 			 "rte_eth_tx_queue_setup: err=%d, port=%u queue=%d\n",
 			 ret, portid, 0);
 
+	rte_eth_dev_set_supported_ptypes(portid, RTE_PTYPE_UNKNOWN);
 	/* Start device */
 	ret = rte_eth_dev_start(portid);
 	if (ret < 0)
diff --git a/examples/qos_sched/meson.build b/examples/qos_sched/meson.build
index 289b81ce8..5101652af 100644
--- a/examples/qos_sched/meson.build
+++ b/examples/qos_sched/meson.build
@@ -7,6 +7,7 @@
 # DPDK instance, use 'make'
 
 deps += ['sched', 'cfgfile']
+allow_experimental_apis = true
 sources = files(
 	'app_thread.c', 'args.c', 'cfg_file.c', 'cmdline.c',
 	'init.c', 'main.c', 'stats.c'
diff --git a/examples/quota_watermark/qw/Makefile b/examples/quota_watermark/qw/Makefile
index 3f10f01c3..e06f4482b 100644
--- a/examples/quota_watermark/qw/Makefile
+++ b/examples/quota_watermark/qw/Makefile
@@ -18,5 +18,6 @@ SRCS-y := args.c init.c main.c
 
 CFLAGS += -O3 -DQW_SOFTWARE_FC
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 include $(RTE_SDK)/mk/rte.extapp.mk
diff --git a/examples/quota_watermark/qw/init.c b/examples/quota_watermark/qw/init.c
index 5a0f64f45..098e3c16e 100644
--- a/examples/quota_watermark/qw/init.c
+++ b/examples/quota_watermark/qw/init.c
@@ -96,6 +96,7 @@ void configure_eth_port(uint16_t port_id)
 				"Failed to setup hardware flow control on port %u (error %d)\n",
 				(unsigned int) port_id, ret);
 
+	rte_eth_dev_set_supported_ptypes(port_id, RTE_PTYPE_UNKNOWN);
 	/* Start the port */
 	ret = rte_eth_dev_start(port_id);
 	if (ret < 0)
diff --git a/examples/rxtx_callbacks/main.c b/examples/rxtx_callbacks/main.c
index dbcd9f4fc..c4acac585 100644
--- a/examples/rxtx_callbacks/main.c
+++ b/examples/rxtx_callbacks/main.c
@@ -152,6 +152,7 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool)
 			return retval;
 	}
 
+	rte_eth_dev_set_supported_ptypes(port, RTE_PTYPE_UNKNOWN);
 	retval  = rte_eth_dev_start(port);
 	if (retval < 0)
 		return retval;
diff --git a/examples/server_node_efd/server/Makefile b/examples/server_node_efd/server/Makefile
index 4837bd3ea..acbd12ae2 100644
--- a/examples/server_node_efd/server/Makefile
+++ b/examples/server_node_efd/server/Makefile
@@ -25,5 +25,6 @@ INC := $(sort $(wildcard *.h))
 
 CFLAGS += $(WERROR_FLAGS) -O3
 CFLAGS += -I$(SRCDIR)/../shared
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 include $(RTE_SDK)/mk/rte.extapp.mk
diff --git a/examples/server_node_efd/server/init.c b/examples/server_node_efd/server/init.c
index af5a18e28..b4ff9dd57 100644
--- a/examples/server_node_efd/server/init.c
+++ b/examples/server_node_efd/server/init.c
@@ -149,6 +149,7 @@ init_port(uint16_t port_num)
 
 	rte_eth_promiscuous_enable(port_num);
 
+	rte_eth_dev_set_supported_ptypes(port_num, RTE_PTYPE_UNKNOWN);
 	retval = rte_eth_dev_start(port_num);
 	if (retval < 0)
 		return retval;
diff --git a/examples/skeleton/Makefile b/examples/skeleton/Makefile
index c5ac26029..0037d6b25 100644
--- a/examples/skeleton/Makefile
+++ b/examples/skeleton/Makefile
@@ -50,6 +50,7 @@ RTE_TARGET ?= $(notdir $(abspath $(dir $(firstword $(wildcard $(RTE_SDK)/*/.conf
 include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 # workaround for a gcc bug with noreturn attribute
 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603
diff --git a/examples/skeleton/basicfwd.c b/examples/skeleton/basicfwd.c
index a8a8e98f0..6c10a06ef 100644
--- a/examples/skeleton/basicfwd.c
+++ b/examples/skeleton/basicfwd.c
@@ -76,6 +76,7 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool)
 			return retval;
 	}
 
+	rte_eth_dev_set_supported_ptypes(port, RTE_PTYPE_UNKNOWN);
 	/* Start the Ethernet port. */
 	retval = rte_eth_dev_start(port);
 	if (retval < 0)
diff --git a/examples/skeleton/meson.build b/examples/skeleton/meson.build
index 9bb9ec329..ef46b187e 100644
--- a/examples/skeleton/meson.build
+++ b/examples/skeleton/meson.build
@@ -6,6 +6,7 @@
 # To build this example as a standalone application with an already-installed
 # DPDK instance, use 'make'
 
+allow_experimental_apis = true
 sources = files(
 	'basicfwd.c'
 )
diff --git a/examples/tep_termination/Makefile b/examples/tep_termination/Makefile
index 31165bd92..586838676 100644
--- a/examples/tep_termination/Makefile
+++ b/examples/tep_termination/Makefile
@@ -61,6 +61,7 @@ endif
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
 CFLAGS += -Wno-deprecated-declarations
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 include $(RTE_SDK)/mk/rte.extapp.mk
 endif
diff --git a/examples/tep_termination/meson.build b/examples/tep_termination/meson.build
index f65d68980..f40b1c0b8 100644
--- a/examples/tep_termination/meson.build
+++ b/examples/tep_termination/meson.build
@@ -11,6 +11,7 @@ if not is_linux
 endif
 deps += ['hash', 'vhost']
 cflags += '-Wno-deprecated-declarations'
+allow_experimental_apis = true
 sources = files(
 	'main.c', 'vxlan.c', 'vxlan_setup.c'
 )
diff --git a/examples/tep_termination/vxlan_setup.c b/examples/tep_termination/vxlan_setup.c
index 9a0880002..538a54b3a 100644
--- a/examples/tep_termination/vxlan_setup.c
+++ b/examples/tep_termination/vxlan_setup.c
@@ -167,6 +167,7 @@ vxlan_port_init(uint16_t port, struct rte_mempool *mbuf_pool)
 			return retval;
 	}
 
+	rte_eth_dev_set_supported_ptypes(port, RTE_PTYPE_UNKNOWN);
 	/* Start the device. */
 	retval  = rte_eth_dev_start(port);
 	if (retval < 0)
diff --git a/examples/vhost/Makefile b/examples/vhost/Makefile
index f84b7f017..7722e81c7 100644
--- a/examples/vhost/Makefile
+++ b/examples/vhost/Makefile
@@ -62,6 +62,7 @@ else
 CFLAGS += -DALLOW_EXPERIMENTAL_API
 CFLAGS += -O2 -D_FILE_OFFSET_BITS=64
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 include $(RTE_SDK)/mk/rte.extapp.mk
 
diff --git a/examples/vhost/main.c b/examples/vhost/main.c
index 0961db080..57438b22c 100644
--- a/examples/vhost/main.c
+++ b/examples/vhost/main.c
@@ -321,6 +321,7 @@ port_init(uint16_t port)
 		}
 	}
 
+	rte_eth_dev_set_supported_ptypes(port, RTE_PTYPE_UNKNOWN);
 	/* Start the device. */
 	retval  = rte_eth_dev_start(port);
 	if (retval < 0) {
diff --git a/examples/vm_power_manager/Makefile b/examples/vm_power_manager/Makefile
index 2fdb991d7..65c2ad179 100644
--- a/examples/vm_power_manager/Makefile
+++ b/examples/vm_power_manager/Makefile
@@ -28,6 +28,7 @@ endif
 
 CFLAGS += -O3 -I$(RTE_SDK)/lib/librte_power/
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 LDLIBS += -lvirt
 
diff --git a/examples/vm_power_manager/main.c b/examples/vm_power_manager/main.c
index 54c704610..190a7a9ea 100644
--- a/examples/vm_power_manager/main.c
+++ b/examples/vm_power_manager/main.c
@@ -99,6 +99,7 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool)
 			return retval;
 	}
 
+	rte_eth_dev_set_supported_ptypes(port, RTE_PTYPE_UNKNOWN);
 	/* Start the Ethernet port. */
 	retval = rte_eth_dev_start(port);
 	if (retval < 0)
diff --git a/examples/vm_power_manager/meson.build b/examples/vm_power_manager/meson.build
index 20a4a05b3..54e2b584f 100644
--- a/examples/vm_power_manager/meson.build
+++ b/examples/vm_power_manager/meson.build
@@ -25,6 +25,7 @@ if dpdk_conf.has('RTE_LIBRTE_IXGBE_PMD')
 	deps += ['pmd_ixgbe']
 endif
 
+allow_experimental_apis = true
 sources = files(
 	'channel_manager.c', 'channel_monitor.c', 'main.c', 'parse.c', 'power_manager.c', 'vm_power_cli.c'
 )
diff --git a/examples/vmdq/Makefile b/examples/vmdq/Makefile
index 1557ee86b..2168747cc 100644
--- a/examples/vmdq/Makefile
+++ b/examples/vmdq/Makefile
@@ -50,6 +50,7 @@ RTE_TARGET ?= $(notdir $(abspath $(dir $(firstword $(wildcard $(RTE_SDK)/*/.conf
 include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 EXTRA_CFLAGS += -O3
 
diff --git a/examples/vmdq/main.c b/examples/vmdq/main.c
index 7281ffd7f..87cf230f4 100644
--- a/examples/vmdq/main.c
+++ b/examples/vmdq/main.c
@@ -258,6 +258,7 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool)
 		}
 	}
 
+	rte_eth_dev_set_supported_ptypes(port, RTE_PTYPE_UNKNOWN);
 	retval  = rte_eth_dev_start(port);
 	if (retval < 0) {
 		printf("port %d start failed\n", port);
diff --git a/examples/vmdq/meson.build b/examples/vmdq/meson.build
index c34e11e36..2b0a25036 100644
--- a/examples/vmdq/meson.build
+++ b/examples/vmdq/meson.build
@@ -6,6 +6,7 @@
 # To build this example as a standalone application with an already-installed
 # DPDK instance, use 'make'
 
+allow_experimental_apis = true
 sources = files(
 	'main.c'
 )
diff --git a/examples/vmdq_dcb/Makefile b/examples/vmdq_dcb/Makefile
index 391096cfb..ea1574d91 100644
--- a/examples/vmdq_dcb/Makefile
+++ b/examples/vmdq_dcb/Makefile
@@ -50,6 +50,7 @@ RTE_TARGET ?= $(notdir $(abspath $(dir $(firstword $(wildcard $(RTE_SDK)/*/.conf
 include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 # workaround for a gcc bug with noreturn attribute
 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603
diff --git a/examples/vmdq_dcb/main.c b/examples/vmdq_dcb/main.c
index 389000327..bace88e47 100644
--- a/examples/vmdq_dcb/main.c
+++ b/examples/vmdq_dcb/main.c
@@ -313,6 +313,7 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool)
 		}
 	}
 
+	rte_eth_dev_set_supported_ptypes(port, RTE_PTYPE_UNKNOWN);
 	retval  = rte_eth_dev_start(port);
 	if (retval < 0) {
 		printf("port %d start failed\n", port);
diff --git a/examples/vmdq_dcb/meson.build b/examples/vmdq_dcb/meson.build
index c34e11e36..2b0a25036 100644
--- a/examples/vmdq_dcb/meson.build
+++ b/examples/vmdq_dcb/meson.build
@@ -6,6 +6,7 @@
 # To build this example as a standalone application with an already-installed
 # DPDK instance, use 'make'
 
+allow_experimental_apis = true
 sources = files(
 	'main.c'
 )
-- 
2.17.1


^ permalink raw reply	[flat|nested] 245+ messages in thread

* Re: [dpdk-dev] [PATCH v3 7/7] examples: disable Rx packet type parsing
  2019-09-29 21:19   ` [dpdk-dev] [PATCH v3 7/7] examples: disable Rx packet type parsing pbhagavatula
@ 2019-09-30 17:47     ` Aaron Conole
  2019-10-01  5:02       ` Pavan Nikhilesh Bhagavatula
  0 siblings, 1 reply; 245+ messages in thread
From: Aaron Conole @ 2019-09-30 17:47 UTC (permalink / raw)
  To: pbhagavatula
  Cc: arybchenko, jerinj, Nicolas Chautru, Chas Williams, David Hunt,
	Harry van Haaren, Marko Kovacevic, Ori Kam, Bruce Richardson,
	Radu Nicolau, Akhil Goyal, Tomasz Kantecki, Bernard Iremonger,
	Cristian Dumitrescu, Konstantin Ananyev, Ferruh Yigit,
	Declan Doherty, Reshma Pattan, John McNamara, Xiaoyun Li,
	Jasvinder Singh, Byron Marohn, Yipeng Wang, Maxime Coquelin,
	Tiwei Bie, Zhihong Wang, dev

<pbhagavatula@marvell.com> writes:

> From: Pavan Nikhilesh <pbhagavatula@marvell.com>
>
> Disable packet type parsing in examples that don't use
> `rte_mbuf::packet_type` by setting ptype_mask as 0 in
> `rte_eth_dev_set_supported_ptypes`
>
> Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
> ---
>  examples/bbdev_app/main.c                  | 1 +
>  examples/bond/main.c                       | 2 ++
>  examples/distributor/Makefile              | 1 +
>  examples/distributor/main.c                | 1 +
>  examples/distributor/meson.build           | 1 +
>  examples/eventdev_pipeline/main.c          | 1 +
>  examples/eventdev_pipeline/meson.build     | 1 +
>  examples/exception_path/Makefile           | 1 +
>  examples/exception_path/main.c             | 1 +
>  examples/exception_path/meson.build        | 1 +
>  examples/flow_classify/flow_classify.c     | 1 +
>  examples/flow_filtering/Makefile           | 1 +
>  examples/flow_filtering/main.c             | 1 +
>  examples/flow_filtering/meson.build        | 1 +
>  examples/ip_pipeline/link.c                | 1 +
>  examples/ip_reassembly/Makefile            | 1 +
>  examples/ip_reassembly/main.c              | 1 +
>  examples/ip_reassembly/meson.build         | 1 +
>  examples/ipsec-secgw/ipsec-secgw.c         | 1 +
>  examples/ipv4_multicast/Makefile           | 1 +
>  examples/ipv4_multicast/main.c             | 1 +
>  examples/ipv4_multicast/meson.build        | 1 +
>  examples/kni/main.c                        | 1 +
>  examples/l2fwd-cat/Makefile                | 1 +
>  examples/l2fwd-cat/l2fwd-cat.c             | 1 +
>  examples/l2fwd-cat/meson.build             | 1 +
>  examples/l2fwd-crypto/main.c               | 1 +
>  examples/l2fwd-jobstats/Makefile           | 1 +
>  examples/l2fwd-jobstats/main.c             | 1 +
>  examples/l2fwd-jobstats/meson.build        | 1 +
>  examples/l2fwd-keepalive/Makefile          | 1 +
>  examples/l2fwd-keepalive/main.c            | 1 +
>  examples/l2fwd-keepalive/meson.build       | 1 +
>  examples/l2fwd/Makefile                    | 1 +
>  examples/l2fwd/main.c                      | 1 +
>  examples/l2fwd/meson.build                 | 1 +
>  examples/l3fwd-acl/Makefile                | 1 +
>  examples/l3fwd-acl/main.c                  | 1 +
>  examples/l3fwd-acl/meson.build             | 1 +
>  examples/l3fwd-power/main.c                | 1 +
>  examples/l3fwd-vf/Makefile                 | 1 +
>  examples/l3fwd-vf/main.c                   | 1 +
>  examples/l3fwd-vf/meson.build              | 1 +
>  examples/link_status_interrupt/Makefile    | 1 +
>  examples/link_status_interrupt/main.c      | 1 +
>  examples/link_status_interrupt/meson.build | 1 +
>  examples/load_balancer/Makefile            | 1 +
>  examples/load_balancer/init.c              | 1 +
>  examples/load_balancer/meson.build         | 1 +
>  examples/packet_ordering/Makefile          | 1 +
>  examples/packet_ordering/main.c            | 1 +
>  examples/packet_ordering/meson.build       | 1 +
>  examples/ptpclient/Makefile                | 1 +
>  examples/ptpclient/meson.build             | 1 +
>  examples/ptpclient/ptpclient.c             | 1 +
>  examples/qos_meter/Makefile                | 1 +
>  examples/qos_meter/main.c                  | 2 ++
>  examples/qos_meter/meson.build             | 1 +
>  examples/qos_sched/Makefile                | 1 +
>  examples/qos_sched/init.c                  | 1 +
>  examples/qos_sched/meson.build             | 1 +
>  examples/quota_watermark/qw/Makefile       | 1 +
>  examples/quota_watermark/qw/init.c         | 1 +
>  examples/rxtx_callbacks/main.c             | 1 +
>  examples/server_node_efd/server/Makefile   | 1 +
>  examples/server_node_efd/server/init.c     | 1 +
>  examples/skeleton/Makefile                 | 1 +
>  examples/skeleton/basicfwd.c               | 1 +
>  examples/skeleton/meson.build              | 1 +
>  examples/tep_termination/Makefile          | 1 +
>  examples/tep_termination/meson.build       | 1 +
>  examples/tep_termination/vxlan_setup.c     | 1 +
>  examples/vhost/Makefile                    | 1 +
>  examples/vhost/main.c                      | 1 +
>  examples/vm_power_manager/Makefile         | 1 +
>  examples/vm_power_manager/main.c           | 1 +
>  examples/vm_power_manager/meson.build      | 1 +
>  examples/vmdq/Makefile                     | 1 +
>  examples/vmdq/main.c                       | 1 +
>  examples/vmdq/meson.build                  | 1 +
>  examples/vmdq_dcb/Makefile                 | 1 +
>  examples/vmdq_dcb/main.c                   | 1 +
>  examples/vmdq_dcb/meson.build              | 1 +
>  83 files changed, 85 insertions(+)
>
> diff --git a/examples/bbdev_app/main.c b/examples/bbdev_app/main.c
> index 9acf666dc..a32f63187 100644
> --- a/examples/bbdev_app/main.c
> +++ b/examples/bbdev_app/main.c
> @@ -478,6 +478,7 @@ initialize_ports(struct app_config_params *app_params,
>  	}
>  
>  	rte_eth_promiscuous_enable(port_id);
> +	rte_eth_dev_set_supported_ptypes(port_id, RTE_PTYPE_UNKNOWN);

This is strange, since the function signature is defined (in 1/7) as:

  int rte_eth_dev_set_supported_ptypes(uint16_t port_id, uint32_t ptype_mask,
				       uint32_t *set_ptypes, int num);

Did you mean to add more args?

>  	rte_eth_macaddr_get(port_id, &bbdev_port_eth_addr);
>  	print_mac(port_id, &bbdev_port_eth_addr);
> diff --git a/examples/bond/main.c b/examples/bond/main.c
> index 1c0df9d46..8beb1dc14 100644
> --- a/examples/bond/main.c
> +++ b/examples/bond/main.c
> @@ -195,6 +195,7 @@ slave_port_init(uint16_t portid, struct rte_mempool *mbuf_pool)
>  		rte_exit(retval, "port %u: TX queue 0 setup failed (res=%d)",
>  				portid, retval);
>  
> +	rte_eth_dev_set_supported_ptypes(portid, RTE_PTYPE_UNKNOWN);
>  	retval  = rte_eth_dev_start(portid);
>  	if (retval < 0)
>  		rte_exit(retval,
> @@ -271,6 +272,7 @@ bond_port_init(struct rte_mempool *mbuf_pool)
>  		rte_exit(retval, "port %u: TX queue 0 setup failed (res=%d)",
>  				BOND_PORT, retval);
>  
> +	rte_eth_dev_set_supported_ptypes(BOND_PORT, RTE_PTYPE_UNKNOWN);
>  	retval  = rte_eth_dev_start(BOND_PORT);
>  	if (retval < 0)
>  		rte_exit(retval, "Start port %d failed (res=%d)", BOND_PORT, retval);
> diff --git a/examples/distributor/Makefile b/examples/distributor/Makefile
> index bac8d5578..a2a477279 100644
> --- a/examples/distributor/Makefile
> +++ b/examples/distributor/Makefile
> @@ -50,6 +50,7 @@ RTE_TARGET ?= $(notdir $(abspath $(dir $(firstword $(wildcard $(RTE_SDK)/*/.conf
>  include $(RTE_SDK)/mk/rte.vars.mk
>  
>  CFLAGS += $(WERROR_FLAGS)
> +CFLAGS += -DALLOW_EXPERIMENTAL_API
>  
>  # workaround for a gcc bug with noreturn attribute
>  # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603
> diff --git a/examples/distributor/main.c b/examples/distributor/main.c
> index 81d7ca61d..bc945d862 100644
> --- a/examples/distributor/main.c
> +++ b/examples/distributor/main.c
> @@ -162,6 +162,7 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool)
>  			return retval;
>  	}
>  
> +	rte_eth_dev_set_supported_ptypes(port, RTE_PTYPE_UNKNOWN);
>  	retval = rte_eth_dev_start(port);
>  	if (retval < 0)
>  		return retval;
> diff --git a/examples/distributor/meson.build b/examples/distributor/meson.build
> index 26f108d65..c2976f6bd 100644
> --- a/examples/distributor/meson.build
> +++ b/examples/distributor/meson.build
> @@ -10,6 +10,7 @@
>  build = dpdk_conf.has('RTE_LIBRTE_POWER')
>  
>  deps += ['distributor', 'power']
> +allow_experimental_apis = true
>  sources = files(
>  	'main.c'
>  )
> diff --git a/examples/eventdev_pipeline/main.c b/examples/eventdev_pipeline/main.c
> index a73b61d59..9f9968cf8 100644
> --- a/examples/eventdev_pipeline/main.c
> +++ b/examples/eventdev_pipeline/main.c
> @@ -393,6 +393,7 @@ main(int argc, char **argv)
>  
>  	/* Start the Ethernet port. */
>  	RTE_ETH_FOREACH_DEV(portid) {
> +		rte_eth_dev_set_supported_ptypes(portid, RTE_PTYPE_UNKNOWN);
>  		err = rte_eth_dev_start(portid);
>  		if (err < 0)
>  			rte_exit(EXIT_FAILURE, "Error starting ethdev %d\n",
> diff --git a/examples/eventdev_pipeline/meson.build b/examples/eventdev_pipeline/meson.build
> index a54c35aa7..0fc916b05 100644
> --- a/examples/eventdev_pipeline/meson.build
> +++ b/examples/eventdev_pipeline/meson.build
> @@ -7,6 +7,7 @@
>  # DPDK instance, use 'make'
>  
>  deps += 'eventdev'
> +allow_experimental_apis = true
>  sources = files(
>  	'main.c',
>  	'pipeline_worker_generic.c',
> diff --git a/examples/exception_path/Makefile b/examples/exception_path/Makefile
> index 90c7f133a..a7c961276 100644
> --- a/examples/exception_path/Makefile
> +++ b/examples/exception_path/Makefile
> @@ -51,6 +51,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
>  
>  CFLAGS += -O3
>  CFLAGS += $(WERROR_FLAGS)
> +CFLAGS += -DALLOW_EXPERIMENTAL_API
>  
>  include $(RTE_SDK)/mk/rte.extapp.mk
>  
> diff --git a/examples/exception_path/main.c b/examples/exception_path/main.c
> index 0d79e5a24..7dbc0970a 100644
> --- a/examples/exception_path/main.c
> +++ b/examples/exception_path/main.c
> @@ -464,6 +464,7 @@ init_port(uint16_t port)
>  		FATAL_ERROR("Could not setup up TX queue for port%u (%d)",
>  				port, ret);
>  
> +	rte_eth_dev_set_supported_ptypes(port, RTE_PTYPE_UNKNOWN);
>  	ret = rte_eth_dev_start(port);
>  	if (ret < 0)
>  		FATAL_ERROR("Could not start port%u (%d)", port, ret);
> diff --git a/examples/exception_path/meson.build b/examples/exception_path/meson.build
> index c34e11e36..2b0a25036 100644
> --- a/examples/exception_path/meson.build
> +++ b/examples/exception_path/meson.build
> @@ -6,6 +6,7 @@
>  # To build this example as a standalone application with an already-installed
>  # DPDK instance, use 'make'
>  
> +allow_experimental_apis = true
>  sources = files(
>  	'main.c'
>  )
> diff --git a/examples/flow_classify/flow_classify.c b/examples/flow_classify/flow_classify.c
> index bc7f43ea9..aa25218a3 100644
> --- a/examples/flow_classify/flow_classify.c
> +++ b/examples/flow_classify/flow_classify.c
> @@ -231,6 +231,7 @@ port_init(uint8_t port, struct rte_mempool *mbuf_pool)
>  	}
>  
>  	/* Start the Ethernet port. */
> +	rte_eth_dev_set_supported_ptypes(port, RTE_PTYPE_UNKNOWN);
>  	retval = rte_eth_dev_start(port);
>  	if (retval < 0)
>  		return retval;
> diff --git a/examples/flow_filtering/Makefile b/examples/flow_filtering/Makefile
> index a63a75555..793a08fae 100644
> --- a/examples/flow_filtering/Makefile
> +++ b/examples/flow_filtering/Makefile
> @@ -49,6 +49,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
>  
>  CFLAGS += -O3
>  CFLAGS += $(WERROR_FLAGS)
> +CFLAGS += -DALLOW_EXPERIMENTAL_API
>  
>  include $(RTE_SDK)/mk/rte.extapp.mk
>  
> diff --git a/examples/flow_filtering/main.c b/examples/flow_filtering/main.c
> index a0487be77..fbd1b6cc2 100644
> --- a/examples/flow_filtering/main.c
> +++ b/examples/flow_filtering/main.c
> @@ -176,6 +176,7 @@ init_port(void)
>  	}
>  
>  	rte_eth_promiscuous_enable(port_id);
> +	rte_eth_dev_set_supported_ptypes(port_id, RTE_PTYPE_UNKNOWN);
>  	ret = rte_eth_dev_start(port_id);
>  	if (ret < 0) {
>  		rte_exit(EXIT_FAILURE,
> diff --git a/examples/flow_filtering/meson.build b/examples/flow_filtering/meson.build
> index 407795c42..6f5d1b08a 100644
> --- a/examples/flow_filtering/meson.build
> +++ b/examples/flow_filtering/meson.build
> @@ -6,6 +6,7 @@
>  # To build this example as a standalone application with an already-installed
>  # DPDK instance, use 'make'
>  
> +allow_experimental_apis = true
>  sources = files(
>  	'main.c',
>  )
> diff --git a/examples/ip_pipeline/link.c b/examples/ip_pipeline/link.c
> index 787eb866a..9f8b5b2ae 100644
> --- a/examples/ip_pipeline/link.c
> +++ b/examples/ip_pipeline/link.c
> @@ -205,6 +205,7 @@ link_create(const char *name, struct link_params *params)
>  			return NULL;
>  	}
>  
> +	rte_eth_dev_set_supported_ptypes(port_id, RTE_PTYPE_UNKNOWN);
>  	/* Port start */
>  	status = rte_eth_dev_start(port_id);
>  	if (status < 0)
> diff --git a/examples/ip_reassembly/Makefile b/examples/ip_reassembly/Makefile
> index 0b1a904e0..19c462388 100644
> --- a/examples/ip_reassembly/Makefile
> +++ b/examples/ip_reassembly/Makefile
> @@ -52,6 +52,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
>  
>  CFLAGS += -O3
>  CFLAGS += $(WERROR_FLAGS)
> +CFLAGS += -DALLOW_EXPERIMENTAL_API
>  
>  # workaround for a gcc bug with noreturn attribute
>  # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603
> diff --git a/examples/ip_reassembly/main.c b/examples/ip_reassembly/main.c
> index 38b39be6b..ff5407892 100644
> --- a/examples/ip_reassembly/main.c
> +++ b/examples/ip_reassembly/main.c
> @@ -1158,6 +1158,7 @@ main(int argc, char **argv)
>  		if ((enabled_port_mask & (1 << portid)) == 0) {
>  			continue;
>  		}
> +		rte_eth_dev_set_supported_ptypes(portid, RTE_PTYPE_UNKNOWN);
>  		/* Start device */
>  		ret = rte_eth_dev_start(portid);
>  		if (ret < 0)
> diff --git a/examples/ip_reassembly/meson.build b/examples/ip_reassembly/meson.build
> index 8ebd48291..8a667c265 100644
> --- a/examples/ip_reassembly/meson.build
> +++ b/examples/ip_reassembly/meson.build
> @@ -7,6 +7,7 @@
>  # DPDK instance, use 'make'
>  
>  deps += ['lpm', 'ip_frag']
> +allow_experimental_apis = true
>  sources = files(
>  	'main.c'
>  )
> diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c
> index 0d1fd6af6..619d248c8 100644
> --- a/examples/ipsec-secgw/ipsec-secgw.c
> +++ b/examples/ipsec-secgw/ipsec-secgw.c
> @@ -2448,6 +2448,7 @@ main(int32_t argc, char **argv)
>  		if ((enabled_port_mask & (1 << portid)) == 0)
>  			continue;
>  
> +		rte_eth_dev_set_supported_ptypes(portid, RTE_PTYPE_UNKNOWN);
>  		/*
>  		 * Start device
>  		 * note: device must be started before a flow rule
> diff --git a/examples/ipv4_multicast/Makefile b/examples/ipv4_multicast/Makefile
> index 5f8a67dd4..5171f7ab2 100644
> --- a/examples/ipv4_multicast/Makefile
> +++ b/examples/ipv4_multicast/Makefile
> @@ -52,6 +52,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
>  
>  CFLAGS += -O3
>  CFLAGS += $(WERROR_FLAGS)
> +CFLAGS += -DALLOW_EXPERIMENTAL_API
>  
>  # workaround for a gcc bug with noreturn attribute
>  # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603
> diff --git a/examples/ipv4_multicast/main.c b/examples/ipv4_multicast/main.c
> index 72eaadc51..29b3fed9c 100644
> --- a/examples/ipv4_multicast/main.c
> +++ b/examples/ipv4_multicast/main.c
> @@ -765,6 +765,7 @@ main(int argc, char **argv)
>  			qconf->tx_queue_id[portid] = queueid;
>  			queueid++;
>  		}
> +		rte_eth_dev_set_supported_ptypes(portid, RTE_PTYPE_UNKNOWN);
>  		rte_eth_allmulticast_enable(portid);
>  		/* Start device */
>  		ret = rte_eth_dev_start(portid);
> diff --git a/examples/ipv4_multicast/meson.build b/examples/ipv4_multicast/meson.build
> index d9e4c7c21..6969e2c54 100644
> --- a/examples/ipv4_multicast/meson.build
> +++ b/examples/ipv4_multicast/meson.build
> @@ -7,6 +7,7 @@
>  # DPDK instance, use 'make'
>  
>  deps += 'hash'
> +allow_experimental_apis = true
>  sources = files(
>  	'main.c'
>  )
> diff --git a/examples/kni/main.c b/examples/kni/main.c
> index 4710d7176..3163087ff 100644
> --- a/examples/kni/main.c
> +++ b/examples/kni/main.c
> @@ -625,6 +625,7 @@ init_port(uint16_t port)
>  		rte_exit(EXIT_FAILURE, "Could not setup up TX queue for "
>  				"port%u (%d)\n", (unsigned)port, ret);
>  
> +	rte_eth_dev_set_supported_ptypes(port, RTE_PTYPE_UNKNOWN);
>  	ret = rte_eth_dev_start(port);
>  	if (ret < 0)
>  		rte_exit(EXIT_FAILURE, "Could not start port%u (%d)\n",
> diff --git a/examples/l2fwd-cat/Makefile b/examples/l2fwd-cat/Makefile
> index c1960d6d3..d6a25e42a 100644
> --- a/examples/l2fwd-cat/Makefile
> +++ b/examples/l2fwd-cat/Makefile
> @@ -66,6 +66,7 @@ endif
>  EXTRA_CFLAGS += -O3 -g -Wfatal-errors
>  
>  CFLAGS += -I$(PQOS_INSTALL_PATH)/../include
> +CFLAGS += -DALLOW_EXPERIMENTAL_API
>  
>  LDLIBS += -L$(PQOS_INSTALL_PATH)
>  LDLIBS += -lpqos
> diff --git a/examples/l2fwd-cat/l2fwd-cat.c b/examples/l2fwd-cat/l2fwd-cat.c
> index b34b40a00..ddd9888b1 100644
> --- a/examples/l2fwd-cat/l2fwd-cat.c
> +++ b/examples/l2fwd-cat/l2fwd-cat.c
> @@ -67,6 +67,7 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool)
>  			return retval;
>  	}
>  
> +	rte_eth_dev_set_supported_ptypes(port, RTE_PTYPE_UNKNOWN);
>  	/* Start the Ethernet port. */
>  	retval = rte_eth_dev_start(port);
>  	if (retval < 0)
> diff --git a/examples/l2fwd-cat/meson.build b/examples/l2fwd-cat/meson.build
> index 4e2777a03..37c96040d 100644
> --- a/examples/l2fwd-cat/meson.build
> +++ b/examples/l2fwd-cat/meson.build
> @@ -10,6 +10,7 @@ pqos = cc.find_library('pqos', required: false)
>  build = pqos.found()
>  ext_deps += pqos
>  cflags += '-I/usr/local/include' # assume pqos lib installed in /usr/local
> +allow_experimental_apis = true
>  sources = files(
>  	'cat.c', 'l2fwd-cat.c'
>  )
> diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c
> index 3fe2ba725..6aad08b06 100644
> --- a/examples/l2fwd-crypto/main.c
> +++ b/examples/l2fwd-crypto/main.c
> @@ -2559,6 +2559,7 @@ initialize_ports(struct l2fwd_crypto_options *options)
>  			return -1;
>  		}
>  
> +		rte_eth_dev_set_supported_ptypes(portid, RTE_PTYPE_UNKNOWN);
>  		/* Start device */
>  		retval = rte_eth_dev_start(portid);
>  		if (retval < 0) {
> diff --git a/examples/l2fwd-jobstats/Makefile b/examples/l2fwd-jobstats/Makefile
> index 729a39e93..09834e979 100644
> --- a/examples/l2fwd-jobstats/Makefile
> +++ b/examples/l2fwd-jobstats/Makefile
> @@ -52,6 +52,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
>  
>  CFLAGS += -O3
>  CFLAGS += $(WERROR_FLAGS)
> +CFLAGS += -DALLOW_EXPERIMENTAL_API
>  
>  include $(RTE_SDK)/mk/rte.extapp.mk
>  endif
> diff --git a/examples/l2fwd-jobstats/main.c b/examples/l2fwd-jobstats/main.c
> index 77e44dc82..61ad8e759 100644
> --- a/examples/l2fwd-jobstats/main.c
> +++ b/examples/l2fwd-jobstats/main.c
> @@ -902,6 +902,7 @@ main(int argc, char **argv)
>  			"Cannot set error callback for tx buffer on port %u\n",
>  				 portid);
>  
> +		rte_eth_dev_set_supported_ptypes(portid, RTE_PTYPE_UNKNOWN);
>  		/* Start device */
>  		ret = rte_eth_dev_start(portid);
>  		if (ret < 0)
> diff --git a/examples/l2fwd-jobstats/meson.build b/examples/l2fwd-jobstats/meson.build
> index 1ffd484e2..3653aa7ec 100644
> --- a/examples/l2fwd-jobstats/meson.build
> +++ b/examples/l2fwd-jobstats/meson.build
> @@ -7,6 +7,7 @@
>  # DPDK instance, use 'make'
>  
>  deps += ['jobstats', 'timer']
> +allow_experimental_apis = true
>  sources = files(
>  	'main.c'
>  )
> diff --git a/examples/l2fwd-keepalive/Makefile b/examples/l2fwd-keepalive/Makefile
> index 37de27a6f..584257ae2 100644
> --- a/examples/l2fwd-keepalive/Makefile
> +++ b/examples/l2fwd-keepalive/Makefile
> @@ -53,6 +53,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
>  
>  CFLAGS += -O3
>  CFLAGS += $(WERROR_FLAGS)
> +CFLAGS += -DALLOW_EXPERIMENTAL_API
>  LDFLAGS += -lrt
>  
>  include $(RTE_SDK)/mk/rte.extapp.mk
> diff --git a/examples/l2fwd-keepalive/main.c b/examples/l2fwd-keepalive/main.c
> index 9831a4323..bf662bd37 100644
> --- a/examples/l2fwd-keepalive/main.c
> +++ b/examples/l2fwd-keepalive/main.c
> @@ -696,6 +696,7 @@ main(int argc, char **argv)
>  			"Cannot set error callback for tx buffer on port %u\n",
>  				 portid);
>  
> +		rte_eth_dev_set_supported_ptypes(portid, RTE_PTYPE_UNKNOWN);
>  		/* Start device */
>  		ret = rte_eth_dev_start(portid);
>  		if (ret < 0)
> diff --git a/examples/l2fwd-keepalive/meson.build b/examples/l2fwd-keepalive/meson.build
> index 6f7b007e1..2dffffaaa 100644
> --- a/examples/l2fwd-keepalive/meson.build
> +++ b/examples/l2fwd-keepalive/meson.build
> @@ -8,6 +8,7 @@
>  
>  ext_deps += cc.find_library('rt')
>  deps += 'timer'
> +allow_experimental_apis = true
>  sources = files(
>  	'main.c', 'shm.c'
>  )
> diff --git a/examples/l2fwd/Makefile b/examples/l2fwd/Makefile
> index 230352093..123e6161c 100644
> --- a/examples/l2fwd/Makefile
> +++ b/examples/l2fwd/Makefile
> @@ -51,6 +51,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
>  
>  CFLAGS += -O3
>  CFLAGS += $(WERROR_FLAGS)
> +CFLAGS += -DALLOW_EXPERIMENTAL_API
>  
>  include $(RTE_SDK)/mk/rte.extapp.mk
>  endif
> diff --git a/examples/l2fwd/main.c b/examples/l2fwd/main.c
> index 1e2b14297..1b940038f 100644
> --- a/examples/l2fwd/main.c
> +++ b/examples/l2fwd/main.c
> @@ -694,6 +694,7 @@ main(int argc, char **argv)
>  			"Cannot set error callback for tx buffer on port %u\n",
>  				 portid);
>  
> +		rte_eth_dev_set_supported_ptypes(portid, RTE_PTYPE_UNKNOWN);
>  		/* Start device */
>  		ret = rte_eth_dev_start(portid);
>  		if (ret < 0)
> diff --git a/examples/l2fwd/meson.build b/examples/l2fwd/meson.build
> index c34e11e36..2b0a25036 100644
> --- a/examples/l2fwd/meson.build
> +++ b/examples/l2fwd/meson.build
> @@ -6,6 +6,7 @@
>  # To build this example as a standalone application with an already-installed
>  # DPDK instance, use 'make'
>  
> +allow_experimental_apis = true
>  sources = files(
>  	'main.c'
>  )
> diff --git a/examples/l3fwd-acl/Makefile b/examples/l3fwd-acl/Makefile
> index e2c989f71..df590f8e9 100644
> --- a/examples/l3fwd-acl/Makefile
> +++ b/examples/l3fwd-acl/Makefile
> @@ -51,6 +51,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
>  
>  CFLAGS += -O3
>  CFLAGS += $(WERROR_FLAGS)
> +CFLAGS += -DALLOW_EXPERIMENTAL_API
>  
>  # workaround for a gcc bug with noreturn attribute
>  # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603
> diff --git a/examples/l3fwd-acl/main.c b/examples/l3fwd-acl/main.c
> index 0c44df767..1a0c09c1d 100644
> --- a/examples/l3fwd-acl/main.c
> +++ b/examples/l3fwd-acl/main.c
> @@ -2056,6 +2056,7 @@ main(int argc, char **argv)
>  		if ((enabled_port_mask & (1 << portid)) == 0)
>  			continue;
>  
> +		rte_eth_dev_set_supported_ptypes(portid, RTE_PTYPE_UNKNOWN);
>  		/* Start device */
>  		ret = rte_eth_dev_start(portid);
>  		if (ret < 0)
> diff --git a/examples/l3fwd-acl/meson.build b/examples/l3fwd-acl/meson.build
> index 7096e00c1..68cebd6ce 100644
> --- a/examples/l3fwd-acl/meson.build
> +++ b/examples/l3fwd-acl/meson.build
> @@ -7,6 +7,7 @@
>  # DPDK instance, use 'make'
>  
>  deps += ['acl', 'lpm', 'hash']
> +allow_experimental_apis = true
>  sources = files(
>  	'main.c'
>  )
> diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c
> index fd8d9528f..136f446b3 100644
> --- a/examples/l3fwd-power/main.c
> +++ b/examples/l3fwd-power/main.c
> @@ -2426,6 +2426,7 @@ main(int argc, char **argv)
>  		if ((enabled_port_mask & (1 << portid)) == 0) {
>  			continue;
>  		}
> +		rte_eth_dev_set_supported_ptypes(portid, RTE_PTYPE_UNKNOWN);
>  		/* Start device */
>  		ret = rte_eth_dev_start(portid);
>  		if (ret < 0)
> diff --git a/examples/l3fwd-vf/Makefile b/examples/l3fwd-vf/Makefile
> index 7b186a23c..db7f51f2f 100644
> --- a/examples/l3fwd-vf/Makefile
> +++ b/examples/l3fwd-vf/Makefile
> @@ -51,6 +51,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
>  
>  CFLAGS += -O3 $(USER_FLAGS)
>  CFLAGS += $(WERROR_FLAGS)
> +CFLAGS += -DALLOW_EXPERIMENTAL_API
>  
>  # workaround for a gcc bug with noreturn attribute
>  # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603
> diff --git a/examples/l3fwd-vf/main.c b/examples/l3fwd-vf/main.c
> index 572e74cf5..387d2426c 100644
> --- a/examples/l3fwd-vf/main.c
> +++ b/examples/l3fwd-vf/main.c
> @@ -1051,6 +1051,7 @@ main(int argc, char **argv)
>  		if ((enabled_port_mask & (1 << portid)) == 0) {
>  			continue;
>  		}
> +		rte_eth_dev_set_supported_ptypes(portid, RTE_PTYPE_UNKNOWN);
>  		/* Start device */
>  		ret = rte_eth_dev_start(portid);
>  		if (ret < 0)
> diff --git a/examples/l3fwd-vf/meson.build b/examples/l3fwd-vf/meson.build
> index 226286e74..00f3c38f4 100644
> --- a/examples/l3fwd-vf/meson.build
> +++ b/examples/l3fwd-vf/meson.build
> @@ -7,6 +7,7 @@
>  # DPDK instance, use 'make'
>  
>  deps += ['lpm', 'hash']
> +allow_experimental_apis = true
>  sources = files(
>  	'main.c'
>  )
> diff --git a/examples/link_status_interrupt/Makefile b/examples/link_status_interrupt/Makefile
> index 97e5a14a8..6ddedd4de 100644
> --- a/examples/link_status_interrupt/Makefile
> +++ b/examples/link_status_interrupt/Makefile
> @@ -51,6 +51,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
>  
>  CFLAGS += -O3
>  CFLAGS += $(WERROR_FLAGS)
> +CFLAGS += -DALLOW_EXPERIMENTAL_API
>  
>  include $(RTE_SDK)/mk/rte.extapp.mk
>  endif
> diff --git a/examples/link_status_interrupt/main.c b/examples/link_status_interrupt/main.c
> index 9cd4dc7a6..abd84b862 100644
> --- a/examples/link_status_interrupt/main.c
> +++ b/examples/link_status_interrupt/main.c
> @@ -676,6 +676,7 @@ main(int argc, char **argv)
>  			rte_exit(EXIT_FAILURE, "Cannot set error callback for "
>  					"tx buffer on port %u\n", (unsigned) portid);
>  
> +		rte_eth_dev_set_supported_ptypes(portid, RTE_PTYPE_UNKNOWN);
>  		/* Start device */
>  		ret = rte_eth_dev_start(portid);
>  		if (ret < 0)
> diff --git a/examples/link_status_interrupt/meson.build b/examples/link_status_interrupt/meson.build
> index c34e11e36..2b0a25036 100644
> --- a/examples/link_status_interrupt/meson.build
> +++ b/examples/link_status_interrupt/meson.build
> @@ -6,6 +6,7 @@
>  # To build this example as a standalone application with an already-installed
>  # DPDK instance, use 'make'
>  
> +allow_experimental_apis = true
>  sources = files(
>  	'main.c'
>  )
> diff --git a/examples/load_balancer/Makefile b/examples/load_balancer/Makefile
> index caae8a107..dcba9194c 100644
> --- a/examples/load_balancer/Makefile
> +++ b/examples/load_balancer/Makefile
> @@ -51,6 +51,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
>  
>  CFLAGS += -O3 -g
>  CFLAGS += $(WERROR_FLAGS)
> +CFLAGS += -DALLOW_EXPERIMENTAL_API
>  
>  # workaround for a gcc bug with noreturn attribute
>  # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603
> diff --git a/examples/load_balancer/init.c b/examples/load_balancer/init.c
> index 3ab7d0211..52f677fd4 100644
> --- a/examples/load_balancer/init.c
> +++ b/examples/load_balancer/init.c
> @@ -496,6 +496,7 @@ app_init_nics(void)
>  			}
>  		}
>  
> +		rte_eth_dev_set_supported_ptypes(port, RTE_PTYPE_UNKNOWN);
>  		/* Start port */
>  		ret = rte_eth_dev_start(port);
>  		if (ret < 0) {
> diff --git a/examples/load_balancer/meson.build b/examples/load_balancer/meson.build
> index 4f7ac3999..19708974c 100644
> --- a/examples/load_balancer/meson.build
> +++ b/examples/load_balancer/meson.build
> @@ -7,6 +7,7 @@
>  # DPDK instance, use 'make'
>  
>  deps += 'lpm'
> +allow_experimental_apis = true
>  sources = files(
>  	'config.c', 'init.c', 'main.c', 'runtime.c'
>  )
> diff --git a/examples/packet_ordering/Makefile b/examples/packet_ordering/Makefile
> index 51acaf7eb..9ba3fa9e8 100644
> --- a/examples/packet_ordering/Makefile
> +++ b/examples/packet_ordering/Makefile
> @@ -51,6 +51,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
>  
>  CFLAGS += -O3
>  CFLAGS += $(WERROR_FLAGS)
> +CFLAGS += -DALLOW_EXPERIMENTAL_API
>  
>  include $(RTE_SDK)/mk/rte.extapp.mk
>  endif
> diff --git a/examples/packet_ordering/main.c b/examples/packet_ordering/main.c
> index 030e92299..41295690d 100644
> --- a/examples/packet_ordering/main.c
> +++ b/examples/packet_ordering/main.c
> @@ -312,6 +312,7 @@ configure_eth_port(uint16_t port_id)
>  			return ret;
>  	}
>  
> +	rte_eth_dev_set_supported_ptypes(port_id, RTE_PTYPE_UNKNOWN);
>  	ret = rte_eth_dev_start(port_id);
>  	if (ret < 0)
>  		return ret;
> diff --git a/examples/packet_ordering/meson.build b/examples/packet_ordering/meson.build
> index 6c2fccdcb..a3776946f 100644
> --- a/examples/packet_ordering/meson.build
> +++ b/examples/packet_ordering/meson.build
> @@ -7,6 +7,7 @@
>  # DPDK instance, use 'make'
>  
>  deps += 'reorder'
> +allow_experimental_apis = true
>  sources = files(
>  	'main.c'
>  )
> diff --git a/examples/ptpclient/Makefile b/examples/ptpclient/Makefile
> index 89e2bacbd..f158d96b9 100644
> --- a/examples/ptpclient/Makefile
> +++ b/examples/ptpclient/Makefile
> @@ -50,6 +50,7 @@ RTE_TARGET ?= $(notdir $(abspath $(dir $(firstword $(wildcard $(RTE_SDK)/*/.conf
>  include $(RTE_SDK)/mk/rte.vars.mk
>  
>  CFLAGS += -O3
> +CFLAGS += -DALLOW_EXPERIMENTAL_API
>  CFLAGS += $(WERROR_FLAGS)
>  
>  # workaround for a gcc bug with noreturn attribute
> diff --git a/examples/ptpclient/meson.build b/examples/ptpclient/meson.build
> index fa0cbe93c..d4171a218 100644
> --- a/examples/ptpclient/meson.build
> +++ b/examples/ptpclient/meson.build
> @@ -6,6 +6,7 @@
>  # To build this example as a standalone application with an already-installed
>  # DPDK instance, use 'make'
>  
> +allow_experimental_apis = true
>  sources = files(
>  	'ptpclient.c'
>  )
> diff --git a/examples/ptpclient/ptpclient.c b/examples/ptpclient/ptpclient.c
> index 31778fd95..351596fc3 100644
> --- a/examples/ptpclient/ptpclient.c
> +++ b/examples/ptpclient/ptpclient.c
> @@ -227,6 +227,7 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool)
>  			return retval;
>  	}
>  
> +	rte_eth_dev_set_supported_ptypes(port, RTE_PTYPE_UNKNOWN);
>  	/* Start the Ethernet port. */
>  	retval = rte_eth_dev_start(port);
>  	if (retval < 0)
> diff --git a/examples/qos_meter/Makefile b/examples/qos_meter/Makefile
> index e5217cf7c..a1533d08f 100644
> --- a/examples/qos_meter/Makefile
> +++ b/examples/qos_meter/Makefile
> @@ -52,6 +52,7 @@ RTE_TARGET ?= $(notdir $(abspath $(dir $(firstword $(wildcard $(RTE_SDK)/*/.conf
>  include $(RTE_SDK)/mk/rte.vars.mk
>  
>  CFLAGS += -O3
> +CFLAGS += -DALLOW_EXPERIMENTAL_API
>  CFLAGS += $(WERROR_FLAGS)
>  
>  # workaround for a gcc bug with noreturn attribute
> diff --git a/examples/qos_meter/main.c b/examples/qos_meter/main.c
> index da7afe8be..2accbc9b6 100644
> --- a/examples/qos_meter/main.c
> +++ b/examples/qos_meter/main.c
> @@ -419,10 +419,12 @@ main(int argc, char **argv)
>  
>  	rte_eth_tx_buffer_init(tx_buffer, PKT_TX_BURST_MAX);
>  
> +	rte_eth_dev_set_supported_ptypes(port_rx, RTE_PTYPE_UNKNOWN);
>  	ret = rte_eth_dev_start(port_rx);
>  	if (ret < 0)
>  		rte_exit(EXIT_FAILURE, "Port %d start error (%d)\n", port_rx, ret);
>  
> +	rte_eth_dev_set_supported_ptypes(port_tx, RTE_PTYPE_UNKNOWN);
>  	ret = rte_eth_dev_start(port_tx);
>  	if (ret < 0)
>  		rte_exit(EXIT_FAILURE, "Port %d start error (%d)\n", port_tx, ret);
> diff --git a/examples/qos_meter/meson.build b/examples/qos_meter/meson.build
> index ef7779f2f..10cd4bc79 100644
> --- a/examples/qos_meter/meson.build
> +++ b/examples/qos_meter/meson.build
> @@ -7,6 +7,7 @@
>  # DPDK instance, use 'make'
>  
>  deps += 'meter'
> +allow_experimental_apis = true
>  sources = files(
>  	'main.c', 'rte_policer.c'
>  )
> diff --git a/examples/qos_sched/Makefile b/examples/qos_sched/Makefile
> index ce2d25371..7d3d3019f 100644
> --- a/examples/qos_sched/Makefile
> +++ b/examples/qos_sched/Makefile
> @@ -58,6 +58,7 @@ else
>  
>  CFLAGS += -O3
>  CFLAGS += $(WERROR_FLAGS)
> +CFLAGS += -DALLOW_EXPERIMENTAL_API
>  
>  include $(RTE_SDK)/mk/rte.extapp.mk
>  
> diff --git a/examples/qos_sched/init.c b/examples/qos_sched/init.c
> index b05206d5a..35e4c90a2 100644
> --- a/examples/qos_sched/init.c
> +++ b/examples/qos_sched/init.c
> @@ -138,6 +138,7 @@ app_init_port(uint16_t portid, struct rte_mempool *mp)
>  			 "rte_eth_tx_queue_setup: err=%d, port=%u queue=%d\n",
>  			 ret, portid, 0);
>  
> +	rte_eth_dev_set_supported_ptypes(portid, RTE_PTYPE_UNKNOWN);
>  	/* Start device */
>  	ret = rte_eth_dev_start(portid);
>  	if (ret < 0)
> diff --git a/examples/qos_sched/meson.build b/examples/qos_sched/meson.build
> index 289b81ce8..5101652af 100644
> --- a/examples/qos_sched/meson.build
> +++ b/examples/qos_sched/meson.build
> @@ -7,6 +7,7 @@
>  # DPDK instance, use 'make'
>  
>  deps += ['sched', 'cfgfile']
> +allow_experimental_apis = true
>  sources = files(
>  	'app_thread.c', 'args.c', 'cfg_file.c', 'cmdline.c',
>  	'init.c', 'main.c', 'stats.c'
> diff --git a/examples/quota_watermark/qw/Makefile b/examples/quota_watermark/qw/Makefile
> index 3f10f01c3..e06f4482b 100644
> --- a/examples/quota_watermark/qw/Makefile
> +++ b/examples/quota_watermark/qw/Makefile
> @@ -18,5 +18,6 @@ SRCS-y := args.c init.c main.c
>  
>  CFLAGS += -O3 -DQW_SOFTWARE_FC
>  CFLAGS += $(WERROR_FLAGS)
> +CFLAGS += -DALLOW_EXPERIMENTAL_API
>  
>  include $(RTE_SDK)/mk/rte.extapp.mk
> diff --git a/examples/quota_watermark/qw/init.c b/examples/quota_watermark/qw/init.c
> index 5a0f64f45..098e3c16e 100644
> --- a/examples/quota_watermark/qw/init.c
> +++ b/examples/quota_watermark/qw/init.c
> @@ -96,6 +96,7 @@ void configure_eth_port(uint16_t port_id)
>  				"Failed to setup hardware flow control on port %u (error %d)\n",
>  				(unsigned int) port_id, ret);
>  
> +	rte_eth_dev_set_supported_ptypes(port_id, RTE_PTYPE_UNKNOWN);
>  	/* Start the port */
>  	ret = rte_eth_dev_start(port_id);
>  	if (ret < 0)
> diff --git a/examples/rxtx_callbacks/main.c b/examples/rxtx_callbacks/main.c
> index dbcd9f4fc..c4acac585 100644
> --- a/examples/rxtx_callbacks/main.c
> +++ b/examples/rxtx_callbacks/main.c
> @@ -152,6 +152,7 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool)
>  			return retval;
>  	}
>  
> +	rte_eth_dev_set_supported_ptypes(port, RTE_PTYPE_UNKNOWN);
>  	retval  = rte_eth_dev_start(port);
>  	if (retval < 0)
>  		return retval;
> diff --git a/examples/server_node_efd/server/Makefile b/examples/server_node_efd/server/Makefile
> index 4837bd3ea..acbd12ae2 100644
> --- a/examples/server_node_efd/server/Makefile
> +++ b/examples/server_node_efd/server/Makefile
> @@ -25,5 +25,6 @@ INC := $(sort $(wildcard *.h))
>  
>  CFLAGS += $(WERROR_FLAGS) -O3
>  CFLAGS += -I$(SRCDIR)/../shared
> +CFLAGS += -DALLOW_EXPERIMENTAL_API
>  
>  include $(RTE_SDK)/mk/rte.extapp.mk
> diff --git a/examples/server_node_efd/server/init.c b/examples/server_node_efd/server/init.c
> index af5a18e28..b4ff9dd57 100644
> --- a/examples/server_node_efd/server/init.c
> +++ b/examples/server_node_efd/server/init.c
> @@ -149,6 +149,7 @@ init_port(uint16_t port_num)
>  
>  	rte_eth_promiscuous_enable(port_num);
>  
> +	rte_eth_dev_set_supported_ptypes(port_num, RTE_PTYPE_UNKNOWN);
>  	retval = rte_eth_dev_start(port_num);
>  	if (retval < 0)
>  		return retval;
> diff --git a/examples/skeleton/Makefile b/examples/skeleton/Makefile
> index c5ac26029..0037d6b25 100644
> --- a/examples/skeleton/Makefile
> +++ b/examples/skeleton/Makefile
> @@ -50,6 +50,7 @@ RTE_TARGET ?= $(notdir $(abspath $(dir $(firstword $(wildcard $(RTE_SDK)/*/.conf
>  include $(RTE_SDK)/mk/rte.vars.mk
>  
>  CFLAGS += $(WERROR_FLAGS)
> +CFLAGS += -DALLOW_EXPERIMENTAL_API
>  
>  # workaround for a gcc bug with noreturn attribute
>  # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603
> diff --git a/examples/skeleton/basicfwd.c b/examples/skeleton/basicfwd.c
> index a8a8e98f0..6c10a06ef 100644
> --- a/examples/skeleton/basicfwd.c
> +++ b/examples/skeleton/basicfwd.c
> @@ -76,6 +76,7 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool)
>  			return retval;
>  	}
>  
> +	rte_eth_dev_set_supported_ptypes(port, RTE_PTYPE_UNKNOWN);
>  	/* Start the Ethernet port. */
>  	retval = rte_eth_dev_start(port);
>  	if (retval < 0)
> diff --git a/examples/skeleton/meson.build b/examples/skeleton/meson.build
> index 9bb9ec329..ef46b187e 100644
> --- a/examples/skeleton/meson.build
> +++ b/examples/skeleton/meson.build
> @@ -6,6 +6,7 @@
>  # To build this example as a standalone application with an already-installed
>  # DPDK instance, use 'make'
>  
> +allow_experimental_apis = true
>  sources = files(
>  	'basicfwd.c'
>  )
> diff --git a/examples/tep_termination/Makefile b/examples/tep_termination/Makefile
> index 31165bd92..586838676 100644
> --- a/examples/tep_termination/Makefile
> +++ b/examples/tep_termination/Makefile
> @@ -61,6 +61,7 @@ endif
>  CFLAGS += -O3
>  CFLAGS += $(WERROR_FLAGS)
>  CFLAGS += -Wno-deprecated-declarations
> +CFLAGS += -DALLOW_EXPERIMENTAL_API
>  
>  include $(RTE_SDK)/mk/rte.extapp.mk
>  endif
> diff --git a/examples/tep_termination/meson.build b/examples/tep_termination/meson.build
> index f65d68980..f40b1c0b8 100644
> --- a/examples/tep_termination/meson.build
> +++ b/examples/tep_termination/meson.build
> @@ -11,6 +11,7 @@ if not is_linux
>  endif
>  deps += ['hash', 'vhost']
>  cflags += '-Wno-deprecated-declarations'
> +allow_experimental_apis = true
>  sources = files(
>  	'main.c', 'vxlan.c', 'vxlan_setup.c'
>  )
> diff --git a/examples/tep_termination/vxlan_setup.c b/examples/tep_termination/vxlan_setup.c
> index 9a0880002..538a54b3a 100644
> --- a/examples/tep_termination/vxlan_setup.c
> +++ b/examples/tep_termination/vxlan_setup.c
> @@ -167,6 +167,7 @@ vxlan_port_init(uint16_t port, struct rte_mempool *mbuf_pool)
>  			return retval;
>  	}
>  
> +	rte_eth_dev_set_supported_ptypes(port, RTE_PTYPE_UNKNOWN);
>  	/* Start the device. */
>  	retval  = rte_eth_dev_start(port);
>  	if (retval < 0)
> diff --git a/examples/vhost/Makefile b/examples/vhost/Makefile
> index f84b7f017..7722e81c7 100644
> --- a/examples/vhost/Makefile
> +++ b/examples/vhost/Makefile
> @@ -62,6 +62,7 @@ else
>  CFLAGS += -DALLOW_EXPERIMENTAL_API
>  CFLAGS += -O2 -D_FILE_OFFSET_BITS=64
>  CFLAGS += $(WERROR_FLAGS)
> +CFLAGS += -DALLOW_EXPERIMENTAL_API
>  
>  include $(RTE_SDK)/mk/rte.extapp.mk
>  
> diff --git a/examples/vhost/main.c b/examples/vhost/main.c
> index 0961db080..57438b22c 100644
> --- a/examples/vhost/main.c
> +++ b/examples/vhost/main.c
> @@ -321,6 +321,7 @@ port_init(uint16_t port)
>  		}
>  	}
>  
> +	rte_eth_dev_set_supported_ptypes(port, RTE_PTYPE_UNKNOWN);
>  	/* Start the device. */
>  	retval  = rte_eth_dev_start(port);
>  	if (retval < 0) {
> diff --git a/examples/vm_power_manager/Makefile b/examples/vm_power_manager/Makefile
> index 2fdb991d7..65c2ad179 100644
> --- a/examples/vm_power_manager/Makefile
> +++ b/examples/vm_power_manager/Makefile
> @@ -28,6 +28,7 @@ endif
>  
>  CFLAGS += -O3 -I$(RTE_SDK)/lib/librte_power/
>  CFLAGS += $(WERROR_FLAGS)
> +CFLAGS += -DALLOW_EXPERIMENTAL_API
>  
>  LDLIBS += -lvirt
>  
> diff --git a/examples/vm_power_manager/main.c b/examples/vm_power_manager/main.c
> index 54c704610..190a7a9ea 100644
> --- a/examples/vm_power_manager/main.c
> +++ b/examples/vm_power_manager/main.c
> @@ -99,6 +99,7 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool)
>  			return retval;
>  	}
>  
> +	rte_eth_dev_set_supported_ptypes(port, RTE_PTYPE_UNKNOWN);
>  	/* Start the Ethernet port. */
>  	retval = rte_eth_dev_start(port);
>  	if (retval < 0)
> diff --git a/examples/vm_power_manager/meson.build b/examples/vm_power_manager/meson.build
> index 20a4a05b3..54e2b584f 100644
> --- a/examples/vm_power_manager/meson.build
> +++ b/examples/vm_power_manager/meson.build
> @@ -25,6 +25,7 @@ if dpdk_conf.has('RTE_LIBRTE_IXGBE_PMD')
>  	deps += ['pmd_ixgbe']
>  endif
>  
> +allow_experimental_apis = true
>  sources = files(
>  	'channel_manager.c', 'channel_monitor.c', 'main.c', 'parse.c', 'power_manager.c', 'vm_power_cli.c'
>  )
> diff --git a/examples/vmdq/Makefile b/examples/vmdq/Makefile
> index 1557ee86b..2168747cc 100644
> --- a/examples/vmdq/Makefile
> +++ b/examples/vmdq/Makefile
> @@ -50,6 +50,7 @@ RTE_TARGET ?= $(notdir $(abspath $(dir $(firstword $(wildcard $(RTE_SDK)/*/.conf
>  include $(RTE_SDK)/mk/rte.vars.mk
>  
>  CFLAGS += $(WERROR_FLAGS)
> +CFLAGS += -DALLOW_EXPERIMENTAL_API
>  
>  EXTRA_CFLAGS += -O3
>  
> diff --git a/examples/vmdq/main.c b/examples/vmdq/main.c
> index 7281ffd7f..87cf230f4 100644
> --- a/examples/vmdq/main.c
> +++ b/examples/vmdq/main.c
> @@ -258,6 +258,7 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool)
>  		}
>  	}
>  
> +	rte_eth_dev_set_supported_ptypes(port, RTE_PTYPE_UNKNOWN);
>  	retval  = rte_eth_dev_start(port);
>  	if (retval < 0) {
>  		printf("port %d start failed\n", port);
> diff --git a/examples/vmdq/meson.build b/examples/vmdq/meson.build
> index c34e11e36..2b0a25036 100644
> --- a/examples/vmdq/meson.build
> +++ b/examples/vmdq/meson.build
> @@ -6,6 +6,7 @@
>  # To build this example as a standalone application with an already-installed
>  # DPDK instance, use 'make'
>  
> +allow_experimental_apis = true
>  sources = files(
>  	'main.c'
>  )
> diff --git a/examples/vmdq_dcb/Makefile b/examples/vmdq_dcb/Makefile
> index 391096cfb..ea1574d91 100644
> --- a/examples/vmdq_dcb/Makefile
> +++ b/examples/vmdq_dcb/Makefile
> @@ -50,6 +50,7 @@ RTE_TARGET ?= $(notdir $(abspath $(dir $(firstword $(wildcard $(RTE_SDK)/*/.conf
>  include $(RTE_SDK)/mk/rte.vars.mk
>  
>  CFLAGS += $(WERROR_FLAGS)
> +CFLAGS += -DALLOW_EXPERIMENTAL_API
>  
>  # workaround for a gcc bug with noreturn attribute
>  # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603
> diff --git a/examples/vmdq_dcb/main.c b/examples/vmdq_dcb/main.c
> index 389000327..bace88e47 100644
> --- a/examples/vmdq_dcb/main.c
> +++ b/examples/vmdq_dcb/main.c
> @@ -313,6 +313,7 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool)
>  		}
>  	}
>  
> +	rte_eth_dev_set_supported_ptypes(port, RTE_PTYPE_UNKNOWN);
>  	retval  = rte_eth_dev_start(port);
>  	if (retval < 0) {
>  		printf("port %d start failed\n", port);
> diff --git a/examples/vmdq_dcb/meson.build b/examples/vmdq_dcb/meson.build
> index c34e11e36..2b0a25036 100644
> --- a/examples/vmdq_dcb/meson.build
> +++ b/examples/vmdq_dcb/meson.build
> @@ -6,6 +6,7 @@
>  # To build this example as a standalone application with an already-installed
>  # DPDK instance, use 'make'
>  
> +allow_experimental_apis = true
>  sources = files(
>  	'main.c'
>  )

^ permalink raw reply	[flat|nested] 245+ messages in thread

* Re: [dpdk-dev] [PATCH v3 7/7] examples: disable Rx packet type parsing
  2019-09-30 17:47     ` Aaron Conole
@ 2019-10-01  5:02       ` Pavan Nikhilesh Bhagavatula
  0 siblings, 0 replies; 245+ messages in thread
From: Pavan Nikhilesh Bhagavatula @ 2019-10-01  5:02 UTC (permalink / raw)
  To: Aaron Conole
  Cc: arybchenko, Jerin Jacob Kollanukkaran, Nicolas Chautru,
	Chas Williams, David Hunt, Harry van Haaren, Marko Kovacevic,
	Ori Kam, Bruce Richardson, Radu Nicolau, Akhil Goyal,
	Tomasz Kantecki, Bernard Iremonger, Cristian Dumitrescu,
	Konstantin Ananyev, Ferruh Yigit, Declan Doherty, Reshma Pattan,
	John McNamara, Xiaoyun Li, Jasvinder Singh, Byron Marohn,
	Yipeng Wang, Maxime Coquelin, Tiwei Bie, Zhihong Wang, dev

<snip>
>*app_params,
>>  	}
>>
>>  	rte_eth_promiscuous_enable(port_id);
>> +	rte_eth_dev_set_supported_ptypes(port_id,
>RTE_PTYPE_UNKNOWN);
>
>This is strange, since the function signature is defined (in 1/7) as:
>
>  int rte_eth_dev_set_supported_ptypes(uint16_t port_id, uint32_t
>ptype_mask,
>				       uint32_t *set_ptypes, int num);
>
>Did you mean to add more args?

Ah yes, my bad. I will send v4.

Thanks,
Pavan.

>
>>  	rte_eth_macaddr_get(port_id, &bbdev_port_eth_addr);

<snip>

^ permalink raw reply	[flat|nested] 245+ messages in thread

* [dpdk-dev]  [PATCH v4 0/7] ethdev: add new Rx offload flags
  2019-09-29 21:19 ` [dpdk-dev] [PATCH v3 0/7] ethdev: add new Rx offload flags pbhagavatula
                     ` (6 preceding siblings ...)
  2019-09-29 21:19   ` [dpdk-dev] [PATCH v3 7/7] examples: disable Rx packet type parsing pbhagavatula
@ 2019-10-01  6:34   ` pbhagavatula
  2019-10-01  6:34     ` [dpdk-dev] [PATCH v4 1/7] ethdev: add set ptype function pbhagavatula
                       ` (7 more replies)
  7 siblings, 8 replies; 245+ messages in thread
From: pbhagavatula @ 2019-10-01  6:34 UTC (permalink / raw)
  To: arybchenko, jerinj; +Cc: dev, Pavan Nikhilesh

From: Pavan Nikhilesh <pbhagavatula@marvell.com>

Add new Rx offload flags `DEV_RX_OFFLOAD_RSS_HASH` and
`DEV_RX_OFFLOAD_FLOW_MARK`. These flags can be used to
enable/disable PMD writes to rte_mbuf fields `hash.rss` and `hash.fdir.hi`
and also `ol_flags:PKT_RX_RSS` and `ol_flags:PKT_RX_FDIR`.

Add new packet type set function `rte_eth_dev_set_supported_ptypes`,
allows application to inform PMDs about the packet types it is interested
in. Based on ptypes requested by application PMDs can optimize the Rx path.

For example, if a given PMD doesn't support any packet types that the
application is interested in then the application can disable[1] writes to
`mbuf.packet_type` done by the PMD and use a software ptype parser.
     [1] rte_eth_dev_set_supported_ptypes(*port_id*, RTE_PTYPE_UNKNOWN, NULL,
					  0);

v4 Changes:
----------
- Set the last element in set_ptype array as RTE_PTYPE_UNKNOWN to mark the end
  of array.
- Fix invalid set ptype function call in examples.
- Remove setting rte_eth_dev_set_supported_ptypes to UNKNOWN in l3fwd-power.

v3 Changes:
----------
- Add missing release notes. (Andrew)
- Re-word various descriptions.
- Fix ptype set logic.

v2 Changes:
----------
- Update release notes. (Andrew)
- Redo commit logs. (Andrew)
- Disable ptype parsing for unsupported examples. (Jerin)
- Disable RSS write only in generic mode eventdev_pipeline. (Jerin)
- Modify set_supported_ptypes function to return successfuly set mask
  instead of failure.
- Dropped set_supported_ptypes to drivers by handling in library
  layer, interested PMD can add it in.


Pavan Nikhilesh (7):
  ethdev: add set ptype function
  ethdev: add mbuf RSS update as an offload
  ethdev: add flow action type update as an offload
  drivers/net: update Rx RSS hash offload capabilities
  drivers/net: update Rx flow flag and mark capabilities
  examples/eventdev_pipeline: add new Rx RSS hash offload
  examples: disable Rx packet type parsing

 doc/guides/nics/features.rst                  |  22 +++-
 doc/guides/rel_notes/release_19_11.rst        |  23 ++++
 drivers/net/bnxt/bnxt_ethdev.c                |   4 +-
 drivers/net/cxgbe/cxgbe.h                     |   3 +-
 drivers/net/dpaa/dpaa_ethdev.c                |   3 +-
 drivers/net/dpaa2/dpaa2_ethdev.c              |   3 +-
 drivers/net/e1000/igb_rxtx.c                  |   3 +-
 drivers/net/enic/enic_res.c                   |   4 +-
 drivers/net/fm10k/fm10k_ethdev.c              |   3 +-
 drivers/net/hinic/hinic_pmd_ethdev.c          |   3 +-
 drivers/net/i40e/i40e_ethdev.c                |   4 +-
 drivers/net/iavf/iavf_ethdev.c                |   4 +-
 drivers/net/ice/ice_ethdev.c                  |   4 +-
 drivers/net/ixgbe/ixgbe_rxtx.c                |   4 +-
 drivers/net/liquidio/lio_ethdev.c             |   3 +-
 drivers/net/mlx4/mlx4_rxq.c                   |   3 +-
 drivers/net/mlx5/mlx5_rxq.c                   |   4 +-
 drivers/net/netvsc/hn_rndis.c                 |   3 +-
 drivers/net/nfp/nfp_net.c                     |   3 +-
 drivers/net/octeontx2/otx2_ethdev.c           |   3 +-
 drivers/net/octeontx2/otx2_ethdev.h           |  16 +--
 drivers/net/octeontx2/otx2_flow_parse.c       |   3 +-
 drivers/net/qede/qede_ethdev.c                |   3 +-
 drivers/net/sfc/sfc_ef10_essb_rx.c            |   3 +-
 drivers/net/sfc/sfc_ef10_rx.c                 |   3 +-
 drivers/net/sfc/sfc_rx.c                      |   3 +-
 drivers/net/thunderx/nicvf_ethdev.h           |   3 +-
 drivers/net/vmxnet3/vmxnet3_ethdev.c          |   3 +-
 examples/bbdev_app/main.c                     |   1 +
 examples/bond/main.c                          |   2 +
 examples/distributor/Makefile                 |   1 +
 examples/distributor/main.c                   |   1 +
 examples/distributor/meson.build              |   1 +
 examples/eventdev_pipeline/main.c             | 115 +----------------
 examples/eventdev_pipeline/meson.build        |   1 +
 .../pipeline_worker_generic.c                 | 118 ++++++++++++++++++
 .../eventdev_pipeline/pipeline_worker_tx.c    | 114 +++++++++++++++++
 examples/exception_path/Makefile              |   1 +
 examples/exception_path/main.c                |   1 +
 examples/exception_path/meson.build           |   1 +
 examples/flow_classify/flow_classify.c        |   1 +
 examples/flow_filtering/Makefile              |   1 +
 examples/flow_filtering/main.c                |   1 +
 examples/flow_filtering/meson.build           |   1 +
 examples/ip_pipeline/link.c                   |   1 +
 examples/ip_reassembly/Makefile               |   1 +
 examples/ip_reassembly/main.c                 |   2 +
 examples/ip_reassembly/meson.build            |   1 +
 examples/ipsec-secgw/ipsec-secgw.c            |   2 +
 examples/ipv4_multicast/Makefile              |   1 +
 examples/ipv4_multicast/main.c                |   2 +
 examples/ipv4_multicast/meson.build           |   1 +
 examples/kni/main.c                           |   1 +
 examples/l2fwd-cat/Makefile                   |   1 +
 examples/l2fwd-cat/l2fwd-cat.c                |   1 +
 examples/l2fwd-cat/meson.build                |   1 +
 examples/l2fwd-crypto/main.c                  |   2 +
 examples/l2fwd-jobstats/Makefile              |   1 +
 examples/l2fwd-jobstats/main.c                |   2 +
 examples/l2fwd-jobstats/meson.build           |   1 +
 examples/l2fwd-keepalive/Makefile             |   1 +
 examples/l2fwd-keepalive/main.c               |   2 +
 examples/l2fwd-keepalive/meson.build          |   1 +
 examples/l2fwd/Makefile                       |   1 +
 examples/l2fwd/main.c                         |   2 +
 examples/l2fwd/meson.build                    |   1 +
 examples/l3fwd-acl/Makefile                   |   1 +
 examples/l3fwd-acl/main.c                     |   2 +
 examples/l3fwd-acl/meson.build                |   1 +
 examples/l3fwd-power/Makefile                 |   1 -
 examples/l3fwd-vf/Makefile                    |   1 +
 examples/l3fwd-vf/main.c                      |   2 +
 examples/l3fwd-vf/meson.build                 |   1 +
 examples/link_status_interrupt/Makefile       |   1 +
 examples/link_status_interrupt/main.c         |   2 +
 examples/link_status_interrupt/meson.build    |   1 +
 examples/load_balancer/Makefile               |   1 +
 examples/load_balancer/init.c                 |   2 +
 examples/load_balancer/meson.build            |   1 +
 examples/packet_ordering/Makefile             |   1 +
 examples/packet_ordering/main.c               |   1 +
 examples/packet_ordering/meson.build          |   1 +
 examples/ptpclient/Makefile                   |   1 +
 examples/ptpclient/meson.build                |   1 +
 examples/ptpclient/ptpclient.c                |   1 +
 examples/qos_meter/Makefile                   |   1 +
 examples/qos_meter/main.c                     |   2 +
 examples/qos_meter/meson.build                |   1 +
 examples/qos_sched/Makefile                   |   1 +
 examples/qos_sched/init.c                     |   1 +
 examples/qos_sched/meson.build                |   1 +
 examples/quota_watermark/qw/Makefile          |   1 +
 examples/quota_watermark/qw/init.c            |   1 +
 examples/rxtx_callbacks/main.c                |   1 +
 examples/server_node_efd/server/Makefile      |   1 +
 examples/server_node_efd/server/init.c        |   1 +
 examples/skeleton/Makefile                    |   1 +
 examples/skeleton/basicfwd.c                  |   1 +
 examples/skeleton/meson.build                 |   1 +
 examples/tep_termination/Makefile             |   1 +
 examples/tep_termination/meson.build          |   1 +
 examples/tep_termination/vxlan_setup.c        |   1 +
 examples/vhost/Makefile                       |   1 +
 examples/vhost/main.c                         |   1 +
 examples/vm_power_manager/Makefile            |   1 +
 examples/vm_power_manager/main.c              |   1 +
 examples/vm_power_manager/meson.build         |   1 +
 examples/vmdq/Makefile                        |   1 +
 examples/vmdq/main.c                          |   1 +
 examples/vmdq/meson.build                     |   1 +
 examples/vmdq_dcb/Makefile                    |   1 +
 examples/vmdq_dcb/main.c                      |   1 +
 examples/vmdq_dcb/meson.build                 |   1 +
 lib/librte_ethdev/rte_ethdev.c                |  40 ++++++
 lib/librte_ethdev/rte_ethdev.h                |  31 +++++
 lib/librte_ethdev/rte_ethdev_core.h           |   6 +
 lib/librte_ethdev/rte_ethdev_version.map      |   3 +
 lib/librte_ethdev/rte_flow.h                  |   6 +-
 118 files changed, 521 insertions(+), 150 deletions(-)

--
2.17.1


^ permalink raw reply	[flat|nested] 245+ messages in thread

* [dpdk-dev]  [PATCH v4 1/7] ethdev: add set ptype function
  2019-10-01  6:34   ` [dpdk-dev] [PATCH v4 0/7] ethdev: add new Rx offload flags pbhagavatula
@ 2019-10-01  6:34     ` pbhagavatula
  2019-10-01  7:04       ` Andrew Rybchenko
  2019-10-01  6:34     ` [dpdk-dev] [PATCH v4 2/7] ethdev: add mbuf RSS update as an offload pbhagavatula
                       ` (6 subsequent siblings)
  7 siblings, 1 reply; 245+ messages in thread
From: pbhagavatula @ 2019-10-01  6:34 UTC (permalink / raw)
  To: arybchenko, jerinj, John McNamara, Marko Kovacevic,
	Thomas Monjalon, Ferruh Yigit
  Cc: dev, Pavan Nikhilesh

From: Pavan Nikhilesh <pbhagavatula@marvell.com>

Add `rte_eth_dev_set_supported_ptypes` function that will allow the
application to inform the PMD the packet types it is interested in.
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_supported_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_supported_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_supported_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>
---
 doc/guides/nics/features.rst             |  8 +++--
 doc/guides/rel_notes/release_19_11.rst   |  7 +++++
 lib/librte_ethdev/rte_ethdev.c           | 38 ++++++++++++++++++++++++
 lib/librte_ethdev/rte_ethdev.h           | 29 ++++++++++++++++++
 lib/librte_ethdev/rte_ethdev_core.h      |  6 ++++
 lib/librte_ethdev/rte_ethdev_version.map |  3 ++
 6 files changed, 89 insertions(+), 2 deletions(-)

diff --git a/doc/guides/nics/features.rst b/doc/guides/nics/features.rst
index c4e128d2f..1756fa73a 100644
--- a/doc/guides/nics/features.rst
+++ b/doc/guides/nics/features.rst
@@ -583,9 +583,13 @@ 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``,
+  ``dev_supported_ptypes_set``.
+* **[related]    API**: ``rte_eth_dev_get_supported_ptypes()``,
+  ``rte_eth_dev_set_supported_ptypes()``.
+* **[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 27cfbd9e3..7e31b9401 100644
--- a/doc/guides/rel_notes/release_19_11.rst
+++ b/doc/guides/rel_notes/release_19_11.rst
@@ -56,6 +56,13 @@ New Features
      Also, make sure to start the actual text at the margin.
      =========================================================
 
+* **Added ethdev API to set supported packet types**
+
+  *  Added new API ``rte_eth_dev_set_supported_ptypes`` that allows an
+     application to inform PMD about packet types classification the application
+     is interested in
+  *  This scheme will allow PMDs to avoid lookup to internal ptype table on Rx
+     and thereby improve Rx performance if application wishes do so.
 
 Removed Items
 -------------
diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
index 17d183e1f..061de7ac5 100644
--- a/lib/librte_ethdev/rte_ethdev.c
+++ b/lib/librte_ethdev/rte_ethdev.c
@@ -2602,6 +2602,44 @@ rte_eth_dev_get_supported_ptypes(uint16_t port_id, uint32_t ptype_mask,
 	return j;
 }
 
+int
+rte_eth_dev_set_supported_ptypes(uint16_t port_id, uint32_t ptype_mask,
+				 uint32_t *set_ptypes, int num)
+{
+	int i, j;
+	struct rte_eth_dev *dev;
+	const uint32_t *all_ptypes;
+
+	RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
+	dev = &rte_eth_devices[port_id];
+	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_supported_ptypes_get, 0);
+	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_supported_ptypes_set, 0);
+
+	if (ptype_mask == 0)
+		return (*dev->dev_ops->dev_supported_ptypes_set)(dev,
+				ptype_mask);
+
+	all_ptypes = (*dev->dev_ops->dev_supported_ptypes_get)(dev);
+	if (all_ptypes == NULL)
+		return 0;
+
+	for (i = 0, j = 0; set_ptypes && (all_ptypes[i] != RTE_PTYPE_UNKNOWN);
+									++i) {
+		if (ptype_mask & all_ptypes[i]) {
+			if (j < num - 1) {
+				set_ptypes[j] = all_ptypes[i];
+				j++;
+				continue;
+			}
+			break;
+		}
+	}
+
+	set_ptypes[j] = RTE_PTYPE_UNKNOWN;
+
+	return (*dev->dev_ops->dev_supported_ptypes_set)(dev, ptype_mask);
+}
+
 void
 rte_eth_macaddr_get(uint16_t port_id, struct rte_ether_addr *mac_addr)
 {
diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
index d9871782e..6c5fd789a 100644
--- a/lib/librte_ethdev/rte_ethdev.h
+++ b/lib/librte_ethdev/rte_ethdev.h
@@ -2431,6 +2431,35 @@ int rte_eth_dev_fw_version_get(uint16_t port_id,
  */
 int rte_eth_dev_get_supported_ptypes(uint16_t port_id, uint32_t ptype_mask,
 				     uint32_t *ptypes, int num);
+/**
+ * @warning
+ * @b EXPERIMENTAL: this API may change without prior notice.
+ *
+ * Inform Ethernet device of the packet types classification in which
+ * the recipient is interested.
+ *
+ * Application can use this function to set only specific ptypes that it's
+ * interested. This information can be used by the PMD to optimize Rx path.
+ *
+ * @param port_id
+ *   The port identifier of the Ethernet device.
+ * @param ptype_mask
+ *   The ptype family that application is interested in.
+ * @param set_ptypes
+ *   An array pointer to store set packet types, allocated by caller. The
+ *   function marks the end of array with RTE_PTYPE_UNKNOWN.
+ * @param num
+ *   Size of the array pointed by param ptypes.
+ *   Should be rte_eth_dev_get_supported_ptypes() + 1 to accomodate the
+ *   set ptypes.
+ * @return
+ *   - (0) if Success.
+ *   - (-ENODEV) if *port_id* invalid.
+ *   - (-EINVAL) if *ptype_mask* is invalid.
+ */
+__rte_experimental
+int rte_eth_dev_set_supported_ptypes(uint16_t port_id, uint32_t ptype_mask,
+				     uint32_t *set_ptypes, int num);
 
 /**
  * Retrieve the MTU of an Ethernet device.
diff --git a/lib/librte_ethdev/rte_ethdev_core.h b/lib/librte_ethdev/rte_ethdev_core.h
index 2922d5b7c..93bc34480 100644
--- a/lib/librte_ethdev/rte_ethdev_core.h
+++ b/lib/librte_ethdev/rte_ethdev_core.h
@@ -110,6 +110,10 @@ typedef void (*eth_dev_infos_get_t)(struct rte_eth_dev *dev,
 typedef const uint32_t *(*eth_dev_supported_ptypes_get_t)(struct rte_eth_dev *dev);
 /**< @internal Get supported ptypes of an Ethernet device. */
 
+typedef uint32_t (*eth_dev_supported_ptypes_set_t)(struct rte_eth_dev *dev,
+					      uint32_t ptype_mask);
+/**< @internal Inform device about packet types in which the recipient is interested. */
+
 typedef int (*eth_queue_start_t)(struct rte_eth_dev *dev,
 				    uint16_t queue_id);
 /**< @internal Start rx and tx of a queue of an Ethernet device. */
@@ -421,6 +425,8 @@ struct eth_dev_ops {
 	eth_fw_version_get_t       fw_version_get; /**< Get firmware version. */
 	eth_dev_supported_ptypes_get_t dev_supported_ptypes_get;
 	/**< Get packet types supported and identified by device. */
+	eth_dev_supported_ptypes_set_t dev_supported_ptypes_set;
+	/**< Inform device about packet types in which the recipient is interested. */
 
 	vlan_filter_set_t          vlan_filter_set; /**< Filter VLAN Setup. */
 	vlan_tpid_set_t            vlan_tpid_set; /**< Outer/Inner VLAN TPID Setup. */
diff --git a/lib/librte_ethdev/rte_ethdev_version.map b/lib/librte_ethdev/rte_ethdev_version.map
index 6df42a47b..e14745b9c 100644
--- a/lib/librte_ethdev/rte_ethdev_version.map
+++ b/lib/librte_ethdev/rte_ethdev_version.map
@@ -283,4 +283,7 @@ EXPERIMENTAL {
 
 	# added in 19.08
 	rte_eth_read_clock;
+
+	# added in 19.11
+	rte_eth_dev_set_supported_ptypes;
 };
-- 
2.17.1


^ permalink raw reply	[flat|nested] 245+ messages in thread

* [dpdk-dev] [PATCH v4 2/7] ethdev: add mbuf RSS update as an offload
  2019-10-01  6:34   ` [dpdk-dev] [PATCH v4 0/7] ethdev: add new Rx offload flags pbhagavatula
  2019-10-01  6:34     ` [dpdk-dev] [PATCH v4 1/7] ethdev: add set ptype function pbhagavatula
@ 2019-10-01  6:34     ` pbhagavatula
  2019-10-01  6:34     ` [dpdk-dev] [PATCH v4 3/7] ethdev: add flow action type " pbhagavatula
                       ` (5 subsequent siblings)
  7 siblings, 0 replies; 245+ messages in thread
From: pbhagavatula @ 2019-10-01  6:34 UTC (permalink / raw)
  To: arybchenko, jerinj, John McNamara, Marko Kovacevic,
	Thomas Monjalon, Ferruh Yigit
  Cc: dev, Pavan Nikhilesh

From: Pavan Nikhilesh <pbhagavatula@marvell.com>

Add new Rx offload flag `DEV_RX_OFFLOAD_RSS_HASH` which can be used to
enable/disable PMDs write to `rte_mbuf::hash::rss`.
PMDs notify the validity of `rte_mbuf::hash:rss` to the applcation
by enabling `PKT_RX_RSS_HASH ` flag in `rte_mbuf::ol_flags`.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 doc/guides/nics/features.rst           | 2 ++
 doc/guides/rel_notes/release_19_11.rst | 7 +++++++
 lib/librte_ethdev/rte_ethdev.c         | 1 +
 lib/librte_ethdev/rte_ethdev.h         | 1 +
 4 files changed, 11 insertions(+)

diff --git a/doc/guides/nics/features.rst b/doc/guides/nics/features.rst
index 1756fa73a..f7c6d918f 100644
--- a/doc/guides/nics/features.rst
+++ b/doc/guides/nics/features.rst
@@ -274,6 +274,7 @@ Supports RSS hashing on RX.
 
 * **[uses]     user config**: ``dev_conf.rxmode.mq_mode`` = ``ETH_MQ_RX_RSS_FLAG``.
 * **[uses]     user config**: ``dev_conf.rx_adv_conf.rss_conf``.
+* **[uses]     rte_eth_rxconf,rte_eth_rxmode**: ``offloads:DEV_RX_OFFLOAD_RSS_HASH``.
 * **[provides] rte_eth_dev_info**: ``flow_type_rss_offloads``.
 * **[provides] mbuf**: ``mbuf.ol_flags:PKT_RX_RSS_HASH``, ``mbuf.rss``.
 
@@ -286,6 +287,7 @@ Inner RSS
 Supports RX RSS hashing on Inner headers.
 
 * **[uses]    rte_flow_action_rss**: ``level``.
+* **[uses]    rte_eth_rxconf,rte_eth_rxmode**: ``offloads:DEV_RX_OFFLOAD_RSS_HASH``.
 * **[provides] mbuf**: ``mbuf.ol_flags:PKT_RX_RSS_HASH``, ``mbuf.rss``.
 
 
diff --git a/doc/guides/rel_notes/release_19_11.rst b/doc/guides/rel_notes/release_19_11.rst
index 7e31b9401..78ce0bc0e 100644
--- a/doc/guides/rel_notes/release_19_11.rst
+++ b/doc/guides/rel_notes/release_19_11.rst
@@ -64,6 +64,13 @@ New Features
   *  This scheme will allow PMDs to avoid lookup to internal ptype table on Rx
      and thereby improve Rx performance if application wishes do so.
 
+* **Added Rx offload flag to enable or disable RSS update**
+
+  *  Added new Rx offload flag `DEV_RX_OFFLOAD_RSS_HASH` which can be used to
+     enable/disable PMDs write to `rte_mbuf::hash::rss`.
+  *  PMDs notify the validity of `rte_mbuf::hash:rss` to the applcation
+     by enabling `PKT_RX_RSS_HASH ` flag in `rte_mbuf::ol_flags`.
+
 Removed Items
 -------------
 
diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
index 061de7ac5..6df2af6a6 100644
--- a/lib/librte_ethdev/rte_ethdev.c
+++ b/lib/librte_ethdev/rte_ethdev.c
@@ -129,6 +129,7 @@ static const struct {
 	RTE_RX_OFFLOAD_BIT2STR(KEEP_CRC),
 	RTE_RX_OFFLOAD_BIT2STR(SCTP_CKSUM),
 	RTE_RX_OFFLOAD_BIT2STR(OUTER_UDP_CKSUM),
+	RTE_RX_OFFLOAD_BIT2STR(RSS_HASH),
 };
 
 #undef RTE_RX_OFFLOAD_BIT2STR
diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
index 6c5fd789a..2bd7c27fc 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_RSS_HASH		0x00080000
 
 #define DEV_RX_OFFLOAD_CHECKSUM (DEV_RX_OFFLOAD_IPV4_CKSUM | \
 				 DEV_RX_OFFLOAD_UDP_CKSUM | \
-- 
2.17.1


^ permalink raw reply	[flat|nested] 245+ messages in thread

* [dpdk-dev] [PATCH v4 3/7] ethdev: add flow action type update as an offload
  2019-10-01  6:34   ` [dpdk-dev] [PATCH v4 0/7] ethdev: add new Rx offload flags pbhagavatula
  2019-10-01  6:34     ` [dpdk-dev] [PATCH v4 1/7] ethdev: add set ptype function pbhagavatula
  2019-10-01  6:34     ` [dpdk-dev] [PATCH v4 2/7] ethdev: add mbuf RSS update as an offload pbhagavatula
@ 2019-10-01  6:34     ` " pbhagavatula
  2019-10-01  6:34     ` [dpdk-dev] [PATCH v4 4/7] drivers/net: update Rx RSS hash offload capabilities pbhagavatula
                       ` (4 subsequent siblings)
  7 siblings, 0 replies; 245+ messages in thread
From: pbhagavatula @ 2019-10-01  6:34 UTC (permalink / raw)
  To: arybchenko, jerinj, John McNamara, Marko Kovacevic,
	Thomas Monjalon, Ferruh Yigit, Adrien Mazarguil
  Cc: dev, Pavan Nikhilesh

From: Pavan Nikhilesh <pbhagavatula@marvell.com>

Add new Rx offload flag `DEV_RX_OFFLOAD_FLOW_MARK` that can be used to
enable/disable PMDs write to `rte_mbuf::hash::fdir::hi` and
`rte_mbuf::ol_flags` when flow actions `RTE_FLOW_ACTION_MARK` and
`RTE_FLOW_ACTION_FLAG` are enabled.

PMDs notify the validity of `rte_mbuf::hash:fdir::hi` to the applcation
by enabling `PKT_RX_FDIR_ID` flag in `rte_mbuf::ol_flags`.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 doc/guides/nics/features.rst           | 12 ++++++++++++
 doc/guides/rel_notes/release_19_11.rst |  9 +++++++++
 lib/librte_ethdev/rte_ethdev.c         |  1 +
 lib/librte_ethdev/rte_ethdev.h         |  1 +
 lib/librte_ethdev/rte_flow.h           |  6 ++++--
 5 files changed, 27 insertions(+), 2 deletions(-)

diff --git a/doc/guides/nics/features.rst b/doc/guides/nics/features.rst
index f7c6d918f..9737ff7a1 100644
--- a/doc/guides/nics/features.rst
+++ b/doc/guides/nics/features.rst
@@ -594,6 +594,18 @@ Allows application to set ptypes it is interested in.
 * **[provides]   mbuf**: ``mbuf.packet_type``.
 
 
+.. _nic_features_flow_flag_mark:
+
+Flow flag/mark update
+---------------------
+
+Supports flow action type update to ``mbuf.ol_flags`` and ``mbuf.hash.fdir.hi``.
+
+* **[uses]     rte_eth_rxconf,rte_eth_rxmode**: ``offloads:DEV_RX_OFFLOAD_FLOW_MARK``.
+* **[provides] mbuf**: ``mbuf.ol_flags:PKT_RX_FDIR``, ``mbuf.ol_flags:PKT_RX_FDIR_ID;``,
+  ``mbuf.hash.fdir.hi``
+
+
 .. _nic_features_timesync:
 
 Timesync
diff --git a/doc/guides/rel_notes/release_19_11.rst b/doc/guides/rel_notes/release_19_11.rst
index 78ce0bc0e..2ec521165 100644
--- a/doc/guides/rel_notes/release_19_11.rst
+++ b/doc/guides/rel_notes/release_19_11.rst
@@ -71,6 +71,15 @@ New Features
   *  PMDs notify the validity of `rte_mbuf::hash:rss` to the applcation
      by enabling `PKT_RX_RSS_HASH ` flag in `rte_mbuf::ol_flags`.
 
+* **Added Rx offload flag to enable or diable flow action type update**
+
+  *  Add new Rx offload flag `DEV_RX_OFFLOAD_FLOW_MARK` that can be used to
+     enable/disable PMDs write to `rte_mbuf::hash::fdir::hi` and
+     `rte_mbuf::ol_flags` when flow actions `RTE_FLOW_ACTION_MARK` and
+     `RTE_FLOW_ACTION_FLAG` are enabled.
+  *  PMDs notify the validity of `rte_mbuf::hash:fdir::hi` to the applcation
+     by enabling `PKT_RX_FDIR_ID` flag in `rte_mbuf::ol_flags`.
+
 Removed Items
 -------------
 
diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
index 6df2af6a6..2d1c2a2c0 100644
--- a/lib/librte_ethdev/rte_ethdev.c
+++ b/lib/librte_ethdev/rte_ethdev.c
@@ -130,6 +130,7 @@ static const struct {
 	RTE_RX_OFFLOAD_BIT2STR(SCTP_CKSUM),
 	RTE_RX_OFFLOAD_BIT2STR(OUTER_UDP_CKSUM),
 	RTE_RX_OFFLOAD_BIT2STR(RSS_HASH),
+	RTE_RX_OFFLOAD_BIT2STR(FLOW_MARK),
 };
 
 #undef RTE_RX_OFFLOAD_BIT2STR
diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
index 2bd7c27fc..b536c3b8b 100644
--- a/lib/librte_ethdev/rte_ethdev.h
+++ b/lib/librte_ethdev/rte_ethdev.h
@@ -1014,6 +1014,7 @@ struct rte_eth_conf {
 #define DEV_RX_OFFLOAD_SCTP_CKSUM	0x00020000
 #define DEV_RX_OFFLOAD_OUTER_UDP_CKSUM  0x00040000
 #define DEV_RX_OFFLOAD_RSS_HASH		0x00080000
+#define DEV_RX_OFFLOAD_FLOW_MARK	0x00100000
 
 #define DEV_RX_OFFLOAD_CHECKSUM (DEV_RX_OFFLOAD_IPV4_CKSUM | \
 				 DEV_RX_OFFLOAD_UDP_CKSUM | \
diff --git a/lib/librte_ethdev/rte_flow.h b/lib/librte_ethdev/rte_flow.h
index 354cb1dd0..5d62686c0 100644
--- a/lib/librte_ethdev/rte_flow.h
+++ b/lib/librte_ethdev/rte_flow.h
@@ -1316,7 +1316,8 @@ enum rte_flow_action_type {
 
 	/**
 	 * Attaches an integer value to packets and sets PKT_RX_FDIR and
-	 * PKT_RX_FDIR_ID mbuf flags.
+	 * PKT_RX_FDIR_ID mbuf flags when
+	 * `rx_mode:offloads:DEV_RX_OFFLOAD_FLOW_MARK` is enabled.
 	 *
 	 * See struct rte_flow_action_mark.
 	 */
@@ -1324,7 +1325,8 @@ enum rte_flow_action_type {
 
 	/**
 	 * Flags packets. Similar to MARK without a specific value; only
-	 * sets the PKT_RX_FDIR mbuf flag.
+	 * sets the PKT_RX_FDIR mbuf flag when
+	 * `rx_mode:offloads:DEV_RX_OFFLOAD_FLOW_MARK` is enabled.
 	 *
 	 * No associated configuration structure.
 	 */
-- 
2.17.1


^ permalink raw reply	[flat|nested] 245+ messages in thread

* [dpdk-dev] [PATCH v4 4/7] drivers/net: update Rx RSS hash offload capabilities
  2019-10-01  6:34   ` [dpdk-dev] [PATCH v4 0/7] ethdev: add new Rx offload flags pbhagavatula
                       ` (2 preceding siblings ...)
  2019-10-01  6:34     ` [dpdk-dev] [PATCH v4 3/7] ethdev: add flow action type " pbhagavatula
@ 2019-10-01  6:34     ` pbhagavatula
  2019-10-01  6:34     ` [dpdk-dev] [PATCH v4 5/7] drivers/net: update Rx flow flag and mark capabilities pbhagavatula
                       ` (3 subsequent siblings)
  7 siblings, 0 replies; 245+ messages in thread
From: pbhagavatula @ 2019-10-01  6:34 UTC (permalink / raw)
  To: arybchenko, jerinj, Ajit Khaparde, Somnath Kotur,
	Rahul Lakkireddy, Hemant Agrawal, Sachin Saxena, Wenzhuo Lu,
	John Daley, Hyong Youb Kim, Qi Zhang, Xiao Wang, Ziyang Xuan,
	Xiaoyun Wang, Guoyang Zhou, Beilei Xing, Jingjing Wu,
	Qiming Yang, Konstantin Ananyev, Shijith Thotton,
	Srisivasubramanian Srinivasan, Matan Azrad, Shahaf Shuler,
	Viacheslav Ovsiienko, Stephen Hemminger, K. Y. Srinivasan,
	Haiyang Zhang, Alejandro Lucero, Nithin Dabilpuram,
	Kiran Kumar K, Rasesh Mody, Shahed Shaikh, Maciej Czekaj,
	Yong Wang
  Cc: dev, Pavan Nikhilesh

From: Pavan Nikhilesh <pbhagavatula@marvell.com>

Add DEV_RX_OFFLOAD_RSS_HASH flag for all PMDs that support RSS hash
delivery.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
 drivers/net/bnxt/bnxt_ethdev.c       |  3 ++-
 drivers/net/cxgbe/cxgbe.h            |  3 ++-
 drivers/net/dpaa/dpaa_ethdev.c       |  3 ++-
 drivers/net/dpaa2/dpaa2_ethdev.c     |  3 ++-
 drivers/net/e1000/igb_rxtx.c         |  3 ++-
 drivers/net/enic/enic_res.c          |  3 ++-
 drivers/net/fm10k/fm10k_ethdev.c     |  3 ++-
 drivers/net/hinic/hinic_pmd_ethdev.c |  3 ++-
 drivers/net/i40e/i40e_ethdev.c       |  3 ++-
 drivers/net/iavf/iavf_ethdev.c       |  3 ++-
 drivers/net/ice/ice_ethdev.c         |  3 ++-
 drivers/net/ixgbe/ixgbe_rxtx.c       |  3 ++-
 drivers/net/liquidio/lio_ethdev.c    |  3 ++-
 drivers/net/mlx4/mlx4_rxq.c          |  3 ++-
 drivers/net/mlx5/mlx5_rxq.c          |  3 ++-
 drivers/net/netvsc/hn_rndis.c        |  3 ++-
 drivers/net/nfp/nfp_net.c            |  3 ++-
 drivers/net/octeontx2/otx2_ethdev.c  |  3 ++-
 drivers/net/octeontx2/otx2_ethdev.h  | 15 ++++++++-------
 drivers/net/qede/qede_ethdev.c       |  3 ++-
 drivers/net/sfc/sfc_ef10_essb_rx.c   |  2 +-
 drivers/net/sfc/sfc_ef10_rx.c        |  3 ++-
 drivers/net/sfc/sfc_rx.c             |  3 ++-
 drivers/net/thunderx/nicvf_ethdev.h  |  3 ++-
 drivers/net/vmxnet3/vmxnet3_ethdev.c |  3 ++-
 25 files changed, 55 insertions(+), 31 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 6685ee7d9..6c106baf7 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -160,7 +160,8 @@ static const struct rte_pci_id bnxt_pci_id_map[] = {
 				     DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM | \
 				     DEV_RX_OFFLOAD_JUMBO_FRAME | \
 				     DEV_RX_OFFLOAD_KEEP_CRC | \
-				     DEV_RX_OFFLOAD_TCP_LRO)
+				     DEV_RX_OFFLOAD_TCP_LRO | \
+				     DEV_RX_OFFLOAD_RSS_HASH)
 
 static int bnxt_vlan_offload_set_op(struct rte_eth_dev *dev, int mask);
 static void bnxt_print_link_info(struct rte_eth_dev *eth_dev);
diff --git a/drivers/net/cxgbe/cxgbe.h b/drivers/net/cxgbe/cxgbe.h
index 3f97fa58b..22e61a55c 100644
--- a/drivers/net/cxgbe/cxgbe.h
+++ b/drivers/net/cxgbe/cxgbe.h
@@ -47,7 +47,8 @@
 			   DEV_RX_OFFLOAD_UDP_CKSUM | \
 			   DEV_RX_OFFLOAD_TCP_CKSUM | \
 			   DEV_RX_OFFLOAD_JUMBO_FRAME | \
-			   DEV_RX_OFFLOAD_SCATTER)
+			   DEV_RX_OFFLOAD_SCATTER | \
+			   DEV_RX_OFFLOAD_RSS_HASH)
 
 
 #define CXGBE_DEVARG_KEEP_OVLAN "keep_ovlan"
diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
index 7154fb9b4..18c7bd0d5 100644
--- a/drivers/net/dpaa/dpaa_ethdev.c
+++ b/drivers/net/dpaa/dpaa_ethdev.c
@@ -49,7 +49,8 @@
 /* Supported Rx offloads */
 static uint64_t dev_rx_offloads_sup =
 		DEV_RX_OFFLOAD_JUMBO_FRAME |
-		DEV_RX_OFFLOAD_SCATTER;
+		DEV_RX_OFFLOAD_SCATTER |
+		DEV_RX_OFFLOAD_RSS_HASH;
 
 /* Rx offloads which cannot be disabled */
 static uint64_t dev_rx_offloads_nodis =
diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c
index dd6a78f9f..55a1c4455 100644
--- a/drivers/net/dpaa2/dpaa2_ethdev.c
+++ b/drivers/net/dpaa2/dpaa2_ethdev.c
@@ -38,7 +38,8 @@ static uint64_t dev_rx_offloads_sup =
 		DEV_RX_OFFLOAD_TCP_CKSUM |
 		DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM |
 		DEV_RX_OFFLOAD_VLAN_FILTER |
-		DEV_RX_OFFLOAD_JUMBO_FRAME;
+		DEV_RX_OFFLOAD_JUMBO_FRAME |
+		DEV_RX_OFFLOAD_RSS_HASH;
 
 /* Rx offloads which cannot be disabled */
 static uint64_t dev_rx_offloads_nodis =
diff --git a/drivers/net/e1000/igb_rxtx.c b/drivers/net/e1000/igb_rxtx.c
index c5606de5d..684fa4ad8 100644
--- a/drivers/net/e1000/igb_rxtx.c
+++ b/drivers/net/e1000/igb_rxtx.c
@@ -1646,7 +1646,8 @@ igb_get_rx_port_offloads_capa(struct rte_eth_dev *dev)
 			  DEV_RX_OFFLOAD_TCP_CKSUM   |
 			  DEV_RX_OFFLOAD_JUMBO_FRAME |
 			  DEV_RX_OFFLOAD_KEEP_CRC    |
-			  DEV_RX_OFFLOAD_SCATTER;
+			  DEV_RX_OFFLOAD_SCATTER     |
+			  DEV_RX_OFFLOAD_RSS_HASH;
 
 	return rx_offload_capa;
 }
diff --git a/drivers/net/enic/enic_res.c b/drivers/net/enic/enic_res.c
index 9405e1933..607a085f8 100644
--- a/drivers/net/enic/enic_res.c
+++ b/drivers/net/enic/enic_res.c
@@ -198,7 +198,8 @@ int enic_get_vnic_config(struct enic *enic)
 		DEV_RX_OFFLOAD_VLAN_STRIP |
 		DEV_RX_OFFLOAD_IPV4_CKSUM |
 		DEV_RX_OFFLOAD_UDP_CKSUM |
-		DEV_RX_OFFLOAD_TCP_CKSUM;
+		DEV_RX_OFFLOAD_TCP_CKSUM |
+		DEV_RX_OFFLOAD_RSS_HASH;
 	enic->tx_offload_mask =
 		PKT_TX_IPV6 |
 		PKT_TX_IPV4 |
diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c
index db4d72129..ba9b174cf 100644
--- a/drivers/net/fm10k/fm10k_ethdev.c
+++ b/drivers/net/fm10k/fm10k_ethdev.c
@@ -1797,7 +1797,8 @@ static uint64_t fm10k_get_rx_port_offloads_capa(struct rte_eth_dev *dev)
 			   DEV_RX_OFFLOAD_UDP_CKSUM   |
 			   DEV_RX_OFFLOAD_TCP_CKSUM   |
 			   DEV_RX_OFFLOAD_JUMBO_FRAME |
-			   DEV_RX_OFFLOAD_HEADER_SPLIT);
+			   DEV_RX_OFFLOAD_HEADER_SPLIT |
+			   DEV_RX_OFFLOAD_RSS_HASH);
 }
 
 static int
diff --git a/drivers/net/hinic/hinic_pmd_ethdev.c b/drivers/net/hinic/hinic_pmd_ethdev.c
index 044af9053..53bd2b9ae 100644
--- a/drivers/net/hinic/hinic_pmd_ethdev.c
+++ b/drivers/net/hinic/hinic_pmd_ethdev.c
@@ -680,7 +680,8 @@ hinic_dev_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *info)
 	info->rx_offload_capa = DEV_RX_OFFLOAD_VLAN_STRIP |
 				DEV_RX_OFFLOAD_IPV4_CKSUM |
 				DEV_RX_OFFLOAD_UDP_CKSUM |
-				DEV_RX_OFFLOAD_TCP_CKSUM;
+				DEV_RX_OFFLOAD_TCP_CKSUM |
+				DEV_RX_OFFLOAD_RSS_HASH;
 
 	info->tx_queue_offload_capa = 0;
 	info->tx_offload_capa = DEV_TX_OFFLOAD_VLAN_INSERT |
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 4e40b7ab5..7058e0213 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -3511,7 +3511,8 @@ i40e_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 		DEV_RX_OFFLOAD_SCATTER |
 		DEV_RX_OFFLOAD_VLAN_EXTEND |
 		DEV_RX_OFFLOAD_VLAN_FILTER |
-		DEV_RX_OFFLOAD_JUMBO_FRAME;
+		DEV_RX_OFFLOAD_JUMBO_FRAME |
+		DEV_RX_OFFLOAD_RSS_HASH;
 
 	dev_info->tx_queue_offload_capa = DEV_TX_OFFLOAD_MBUF_FAST_FREE;
 	dev_info->tx_offload_capa =
diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index 8f3907378..aef91a79b 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -517,7 +517,8 @@ iavf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 		DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM |
 		DEV_RX_OFFLOAD_SCATTER |
 		DEV_RX_OFFLOAD_JUMBO_FRAME |
-		DEV_RX_OFFLOAD_VLAN_FILTER;
+		DEV_RX_OFFLOAD_VLAN_FILTER |
+		DEV_RX_OFFLOAD_RSS_HASH;
 	dev_info->tx_offload_capa =
 		DEV_TX_OFFLOAD_VLAN_INSERT |
 		DEV_TX_OFFLOAD_QINQ_INSERT |
diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index 63997fdfb..2e2a6b2af 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -2145,7 +2145,8 @@ ice_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 			DEV_RX_OFFLOAD_TCP_CKSUM |
 			DEV_RX_OFFLOAD_QINQ_STRIP |
 			DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM |
-			DEV_RX_OFFLOAD_VLAN_EXTEND;
+			DEV_RX_OFFLOAD_VLAN_EXTEND |
+			DEV_RX_OFFLOAD_RSS_HASH;
 		dev_info->tx_offload_capa |=
 			DEV_TX_OFFLOAD_QINQ_INSERT |
 			DEV_TX_OFFLOAD_IPV4_CKSUM |
diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c
index edcfa60ce..fa572d184 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx.c
@@ -2872,7 +2872,8 @@ ixgbe_get_rx_port_offloads(struct rte_eth_dev *dev)
 		   DEV_RX_OFFLOAD_KEEP_CRC    |
 		   DEV_RX_OFFLOAD_JUMBO_FRAME |
 		   DEV_RX_OFFLOAD_VLAN_FILTER |
-		   DEV_RX_OFFLOAD_SCATTER;
+		   DEV_RX_OFFLOAD_SCATTER |
+		   DEV_RX_OFFLOAD_RSS_HASH;
 
 	if (hw->mac.type == ixgbe_mac_82598EB)
 		offloads |= DEV_RX_OFFLOAD_VLAN_STRIP;
diff --git a/drivers/net/liquidio/lio_ethdev.c b/drivers/net/liquidio/lio_ethdev.c
index c25dab00c..ff118586e 100644
--- a/drivers/net/liquidio/lio_ethdev.c
+++ b/drivers/net/liquidio/lio_ethdev.c
@@ -406,7 +406,8 @@ lio_dev_info_get(struct rte_eth_dev *eth_dev,
 	devinfo->rx_offload_capa = (DEV_RX_OFFLOAD_IPV4_CKSUM		|
 				    DEV_RX_OFFLOAD_UDP_CKSUM		|
 				    DEV_RX_OFFLOAD_TCP_CKSUM		|
-				    DEV_RX_OFFLOAD_VLAN_STRIP);
+				    DEV_RX_OFFLOAD_VLAN_STRIP		|
+				    DEV_RX_OFFLOAD_RSS_HASH);
 	devinfo->tx_offload_capa = (DEV_TX_OFFLOAD_IPV4_CKSUM		|
 				    DEV_TX_OFFLOAD_UDP_CKSUM		|
 				    DEV_TX_OFFLOAD_TCP_CKSUM		|
diff --git a/drivers/net/mlx4/mlx4_rxq.c b/drivers/net/mlx4/mlx4_rxq.c
index f45c1ff85..4a6fbd922 100644
--- a/drivers/net/mlx4/mlx4_rxq.c
+++ b/drivers/net/mlx4/mlx4_rxq.c
@@ -685,7 +685,8 @@ mlx4_get_rx_queue_offloads(struct mlx4_priv *priv)
 {
 	uint64_t offloads = DEV_RX_OFFLOAD_SCATTER |
 			    DEV_RX_OFFLOAD_KEEP_CRC |
-			    DEV_RX_OFFLOAD_JUMBO_FRAME;
+			    DEV_RX_OFFLOAD_JUMBO_FRAME |
+			    DEV_RX_OFFLOAD_RSS_HASH;
 
 	if (priv->hw_csum)
 		offloads |= DEV_RX_OFFLOAD_CHECKSUM;
diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
index a1fdeef2a..b5fd57693 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -368,7 +368,8 @@ mlx5_get_rx_queue_offloads(struct rte_eth_dev *dev)
 	struct mlx5_dev_config *config = &priv->config;
 	uint64_t offloads = (DEV_RX_OFFLOAD_SCATTER |
 			     DEV_RX_OFFLOAD_TIMESTAMP |
-			     DEV_RX_OFFLOAD_JUMBO_FRAME);
+			     DEV_RX_OFFLOAD_JUMBO_FRAME |
+			     DEV_RX_OFFLOAD_RSS_HASH);
 
 	if (config->hw_fcs_strip)
 		offloads |= DEV_RX_OFFLOAD_KEEP_CRC;
diff --git a/drivers/net/netvsc/hn_rndis.c b/drivers/net/netvsc/hn_rndis.c
index a67bc7a79..2b4714042 100644
--- a/drivers/net/netvsc/hn_rndis.c
+++ b/drivers/net/netvsc/hn_rndis.c
@@ -897,7 +897,8 @@ int hn_rndis_get_offload(struct hn_data *hv,
 	    == HN_NDIS_LSOV2_CAP_IP6)
 		dev_info->tx_offload_capa |= DEV_TX_OFFLOAD_TCP_TSO;
 
-	dev_info->rx_offload_capa = DEV_RX_OFFLOAD_VLAN_STRIP;
+	dev_info->rx_offload_capa = DEV_RX_OFFLOAD_VLAN_STRIP |
+				    DEV_RX_OFFLOAD_RSS_HASH;
 
 	if (hwcaps.ndis_csum.ndis_ip4_rxcsum & NDIS_RXCSUM_CAP_IP4)
 		dev_info->rx_offload_capa |= DEV_RX_OFFLOAD_IPV4_CKSUM;
diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
index f1a3ef2f9..230d64c8a 100644
--- a/drivers/net/nfp/nfp_net.c
+++ b/drivers/net/nfp/nfp_net.c
@@ -1226,7 +1226,8 @@ nfp_net_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 					     DEV_RX_OFFLOAD_UDP_CKSUM |
 					     DEV_RX_OFFLOAD_TCP_CKSUM;
 
-	dev_info->rx_offload_capa |= DEV_RX_OFFLOAD_JUMBO_FRAME;
+	dev_info->rx_offload_capa |= DEV_RX_OFFLOAD_JUMBO_FRAME |
+				     DEV_RX_OFFLOAD_RSS_HASH;
 
 	if (hw->cap & NFP_NET_CFG_CTRL_TXVLAN)
 		dev_info->tx_offload_capa = DEV_TX_OFFLOAD_VLAN_INSERT;
diff --git a/drivers/net/octeontx2/otx2_ethdev.c b/drivers/net/octeontx2/otx2_ethdev.c
index b84128fef..2e88d1844 100644
--- a/drivers/net/octeontx2/otx2_ethdev.c
+++ b/drivers/net/octeontx2/otx2_ethdev.c
@@ -569,7 +569,8 @@ nix_rx_offload_flags(struct rte_eth_dev *eth_dev)
 	struct rte_eth_rxmode *rxmode = &conf->rxmode;
 	uint16_t flags = 0;
 
-	if (rxmode->mq_mode == ETH_MQ_RX_RSS)
+	if (rxmode->mq_mode == ETH_MQ_RX_RSS &&
+			(dev->rx_offloads & DEV_RX_OFFLOAD_RSS_HASH))
 		flags |= NIX_RX_OFFLOAD_RSS_F;
 
 	if (dev->rx_offloads & (DEV_RX_OFFLOAD_TCP_CKSUM |
diff --git a/drivers/net/octeontx2/otx2_ethdev.h b/drivers/net/octeontx2/otx2_ethdev.h
index 7b15d6bc8..0cca6746d 100644
--- a/drivers/net/octeontx2/otx2_ethdev.h
+++ b/drivers/net/octeontx2/otx2_ethdev.h
@@ -122,8 +122,8 @@
 	DEV_TX_OFFLOAD_MT_LOCKFREE	| \
 	DEV_TX_OFFLOAD_VLAN_INSERT	| \
 	DEV_TX_OFFLOAD_QINQ_INSERT	| \
-	DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM | \
-	DEV_TX_OFFLOAD_OUTER_UDP_CKSUM  | \
+	DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM	| \
+	DEV_TX_OFFLOAD_OUTER_UDP_CKSUM	| \
 	DEV_TX_OFFLOAD_TCP_CKSUM	| \
 	DEV_TX_OFFLOAD_UDP_CKSUM	| \
 	DEV_TX_OFFLOAD_SCTP_CKSUM	| \
@@ -136,11 +136,12 @@
 	DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM | \
 	DEV_RX_OFFLOAD_SCATTER		| \
 	DEV_RX_OFFLOAD_JUMBO_FRAME	| \
-	DEV_RX_OFFLOAD_OUTER_UDP_CKSUM | \
-	DEV_RX_OFFLOAD_VLAN_STRIP | \
-	DEV_RX_OFFLOAD_VLAN_FILTER | \
-	DEV_RX_OFFLOAD_QINQ_STRIP | \
-	DEV_RX_OFFLOAD_TIMESTAMP)
+	DEV_RX_OFFLOAD_OUTER_UDP_CKSUM	| \
+	DEV_RX_OFFLOAD_VLAN_STRIP	| \
+	DEV_RX_OFFLOAD_VLAN_FILTER	| \
+	DEV_RX_OFFLOAD_QINQ_STRIP	| \
+	DEV_RX_OFFLOAD_TIMESTAMP	| \
+	DEV_RX_OFFLOAD_RSS_HASH)
 
 #define NIX_DEFAULT_RSS_CTX_GROUP  0
 #define NIX_DEFAULT_RSS_MCAM_IDX  -1
diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index 528b33e8c..da25b26df 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -1291,7 +1291,8 @@ qede_dev_info_get(struct rte_eth_dev *eth_dev,
 				     DEV_RX_OFFLOAD_SCATTER	|
 				     DEV_RX_OFFLOAD_JUMBO_FRAME |
 				     DEV_RX_OFFLOAD_VLAN_FILTER |
-				     DEV_RX_OFFLOAD_VLAN_STRIP);
+				     DEV_RX_OFFLOAD_VLAN_STRIP  |
+				     DEV_RX_OFFLOAD_RSS_HASH);
 	dev_info->rx_queue_offload_capa = 0;
 
 	/* TX offloads are on a per-packet basis, so it is applicable
diff --git a/drivers/net/sfc/sfc_ef10_essb_rx.c b/drivers/net/sfc/sfc_ef10_essb_rx.c
index 63da807ea..220ef0e47 100644
--- a/drivers/net/sfc/sfc_ef10_essb_rx.c
+++ b/drivers/net/sfc/sfc_ef10_essb_rx.c
@@ -716,7 +716,7 @@ struct sfc_dp_rx sfc_ef10_essb_rx = {
 	.features		= SFC_DP_RX_FEAT_FLOW_FLAG |
 				  SFC_DP_RX_FEAT_FLOW_MARK,
 	.dev_offload_capa	= DEV_RX_OFFLOAD_CHECKSUM,
-	.queue_offload_capa	= 0,
+	.queue_offload_capa	= DEV_RX_OFFLOAD_RSS_HASH,
 	.get_dev_info		= sfc_ef10_essb_rx_get_dev_info,
 	.pool_ops_supported	= sfc_ef10_essb_rx_pool_ops_supported,
 	.qsize_up_rings		= sfc_ef10_essb_rx_qsize_up_rings,
diff --git a/drivers/net/sfc/sfc_ef10_rx.c b/drivers/net/sfc/sfc_ef10_rx.c
index f2fc6e70a..85b5df466 100644
--- a/drivers/net/sfc/sfc_ef10_rx.c
+++ b/drivers/net/sfc/sfc_ef10_rx.c
@@ -797,7 +797,8 @@ struct sfc_dp_rx sfc_ef10_rx = {
 				  SFC_DP_RX_FEAT_INTR,
 	.dev_offload_capa	= DEV_RX_OFFLOAD_CHECKSUM |
 				  DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM,
-	.queue_offload_capa	= DEV_RX_OFFLOAD_SCATTER,
+	.queue_offload_capa	= DEV_RX_OFFLOAD_SCATTER |
+				  DEV_RX_OFFLOAD_RSS_HASH,
 	.get_dev_info		= sfc_ef10_rx_get_dev_info,
 	.qsize_up_rings		= sfc_ef10_rx_qsize_up_rings,
 	.qcreate		= sfc_ef10_rx_qcreate,
diff --git a/drivers/net/sfc/sfc_rx.c b/drivers/net/sfc/sfc_rx.c
index e6809bb64..695580b22 100644
--- a/drivers/net/sfc/sfc_rx.c
+++ b/drivers/net/sfc/sfc_rx.c
@@ -618,7 +618,8 @@ struct sfc_dp_rx sfc_efx_rx = {
 	},
 	.features		= SFC_DP_RX_FEAT_INTR,
 	.dev_offload_capa	= DEV_RX_OFFLOAD_CHECKSUM,
-	.queue_offload_capa	= DEV_RX_OFFLOAD_SCATTER,
+	.queue_offload_capa	= DEV_RX_OFFLOAD_SCATTER |
+				  DEV_RX_OFFLOAD_RSS_HASH,
 	.qsize_up_rings		= sfc_efx_rx_qsize_up_rings,
 	.qcreate		= sfc_efx_rx_qcreate,
 	.qdestroy		= sfc_efx_rx_qdestroy,
diff --git a/drivers/net/thunderx/nicvf_ethdev.h b/drivers/net/thunderx/nicvf_ethdev.h
index c0bfbf848..391411799 100644
--- a/drivers/net/thunderx/nicvf_ethdev.h
+++ b/drivers/net/thunderx/nicvf_ethdev.h
@@ -41,7 +41,8 @@
 	DEV_RX_OFFLOAD_CHECKSUM    | \
 	DEV_RX_OFFLOAD_VLAN_STRIP  | \
 	DEV_RX_OFFLOAD_JUMBO_FRAME | \
-	DEV_RX_OFFLOAD_SCATTER)
+	DEV_RX_OFFLOAD_SCATTER     | \
+	DEV_RX_OFFLOAD_RSS_HASH)
 
 #define NICVF_DEFAULT_RX_FREE_THRESH    224
 #define NICVF_DEFAULT_TX_FREE_THRESH    224
diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c
index 9cd5eb65b..da768ced7 100644
--- a/drivers/net/vmxnet3/vmxnet3_ethdev.c
+++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c
@@ -56,7 +56,8 @@
 	 DEV_RX_OFFLOAD_UDP_CKSUM |	\
 	 DEV_RX_OFFLOAD_TCP_CKSUM |	\
 	 DEV_RX_OFFLOAD_TCP_LRO |	\
-	 DEV_RX_OFFLOAD_JUMBO_FRAME)
+	 DEV_RX_OFFLOAD_JUMBO_FRAME |   \
+	 DEV_RX_OFFLOAD_RSS_HASH)
 
 static int eth_vmxnet3_dev_init(struct rte_eth_dev *eth_dev);
 static int eth_vmxnet3_dev_uninit(struct rte_eth_dev *eth_dev);
-- 
2.17.1


^ permalink raw reply	[flat|nested] 245+ messages in thread

* [dpdk-dev] [PATCH v4 5/7] drivers/net: update Rx flow flag and mark capabilities
  2019-10-01  6:34   ` [dpdk-dev] [PATCH v4 0/7] ethdev: add new Rx offload flags pbhagavatula
                       ` (3 preceding siblings ...)
  2019-10-01  6:34     ` [dpdk-dev] [PATCH v4 4/7] drivers/net: update Rx RSS hash offload capabilities pbhagavatula
@ 2019-10-01  6:34     ` pbhagavatula
  2019-10-01  6:34     ` [dpdk-dev] [PATCH v4 6/7] examples/eventdev_pipeline: add new Rx RSS hash offload pbhagavatula
                       ` (2 subsequent siblings)
  7 siblings, 0 replies; 245+ messages in thread
From: pbhagavatula @ 2019-10-01  6:34 UTC (permalink / raw)
  To: arybchenko, jerinj, Ajit Khaparde, Somnath Kotur, John Daley,
	Hyong Youb Kim, Beilei Xing, Qi Zhang, Jingjing Wu, Wenzhuo Lu,
	Qiming Yang, Konstantin Ananyev, Matan Azrad, Shahaf Shuler,
	Viacheslav Ovsiienko, Nithin Dabilpuram, Kiran Kumar K
  Cc: dev, Pavan Nikhilesh

From: Pavan Nikhilesh <pbhagavatula@marvell.com>

Add DEV_RX_OFFLOAD_FLOW_MARK flag for all PMDs that support flow action
flag and mark.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
 drivers/net/bnxt/bnxt_ethdev.c          | 3 ++-
 drivers/net/enic/enic_res.c             | 3 ++-
 drivers/net/i40e/i40e_ethdev.c          | 3 ++-
 drivers/net/iavf/iavf_ethdev.c          | 3 ++-
 drivers/net/ice/ice_ethdev.c            | 3 ++-
 drivers/net/ixgbe/ixgbe_rxtx.c          | 3 ++-
 drivers/net/mlx5/mlx5_rxq.c             | 3 ++-
 drivers/net/octeontx2/otx2_ethdev.h     | 3 ++-
 drivers/net/octeontx2/otx2_flow_parse.c | 3 ++-
 drivers/net/sfc/sfc_ef10_essb_rx.c      | 3 ++-
 10 files changed, 20 insertions(+), 10 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 6c106baf7..fd1fb7eda 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -161,7 +161,8 @@ static const struct rte_pci_id bnxt_pci_id_map[] = {
 				     DEV_RX_OFFLOAD_JUMBO_FRAME | \
 				     DEV_RX_OFFLOAD_KEEP_CRC | \
 				     DEV_RX_OFFLOAD_TCP_LRO | \
-				     DEV_RX_OFFLOAD_RSS_HASH)
+				     DEV_RX_OFFLOAD_RSS_HASH | \
+				     DEV_RX_OFFLOAD_FLOW_MARK)
 
 static int bnxt_vlan_offload_set_op(struct rte_eth_dev *dev, int mask);
 static void bnxt_print_link_info(struct rte_eth_dev *eth_dev);
diff --git a/drivers/net/enic/enic_res.c b/drivers/net/enic/enic_res.c
index 607a085f8..3503d5d7e 100644
--- a/drivers/net/enic/enic_res.c
+++ b/drivers/net/enic/enic_res.c
@@ -199,7 +199,8 @@ int enic_get_vnic_config(struct enic *enic)
 		DEV_RX_OFFLOAD_IPV4_CKSUM |
 		DEV_RX_OFFLOAD_UDP_CKSUM |
 		DEV_RX_OFFLOAD_TCP_CKSUM |
-		DEV_RX_OFFLOAD_RSS_HASH;
+		DEV_RX_OFFLOAD_RSS_HASH |
+		DEV_RX_OFFLOAD_FLOW_MARK;
 	enic->tx_offload_mask =
 		PKT_TX_IPV6 |
 		PKT_TX_IPV4 |
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 7058e0213..6311943be 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -3512,7 +3512,8 @@ i40e_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 		DEV_RX_OFFLOAD_VLAN_EXTEND |
 		DEV_RX_OFFLOAD_VLAN_FILTER |
 		DEV_RX_OFFLOAD_JUMBO_FRAME |
-		DEV_RX_OFFLOAD_RSS_HASH;
+		DEV_RX_OFFLOAD_RSS_HASH |
+		DEV_RX_OFFLOAD_FLOW_MARK;
 
 	dev_info->tx_queue_offload_capa = DEV_TX_OFFLOAD_MBUF_FAST_FREE;
 	dev_info->tx_offload_capa =
diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index aef91a79b..7bdaa87b1 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -518,7 +518,8 @@ iavf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 		DEV_RX_OFFLOAD_SCATTER |
 		DEV_RX_OFFLOAD_JUMBO_FRAME |
 		DEV_RX_OFFLOAD_VLAN_FILTER |
-		DEV_RX_OFFLOAD_RSS_HASH;
+		DEV_RX_OFFLOAD_RSS_HASH |
+		DEV_RX_OFFLOAD_FLOW_MARK;
 	dev_info->tx_offload_capa =
 		DEV_TX_OFFLOAD_VLAN_INSERT |
 		DEV_TX_OFFLOAD_QINQ_INSERT |
diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index 2e2a6b2af..984af659f 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -2146,7 +2146,8 @@ ice_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 			DEV_RX_OFFLOAD_QINQ_STRIP |
 			DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM |
 			DEV_RX_OFFLOAD_VLAN_EXTEND |
-			DEV_RX_OFFLOAD_RSS_HASH;
+			DEV_RX_OFFLOAD_RSS_HASH |
+			DEV_RX_OFFLOAD_FLOW_MARK;
 		dev_info->tx_offload_capa |=
 			DEV_TX_OFFLOAD_QINQ_INSERT |
 			DEV_TX_OFFLOAD_IPV4_CKSUM |
diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c
index fa572d184..1481e2426 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx.c
@@ -2873,7 +2873,8 @@ ixgbe_get_rx_port_offloads(struct rte_eth_dev *dev)
 		   DEV_RX_OFFLOAD_JUMBO_FRAME |
 		   DEV_RX_OFFLOAD_VLAN_FILTER |
 		   DEV_RX_OFFLOAD_SCATTER |
-		   DEV_RX_OFFLOAD_RSS_HASH;
+		   DEV_RX_OFFLOAD_RSS_HASH |
+		   DEV_RX_OFFLOAD_FLOW_MARK;
 
 	if (hw->mac.type == ixgbe_mac_82598EB)
 		offloads |= DEV_RX_OFFLOAD_VLAN_STRIP;
diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
index b5fd57693..1bf01bda3 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -369,7 +369,8 @@ mlx5_get_rx_queue_offloads(struct rte_eth_dev *dev)
 	uint64_t offloads = (DEV_RX_OFFLOAD_SCATTER |
 			     DEV_RX_OFFLOAD_TIMESTAMP |
 			     DEV_RX_OFFLOAD_JUMBO_FRAME |
-			     DEV_RX_OFFLOAD_RSS_HASH);
+			     DEV_RX_OFFLOAD_RSS_HASH |
+			     DEV_RX_OFFLOAD_FLOW_MARK);
 
 	if (config->hw_fcs_strip)
 		offloads |= DEV_RX_OFFLOAD_KEEP_CRC;
diff --git a/drivers/net/octeontx2/otx2_ethdev.h b/drivers/net/octeontx2/otx2_ethdev.h
index 0cca6746d..97c1a636a 100644
--- a/drivers/net/octeontx2/otx2_ethdev.h
+++ b/drivers/net/octeontx2/otx2_ethdev.h
@@ -141,7 +141,8 @@
 	DEV_RX_OFFLOAD_VLAN_FILTER	| \
 	DEV_RX_OFFLOAD_QINQ_STRIP	| \
 	DEV_RX_OFFLOAD_TIMESTAMP	| \
-	DEV_RX_OFFLOAD_RSS_HASH)
+	DEV_RX_OFFLOAD_RSS_HASH		| \
+	DEV_RX_OFFLOAD_FLOW_MARK)
 
 #define NIX_DEFAULT_RSS_CTX_GROUP  0
 #define NIX_DEFAULT_RSS_MCAM_IDX  -1
diff --git a/drivers/net/octeontx2/otx2_flow_parse.c b/drivers/net/octeontx2/otx2_flow_parse.c
index 6670c1a70..6eb69a8b2 100644
--- a/drivers/net/octeontx2/otx2_flow_parse.c
+++ b/drivers/net/octeontx2/otx2_flow_parse.c
@@ -979,7 +979,8 @@ otx2_flow_parse_actions(struct rte_eth_dev *dev,
 	if (mark)
 		flow->npc_action |= (uint64_t)mark << 40;
 
-	if (rte_atomic32_read(&npc->mark_actions) == 1) {
+	if (rte_atomic32_read(&npc->mark_actions) == 1 &&
+			(hw->rx_offloads & DEV_RX_OFFLOAD_FLOW_MARK)) {
 		hw->rx_offload_flags |=
 			NIX_RX_OFFLOAD_MARK_UPDATE_F;
 		otx2_eth_set_rx_function(dev);
diff --git a/drivers/net/sfc/sfc_ef10_essb_rx.c b/drivers/net/sfc/sfc_ef10_essb_rx.c
index 220ef0e47..1887731e2 100644
--- a/drivers/net/sfc/sfc_ef10_essb_rx.c
+++ b/drivers/net/sfc/sfc_ef10_essb_rx.c
@@ -716,7 +716,8 @@ struct sfc_dp_rx sfc_ef10_essb_rx = {
 	.features		= SFC_DP_RX_FEAT_FLOW_FLAG |
 				  SFC_DP_RX_FEAT_FLOW_MARK,
 	.dev_offload_capa	= DEV_RX_OFFLOAD_CHECKSUM,
-	.queue_offload_capa	= DEV_RX_OFFLOAD_RSS_HASH,
+	.queue_offload_capa	= DEV_RX_OFFLOAD_RSS_HASH |
+				  DEV_RX_OFFLOAD_FLOW_MARK,
 	.get_dev_info		= sfc_ef10_essb_rx_get_dev_info,
 	.pool_ops_supported	= sfc_ef10_essb_rx_pool_ops_supported,
 	.qsize_up_rings		= sfc_ef10_essb_rx_qsize_up_rings,
-- 
2.17.1


^ permalink raw reply	[flat|nested] 245+ messages in thread

* [dpdk-dev] [PATCH v4 6/7] examples/eventdev_pipeline: add new Rx RSS hash offload
  2019-10-01  6:34   ` [dpdk-dev] [PATCH v4 0/7] ethdev: add new Rx offload flags pbhagavatula
                       ` (4 preceding siblings ...)
  2019-10-01  6:34     ` [dpdk-dev] [PATCH v4 5/7] drivers/net: update Rx flow flag and mark capabilities pbhagavatula
@ 2019-10-01  6:34     ` pbhagavatula
  2019-10-01  6:34     ` [dpdk-dev] [PATCH v4 7/7] examples: disable Rx packet type parsing pbhagavatula
  2019-10-01  6:41     ` [dpdk-dev] [PATCH v5 0/7] ethdev: add new Rx offload flags pbhagavatula
  7 siblings, 0 replies; 245+ messages in thread
From: pbhagavatula @ 2019-10-01  6:34 UTC (permalink / raw)
  To: arybchenko, jerinj, Harry van Haaren; +Cc: dev, Pavan Nikhilesh

From: Pavan Nikhilesh <pbhagavatula@marvell.com>

Since pipeline_generic uses `rte_mbuf::hash::rss` add the new Rx offload
flag `DEV_RX_OFFLOAD_RSS_HASH` to inform PMD to copy the RSS hash result
into the mbuf.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
 examples/eventdev_pipeline/main.c             | 113 -----------------
 .../pipeline_worker_generic.c                 | 118 ++++++++++++++++++
 .../eventdev_pipeline/pipeline_worker_tx.c    | 114 +++++++++++++++++
 3 files changed, 232 insertions(+), 113 deletions(-)

diff --git a/examples/eventdev_pipeline/main.c b/examples/eventdev_pipeline/main.c
index f4e57f541..a73b61d59 100644
--- a/examples/eventdev_pipeline/main.c
+++ b/examples/eventdev_pipeline/main.c
@@ -242,118 +242,6 @@ parse_app_args(int argc, char **argv)
 	}
 }
 
-/*
- * Initializes a given port using global settings and with the RX buffers
- * coming from the mbuf_pool passed as a parameter.
- */
-static inline int
-port_init(uint8_t port, struct rte_mempool *mbuf_pool)
-{
-	struct rte_eth_rxconf rx_conf;
-	static const struct rte_eth_conf port_conf_default = {
-		.rxmode = {
-			.mq_mode = ETH_MQ_RX_RSS,
-			.max_rx_pkt_len = RTE_ETHER_MAX_LEN,
-		},
-		.rx_adv_conf = {
-			.rss_conf = {
-				.rss_hf = ETH_RSS_IP |
-					  ETH_RSS_TCP |
-					  ETH_RSS_UDP,
-			}
-		}
-	};
-	const uint16_t rx_rings = 1, tx_rings = 1;
-	const uint16_t rx_ring_size = 512, tx_ring_size = 512;
-	struct rte_eth_conf port_conf = port_conf_default;
-	int retval;
-	uint16_t q;
-	struct rte_eth_dev_info dev_info;
-	struct rte_eth_txconf txconf;
-
-	if (!rte_eth_dev_is_valid_port(port))
-		return -1;
-
-	rte_eth_dev_info_get(port, &dev_info);
-	if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_MBUF_FAST_FREE)
-		port_conf.txmode.offloads |=
-			DEV_TX_OFFLOAD_MBUF_FAST_FREE;
-	rx_conf = dev_info.default_rxconf;
-	rx_conf.offloads = port_conf.rxmode.offloads;
-
-	port_conf.rx_adv_conf.rss_conf.rss_hf &=
-		dev_info.flow_type_rss_offloads;
-	if (port_conf.rx_adv_conf.rss_conf.rss_hf !=
-			port_conf_default.rx_adv_conf.rss_conf.rss_hf) {
-		printf("Port %u modified RSS hash function based on hardware support,"
-			"requested:%#"PRIx64" configured:%#"PRIx64"\n",
-			port,
-			port_conf_default.rx_adv_conf.rss_conf.rss_hf,
-			port_conf.rx_adv_conf.rss_conf.rss_hf);
-	}
-
-	/* Configure the Ethernet device. */
-	retval = rte_eth_dev_configure(port, rx_rings, tx_rings, &port_conf);
-	if (retval != 0)
-		return retval;
-
-	/* Allocate and set up 1 RX queue per Ethernet port. */
-	for (q = 0; q < rx_rings; q++) {
-		retval = rte_eth_rx_queue_setup(port, q, rx_ring_size,
-				rte_eth_dev_socket_id(port), &rx_conf,
-				mbuf_pool);
-		if (retval < 0)
-			return retval;
-	}
-
-	txconf = dev_info.default_txconf;
-	txconf.offloads = port_conf_default.txmode.offloads;
-	/* Allocate and set up 1 TX queue per Ethernet port. */
-	for (q = 0; q < tx_rings; q++) {
-		retval = rte_eth_tx_queue_setup(port, q, tx_ring_size,
-				rte_eth_dev_socket_id(port), &txconf);
-		if (retval < 0)
-			return retval;
-	}
-
-	/* Display the port MAC address. */
-	struct rte_ether_addr addr;
-	rte_eth_macaddr_get(port, &addr);
-	printf("Port %u MAC: %02" PRIx8 " %02" PRIx8 " %02" PRIx8
-			   " %02" PRIx8 " %02" PRIx8 " %02" PRIx8 "\n",
-			(unsigned int)port,
-			addr.addr_bytes[0], addr.addr_bytes[1],
-			addr.addr_bytes[2], addr.addr_bytes[3],
-			addr.addr_bytes[4], addr.addr_bytes[5]);
-
-	/* Enable RX in promiscuous mode for the Ethernet device. */
-	rte_eth_promiscuous_enable(port);
-
-	return 0;
-}
-
-static int
-init_ports(uint16_t num_ports)
-{
-	uint16_t portid;
-
-	if (!cdata.num_mbuf)
-		cdata.num_mbuf = 16384 * num_ports;
-
-	struct rte_mempool *mp = rte_pktmbuf_pool_create("packet_pool",
-			/* mbufs */ cdata.num_mbuf,
-			/* cache_size */ 512,
-			/* priv_size*/ 0,
-			/* data_room_size */ RTE_MBUF_DEFAULT_BUF_SIZE,
-			rte_socket_id());
-
-	RTE_ETH_FOREACH_DEV(portid)
-		if (port_init(portid, mp) != 0)
-			rte_exit(EXIT_FAILURE, "Cannot init port %"PRIu16 "\n",
-					portid);
-
-	return 0;
-}
 
 static void
 do_capability_setup(uint8_t eventdev_id)
@@ -501,7 +389,6 @@ main(int argc, char **argv)
 	if (dev_id < 0)
 		rte_exit(EXIT_FAILURE, "Error setting up eventdev\n");
 
-	init_ports(num_ports);
 	fdata->cap.adptr_setup(num_ports);
 
 	/* Start the Ethernet port. */
diff --git a/examples/eventdev_pipeline/pipeline_worker_generic.c b/examples/eventdev_pipeline/pipeline_worker_generic.c
index 766c8e958..aa1678fe7 100644
--- a/examples/eventdev_pipeline/pipeline_worker_generic.c
+++ b/examples/eventdev_pipeline/pipeline_worker_generic.c
@@ -271,6 +271,123 @@ setup_eventdev_generic(struct worker_data *worker_data)
 	return dev_id;
 }
 
+/*
+ * Initializes a given port using global settings and with the RX buffers
+ * coming from the mbuf_pool passed as a parameter.
+ */
+static inline int
+port_init(uint8_t port, struct rte_mempool *mbuf_pool)
+{
+	struct rte_eth_rxconf rx_conf;
+	static const struct rte_eth_conf port_conf_default = {
+		.rxmode = {
+			.mq_mode = ETH_MQ_RX_RSS,
+			.max_rx_pkt_len = RTE_ETHER_MAX_LEN,
+		},
+		.rx_adv_conf = {
+			.rss_conf = {
+				.rss_hf = ETH_RSS_IP |
+					  ETH_RSS_TCP |
+					  ETH_RSS_UDP,
+			}
+		}
+	};
+	const uint16_t rx_rings = 1, tx_rings = 1;
+	const uint16_t rx_ring_size = 512, tx_ring_size = 512;
+	struct rte_eth_conf port_conf = port_conf_default;
+	int retval;
+	uint16_t q;
+	struct rte_eth_dev_info dev_info;
+	struct rte_eth_txconf txconf;
+
+	if (!rte_eth_dev_is_valid_port(port))
+		return -1;
+
+	rte_eth_dev_info_get(port, &dev_info);
+	if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_MBUF_FAST_FREE)
+		port_conf.txmode.offloads |=
+			DEV_TX_OFFLOAD_MBUF_FAST_FREE;
+
+	if (dev_info.rx_offload_capa & DEV_RX_OFFLOAD_RSS_HASH)
+		port_conf.rxmode.offloads |= DEV_RX_OFFLOAD_RSS_HASH;
+
+	rx_conf = dev_info.default_rxconf;
+	rx_conf.offloads = port_conf.rxmode.offloads;
+
+	port_conf.rx_adv_conf.rss_conf.rss_hf &=
+		dev_info.flow_type_rss_offloads;
+	if (port_conf.rx_adv_conf.rss_conf.rss_hf !=
+			port_conf_default.rx_adv_conf.rss_conf.rss_hf) {
+		printf("Port %u modified RSS hash function based on hardware support,"
+			"requested:%#"PRIx64" configured:%#"PRIx64"\n",
+			port,
+			port_conf_default.rx_adv_conf.rss_conf.rss_hf,
+			port_conf.rx_adv_conf.rss_conf.rss_hf);
+	}
+
+	/* Configure the Ethernet device. */
+	retval = rte_eth_dev_configure(port, rx_rings, tx_rings, &port_conf);
+	if (retval != 0)
+		return retval;
+
+	/* Allocate and set up 1 RX queue per Ethernet port. */
+	for (q = 0; q < rx_rings; q++) {
+		retval = rte_eth_rx_queue_setup(port, q, rx_ring_size,
+				rte_eth_dev_socket_id(port), &rx_conf,
+				mbuf_pool);
+		if (retval < 0)
+			return retval;
+	}
+
+	txconf = dev_info.default_txconf;
+	txconf.offloads = port_conf_default.txmode.offloads;
+	/* Allocate and set up 1 TX queue per Ethernet port. */
+	for (q = 0; q < tx_rings; q++) {
+		retval = rte_eth_tx_queue_setup(port, q, tx_ring_size,
+				rte_eth_dev_socket_id(port), &txconf);
+		if (retval < 0)
+			return retval;
+	}
+
+	/* Display the port MAC address. */
+	struct rte_ether_addr addr;
+	rte_eth_macaddr_get(port, &addr);
+	printf("Port %u MAC: %02" PRIx8 " %02" PRIx8 " %02" PRIx8
+			   " %02" PRIx8 " %02" PRIx8 " %02" PRIx8 "\n",
+			(unsigned int)port,
+			addr.addr_bytes[0], addr.addr_bytes[1],
+			addr.addr_bytes[2], addr.addr_bytes[3],
+			addr.addr_bytes[4], addr.addr_bytes[5]);
+
+	/* Enable RX in promiscuous mode for the Ethernet device. */
+	rte_eth_promiscuous_enable(port);
+
+	return 0;
+}
+
+static int
+init_ports(uint16_t num_ports)
+{
+	uint16_t portid;
+
+	if (!cdata.num_mbuf)
+		cdata.num_mbuf = 16384 * num_ports;
+
+	struct rte_mempool *mp = rte_pktmbuf_pool_create("packet_pool",
+			/* mbufs */ cdata.num_mbuf,
+			/* cache_size */ 512,
+			/* priv_size*/ 0,
+			/* data_room_size */ RTE_MBUF_DEFAULT_BUF_SIZE,
+			rte_socket_id());
+
+	RTE_ETH_FOREACH_DEV(portid)
+		if (port_init(portid, mp) != 0)
+			rte_exit(EXIT_FAILURE, "Cannot init port %"PRIu16 "\n",
+					portid);
+
+	return 0;
+}
+
 static void
 init_adapters(uint16_t nb_ports)
 {
@@ -297,6 +414,7 @@ init_adapters(uint16_t nb_ports)
 		adptr_p_conf.enqueue_depth =
 			dev_info.max_event_port_enqueue_depth;
 
+	init_ports(nb_ports);
 	/* Create one adapter for all the ethernet ports. */
 	ret = rte_event_eth_rx_adapter_create(cdata.rx_adapter_id, evdev_id,
 			&adptr_p_conf);
diff --git a/examples/eventdev_pipeline/pipeline_worker_tx.c b/examples/eventdev_pipeline/pipeline_worker_tx.c
index 8961cd656..52a1b4174 100644
--- a/examples/eventdev_pipeline/pipeline_worker_tx.c
+++ b/examples/eventdev_pipeline/pipeline_worker_tx.c
@@ -603,6 +603,119 @@ service_rx_adapter(void *arg)
 	return 0;
 }
 
+/*
+ * Initializes a given port using global settings and with the RX buffers
+ * coming from the mbuf_pool passed as a parameter.
+ */
+static inline int
+port_init(uint8_t port, struct rte_mempool *mbuf_pool)
+{
+	struct rte_eth_rxconf rx_conf;
+	static const struct rte_eth_conf port_conf_default = {
+		.rxmode = {
+			.mq_mode = ETH_MQ_RX_RSS,
+			.max_rx_pkt_len = RTE_ETHER_MAX_LEN,
+		},
+		.rx_adv_conf = {
+			.rss_conf = {
+				.rss_hf = ETH_RSS_IP |
+					  ETH_RSS_TCP |
+					  ETH_RSS_UDP,
+			}
+		}
+	};
+	const uint16_t rx_rings = 1, tx_rings = 1;
+	const uint16_t rx_ring_size = 512, tx_ring_size = 512;
+	struct rte_eth_conf port_conf = port_conf_default;
+	int retval;
+	uint16_t q;
+	struct rte_eth_dev_info dev_info;
+	struct rte_eth_txconf txconf;
+
+	if (!rte_eth_dev_is_valid_port(port))
+		return -1;
+
+	rte_eth_dev_info_get(port, &dev_info);
+	if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_MBUF_FAST_FREE)
+		port_conf.txmode.offloads |=
+			DEV_TX_OFFLOAD_MBUF_FAST_FREE;
+	rx_conf = dev_info.default_rxconf;
+	rx_conf.offloads = port_conf.rxmode.offloads;
+
+	port_conf.rx_adv_conf.rss_conf.rss_hf &=
+		dev_info.flow_type_rss_offloads;
+	if (port_conf.rx_adv_conf.rss_conf.rss_hf !=
+			port_conf_default.rx_adv_conf.rss_conf.rss_hf) {
+		printf("Port %u modified RSS hash function based on hardware support,"
+			"requested:%#"PRIx64" configured:%#"PRIx64"\n",
+			port,
+			port_conf_default.rx_adv_conf.rss_conf.rss_hf,
+			port_conf.rx_adv_conf.rss_conf.rss_hf);
+	}
+
+	/* Configure the Ethernet device. */
+	retval = rte_eth_dev_configure(port, rx_rings, tx_rings, &port_conf);
+	if (retval != 0)
+		return retval;
+
+	/* Allocate and set up 1 RX queue per Ethernet port. */
+	for (q = 0; q < rx_rings; q++) {
+		retval = rte_eth_rx_queue_setup(port, q, rx_ring_size,
+				rte_eth_dev_socket_id(port), &rx_conf,
+				mbuf_pool);
+		if (retval < 0)
+			return retval;
+	}
+
+	txconf = dev_info.default_txconf;
+	txconf.offloads = port_conf_default.txmode.offloads;
+	/* Allocate and set up 1 TX queue per Ethernet port. */
+	for (q = 0; q < tx_rings; q++) {
+		retval = rte_eth_tx_queue_setup(port, q, tx_ring_size,
+				rte_eth_dev_socket_id(port), &txconf);
+		if (retval < 0)
+			return retval;
+	}
+
+	/* Display the port MAC address. */
+	struct rte_ether_addr addr;
+	rte_eth_macaddr_get(port, &addr);
+	printf("Port %u MAC: %02" PRIx8 " %02" PRIx8 " %02" PRIx8
+			   " %02" PRIx8 " %02" PRIx8 " %02" PRIx8 "\n",
+			(unsigned int)port,
+			addr.addr_bytes[0], addr.addr_bytes[1],
+			addr.addr_bytes[2], addr.addr_bytes[3],
+			addr.addr_bytes[4], addr.addr_bytes[5]);
+
+	/* Enable RX in promiscuous mode for the Ethernet device. */
+	rte_eth_promiscuous_enable(port);
+
+	return 0;
+}
+
+static int
+init_ports(uint16_t num_ports)
+{
+	uint16_t portid;
+
+	if (!cdata.num_mbuf)
+		cdata.num_mbuf = 16384 * num_ports;
+
+	struct rte_mempool *mp = rte_pktmbuf_pool_create("packet_pool",
+			/* mbufs */ cdata.num_mbuf,
+			/* cache_size */ 512,
+			/* priv_size*/ 0,
+			/* data_room_size */ RTE_MBUF_DEFAULT_BUF_SIZE,
+			rte_socket_id());
+
+	RTE_ETH_FOREACH_DEV(portid)
+		if (port_init(portid, mp) != 0)
+			rte_exit(EXIT_FAILURE, "Cannot init port %"PRIu16 "\n",
+					portid);
+
+	return 0;
+}
+
 static void
 init_adapters(uint16_t nb_ports)
 {
@@ -621,6 +734,7 @@ init_adapters(uint16_t nb_ports)
 		.new_event_threshold = 4096,
 	};
 
+	init_ports(nb_ports);
 	if (adptr_p_conf.new_event_threshold > dev_info.max_num_events)
 		adptr_p_conf.new_event_threshold = dev_info.max_num_events;
 	if (adptr_p_conf.dequeue_depth > dev_info.max_event_port_dequeue_depth)
-- 
2.17.1


^ permalink raw reply	[flat|nested] 245+ messages in thread

* [dpdk-dev] [PATCH v4 7/7] examples: disable Rx packet type parsing
  2019-10-01  6:34   ` [dpdk-dev] [PATCH v4 0/7] ethdev: add new Rx offload flags pbhagavatula
                       ` (5 preceding siblings ...)
  2019-10-01  6:34     ` [dpdk-dev] [PATCH v4 6/7] examples/eventdev_pipeline: add new Rx RSS hash offload pbhagavatula
@ 2019-10-01  6:34     ` pbhagavatula
  2019-10-01  6:41     ` [dpdk-dev] [PATCH v5 0/7] ethdev: add new Rx offload flags pbhagavatula
  7 siblings, 0 replies; 245+ messages in thread
From: pbhagavatula @ 2019-10-01  6:34 UTC (permalink / raw)
  To: arybchenko, jerinj, Nicolas Chautru, Chas Williams, David Hunt,
	Harry van Haaren, Marko Kovacevic, Ori Kam, Bruce Richardson,
	Radu Nicolau, Akhil Goyal, Tomasz Kantecki, Bernard Iremonger,
	Cristian Dumitrescu, Konstantin Ananyev, Ferruh Yigit,
	Declan Doherty, Reshma Pattan, John McNamara, Xiaoyun Li,
	Jasvinder Singh, Byron Marohn, Yipeng Wang, Maxime Coquelin,
	Tiwei Bie, Zhihong Wang
  Cc: dev, Pavan Nikhilesh

From: Pavan Nikhilesh <pbhagavatula@marvell.com>

Disable packet type parsing in examples that don't use
`rte_mbuf::packet_type` by setting ptype_mask as 0 in
`rte_eth_dev_set_supported_ptypes`

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
 examples/bbdev_app/main.c                  | 1 +
 examples/bond/main.c                       | 2 ++
 examples/distributor/Makefile              | 1 +
 examples/distributor/main.c                | 1 +
 examples/distributor/meson.build           | 1 +
 examples/eventdev_pipeline/main.c          | 2 ++
 examples/eventdev_pipeline/meson.build     | 1 +
 examples/exception_path/Makefile           | 1 +
 examples/exception_path/main.c             | 1 +
 examples/exception_path/meson.build        | 1 +
 examples/flow_classify/flow_classify.c     | 1 +
 examples/flow_filtering/Makefile           | 1 +
 examples/flow_filtering/main.c             | 1 +
 examples/flow_filtering/meson.build        | 1 +
 examples/ip_pipeline/link.c                | 1 +
 examples/ip_reassembly/Makefile            | 1 +
 examples/ip_reassembly/main.c              | 2 ++
 examples/ip_reassembly/meson.build         | 1 +
 examples/ipsec-secgw/ipsec-secgw.c         | 2 ++
 examples/ipv4_multicast/Makefile           | 1 +
 examples/ipv4_multicast/main.c             | 2 ++
 examples/ipv4_multicast/meson.build        | 1 +
 examples/kni/main.c                        | 1 +
 examples/l2fwd-cat/Makefile                | 1 +
 examples/l2fwd-cat/l2fwd-cat.c             | 1 +
 examples/l2fwd-cat/meson.build             | 1 +
 examples/l2fwd-crypto/main.c               | 2 ++
 examples/l2fwd-jobstats/Makefile           | 1 +
 examples/l2fwd-jobstats/main.c             | 2 ++
 examples/l2fwd-jobstats/meson.build        | 1 +
 examples/l2fwd-keepalive/Makefile          | 1 +
 examples/l2fwd-keepalive/main.c            | 2 ++
 examples/l2fwd-keepalive/meson.build       | 1 +
 examples/l2fwd/Makefile                    | 1 +
 examples/l2fwd/main.c                      | 2 ++
 examples/l2fwd/meson.build                 | 1 +
 examples/l3fwd-acl/Makefile                | 1 +
 examples/l3fwd-acl/main.c                  | 2 ++
 examples/l3fwd-acl/meson.build             | 1 +
 examples/l3fwd-vf/Makefile                 | 1 +
 examples/l3fwd-vf/main.c                   | 2 ++
 examples/l3fwd-vf/meson.build              | 1 +
 examples/link_status_interrupt/Makefile    | 1 +
 examples/link_status_interrupt/main.c      | 2 ++
 examples/link_status_interrupt/meson.build | 1 +
 examples/load_balancer/Makefile            | 1 +
 examples/load_balancer/init.c              | 2 ++
 examples/load_balancer/meson.build         | 1 +
 examples/packet_ordering/Makefile          | 1 +
 examples/packet_ordering/main.c            | 1 +
 examples/packet_ordering/meson.build       | 1 +
 examples/ptpclient/Makefile                | 1 +
 examples/ptpclient/meson.build             | 1 +
 examples/ptpclient/ptpclient.c             | 1 +
 examples/qos_meter/Makefile                | 1 +
 examples/qos_meter/main.c                  | 2 ++
 examples/qos_meter/meson.build             | 1 +
 examples/qos_sched/Makefile                | 1 +
 examples/qos_sched/init.c                  | 1 +
 examples/qos_sched/meson.build             | 1 +
 examples/quota_watermark/qw/Makefile       | 1 +
 examples/quota_watermark/qw/init.c         | 1 +
 examples/rxtx_callbacks/main.c             | 1 +
 examples/server_node_efd/server/Makefile   | 1 +
 examples/server_node_efd/server/init.c     | 1 +
 examples/skeleton/Makefile                 | 1 +
 examples/skeleton/basicfwd.c               | 1 +
 examples/skeleton/meson.build              | 1 +
 examples/tep_termination/Makefile          | 1 +
 examples/tep_termination/meson.build       | 1 +
 examples/tep_termination/vxlan_setup.c     | 1 +
 examples/vhost/Makefile                    | 1 +
 examples/vhost/main.c                      | 1 +
 examples/vm_power_manager/Makefile         | 1 +
 examples/vm_power_manager/main.c           | 1 +
 examples/vm_power_manager/meson.build      | 1 +
 examples/vmdq/Makefile                     | 1 +
 examples/vmdq/main.c                       | 1 +
 examples/vmdq/meson.build                  | 1 +
 examples/vmdq_dcb/Makefile                 | 1 +
 examples/vmdq_dcb/main.c                   | 1 +
 examples/vmdq_dcb/meson.build              | 1 +
 82 files changed, 96 insertions(+)

diff --git a/examples/bbdev_app/main.c b/examples/bbdev_app/main.c
index 9acf666dc..277725a6b 100644
--- a/examples/bbdev_app/main.c
+++ b/examples/bbdev_app/main.c
@@ -478,6 +478,7 @@ initialize_ports(struct app_config_params *app_params,
 	}
 
 	rte_eth_promiscuous_enable(port_id);
+	rte_eth_dev_set_supported_ptypes(port_id, RTE_PTYPE_UNKNOWN, NULL, 0);
 
 	rte_eth_macaddr_get(port_id, &bbdev_port_eth_addr);
 	print_mac(port_id, &bbdev_port_eth_addr);
diff --git a/examples/bond/main.c b/examples/bond/main.c
index 1c0df9d46..f92104908 100644
--- a/examples/bond/main.c
+++ b/examples/bond/main.c
@@ -195,6 +195,7 @@ slave_port_init(uint16_t portid, struct rte_mempool *mbuf_pool)
 		rte_exit(retval, "port %u: TX queue 0 setup failed (res=%d)",
 				portid, retval);
 
+	rte_eth_dev_set_supported_ptypes(portid, RTE_PTYPE_UNKNOWN, NULL, 0);
 	retval  = rte_eth_dev_start(portid);
 	if (retval < 0)
 		rte_exit(retval,
@@ -271,6 +272,7 @@ bond_port_init(struct rte_mempool *mbuf_pool)
 		rte_exit(retval, "port %u: TX queue 0 setup failed (res=%d)",
 				BOND_PORT, retval);
 
+	rte_eth_dev_set_supported_ptypes(BOND_PORT, RTE_PTYPE_UNKNOWN, NULL, 0);
 	retval  = rte_eth_dev_start(BOND_PORT);
 	if (retval < 0)
 		rte_exit(retval, "Start port %d failed (res=%d)", BOND_PORT, retval);
diff --git a/examples/distributor/Makefile b/examples/distributor/Makefile
index bac8d5578..a2a477279 100644
--- a/examples/distributor/Makefile
+++ b/examples/distributor/Makefile
@@ -50,6 +50,7 @@ RTE_TARGET ?= $(notdir $(abspath $(dir $(firstword $(wildcard $(RTE_SDK)/*/.conf
 include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 # workaround for a gcc bug with noreturn attribute
 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603
diff --git a/examples/distributor/main.c b/examples/distributor/main.c
index 81d7ca61d..35930d8a3 100644
--- a/examples/distributor/main.c
+++ b/examples/distributor/main.c
@@ -162,6 +162,7 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool)
 			return retval;
 	}
 
+	rte_eth_dev_set_supported_ptypes(port, RTE_PTYPE_UNKNOWN, NULL, 0);
 	retval = rte_eth_dev_start(port);
 	if (retval < 0)
 		return retval;
diff --git a/examples/distributor/meson.build b/examples/distributor/meson.build
index 26f108d65..c2976f6bd 100644
--- a/examples/distributor/meson.build
+++ b/examples/distributor/meson.build
@@ -10,6 +10,7 @@
 build = dpdk_conf.has('RTE_LIBRTE_POWER')
 
 deps += ['distributor', 'power']
+allow_experimental_apis = true
 sources = files(
 	'main.c'
 )
diff --git a/examples/eventdev_pipeline/main.c b/examples/eventdev_pipeline/main.c
index a73b61d59..66b6420f9 100644
--- a/examples/eventdev_pipeline/main.c
+++ b/examples/eventdev_pipeline/main.c
@@ -393,6 +393,8 @@ main(int argc, char **argv)
 
 	/* Start the Ethernet port. */
 	RTE_ETH_FOREACH_DEV(portid) {
+		rte_eth_dev_set_supported_ptypes(portid, RTE_PTYPE_UNKNOWN,
+						 NULL, 0);
 		err = rte_eth_dev_start(portid);
 		if (err < 0)
 			rte_exit(EXIT_FAILURE, "Error starting ethdev %d\n",
diff --git a/examples/eventdev_pipeline/meson.build b/examples/eventdev_pipeline/meson.build
index a54c35aa7..0fc916b05 100644
--- a/examples/eventdev_pipeline/meson.build
+++ b/examples/eventdev_pipeline/meson.build
@@ -7,6 +7,7 @@
 # DPDK instance, use 'make'
 
 deps += 'eventdev'
+allow_experimental_apis = true
 sources = files(
 	'main.c',
 	'pipeline_worker_generic.c',
diff --git a/examples/exception_path/Makefile b/examples/exception_path/Makefile
index 90c7f133a..a7c961276 100644
--- a/examples/exception_path/Makefile
+++ b/examples/exception_path/Makefile
@@ -51,6 +51,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 include $(RTE_SDK)/mk/rte.extapp.mk
 
diff --git a/examples/exception_path/main.c b/examples/exception_path/main.c
index 0d79e5a24..0165e4553 100644
--- a/examples/exception_path/main.c
+++ b/examples/exception_path/main.c
@@ -464,6 +464,7 @@ init_port(uint16_t port)
 		FATAL_ERROR("Could not setup up TX queue for port%u (%d)",
 				port, ret);
 
+	rte_eth_dev_set_supported_ptypes(port, RTE_PTYPE_UNKNOWN, NULL, 0);
 	ret = rte_eth_dev_start(port);
 	if (ret < 0)
 		FATAL_ERROR("Could not start port%u (%d)", port, ret);
diff --git a/examples/exception_path/meson.build b/examples/exception_path/meson.build
index c34e11e36..2b0a25036 100644
--- a/examples/exception_path/meson.build
+++ b/examples/exception_path/meson.build
@@ -6,6 +6,7 @@
 # To build this example as a standalone application with an already-installed
 # DPDK instance, use 'make'
 
+allow_experimental_apis = true
 sources = files(
 	'main.c'
 )
diff --git a/examples/flow_classify/flow_classify.c b/examples/flow_classify/flow_classify.c
index bc7f43ea9..f34d27428 100644
--- a/examples/flow_classify/flow_classify.c
+++ b/examples/flow_classify/flow_classify.c
@@ -231,6 +231,7 @@ port_init(uint8_t port, struct rte_mempool *mbuf_pool)
 	}
 
 	/* Start the Ethernet port. */
+	rte_eth_dev_set_supported_ptypes(port, RTE_PTYPE_UNKNOWN, NULL, 0);
 	retval = rte_eth_dev_start(port);
 	if (retval < 0)
 		return retval;
diff --git a/examples/flow_filtering/Makefile b/examples/flow_filtering/Makefile
index a63a75555..793a08fae 100644
--- a/examples/flow_filtering/Makefile
+++ b/examples/flow_filtering/Makefile
@@ -49,6 +49,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 include $(RTE_SDK)/mk/rte.extapp.mk
 
diff --git a/examples/flow_filtering/main.c b/examples/flow_filtering/main.c
index a0487be77..4b8712324 100644
--- a/examples/flow_filtering/main.c
+++ b/examples/flow_filtering/main.c
@@ -176,6 +176,7 @@ init_port(void)
 	}
 
 	rte_eth_promiscuous_enable(port_id);
+	rte_eth_dev_set_supported_ptypes(port_id, RTE_PTYPE_UNKNOWN, NULL, 0);
 	ret = rte_eth_dev_start(port_id);
 	if (ret < 0) {
 		rte_exit(EXIT_FAILURE,
diff --git a/examples/flow_filtering/meson.build b/examples/flow_filtering/meson.build
index 407795c42..6f5d1b08a 100644
--- a/examples/flow_filtering/meson.build
+++ b/examples/flow_filtering/meson.build
@@ -6,6 +6,7 @@
 # To build this example as a standalone application with an already-installed
 # DPDK instance, use 'make'
 
+allow_experimental_apis = true
 sources = files(
 	'main.c',
 )
diff --git a/examples/ip_pipeline/link.c b/examples/ip_pipeline/link.c
index 787eb866a..7d02962e3 100644
--- a/examples/ip_pipeline/link.c
+++ b/examples/ip_pipeline/link.c
@@ -205,6 +205,7 @@ link_create(const char *name, struct link_params *params)
 			return NULL;
 	}
 
+	rte_eth_dev_set_supported_ptypes(port_id, RTE_PTYPE_UNKNOWN, NULL, 0);
 	/* Port start */
 	status = rte_eth_dev_start(port_id);
 	if (status < 0)
diff --git a/examples/ip_reassembly/Makefile b/examples/ip_reassembly/Makefile
index 0b1a904e0..19c462388 100644
--- a/examples/ip_reassembly/Makefile
+++ b/examples/ip_reassembly/Makefile
@@ -52,6 +52,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 # workaround for a gcc bug with noreturn attribute
 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603
diff --git a/examples/ip_reassembly/main.c b/examples/ip_reassembly/main.c
index 38b39be6b..f2c28ef76 100644
--- a/examples/ip_reassembly/main.c
+++ b/examples/ip_reassembly/main.c
@@ -1158,6 +1158,8 @@ main(int argc, char **argv)
 		if ((enabled_port_mask & (1 << portid)) == 0) {
 			continue;
 		}
+		rte_eth_dev_set_supported_ptypes(portid, RTE_PTYPE_UNKNOWN,
+						 NULL, 0);
 		/* Start device */
 		ret = rte_eth_dev_start(portid);
 		if (ret < 0)
diff --git a/examples/ip_reassembly/meson.build b/examples/ip_reassembly/meson.build
index 8ebd48291..8a667c265 100644
--- a/examples/ip_reassembly/meson.build
+++ b/examples/ip_reassembly/meson.build
@@ -7,6 +7,7 @@
 # DPDK instance, use 'make'
 
 deps += ['lpm', 'ip_frag']
+allow_experimental_apis = true
 sources = files(
 	'main.c'
 )
diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c
index 0d1fd6af6..2aceaf549 100644
--- a/examples/ipsec-secgw/ipsec-secgw.c
+++ b/examples/ipsec-secgw/ipsec-secgw.c
@@ -2448,6 +2448,8 @@ main(int32_t argc, char **argv)
 		if ((enabled_port_mask & (1 << portid)) == 0)
 			continue;
 
+		rte_eth_dev_set_supported_ptypes(portid, RTE_PTYPE_UNKNOWN,
+						 NULL, 0);
 		/*
 		 * Start device
 		 * note: device must be started before a flow rule
diff --git a/examples/ipv4_multicast/Makefile b/examples/ipv4_multicast/Makefile
index 5f8a67dd4..5171f7ab2 100644
--- a/examples/ipv4_multicast/Makefile
+++ b/examples/ipv4_multicast/Makefile
@@ -52,6 +52,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 # workaround for a gcc bug with noreturn attribute
 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603
diff --git a/examples/ipv4_multicast/main.c b/examples/ipv4_multicast/main.c
index 72eaadc51..3d327a00b 100644
--- a/examples/ipv4_multicast/main.c
+++ b/examples/ipv4_multicast/main.c
@@ -765,6 +765,8 @@ main(int argc, char **argv)
 			qconf->tx_queue_id[portid] = queueid;
 			queueid++;
 		}
+		rte_eth_dev_set_supported_ptypes(portid, RTE_PTYPE_UNKNOWN,
+						 NULL, 0);
 		rte_eth_allmulticast_enable(portid);
 		/* Start device */
 		ret = rte_eth_dev_start(portid);
diff --git a/examples/ipv4_multicast/meson.build b/examples/ipv4_multicast/meson.build
index d9e4c7c21..6969e2c54 100644
--- a/examples/ipv4_multicast/meson.build
+++ b/examples/ipv4_multicast/meson.build
@@ -7,6 +7,7 @@
 # DPDK instance, use 'make'
 
 deps += 'hash'
+allow_experimental_apis = true
 sources = files(
 	'main.c'
 )
diff --git a/examples/kni/main.c b/examples/kni/main.c
index 4710d7176..99f500e25 100644
--- a/examples/kni/main.c
+++ b/examples/kni/main.c
@@ -625,6 +625,7 @@ init_port(uint16_t port)
 		rte_exit(EXIT_FAILURE, "Could not setup up TX queue for "
 				"port%u (%d)\n", (unsigned)port, ret);
 
+	rte_eth_dev_set_supported_ptypes(port, RTE_PTYPE_UNKNOWN, NULL, 0);
 	ret = rte_eth_dev_start(port);
 	if (ret < 0)
 		rte_exit(EXIT_FAILURE, "Could not start port%u (%d)\n",
diff --git a/examples/l2fwd-cat/Makefile b/examples/l2fwd-cat/Makefile
index c1960d6d3..d6a25e42a 100644
--- a/examples/l2fwd-cat/Makefile
+++ b/examples/l2fwd-cat/Makefile
@@ -66,6 +66,7 @@ endif
 EXTRA_CFLAGS += -O3 -g -Wfatal-errors
 
 CFLAGS += -I$(PQOS_INSTALL_PATH)/../include
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 LDLIBS += -L$(PQOS_INSTALL_PATH)
 LDLIBS += -lpqos
diff --git a/examples/l2fwd-cat/l2fwd-cat.c b/examples/l2fwd-cat/l2fwd-cat.c
index b34b40a00..a54a1ed25 100644
--- a/examples/l2fwd-cat/l2fwd-cat.c
+++ b/examples/l2fwd-cat/l2fwd-cat.c
@@ -67,6 +67,7 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool)
 			return retval;
 	}
 
+	rte_eth_dev_set_supported_ptypes(port, RTE_PTYPE_UNKNOWN, NULL, 0);
 	/* Start the Ethernet port. */
 	retval = rte_eth_dev_start(port);
 	if (retval < 0)
diff --git a/examples/l2fwd-cat/meson.build b/examples/l2fwd-cat/meson.build
index 4e2777a03..37c96040d 100644
--- a/examples/l2fwd-cat/meson.build
+++ b/examples/l2fwd-cat/meson.build
@@ -10,6 +10,7 @@ pqos = cc.find_library('pqos', required: false)
 build = pqos.found()
 ext_deps += pqos
 cflags += '-I/usr/local/include' # assume pqos lib installed in /usr/local
+allow_experimental_apis = true
 sources = files(
 	'cat.c', 'l2fwd-cat.c'
 )
diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c
index 3fe2ba725..5071ef389 100644
--- a/examples/l2fwd-crypto/main.c
+++ b/examples/l2fwd-crypto/main.c
@@ -2559,6 +2559,8 @@ initialize_ports(struct l2fwd_crypto_options *options)
 			return -1;
 		}
 
+		rte_eth_dev_set_supported_ptypes(portid, RTE_PTYPE_UNKNOWN,
+						 NULL, 0);
 		/* Start device */
 		retval = rte_eth_dev_start(portid);
 		if (retval < 0) {
diff --git a/examples/l2fwd-jobstats/Makefile b/examples/l2fwd-jobstats/Makefile
index 729a39e93..09834e979 100644
--- a/examples/l2fwd-jobstats/Makefile
+++ b/examples/l2fwd-jobstats/Makefile
@@ -52,6 +52,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 include $(RTE_SDK)/mk/rte.extapp.mk
 endif
diff --git a/examples/l2fwd-jobstats/main.c b/examples/l2fwd-jobstats/main.c
index 77e44dc82..03d986a68 100644
--- a/examples/l2fwd-jobstats/main.c
+++ b/examples/l2fwd-jobstats/main.c
@@ -902,6 +902,8 @@ main(int argc, char **argv)
 			"Cannot set error callback for tx buffer on port %u\n",
 				 portid);
 
+		rte_eth_dev_set_supported_ptypes(portid, RTE_PTYPE_UNKNOWN,
+						 NULL, 0);
 		/* Start device */
 		ret = rte_eth_dev_start(portid);
 		if (ret < 0)
diff --git a/examples/l2fwd-jobstats/meson.build b/examples/l2fwd-jobstats/meson.build
index 1ffd484e2..3653aa7ec 100644
--- a/examples/l2fwd-jobstats/meson.build
+++ b/examples/l2fwd-jobstats/meson.build
@@ -7,6 +7,7 @@
 # DPDK instance, use 'make'
 
 deps += ['jobstats', 'timer']
+allow_experimental_apis = true
 sources = files(
 	'main.c'
 )
diff --git a/examples/l2fwd-keepalive/Makefile b/examples/l2fwd-keepalive/Makefile
index 37de27a6f..584257ae2 100644
--- a/examples/l2fwd-keepalive/Makefile
+++ b/examples/l2fwd-keepalive/Makefile
@@ -53,6 +53,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 LDFLAGS += -lrt
 
 include $(RTE_SDK)/mk/rte.extapp.mk
diff --git a/examples/l2fwd-keepalive/main.c b/examples/l2fwd-keepalive/main.c
index 9831a4323..8d3e5eadd 100644
--- a/examples/l2fwd-keepalive/main.c
+++ b/examples/l2fwd-keepalive/main.c
@@ -696,6 +696,8 @@ main(int argc, char **argv)
 			"Cannot set error callback for tx buffer on port %u\n",
 				 portid);
 
+		rte_eth_dev_set_supported_ptypes(portid, RTE_PTYPE_UNKNOWN,
+						 NULL, 0);
 		/* Start device */
 		ret = rte_eth_dev_start(portid);
 		if (ret < 0)
diff --git a/examples/l2fwd-keepalive/meson.build b/examples/l2fwd-keepalive/meson.build
index 6f7b007e1..2dffffaaa 100644
--- a/examples/l2fwd-keepalive/meson.build
+++ b/examples/l2fwd-keepalive/meson.build
@@ -8,6 +8,7 @@
 
 ext_deps += cc.find_library('rt')
 deps += 'timer'
+allow_experimental_apis = true
 sources = files(
 	'main.c', 'shm.c'
 )
diff --git a/examples/l2fwd/Makefile b/examples/l2fwd/Makefile
index 230352093..123e6161c 100644
--- a/examples/l2fwd/Makefile
+++ b/examples/l2fwd/Makefile
@@ -51,6 +51,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 include $(RTE_SDK)/mk/rte.extapp.mk
 endif
diff --git a/examples/l2fwd/main.c b/examples/l2fwd/main.c
index 1e2b14297..b7d6ee2ff 100644
--- a/examples/l2fwd/main.c
+++ b/examples/l2fwd/main.c
@@ -694,6 +694,8 @@ main(int argc, char **argv)
 			"Cannot set error callback for tx buffer on port %u\n",
 				 portid);
 
+		rte_eth_dev_set_supported_ptypes(portid, RTE_PTYPE_UNKNOWN,
+						 NULL, 0);
 		/* Start device */
 		ret = rte_eth_dev_start(portid);
 		if (ret < 0)
diff --git a/examples/l2fwd/meson.build b/examples/l2fwd/meson.build
index c34e11e36..2b0a25036 100644
--- a/examples/l2fwd/meson.build
+++ b/examples/l2fwd/meson.build
@@ -6,6 +6,7 @@
 # To build this example as a standalone application with an already-installed
 # DPDK instance, use 'make'
 
+allow_experimental_apis = true
 sources = files(
 	'main.c'
 )
diff --git a/examples/l3fwd-acl/Makefile b/examples/l3fwd-acl/Makefile
index e2c989f71..df590f8e9 100644
--- a/examples/l3fwd-acl/Makefile
+++ b/examples/l3fwd-acl/Makefile
@@ -51,6 +51,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 # workaround for a gcc bug with noreturn attribute
 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603
diff --git a/examples/l3fwd-acl/main.c b/examples/l3fwd-acl/main.c
index 0c44df767..e113b1a4d 100644
--- a/examples/l3fwd-acl/main.c
+++ b/examples/l3fwd-acl/main.c
@@ -2056,6 +2056,8 @@ main(int argc, char **argv)
 		if ((enabled_port_mask & (1 << portid)) == 0)
 			continue;
 
+		rte_eth_dev_set_supported_ptypes(portid, RTE_PTYPE_UNKNOWN,
+						 NULL, 0);
 		/* Start device */
 		ret = rte_eth_dev_start(portid);
 		if (ret < 0)
diff --git a/examples/l3fwd-acl/meson.build b/examples/l3fwd-acl/meson.build
index 7096e00c1..68cebd6ce 100644
--- a/examples/l3fwd-acl/meson.build
+++ b/examples/l3fwd-acl/meson.build
@@ -7,6 +7,7 @@
 # DPDK instance, use 'make'
 
 deps += ['acl', 'lpm', 'hash']
+allow_experimental_apis = true
 sources = files(
 	'main.c'
 )
diff --git a/examples/l3fwd-vf/Makefile b/examples/l3fwd-vf/Makefile
index 7b186a23c..db7f51f2f 100644
--- a/examples/l3fwd-vf/Makefile
+++ b/examples/l3fwd-vf/Makefile
@@ -51,6 +51,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += -O3 $(USER_FLAGS)
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 # workaround for a gcc bug with noreturn attribute
 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603
diff --git a/examples/l3fwd-vf/main.c b/examples/l3fwd-vf/main.c
index 572e74cf5..5bf70f52d 100644
--- a/examples/l3fwd-vf/main.c
+++ b/examples/l3fwd-vf/main.c
@@ -1051,6 +1051,8 @@ main(int argc, char **argv)
 		if ((enabled_port_mask & (1 << portid)) == 0) {
 			continue;
 		}
+		rte_eth_dev_set_supported_ptypes(portid, RTE_PTYPE_UNKNOWN,
+						 NULL, 0);
 		/* Start device */
 		ret = rte_eth_dev_start(portid);
 		if (ret < 0)
diff --git a/examples/l3fwd-vf/meson.build b/examples/l3fwd-vf/meson.build
index 226286e74..00f3c38f4 100644
--- a/examples/l3fwd-vf/meson.build
+++ b/examples/l3fwd-vf/meson.build
@@ -7,6 +7,7 @@
 # DPDK instance, use 'make'
 
 deps += ['lpm', 'hash']
+allow_experimental_apis = true
 sources = files(
 	'main.c'
 )
diff --git a/examples/link_status_interrupt/Makefile b/examples/link_status_interrupt/Makefile
index 97e5a14a8..6ddedd4de 100644
--- a/examples/link_status_interrupt/Makefile
+++ b/examples/link_status_interrupt/Makefile
@@ -51,6 +51,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 include $(RTE_SDK)/mk/rte.extapp.mk
 endif
diff --git a/examples/link_status_interrupt/main.c b/examples/link_status_interrupt/main.c
index 9cd4dc7a6..04da4732b 100644
--- a/examples/link_status_interrupt/main.c
+++ b/examples/link_status_interrupt/main.c
@@ -676,6 +676,8 @@ main(int argc, char **argv)
 			rte_exit(EXIT_FAILURE, "Cannot set error callback for "
 					"tx buffer on port %u\n", (unsigned) portid);
 
+		rte_eth_dev_set_supported_ptypes(portid, RTE_PTYPE_UNKNOWN,
+						 NULL, 0);
 		/* Start device */
 		ret = rte_eth_dev_start(portid);
 		if (ret < 0)
diff --git a/examples/link_status_interrupt/meson.build b/examples/link_status_interrupt/meson.build
index c34e11e36..2b0a25036 100644
--- a/examples/link_status_interrupt/meson.build
+++ b/examples/link_status_interrupt/meson.build
@@ -6,6 +6,7 @@
 # To build this example as a standalone application with an already-installed
 # DPDK instance, use 'make'
 
+allow_experimental_apis = true
 sources = files(
 	'main.c'
 )
diff --git a/examples/load_balancer/Makefile b/examples/load_balancer/Makefile
index caae8a107..dcba9194c 100644
--- a/examples/load_balancer/Makefile
+++ b/examples/load_balancer/Makefile
@@ -51,6 +51,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += -O3 -g
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 # workaround for a gcc bug with noreturn attribute
 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603
diff --git a/examples/load_balancer/init.c b/examples/load_balancer/init.c
index 3ab7d0211..d49d61474 100644
--- a/examples/load_balancer/init.c
+++ b/examples/load_balancer/init.c
@@ -496,6 +496,8 @@ app_init_nics(void)
 			}
 		}
 
+		rte_eth_dev_set_supported_ptypes(port, RTE_PTYPE_UNKNOWN,
+						 NULL, 0);
 		/* Start port */
 		ret = rte_eth_dev_start(port);
 		if (ret < 0) {
diff --git a/examples/load_balancer/meson.build b/examples/load_balancer/meson.build
index 4f7ac3999..19708974c 100644
--- a/examples/load_balancer/meson.build
+++ b/examples/load_balancer/meson.build
@@ -7,6 +7,7 @@
 # DPDK instance, use 'make'
 
 deps += 'lpm'
+allow_experimental_apis = true
 sources = files(
 	'config.c', 'init.c', 'main.c', 'runtime.c'
 )
diff --git a/examples/packet_ordering/Makefile b/examples/packet_ordering/Makefile
index 51acaf7eb..9ba3fa9e8 100644
--- a/examples/packet_ordering/Makefile
+++ b/examples/packet_ordering/Makefile
@@ -51,6 +51,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 include $(RTE_SDK)/mk/rte.extapp.mk
 endif
diff --git a/examples/packet_ordering/main.c b/examples/packet_ordering/main.c
index 030e92299..59354fad5 100644
--- a/examples/packet_ordering/main.c
+++ b/examples/packet_ordering/main.c
@@ -312,6 +312,7 @@ configure_eth_port(uint16_t port_id)
 			return ret;
 	}
 
+	rte_eth_dev_set_supported_ptypes(port_id, RTE_PTYPE_UNKNOWN, NULL, 0);
 	ret = rte_eth_dev_start(port_id);
 	if (ret < 0)
 		return ret;
diff --git a/examples/packet_ordering/meson.build b/examples/packet_ordering/meson.build
index 6c2fccdcb..a3776946f 100644
--- a/examples/packet_ordering/meson.build
+++ b/examples/packet_ordering/meson.build
@@ -7,6 +7,7 @@
 # DPDK instance, use 'make'
 
 deps += 'reorder'
+allow_experimental_apis = true
 sources = files(
 	'main.c'
 )
diff --git a/examples/ptpclient/Makefile b/examples/ptpclient/Makefile
index 89e2bacbd..f158d96b9 100644
--- a/examples/ptpclient/Makefile
+++ b/examples/ptpclient/Makefile
@@ -50,6 +50,7 @@ RTE_TARGET ?= $(notdir $(abspath $(dir $(firstword $(wildcard $(RTE_SDK)/*/.conf
 include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += -O3
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 CFLAGS += $(WERROR_FLAGS)
 
 # workaround for a gcc bug with noreturn attribute
diff --git a/examples/ptpclient/meson.build b/examples/ptpclient/meson.build
index fa0cbe93c..d4171a218 100644
--- a/examples/ptpclient/meson.build
+++ b/examples/ptpclient/meson.build
@@ -6,6 +6,7 @@
 # To build this example as a standalone application with an already-installed
 # DPDK instance, use 'make'
 
+allow_experimental_apis = true
 sources = files(
 	'ptpclient.c'
 )
diff --git a/examples/ptpclient/ptpclient.c b/examples/ptpclient/ptpclient.c
index 31778fd95..e2cf4b136 100644
--- a/examples/ptpclient/ptpclient.c
+++ b/examples/ptpclient/ptpclient.c
@@ -227,6 +227,7 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool)
 			return retval;
 	}
 
+	rte_eth_dev_set_supported_ptypes(port, RTE_PTYPE_UNKNOWN, NULL, 0);
 	/* Start the Ethernet port. */
 	retval = rte_eth_dev_start(port);
 	if (retval < 0)
diff --git a/examples/qos_meter/Makefile b/examples/qos_meter/Makefile
index e5217cf7c..a1533d08f 100644
--- a/examples/qos_meter/Makefile
+++ b/examples/qos_meter/Makefile
@@ -52,6 +52,7 @@ RTE_TARGET ?= $(notdir $(abspath $(dir $(firstword $(wildcard $(RTE_SDK)/*/.conf
 include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += -O3
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 CFLAGS += $(WERROR_FLAGS)
 
 # workaround for a gcc bug with noreturn attribute
diff --git a/examples/qos_meter/main.c b/examples/qos_meter/main.c
index da7afe8be..ade8e49c3 100644
--- a/examples/qos_meter/main.c
+++ b/examples/qos_meter/main.c
@@ -419,10 +419,12 @@ main(int argc, char **argv)
 
 	rte_eth_tx_buffer_init(tx_buffer, PKT_TX_BURST_MAX);
 
+	rte_eth_dev_set_supported_ptypes(port_rx, RTE_PTYPE_UNKNOWN, NULL, 0);
 	ret = rte_eth_dev_start(port_rx);
 	if (ret < 0)
 		rte_exit(EXIT_FAILURE, "Port %d start error (%d)\n", port_rx, ret);
 
+	rte_eth_dev_set_supported_ptypes(port_tx, RTE_PTYPE_UNKNOWN, NULL, 0);
 	ret = rte_eth_dev_start(port_tx);
 	if (ret < 0)
 		rte_exit(EXIT_FAILURE, "Port %d start error (%d)\n", port_tx, ret);
diff --git a/examples/qos_meter/meson.build b/examples/qos_meter/meson.build
index ef7779f2f..10cd4bc79 100644
--- a/examples/qos_meter/meson.build
+++ b/examples/qos_meter/meson.build
@@ -7,6 +7,7 @@
 # DPDK instance, use 'make'
 
 deps += 'meter'
+allow_experimental_apis = true
 sources = files(
 	'main.c', 'rte_policer.c'
 )
diff --git a/examples/qos_sched/Makefile b/examples/qos_sched/Makefile
index ce2d25371..7d3d3019f 100644
--- a/examples/qos_sched/Makefile
+++ b/examples/qos_sched/Makefile
@@ -58,6 +58,7 @@ else
 
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 include $(RTE_SDK)/mk/rte.extapp.mk
 
diff --git a/examples/qos_sched/init.c b/examples/qos_sched/init.c
index b05206d5a..d165b3dd4 100644
--- a/examples/qos_sched/init.c
+++ b/examples/qos_sched/init.c
@@ -138,6 +138,7 @@ app_init_port(uint16_t portid, struct rte_mempool *mp)
 			 "rte_eth_tx_queue_setup: err=%d, port=%u queue=%d\n",
 			 ret, portid, 0);
 
+	rte_eth_dev_set_supported_ptypes(portid, RTE_PTYPE_UNKNOWN, NULL, 0);
 	/* Start device */
 	ret = rte_eth_dev_start(portid);
 	if (ret < 0)
diff --git a/examples/qos_sched/meson.build b/examples/qos_sched/meson.build
index 289b81ce8..5101652af 100644
--- a/examples/qos_sched/meson.build
+++ b/examples/qos_sched/meson.build
@@ -7,6 +7,7 @@
 # DPDK instance, use 'make'
 
 deps += ['sched', 'cfgfile']
+allow_experimental_apis = true
 sources = files(
 	'app_thread.c', 'args.c', 'cfg_file.c', 'cmdline.c',
 	'init.c', 'main.c', 'stats.c'
diff --git a/examples/quota_watermark/qw/Makefile b/examples/quota_watermark/qw/Makefile
index 3f10f01c3..e06f4482b 100644
--- a/examples/quota_watermark/qw/Makefile
+++ b/examples/quota_watermark/qw/Makefile
@@ -18,5 +18,6 @@ SRCS-y := args.c init.c main.c
 
 CFLAGS += -O3 -DQW_SOFTWARE_FC
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 include $(RTE_SDK)/mk/rte.extapp.mk
diff --git a/examples/quota_watermark/qw/init.c b/examples/quota_watermark/qw/init.c
index 5a0f64f45..4753eb900 100644
--- a/examples/quota_watermark/qw/init.c
+++ b/examples/quota_watermark/qw/init.c
@@ -96,6 +96,7 @@ void configure_eth_port(uint16_t port_id)
 				"Failed to setup hardware flow control on port %u (error %d)\n",
 				(unsigned int) port_id, ret);
 
+	rte_eth_dev_set_supported_ptypes(port_id, RTE_PTYPE_UNKNOWN, NULL, 0);
 	/* Start the port */
 	ret = rte_eth_dev_start(port_id);
 	if (ret < 0)
diff --git a/examples/rxtx_callbacks/main.c b/examples/rxtx_callbacks/main.c
index dbcd9f4fc..8949f0d93 100644
--- a/examples/rxtx_callbacks/main.c
+++ b/examples/rxtx_callbacks/main.c
@@ -152,6 +152,7 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool)
 			return retval;
 	}
 
+	rte_eth_dev_set_supported_ptypes(port, RTE_PTYPE_UNKNOWN, NULL, 0);
 	retval  = rte_eth_dev_start(port);
 	if (retval < 0)
 		return retval;
diff --git a/examples/server_node_efd/server/Makefile b/examples/server_node_efd/server/Makefile
index 4837bd3ea..acbd12ae2 100644
--- a/examples/server_node_efd/server/Makefile
+++ b/examples/server_node_efd/server/Makefile
@@ -25,5 +25,6 @@ INC := $(sort $(wildcard *.h))
 
 CFLAGS += $(WERROR_FLAGS) -O3
 CFLAGS += -I$(SRCDIR)/../shared
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 include $(RTE_SDK)/mk/rte.extapp.mk
diff --git a/examples/server_node_efd/server/init.c b/examples/server_node_efd/server/init.c
index af5a18e28..bbea0c4c9 100644
--- a/examples/server_node_efd/server/init.c
+++ b/examples/server_node_efd/server/init.c
@@ -149,6 +149,7 @@ init_port(uint16_t port_num)
 
 	rte_eth_promiscuous_enable(port_num);
 
+	rte_eth_dev_set_supported_ptypes(port_num, RTE_PTYPE_UNKNOWN, NULL, 0);
 	retval = rte_eth_dev_start(port_num);
 	if (retval < 0)
 		return retval;
diff --git a/examples/skeleton/Makefile b/examples/skeleton/Makefile
index c5ac26029..0037d6b25 100644
--- a/examples/skeleton/Makefile
+++ b/examples/skeleton/Makefile
@@ -50,6 +50,7 @@ RTE_TARGET ?= $(notdir $(abspath $(dir $(firstword $(wildcard $(RTE_SDK)/*/.conf
 include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 # workaround for a gcc bug with noreturn attribute
 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603
diff --git a/examples/skeleton/basicfwd.c b/examples/skeleton/basicfwd.c
index a8a8e98f0..423ce05f8 100644
--- a/examples/skeleton/basicfwd.c
+++ b/examples/skeleton/basicfwd.c
@@ -76,6 +76,7 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool)
 			return retval;
 	}
 
+	rte_eth_dev_set_supported_ptypes(port, RTE_PTYPE_UNKNOWN, NULL, 0);
 	/* Start the Ethernet port. */
 	retval = rte_eth_dev_start(port);
 	if (retval < 0)
diff --git a/examples/skeleton/meson.build b/examples/skeleton/meson.build
index 9bb9ec329..ef46b187e 100644
--- a/examples/skeleton/meson.build
+++ b/examples/skeleton/meson.build
@@ -6,6 +6,7 @@
 # To build this example as a standalone application with an already-installed
 # DPDK instance, use 'make'
 
+allow_experimental_apis = true
 sources = files(
 	'basicfwd.c'
 )
diff --git a/examples/tep_termination/Makefile b/examples/tep_termination/Makefile
index 31165bd92..586838676 100644
--- a/examples/tep_termination/Makefile
+++ b/examples/tep_termination/Makefile
@@ -61,6 +61,7 @@ endif
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
 CFLAGS += -Wno-deprecated-declarations
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 include $(RTE_SDK)/mk/rte.extapp.mk
 endif
diff --git a/examples/tep_termination/meson.build b/examples/tep_termination/meson.build
index f65d68980..f40b1c0b8 100644
--- a/examples/tep_termination/meson.build
+++ b/examples/tep_termination/meson.build
@@ -11,6 +11,7 @@ if not is_linux
 endif
 deps += ['hash', 'vhost']
 cflags += '-Wno-deprecated-declarations'
+allow_experimental_apis = true
 sources = files(
 	'main.c', 'vxlan.c', 'vxlan_setup.c'
 )
diff --git a/examples/tep_termination/vxlan_setup.c b/examples/tep_termination/vxlan_setup.c
index 9a0880002..219d3e215 100644
--- a/examples/tep_termination/vxlan_setup.c
+++ b/examples/tep_termination/vxlan_setup.c
@@ -167,6 +167,7 @@ vxlan_port_init(uint16_t port, struct rte_mempool *mbuf_pool)
 			return retval;
 	}
 
+	rte_eth_dev_set_supported_ptypes(port, RTE_PTYPE_UNKNOWN, NULL, 0);
 	/* Start the device. */
 	retval  = rte_eth_dev_start(port);
 	if (retval < 0)
diff --git a/examples/vhost/Makefile b/examples/vhost/Makefile
index f84b7f017..7722e81c7 100644
--- a/examples/vhost/Makefile
+++ b/examples/vhost/Makefile
@@ -62,6 +62,7 @@ else
 CFLAGS += -DALLOW_EXPERIMENTAL_API
 CFLAGS += -O2 -D_FILE_OFFSET_BITS=64
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 include $(RTE_SDK)/mk/rte.extapp.mk
 
diff --git a/examples/vhost/main.c b/examples/vhost/main.c
index 0961db080..3d9f125e5 100644
--- a/examples/vhost/main.c
+++ b/examples/vhost/main.c
@@ -321,6 +321,7 @@ port_init(uint16_t port)
 		}
 	}
 
+	rte_eth_dev_set_supported_ptypes(port, RTE_PTYPE_UNKNOWN, NULL, 0);
 	/* Start the device. */
 	retval  = rte_eth_dev_start(port);
 	if (retval < 0) {
diff --git a/examples/vm_power_manager/Makefile b/examples/vm_power_manager/Makefile
index 2fdb991d7..65c2ad179 100644
--- a/examples/vm_power_manager/Makefile
+++ b/examples/vm_power_manager/Makefile
@@ -28,6 +28,7 @@ endif
 
 CFLAGS += -O3 -I$(RTE_SDK)/lib/librte_power/
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 LDLIBS += -lvirt
 
diff --git a/examples/vm_power_manager/main.c b/examples/vm_power_manager/main.c
index 54c704610..4cb4ccecf 100644
--- a/examples/vm_power_manager/main.c
+++ b/examples/vm_power_manager/main.c
@@ -99,6 +99,7 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool)
 			return retval;
 	}
 
+	rte_eth_dev_set_supported_ptypes(port, RTE_PTYPE_UNKNOWN, NULL, 0);
 	/* Start the Ethernet port. */
 	retval = rte_eth_dev_start(port);
 	if (retval < 0)
diff --git a/examples/vm_power_manager/meson.build b/examples/vm_power_manager/meson.build
index 20a4a05b3..54e2b584f 100644
--- a/examples/vm_power_manager/meson.build
+++ b/examples/vm_power_manager/meson.build
@@ -25,6 +25,7 @@ if dpdk_conf.has('RTE_LIBRTE_IXGBE_PMD')
 	deps += ['pmd_ixgbe']
 endif
 
+allow_experimental_apis = true
 sources = files(
 	'channel_manager.c', 'channel_monitor.c', 'main.c', 'parse.c', 'power_manager.c', 'vm_power_cli.c'
 )
diff --git a/examples/vmdq/Makefile b/examples/vmdq/Makefile
index 1557ee86b..2168747cc 100644
--- a/examples/vmdq/Makefile
+++ b/examples/vmdq/Makefile
@@ -50,6 +50,7 @@ RTE_TARGET ?= $(notdir $(abspath $(dir $(firstword $(wildcard $(RTE_SDK)/*/.conf
 include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 EXTRA_CFLAGS += -O3
 
diff --git a/examples/vmdq/main.c b/examples/vmdq/main.c
index 7281ffd7f..65431f95e 100644
--- a/examples/vmdq/main.c
+++ b/examples/vmdq/main.c
@@ -258,6 +258,7 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool)
 		}
 	}
 
+	rte_eth_dev_set_supported_ptypes(port, RTE_PTYPE_UNKNOWN, NULL, 0);
 	retval  = rte_eth_dev_start(port);
 	if (retval < 0) {
 		printf("port %d start failed\n", port);
diff --git a/examples/vmdq/meson.build b/examples/vmdq/meson.build
index c34e11e36..2b0a25036 100644
--- a/examples/vmdq/meson.build
+++ b/examples/vmdq/meson.build
@@ -6,6 +6,7 @@
 # To build this example as a standalone application with an already-installed
 # DPDK instance, use 'make'
 
+allow_experimental_apis = true
 sources = files(
 	'main.c'
 )
diff --git a/examples/vmdq_dcb/Makefile b/examples/vmdq_dcb/Makefile
index 391096cfb..ea1574d91 100644
--- a/examples/vmdq_dcb/Makefile
+++ b/examples/vmdq_dcb/Makefile
@@ -50,6 +50,7 @@ RTE_TARGET ?= $(notdir $(abspath $(dir $(firstword $(wildcard $(RTE_SDK)/*/.conf
 include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 # workaround for a gcc bug with noreturn attribute
 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603
diff --git a/examples/vmdq_dcb/main.c b/examples/vmdq_dcb/main.c
index 389000327..44fe63482 100644
--- a/examples/vmdq_dcb/main.c
+++ b/examples/vmdq_dcb/main.c
@@ -313,6 +313,7 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool)
 		}
 	}
 
+	rte_eth_dev_set_supported_ptypes(port, RTE_PTYPE_UNKNOWN, NULL, 0);
 	retval  = rte_eth_dev_start(port);
 	if (retval < 0) {
 		printf("port %d start failed\n", port);
diff --git a/examples/vmdq_dcb/meson.build b/examples/vmdq_dcb/meson.build
index c34e11e36..2b0a25036 100644
--- a/examples/vmdq_dcb/meson.build
+++ b/examples/vmdq_dcb/meson.build
@@ -6,6 +6,7 @@
 # To build this example as a standalone application with an already-installed
 # DPDK instance, use 'make'
 
+allow_experimental_apis = true
 sources = files(
 	'main.c'
 )
-- 
2.17.1


^ permalink raw reply	[flat|nested] 245+ messages in thread

* [dpdk-dev]  [PATCH v5 0/7] ethdev: add new Rx offload flags
  2019-10-01  6:34   ` [dpdk-dev] [PATCH v4 0/7] ethdev: add new Rx offload flags pbhagavatula
                       ` (6 preceding siblings ...)
  2019-10-01  6:34     ` [dpdk-dev] [PATCH v4 7/7] examples: disable Rx packet type parsing pbhagavatula
@ 2019-10-01  6:41     ` pbhagavatula
  2019-10-01  6:41       ` [dpdk-dev] [PATCH v5 1/7] ethdev: add set ptype function pbhagavatula
                         ` (7 more replies)
  7 siblings, 8 replies; 245+ messages in thread
From: pbhagavatula @ 2019-10-01  6:41 UTC (permalink / raw)
  To: arybchenko, jerinj; +Cc: dev, Pavan Nikhilesh

From: Pavan Nikhilesh <pbhagavatula@marvell.com>

Add new Rx offload flags `DEV_RX_OFFLOAD_RSS_HASH` and
`DEV_RX_OFFLOAD_FLOW_MARK`. These flags can be used to
enable/disable PMD writes to rte_mbuf fields `hash.rss` and `hash.fdir.hi`
and also `ol_flags:PKT_RX_RSS` and `ol_flags:PKT_RX_FDIR`.

Add new packet type set function `rte_eth_dev_set_supported_ptypes`,
allows application to inform PMDs about the packet types it is interested
in. Based on ptypes requested by application PMDs can optimize the Rx path.

For example, if a given PMD doesn't support any packet types that the
application is interested in then the application can disable[1] writes to
`mbuf.packet_type` done by the PMD and use a software ptype parser.
     [1] rte_eth_dev_set_supported_ptypes(*port_id*, RTE_PTYPE_UNKNOWN, NULL,
					  0);

v5 Changes:
----------
- Fix typos.

v4 Changes:
----------
- Set the last element in set_ptype array as RTE_PTYPE_UNKNOWN to mark the end
  of array.
- Fix invalid set ptype function call in examples.
- Remove setting rte_eth_dev_set_supported_ptypes to UNKNOWN in l3fwd-power.

v3 Changes:
----------
- Add missing release notes. (Andrew)
- Re-word various descriptions.
- Fix ptype set logic.

v2 Changes:
----------
- Update release notes. (Andrew)
- Redo commit logs. (Andrew)
- Disable ptype parsing for unsupported examples. (Jerin)
- Disable RSS write only in generic mode eventdev_pipeline. (Jerin)
- Modify set_supported_ptypes function to return successfuly set mask
  instead of failure.
- Dropped set_supported_ptypes to drivers by handling in library
  layer, interested PMD can add it in.


Pavan Nikhilesh (7):
  ethdev: add set ptype function
  ethdev: add mbuf RSS update as an offload
  ethdev: add flow action type update as an offload
  drivers/net: update Rx RSS hash offload capabilities
  drivers/net: update Rx flow flag and mark capabilities
  examples/eventdev_pipeline: add new Rx RSS hash offload
  examples: disable Rx packet type parsing

 doc/guides/nics/features.rst                  |  22 +++-
 doc/guides/rel_notes/release_19_11.rst        |  23 ++++
 drivers/net/bnxt/bnxt_ethdev.c                |   4 +-
 drivers/net/cxgbe/cxgbe.h                     |   3 +-
 drivers/net/dpaa/dpaa_ethdev.c                |   3 +-
 drivers/net/dpaa2/dpaa2_ethdev.c              |   3 +-
 drivers/net/e1000/igb_rxtx.c                  |   3 +-
 drivers/net/enic/enic_res.c                   |   4 +-
 drivers/net/fm10k/fm10k_ethdev.c              |   3 +-
 drivers/net/hinic/hinic_pmd_ethdev.c          |   3 +-
 drivers/net/i40e/i40e_ethdev.c                |   4 +-
 drivers/net/iavf/iavf_ethdev.c                |   4 +-
 drivers/net/ice/ice_ethdev.c                  |   4 +-
 drivers/net/ixgbe/ixgbe_rxtx.c                |   4 +-
 drivers/net/liquidio/lio_ethdev.c             |   3 +-
 drivers/net/mlx4/mlx4_rxq.c                   |   3 +-
 drivers/net/mlx5/mlx5_rxq.c                   |   4 +-
 drivers/net/netvsc/hn_rndis.c                 |   3 +-
 drivers/net/nfp/nfp_net.c                     |   3 +-
 drivers/net/octeontx2/otx2_ethdev.c           |   3 +-
 drivers/net/octeontx2/otx2_ethdev.h           |  16 +--
 drivers/net/octeontx2/otx2_flow_parse.c       |   3 +-
 drivers/net/qede/qede_ethdev.c                |   3 +-
 drivers/net/sfc/sfc_ef10_essb_rx.c            |   3 +-
 drivers/net/sfc/sfc_ef10_rx.c                 |   3 +-
 drivers/net/sfc/sfc_rx.c                      |   3 +-
 drivers/net/thunderx/nicvf_ethdev.h           |   3 +-
 drivers/net/vmxnet3/vmxnet3_ethdev.c          |   3 +-
 examples/bbdev_app/main.c                     |   1 +
 examples/bond/main.c                          |   2 +
 examples/distributor/Makefile                 |   1 +
 examples/distributor/main.c                   |   1 +
 examples/distributor/meson.build              |   1 +
 examples/eventdev_pipeline/main.c             | 115 +----------------
 examples/eventdev_pipeline/meson.build        |   1 +
 .../pipeline_worker_generic.c                 | 118 ++++++++++++++++++
 .../eventdev_pipeline/pipeline_worker_tx.c    | 114 +++++++++++++++++
 examples/exception_path/Makefile              |   1 +
 examples/exception_path/main.c                |   1 +
 examples/exception_path/meson.build           |   1 +
 examples/flow_classify/flow_classify.c        |   1 +
 examples/flow_filtering/Makefile              |   1 +
 examples/flow_filtering/main.c                |   1 +
 examples/flow_filtering/meson.build           |   1 +
 examples/ip_pipeline/link.c                   |   1 +
 examples/ip_reassembly/Makefile               |   1 +
 examples/ip_reassembly/main.c                 |   2 +
 examples/ip_reassembly/meson.build            |   1 +
 examples/ipsec-secgw/ipsec-secgw.c            |   2 +
 examples/ipv4_multicast/Makefile              |   1 +
 examples/ipv4_multicast/main.c                |   2 +
 examples/ipv4_multicast/meson.build           |   1 +
 examples/kni/main.c                           |   1 +
 examples/l2fwd-cat/Makefile                   |   1 +
 examples/l2fwd-cat/l2fwd-cat.c                |   1 +
 examples/l2fwd-cat/meson.build                |   1 +
 examples/l2fwd-crypto/main.c                  |   2 +
 examples/l2fwd-jobstats/Makefile              |   1 +
 examples/l2fwd-jobstats/main.c                |   2 +
 examples/l2fwd-jobstats/meson.build           |   1 +
 examples/l2fwd-keepalive/Makefile             |   1 +
 examples/l2fwd-keepalive/main.c               |   2 +
 examples/l2fwd-keepalive/meson.build          |   1 +
 examples/l2fwd/Makefile                       |   1 +
 examples/l2fwd/main.c                         |   2 +
 examples/l2fwd/meson.build                    |   1 +
 examples/l3fwd-acl/Makefile                   |   1 +
 examples/l3fwd-acl/main.c                     |   2 +
 examples/l3fwd-acl/meson.build                |   1 +
 examples/l3fwd-vf/Makefile                    |   1 +
 examples/l3fwd-vf/main.c                      |   2 +
 examples/l3fwd-vf/meson.build                 |   1 +
 examples/link_status_interrupt/Makefile       |   1 +
 examples/link_status_interrupt/main.c         |   2 +
 examples/link_status_interrupt/meson.build    |   1 +
 examples/load_balancer/Makefile               |   1 +
 examples/load_balancer/init.c                 |   2 +
 examples/load_balancer/meson.build            |   1 +
 examples/packet_ordering/Makefile             |   1 +
 examples/packet_ordering/main.c               |   1 +
 examples/packet_ordering/meson.build          |   1 +
 examples/ptpclient/Makefile                   |   1 +
 examples/ptpclient/meson.build                |   1 +
 examples/ptpclient/ptpclient.c                |   1 +
 examples/qos_meter/Makefile                   |   1 +
 examples/qos_meter/main.c                     |   2 +
 examples/qos_meter/meson.build                |   1 +
 examples/qos_sched/Makefile                   |   1 +
 examples/qos_sched/init.c                     |   1 +
 examples/qos_sched/meson.build                |   1 +
 examples/quota_watermark/qw/Makefile          |   1 +
 examples/quota_watermark/qw/init.c            |   1 +
 examples/rxtx_callbacks/main.c                |   1 +
 examples/server_node_efd/server/Makefile      |   1 +
 examples/server_node_efd/server/init.c        |   1 +
 examples/skeleton/Makefile                    |   1 +
 examples/skeleton/basicfwd.c                  |   1 +
 examples/skeleton/meson.build                 |   1 +
 examples/tep_termination/Makefile             |   1 +
 examples/tep_termination/meson.build          |   1 +
 examples/tep_termination/vxlan_setup.c        |   1 +
 examples/vhost/Makefile                       |   1 +
 examples/vhost/main.c                         |   1 +
 examples/vm_power_manager/Makefile            |   1 +
 examples/vm_power_manager/main.c              |   1 +
 examples/vm_power_manager/meson.build         |   1 +
 examples/vmdq/Makefile                        |   1 +
 examples/vmdq/main.c                          |   1 +
 examples/vmdq/meson.build                     |   1 +
 examples/vmdq_dcb/Makefile                    |   1 +
 examples/vmdq_dcb/main.c                      |   1 +
 examples/vmdq_dcb/meson.build                 |   1 +
 lib/librte_ethdev/rte_ethdev.c                |  40 ++++++
 lib/librte_ethdev/rte_ethdev.h                |  31 +++++
 lib/librte_ethdev/rte_ethdev_core.h           |   6 +
 lib/librte_ethdev/rte_ethdev_version.map      |   3 +
 lib/librte_ethdev/rte_flow.h                  |   6 +-
 117 files changed, 521 insertions(+), 149 deletions(-)

--
2.17.1


^ permalink raw reply	[flat|nested] 245+ messages in thread

* [dpdk-dev]  [PATCH v5 1/7] ethdev: add set ptype function
  2019-10-01  6:41     ` [dpdk-dev] [PATCH v5 0/7] ethdev: add new Rx offload flags pbhagavatula
@ 2019-10-01  6:41       ` pbhagavatula
  2019-10-01  6:41       ` [dpdk-dev] [PATCH v5 2/7] ethdev: add mbuf RSS update as an offload pbhagavatula
                         ` (6 subsequent siblings)
  7 siblings, 0 replies; 245+ messages in thread
From: pbhagavatula @ 2019-10-01  6:41 UTC (permalink / raw)
  To: arybchenko, jerinj, John McNamara, Marko Kovacevic,
	Thomas Monjalon, Ferruh Yigit
  Cc: dev, Pavan Nikhilesh

From: Pavan Nikhilesh <pbhagavatula@marvell.com>

Add `rte_eth_dev_set_supported_ptypes` function that will allow the
application to inform the PMD the packet types it is interested in.
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_supported_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_supported_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_supported_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>
---
 doc/guides/nics/features.rst             |  8 +++--
 doc/guides/rel_notes/release_19_11.rst   |  7 +++++
 lib/librte_ethdev/rte_ethdev.c           | 38 ++++++++++++++++++++++++
 lib/librte_ethdev/rte_ethdev.h           | 29 ++++++++++++++++++
 lib/librte_ethdev/rte_ethdev_core.h      |  6 ++++
 lib/librte_ethdev/rte_ethdev_version.map |  3 ++
 6 files changed, 89 insertions(+), 2 deletions(-)

diff --git a/doc/guides/nics/features.rst b/doc/guides/nics/features.rst
index c4e128d2f..1756fa73a 100644
--- a/doc/guides/nics/features.rst
+++ b/doc/guides/nics/features.rst
@@ -583,9 +583,13 @@ 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``,
+  ``dev_supported_ptypes_set``.
+* **[related]    API**: ``rte_eth_dev_get_supported_ptypes()``,
+  ``rte_eth_dev_set_supported_ptypes()``.
+* **[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 27cfbd9e3..7e31b9401 100644
--- a/doc/guides/rel_notes/release_19_11.rst
+++ b/doc/guides/rel_notes/release_19_11.rst
@@ -56,6 +56,13 @@ New Features
      Also, make sure to start the actual text at the margin.
      =========================================================
 
+* **Added ethdev API to set supported packet types**
+
+  *  Added new API ``rte_eth_dev_set_supported_ptypes`` that allows an
+     application to inform PMD about packet types classification the application
+     is interested in
+  *  This scheme will allow PMDs to avoid lookup to internal ptype table on Rx
+     and thereby improve Rx performance if application wishes do so.
 
 Removed Items
 -------------
diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
index 17d183e1f..061de7ac5 100644
--- a/lib/librte_ethdev/rte_ethdev.c
+++ b/lib/librte_ethdev/rte_ethdev.c
@@ -2602,6 +2602,44 @@ rte_eth_dev_get_supported_ptypes(uint16_t port_id, uint32_t ptype_mask,
 	return j;
 }
 
+int
+rte_eth_dev_set_supported_ptypes(uint16_t port_id, uint32_t ptype_mask,
+				 uint32_t *set_ptypes, int num)
+{
+	int i, j;
+	struct rte_eth_dev *dev;
+	const uint32_t *all_ptypes;
+
+	RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
+	dev = &rte_eth_devices[port_id];
+	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_supported_ptypes_get, 0);
+	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_supported_ptypes_set, 0);
+
+	if (ptype_mask == 0)
+		return (*dev->dev_ops->dev_supported_ptypes_set)(dev,
+				ptype_mask);
+
+	all_ptypes = (*dev->dev_ops->dev_supported_ptypes_get)(dev);
+	if (all_ptypes == NULL)
+		return 0;
+
+	for (i = 0, j = 0; set_ptypes && (all_ptypes[i] != RTE_PTYPE_UNKNOWN);
+									++i) {
+		if (ptype_mask & all_ptypes[i]) {
+			if (j < num - 1) {
+				set_ptypes[j] = all_ptypes[i];
+				j++;
+				continue;
+			}
+			break;
+		}
+	}
+
+	set_ptypes[j] = RTE_PTYPE_UNKNOWN;
+
+	return (*dev->dev_ops->dev_supported_ptypes_set)(dev, ptype_mask);
+}
+
 void
 rte_eth_macaddr_get(uint16_t port_id, struct rte_ether_addr *mac_addr)
 {
diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
index d9871782e..06c770055 100644
--- a/lib/librte_ethdev/rte_ethdev.h
+++ b/lib/librte_ethdev/rte_ethdev.h
@@ -2431,6 +2431,35 @@ int rte_eth_dev_fw_version_get(uint16_t port_id,
  */
 int rte_eth_dev_get_supported_ptypes(uint16_t port_id, uint32_t ptype_mask,
 				     uint32_t *ptypes, int num);
+/**
+ * @warning
+ * @b EXPERIMENTAL: this API may change without prior notice.
+ *
+ * Inform Ethernet device of the packet types classification in which
+ * the recipient is interested.
+ *
+ * Application can use this function to set only specific ptypes that it's
+ * interested. This information can be used by the PMD to optimize Rx path.
+ *
+ * @param port_id
+ *   The port identifier of the Ethernet device.
+ * @param ptype_mask
+ *   The ptype family that application is interested in.
+ * @param set_ptypes
+ *   An array pointer to store set packet types, allocated by caller. The
+ *   function marks the end of array with RTE_PTYPE_UNKNOWN.
+ * @param num
+ *   Size of the array pointed by param ptypes.
+ *   Should be rte_eth_dev_get_supported_ptypes() + 1 to accommodate the
+ *   set ptypes.
+ * @return
+ *   - (0) if Success.
+ *   - (-ENODEV) if *port_id* invalid.
+ *   - (-EINVAL) if *ptype_mask* is invalid.
+ */
+__rte_experimental
+int rte_eth_dev_set_supported_ptypes(uint16_t port_id, uint32_t ptype_mask,
+				     uint32_t *set_ptypes, int num);
 
 /**
  * Retrieve the MTU of an Ethernet device.
diff --git a/lib/librte_ethdev/rte_ethdev_core.h b/lib/librte_ethdev/rte_ethdev_core.h
index 2922d5b7c..93bc34480 100644
--- a/lib/librte_ethdev/rte_ethdev_core.h
+++ b/lib/librte_ethdev/rte_ethdev_core.h
@@ -110,6 +110,10 @@ typedef void (*eth_dev_infos_get_t)(struct rte_eth_dev *dev,
 typedef const uint32_t *(*eth_dev_supported_ptypes_get_t)(struct rte_eth_dev *dev);
 /**< @internal Get supported ptypes of an Ethernet device. */
 
+typedef uint32_t (*eth_dev_supported_ptypes_set_t)(struct rte_eth_dev *dev,
+					      uint32_t ptype_mask);
+/**< @internal Inform device about packet types in which the recipient is interested. */
+
 typedef int (*eth_queue_start_t)(struct rte_eth_dev *dev,
 				    uint16_t queue_id);
 /**< @internal Start rx and tx of a queue of an Ethernet device. */
@@ -421,6 +425,8 @@ struct eth_dev_ops {
 	eth_fw_version_get_t       fw_version_get; /**< Get firmware version. */
 	eth_dev_supported_ptypes_get_t dev_supported_ptypes_get;
 	/**< Get packet types supported and identified by device. */
+	eth_dev_supported_ptypes_set_t dev_supported_ptypes_set;
+	/**< Inform device about packet types in which the recipient is interested. */
 
 	vlan_filter_set_t          vlan_filter_set; /**< Filter VLAN Setup. */
 	vlan_tpid_set_t            vlan_tpid_set; /**< Outer/Inner VLAN TPID Setup. */
diff --git a/lib/librte_ethdev/rte_ethdev_version.map b/lib/librte_ethdev/rte_ethdev_version.map
index 6df42a47b..e14745b9c 100644
--- a/lib/librte_ethdev/rte_ethdev_version.map
+++ b/lib/librte_ethdev/rte_ethdev_version.map
@@ -283,4 +283,7 @@ EXPERIMENTAL {
 
 	# added in 19.08
 	rte_eth_read_clock;
+
+	# added in 19.11
+	rte_eth_dev_set_supported_ptypes;
 };
-- 
2.17.1


^ permalink raw reply	[flat|nested] 245+ messages in thread

* [dpdk-dev] [PATCH v5 2/7] ethdev: add mbuf RSS update as an offload
  2019-10-01  6:41     ` [dpdk-dev] [PATCH v5 0/7] ethdev: add new Rx offload flags pbhagavatula
  2019-10-01  6:41       ` [dpdk-dev] [PATCH v5 1/7] ethdev: add set ptype function pbhagavatula
@ 2019-10-01  6:41       ` pbhagavatula
  2019-10-01  6:41       ` [dpdk-dev] [PATCH v5 3/7] ethdev: add flow action type " pbhagavatula
                         ` (5 subsequent siblings)
  7 siblings, 0 replies; 245+ messages in thread
From: pbhagavatula @ 2019-10-01  6:41 UTC (permalink / raw)
  To: arybchenko, jerinj, John McNamara, Marko Kovacevic,
	Thomas Monjalon, Ferruh Yigit
  Cc: dev, Pavan Nikhilesh

From: Pavan Nikhilesh <pbhagavatula@marvell.com>

Add new Rx offload flag `DEV_RX_OFFLOAD_RSS_HASH` which can be used to
enable/disable PMDs write to `rte_mbuf::hash::rss`.
PMDs notify the validity of `rte_mbuf::hash:rss` to the applcation
by enabling `PKT_RX_RSS_HASH ` flag in `rte_mbuf::ol_flags`.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 doc/guides/nics/features.rst           | 2 ++
 doc/guides/rel_notes/release_19_11.rst | 7 +++++++
 lib/librte_ethdev/rte_ethdev.c         | 1 +
 lib/librte_ethdev/rte_ethdev.h         | 1 +
 4 files changed, 11 insertions(+)

diff --git a/doc/guides/nics/features.rst b/doc/guides/nics/features.rst
index 1756fa73a..f7c6d918f 100644
--- a/doc/guides/nics/features.rst
+++ b/doc/guides/nics/features.rst
@@ -274,6 +274,7 @@ Supports RSS hashing on RX.
 
 * **[uses]     user config**: ``dev_conf.rxmode.mq_mode`` = ``ETH_MQ_RX_RSS_FLAG``.
 * **[uses]     user config**: ``dev_conf.rx_adv_conf.rss_conf``.
+* **[uses]     rte_eth_rxconf,rte_eth_rxmode**: ``offloads:DEV_RX_OFFLOAD_RSS_HASH``.
 * **[provides] rte_eth_dev_info**: ``flow_type_rss_offloads``.
 * **[provides] mbuf**: ``mbuf.ol_flags:PKT_RX_RSS_HASH``, ``mbuf.rss``.
 
@@ -286,6 +287,7 @@ Inner RSS
 Supports RX RSS hashing on Inner headers.
 
 * **[uses]    rte_flow_action_rss**: ``level``.
+* **[uses]    rte_eth_rxconf,rte_eth_rxmode**: ``offloads:DEV_RX_OFFLOAD_RSS_HASH``.
 * **[provides] mbuf**: ``mbuf.ol_flags:PKT_RX_RSS_HASH``, ``mbuf.rss``.
 
 
diff --git a/doc/guides/rel_notes/release_19_11.rst b/doc/guides/rel_notes/release_19_11.rst
index 7e31b9401..cff44fe2b 100644
--- a/doc/guides/rel_notes/release_19_11.rst
+++ b/doc/guides/rel_notes/release_19_11.rst
@@ -64,6 +64,13 @@ New Features
   *  This scheme will allow PMDs to avoid lookup to internal ptype table on Rx
      and thereby improve Rx performance if application wishes do so.
 
+* **Added Rx offload flag to enable or disable RSS update**
+
+  *  Added new Rx offload flag `DEV_RX_OFFLOAD_RSS_HASH` which can be used to
+     enable/disable PMDs write to `rte_mbuf::hash::rss`.
+  *  PMDs notify the validity of `rte_mbuf::hash:rss` to the application
+     by enabling `PKT_RX_RSS_HASH ` flag in `rte_mbuf::ol_flags`.
+
 Removed Items
 -------------
 
diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
index 061de7ac5..6df2af6a6 100644
--- a/lib/librte_ethdev/rte_ethdev.c
+++ b/lib/librte_ethdev/rte_ethdev.c
@@ -129,6 +129,7 @@ static const struct {
 	RTE_RX_OFFLOAD_BIT2STR(KEEP_CRC),
 	RTE_RX_OFFLOAD_BIT2STR(SCTP_CKSUM),
 	RTE_RX_OFFLOAD_BIT2STR(OUTER_UDP_CKSUM),
+	RTE_RX_OFFLOAD_BIT2STR(RSS_HASH),
 };
 
 #undef RTE_RX_OFFLOAD_BIT2STR
diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
index 06c770055..69dbce646 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_RSS_HASH		0x00080000
 
 #define DEV_RX_OFFLOAD_CHECKSUM (DEV_RX_OFFLOAD_IPV4_CKSUM | \
 				 DEV_RX_OFFLOAD_UDP_CKSUM | \
-- 
2.17.1


^ permalink raw reply	[flat|nested] 245+ messages in thread

* [dpdk-dev] [PATCH v5 3/7] ethdev: add flow action type update as an offload
  2019-10-01  6:41     ` [dpdk-dev] [PATCH v5 0/7] ethdev: add new Rx offload flags pbhagavatula
  2019-10-01  6:41       ` [dpdk-dev] [PATCH v5 1/7] ethdev: add set ptype function pbhagavatula
  2019-10-01  6:41       ` [dpdk-dev] [PATCH v5 2/7] ethdev: add mbuf RSS update as an offload pbhagavatula
@ 2019-10-01  6:41       ` " pbhagavatula
  2019-10-01  6:41       ` [dpdk-dev] [PATCH v5 4/7] drivers/net: update Rx RSS hash offload capabilities pbhagavatula
                         ` (4 subsequent siblings)
  7 siblings, 0 replies; 245+ messages in thread
From: pbhagavatula @ 2019-10-01  6:41 UTC (permalink / raw)
  To: arybchenko, jerinj, John McNamara, Marko Kovacevic,
	Thomas Monjalon, Ferruh Yigit, Adrien Mazarguil
  Cc: dev, Pavan Nikhilesh

From: Pavan Nikhilesh <pbhagavatula@marvell.com>

Add new Rx offload flag `DEV_RX_OFFLOAD_FLOW_MARK` that can be used to
enable/disable PMDs write to `rte_mbuf::hash::fdir::hi` and
`rte_mbuf::ol_flags` when flow actions `RTE_FLOW_ACTION_MARK` and
`RTE_FLOW_ACTION_FLAG` are enabled.

PMDs notify the validity of `rte_mbuf::hash:fdir::hi` to the applcation
by enabling `PKT_RX_FDIR_ID` flag in `rte_mbuf::ol_flags`.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 doc/guides/nics/features.rst           | 12 ++++++++++++
 doc/guides/rel_notes/release_19_11.rst |  9 +++++++++
 lib/librte_ethdev/rte_ethdev.c         |  1 +
 lib/librte_ethdev/rte_ethdev.h         |  1 +
 lib/librte_ethdev/rte_flow.h           |  6 ++++--
 5 files changed, 27 insertions(+), 2 deletions(-)

diff --git a/doc/guides/nics/features.rst b/doc/guides/nics/features.rst
index f7c6d918f..9737ff7a1 100644
--- a/doc/guides/nics/features.rst
+++ b/doc/guides/nics/features.rst
@@ -594,6 +594,18 @@ Allows application to set ptypes it is interested in.
 * **[provides]   mbuf**: ``mbuf.packet_type``.
 
 
+.. _nic_features_flow_flag_mark:
+
+Flow flag/mark update
+---------------------
+
+Supports flow action type update to ``mbuf.ol_flags`` and ``mbuf.hash.fdir.hi``.
+
+* **[uses]     rte_eth_rxconf,rte_eth_rxmode**: ``offloads:DEV_RX_OFFLOAD_FLOW_MARK``.
+* **[provides] mbuf**: ``mbuf.ol_flags:PKT_RX_FDIR``, ``mbuf.ol_flags:PKT_RX_FDIR_ID;``,
+  ``mbuf.hash.fdir.hi``
+
+
 .. _nic_features_timesync:
 
 Timesync
diff --git a/doc/guides/rel_notes/release_19_11.rst b/doc/guides/rel_notes/release_19_11.rst
index cff44fe2b..d4b3cdad5 100644
--- a/doc/guides/rel_notes/release_19_11.rst
+++ b/doc/guides/rel_notes/release_19_11.rst
@@ -71,6 +71,15 @@ New Features
   *  PMDs notify the validity of `rte_mbuf::hash:rss` to the application
      by enabling `PKT_RX_RSS_HASH ` flag in `rte_mbuf::ol_flags`.
 
+* **Added Rx offload flag to enable or disable flow action type update**
+
+  *  Add new Rx offload flag `DEV_RX_OFFLOAD_FLOW_MARK` that can be used to
+     enable/disable PMDs write to `rte_mbuf::hash::fdir::hi` and
+     `rte_mbuf::ol_flags` when flow actions `RTE_FLOW_ACTION_MARK` and
+     `RTE_FLOW_ACTION_FLAG` are enabled.
+  *  PMDs notify the validity of `rte_mbuf::hash:fdir::hi` to the application
+     by enabling `PKT_RX_FDIR_ID` flag in `rte_mbuf::ol_flags`.
+
 Removed Items
 -------------
 
diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
index 6df2af6a6..2d1c2a2c0 100644
--- a/lib/librte_ethdev/rte_ethdev.c
+++ b/lib/librte_ethdev/rte_ethdev.c
@@ -130,6 +130,7 @@ static const struct {
 	RTE_RX_OFFLOAD_BIT2STR(SCTP_CKSUM),
 	RTE_RX_OFFLOAD_BIT2STR(OUTER_UDP_CKSUM),
 	RTE_RX_OFFLOAD_BIT2STR(RSS_HASH),
+	RTE_RX_OFFLOAD_BIT2STR(FLOW_MARK),
 };
 
 #undef RTE_RX_OFFLOAD_BIT2STR
diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
index 69dbce646..35e22e70c 100644
--- a/lib/librte_ethdev/rte_ethdev.h
+++ b/lib/librte_ethdev/rte_ethdev.h
@@ -1014,6 +1014,7 @@ struct rte_eth_conf {
 #define DEV_RX_OFFLOAD_SCTP_CKSUM	0x00020000
 #define DEV_RX_OFFLOAD_OUTER_UDP_CKSUM  0x00040000
 #define DEV_RX_OFFLOAD_RSS_HASH		0x00080000
+#define DEV_RX_OFFLOAD_FLOW_MARK	0x00100000
 
 #define DEV_RX_OFFLOAD_CHECKSUM (DEV_RX_OFFLOAD_IPV4_CKSUM | \
 				 DEV_RX_OFFLOAD_UDP_CKSUM | \
diff --git a/lib/librte_ethdev/rte_flow.h b/lib/librte_ethdev/rte_flow.h
index 354cb1dd0..5d62686c0 100644
--- a/lib/librte_ethdev/rte_flow.h
+++ b/lib/librte_ethdev/rte_flow.h
@@ -1316,7 +1316,8 @@ enum rte_flow_action_type {
 
 	/**
 	 * Attaches an integer value to packets and sets PKT_RX_FDIR and
-	 * PKT_RX_FDIR_ID mbuf flags.
+	 * PKT_RX_FDIR_ID mbuf flags when
+	 * `rx_mode:offloads:DEV_RX_OFFLOAD_FLOW_MARK` is enabled.
 	 *
 	 * See struct rte_flow_action_mark.
 	 */
@@ -1324,7 +1325,8 @@ enum rte_flow_action_type {
 
 	/**
 	 * Flags packets. Similar to MARK without a specific value; only
-	 * sets the PKT_RX_FDIR mbuf flag.
+	 * sets the PKT_RX_FDIR mbuf flag when
+	 * `rx_mode:offloads:DEV_RX_OFFLOAD_FLOW_MARK` is enabled.
 	 *
 	 * No associated configuration structure.
 	 */
-- 
2.17.1


^ permalink raw reply	[flat|nested] 245+ messages in thread

* [dpdk-dev] [PATCH v5 4/7] drivers/net: update Rx RSS hash offload capabilities
  2019-10-01  6:41     ` [dpdk-dev] [PATCH v5 0/7] ethdev: add new Rx offload flags pbhagavatula
                         ` (2 preceding siblings ...)
  2019-10-01  6:41       ` [dpdk-dev] [PATCH v5 3/7] ethdev: add flow action type " pbhagavatula
@ 2019-10-01  6:41       ` pbhagavatula
  2019-10-01  7:10         ` Andrew Rybchenko
  2019-10-01 11:50         ` Hemant Agrawal
  2019-10-01  6:41       ` [dpdk-dev] [PATCH v5 5/7] drivers/net: update Rx flow flag and mark capabilities pbhagavatula
                         ` (3 subsequent siblings)
  7 siblings, 2 replies; 245+ messages in thread
From: pbhagavatula @ 2019-10-01  6:41 UTC (permalink / raw)
  To: arybchenko, jerinj, Ajit Khaparde, Somnath Kotur,
	Rahul Lakkireddy, Hemant Agrawal, Sachin Saxena, Wenzhuo Lu,
	John Daley, Hyong Youb Kim, Qi Zhang, Xiao Wang, Ziyang Xuan,
	Xiaoyun Wang, Guoyang Zhou, Beilei Xing, Jingjing Wu,
	Qiming Yang, Konstantin Ananyev, Shijith Thotton,
	Srisivasubramanian Srinivasan, Matan Azrad, Shahaf Shuler,
	Viacheslav Ovsiienko, Stephen Hemminger, K. Y. Srinivasan,
	Haiyang Zhang, Alejandro Lucero, Nithin Dabilpuram,
	Kiran Kumar K, Rasesh Mody, Shahed Shaikh, Maciej Czekaj,
	Yong Wang
  Cc: dev, Pavan Nikhilesh

From: Pavan Nikhilesh <pbhagavatula@marvell.com>

Add DEV_RX_OFFLOAD_RSS_HASH flag for all PMDs that support RSS hash
delivery.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
 drivers/net/bnxt/bnxt_ethdev.c       |  3 ++-
 drivers/net/cxgbe/cxgbe.h            |  3 ++-
 drivers/net/dpaa/dpaa_ethdev.c       |  3 ++-
 drivers/net/dpaa2/dpaa2_ethdev.c     |  3 ++-
 drivers/net/e1000/igb_rxtx.c         |  3 ++-
 drivers/net/enic/enic_res.c          |  3 ++-
 drivers/net/fm10k/fm10k_ethdev.c     |  3 ++-
 drivers/net/hinic/hinic_pmd_ethdev.c |  3 ++-
 drivers/net/i40e/i40e_ethdev.c       |  3 ++-
 drivers/net/iavf/iavf_ethdev.c       |  3 ++-
 drivers/net/ice/ice_ethdev.c         |  3 ++-
 drivers/net/ixgbe/ixgbe_rxtx.c       |  3 ++-
 drivers/net/liquidio/lio_ethdev.c    |  3 ++-
 drivers/net/mlx4/mlx4_rxq.c          |  3 ++-
 drivers/net/mlx5/mlx5_rxq.c          |  3 ++-
 drivers/net/netvsc/hn_rndis.c        |  3 ++-
 drivers/net/nfp/nfp_net.c            |  3 ++-
 drivers/net/octeontx2/otx2_ethdev.c  |  3 ++-
 drivers/net/octeontx2/otx2_ethdev.h  | 15 ++++++++-------
 drivers/net/qede/qede_ethdev.c       |  3 ++-
 drivers/net/sfc/sfc_ef10_essb_rx.c   |  2 +-
 drivers/net/sfc/sfc_ef10_rx.c        |  3 ++-
 drivers/net/sfc/sfc_rx.c             |  3 ++-
 drivers/net/thunderx/nicvf_ethdev.h  |  3 ++-
 drivers/net/vmxnet3/vmxnet3_ethdev.c |  3 ++-
 25 files changed, 55 insertions(+), 31 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 6685ee7d9..6c106baf7 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -160,7 +160,8 @@ static const struct rte_pci_id bnxt_pci_id_map[] = {
 				     DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM | \
 				     DEV_RX_OFFLOAD_JUMBO_FRAME | \
 				     DEV_RX_OFFLOAD_KEEP_CRC | \
-				     DEV_RX_OFFLOAD_TCP_LRO)
+				     DEV_RX_OFFLOAD_TCP_LRO | \
+				     DEV_RX_OFFLOAD_RSS_HASH)
 
 static int bnxt_vlan_offload_set_op(struct rte_eth_dev *dev, int mask);
 static void bnxt_print_link_info(struct rte_eth_dev *eth_dev);
diff --git a/drivers/net/cxgbe/cxgbe.h b/drivers/net/cxgbe/cxgbe.h
index 3f97fa58b..22e61a55c 100644
--- a/drivers/net/cxgbe/cxgbe.h
+++ b/drivers/net/cxgbe/cxgbe.h
@@ -47,7 +47,8 @@
 			   DEV_RX_OFFLOAD_UDP_CKSUM | \
 			   DEV_RX_OFFLOAD_TCP_CKSUM | \
 			   DEV_RX_OFFLOAD_JUMBO_FRAME | \
-			   DEV_RX_OFFLOAD_SCATTER)
+			   DEV_RX_OFFLOAD_SCATTER | \
+			   DEV_RX_OFFLOAD_RSS_HASH)
 
 
 #define CXGBE_DEVARG_KEEP_OVLAN "keep_ovlan"
diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
index 7154fb9b4..18c7bd0d5 100644
--- a/drivers/net/dpaa/dpaa_ethdev.c
+++ b/drivers/net/dpaa/dpaa_ethdev.c
@@ -49,7 +49,8 @@
 /* Supported Rx offloads */
 static uint64_t dev_rx_offloads_sup =
 		DEV_RX_OFFLOAD_JUMBO_FRAME |
-		DEV_RX_OFFLOAD_SCATTER;
+		DEV_RX_OFFLOAD_SCATTER |
+		DEV_RX_OFFLOAD_RSS_HASH;
 
 /* Rx offloads which cannot be disabled */
 static uint64_t dev_rx_offloads_nodis =
diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c
index dd6a78f9f..55a1c4455 100644
--- a/drivers/net/dpaa2/dpaa2_ethdev.c
+++ b/drivers/net/dpaa2/dpaa2_ethdev.c
@@ -38,7 +38,8 @@ static uint64_t dev_rx_offloads_sup =
 		DEV_RX_OFFLOAD_TCP_CKSUM |
 		DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM |
 		DEV_RX_OFFLOAD_VLAN_FILTER |
-		DEV_RX_OFFLOAD_JUMBO_FRAME;
+		DEV_RX_OFFLOAD_JUMBO_FRAME |
+		DEV_RX_OFFLOAD_RSS_HASH;
 
 /* Rx offloads which cannot be disabled */
 static uint64_t dev_rx_offloads_nodis =
diff --git a/drivers/net/e1000/igb_rxtx.c b/drivers/net/e1000/igb_rxtx.c
index c5606de5d..684fa4ad8 100644
--- a/drivers/net/e1000/igb_rxtx.c
+++ b/drivers/net/e1000/igb_rxtx.c
@@ -1646,7 +1646,8 @@ igb_get_rx_port_offloads_capa(struct rte_eth_dev *dev)
 			  DEV_RX_OFFLOAD_TCP_CKSUM   |
 			  DEV_RX_OFFLOAD_JUMBO_FRAME |
 			  DEV_RX_OFFLOAD_KEEP_CRC    |
-			  DEV_RX_OFFLOAD_SCATTER;
+			  DEV_RX_OFFLOAD_SCATTER     |
+			  DEV_RX_OFFLOAD_RSS_HASH;
 
 	return rx_offload_capa;
 }
diff --git a/drivers/net/enic/enic_res.c b/drivers/net/enic/enic_res.c
index 9405e1933..607a085f8 100644
--- a/drivers/net/enic/enic_res.c
+++ b/drivers/net/enic/enic_res.c
@@ -198,7 +198,8 @@ int enic_get_vnic_config(struct enic *enic)
 		DEV_RX_OFFLOAD_VLAN_STRIP |
 		DEV_RX_OFFLOAD_IPV4_CKSUM |
 		DEV_RX_OFFLOAD_UDP_CKSUM |
-		DEV_RX_OFFLOAD_TCP_CKSUM;
+		DEV_RX_OFFLOAD_TCP_CKSUM |
+		DEV_RX_OFFLOAD_RSS_HASH;
 	enic->tx_offload_mask =
 		PKT_TX_IPV6 |
 		PKT_TX_IPV4 |
diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c
index db4d72129..ba9b174cf 100644
--- a/drivers/net/fm10k/fm10k_ethdev.c
+++ b/drivers/net/fm10k/fm10k_ethdev.c
@@ -1797,7 +1797,8 @@ static uint64_t fm10k_get_rx_port_offloads_capa(struct rte_eth_dev *dev)
 			   DEV_RX_OFFLOAD_UDP_CKSUM   |
 			   DEV_RX_OFFLOAD_TCP_CKSUM   |
 			   DEV_RX_OFFLOAD_JUMBO_FRAME |
-			   DEV_RX_OFFLOAD_HEADER_SPLIT);
+			   DEV_RX_OFFLOAD_HEADER_SPLIT |
+			   DEV_RX_OFFLOAD_RSS_HASH);
 }
 
 static int
diff --git a/drivers/net/hinic/hinic_pmd_ethdev.c b/drivers/net/hinic/hinic_pmd_ethdev.c
index 044af9053..53bd2b9ae 100644
--- a/drivers/net/hinic/hinic_pmd_ethdev.c
+++ b/drivers/net/hinic/hinic_pmd_ethdev.c
@@ -680,7 +680,8 @@ hinic_dev_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *info)
 	info->rx_offload_capa = DEV_RX_OFFLOAD_VLAN_STRIP |
 				DEV_RX_OFFLOAD_IPV4_CKSUM |
 				DEV_RX_OFFLOAD_UDP_CKSUM |
-				DEV_RX_OFFLOAD_TCP_CKSUM;
+				DEV_RX_OFFLOAD_TCP_CKSUM |
+				DEV_RX_OFFLOAD_RSS_HASH;
 
 	info->tx_queue_offload_capa = 0;
 	info->tx_offload_capa = DEV_TX_OFFLOAD_VLAN_INSERT |
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 4e40b7ab5..7058e0213 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -3511,7 +3511,8 @@ i40e_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 		DEV_RX_OFFLOAD_SCATTER |
 		DEV_RX_OFFLOAD_VLAN_EXTEND |
 		DEV_RX_OFFLOAD_VLAN_FILTER |
-		DEV_RX_OFFLOAD_JUMBO_FRAME;
+		DEV_RX_OFFLOAD_JUMBO_FRAME |
+		DEV_RX_OFFLOAD_RSS_HASH;
 
 	dev_info->tx_queue_offload_capa = DEV_TX_OFFLOAD_MBUF_FAST_FREE;
 	dev_info->tx_offload_capa =
diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index 8f3907378..aef91a79b 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -517,7 +517,8 @@ iavf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 		DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM |
 		DEV_RX_OFFLOAD_SCATTER |
 		DEV_RX_OFFLOAD_JUMBO_FRAME |
-		DEV_RX_OFFLOAD_VLAN_FILTER;
+		DEV_RX_OFFLOAD_VLAN_FILTER |
+		DEV_RX_OFFLOAD_RSS_HASH;
 	dev_info->tx_offload_capa =
 		DEV_TX_OFFLOAD_VLAN_INSERT |
 		DEV_TX_OFFLOAD_QINQ_INSERT |
diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index 63997fdfb..2e2a6b2af 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -2145,7 +2145,8 @@ ice_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 			DEV_RX_OFFLOAD_TCP_CKSUM |
 			DEV_RX_OFFLOAD_QINQ_STRIP |
 			DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM |
-			DEV_RX_OFFLOAD_VLAN_EXTEND;
+			DEV_RX_OFFLOAD_VLAN_EXTEND |
+			DEV_RX_OFFLOAD_RSS_HASH;
 		dev_info->tx_offload_capa |=
 			DEV_TX_OFFLOAD_QINQ_INSERT |
 			DEV_TX_OFFLOAD_IPV4_CKSUM |
diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c
index edcfa60ce..fa572d184 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx.c
@@ -2872,7 +2872,8 @@ ixgbe_get_rx_port_offloads(struct rte_eth_dev *dev)
 		   DEV_RX_OFFLOAD_KEEP_CRC    |
 		   DEV_RX_OFFLOAD_JUMBO_FRAME |
 		   DEV_RX_OFFLOAD_VLAN_FILTER |
-		   DEV_RX_OFFLOAD_SCATTER;
+		   DEV_RX_OFFLOAD_SCATTER |
+		   DEV_RX_OFFLOAD_RSS_HASH;
 
 	if (hw->mac.type == ixgbe_mac_82598EB)
 		offloads |= DEV_RX_OFFLOAD_VLAN_STRIP;
diff --git a/drivers/net/liquidio/lio_ethdev.c b/drivers/net/liquidio/lio_ethdev.c
index c25dab00c..ff118586e 100644
--- a/drivers/net/liquidio/lio_ethdev.c
+++ b/drivers/net/liquidio/lio_ethdev.c
@@ -406,7 +406,8 @@ lio_dev_info_get(struct rte_eth_dev *eth_dev,
 	devinfo->rx_offload_capa = (DEV_RX_OFFLOAD_IPV4_CKSUM		|
 				    DEV_RX_OFFLOAD_UDP_CKSUM		|
 				    DEV_RX_OFFLOAD_TCP_CKSUM		|
-				    DEV_RX_OFFLOAD_VLAN_STRIP);
+				    DEV_RX_OFFLOAD_VLAN_STRIP		|
+				    DEV_RX_OFFLOAD_RSS_HASH);
 	devinfo->tx_offload_capa = (DEV_TX_OFFLOAD_IPV4_CKSUM		|
 				    DEV_TX_OFFLOAD_UDP_CKSUM		|
 				    DEV_TX_OFFLOAD_TCP_CKSUM		|
diff --git a/drivers/net/mlx4/mlx4_rxq.c b/drivers/net/mlx4/mlx4_rxq.c
index f45c1ff85..4a6fbd922 100644
--- a/drivers/net/mlx4/mlx4_rxq.c
+++ b/drivers/net/mlx4/mlx4_rxq.c
@@ -685,7 +685,8 @@ mlx4_get_rx_queue_offloads(struct mlx4_priv *priv)
 {
 	uint64_t offloads = DEV_RX_OFFLOAD_SCATTER |
 			    DEV_RX_OFFLOAD_KEEP_CRC |
-			    DEV_RX_OFFLOAD_JUMBO_FRAME;
+			    DEV_RX_OFFLOAD_JUMBO_FRAME |
+			    DEV_RX_OFFLOAD_RSS_HASH;
 
 	if (priv->hw_csum)
 		offloads |= DEV_RX_OFFLOAD_CHECKSUM;
diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
index a1fdeef2a..b5fd57693 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -368,7 +368,8 @@ mlx5_get_rx_queue_offloads(struct rte_eth_dev *dev)
 	struct mlx5_dev_config *config = &priv->config;
 	uint64_t offloads = (DEV_RX_OFFLOAD_SCATTER |
 			     DEV_RX_OFFLOAD_TIMESTAMP |
-			     DEV_RX_OFFLOAD_JUMBO_FRAME);
+			     DEV_RX_OFFLOAD_JUMBO_FRAME |
+			     DEV_RX_OFFLOAD_RSS_HASH);
 
 	if (config->hw_fcs_strip)
 		offloads |= DEV_RX_OFFLOAD_KEEP_CRC;
diff --git a/drivers/net/netvsc/hn_rndis.c b/drivers/net/netvsc/hn_rndis.c
index a67bc7a79..2b4714042 100644
--- a/drivers/net/netvsc/hn_rndis.c
+++ b/drivers/net/netvsc/hn_rndis.c
@@ -897,7 +897,8 @@ int hn_rndis_get_offload(struct hn_data *hv,
 	    == HN_NDIS_LSOV2_CAP_IP6)
 		dev_info->tx_offload_capa |= DEV_TX_OFFLOAD_TCP_TSO;
 
-	dev_info->rx_offload_capa = DEV_RX_OFFLOAD_VLAN_STRIP;
+	dev_info->rx_offload_capa = DEV_RX_OFFLOAD_VLAN_STRIP |
+				    DEV_RX_OFFLOAD_RSS_HASH;
 
 	if (hwcaps.ndis_csum.ndis_ip4_rxcsum & NDIS_RXCSUM_CAP_IP4)
 		dev_info->rx_offload_capa |= DEV_RX_OFFLOAD_IPV4_CKSUM;
diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
index f1a3ef2f9..230d64c8a 100644
--- a/drivers/net/nfp/nfp_net.c
+++ b/drivers/net/nfp/nfp_net.c
@@ -1226,7 +1226,8 @@ nfp_net_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 					     DEV_RX_OFFLOAD_UDP_CKSUM |
 					     DEV_RX_OFFLOAD_TCP_CKSUM;
 
-	dev_info->rx_offload_capa |= DEV_RX_OFFLOAD_JUMBO_FRAME;
+	dev_info->rx_offload_capa |= DEV_RX_OFFLOAD_JUMBO_FRAME |
+				     DEV_RX_OFFLOAD_RSS_HASH;
 
 	if (hw->cap & NFP_NET_CFG_CTRL_TXVLAN)
 		dev_info->tx_offload_capa = DEV_TX_OFFLOAD_VLAN_INSERT;
diff --git a/drivers/net/octeontx2/otx2_ethdev.c b/drivers/net/octeontx2/otx2_ethdev.c
index b84128fef..2e88d1844 100644
--- a/drivers/net/octeontx2/otx2_ethdev.c
+++ b/drivers/net/octeontx2/otx2_ethdev.c
@@ -569,7 +569,8 @@ nix_rx_offload_flags(struct rte_eth_dev *eth_dev)
 	struct rte_eth_rxmode *rxmode = &conf->rxmode;
 	uint16_t flags = 0;
 
-	if (rxmode->mq_mode == ETH_MQ_RX_RSS)
+	if (rxmode->mq_mode == ETH_MQ_RX_RSS &&
+			(dev->rx_offloads & DEV_RX_OFFLOAD_RSS_HASH))
 		flags |= NIX_RX_OFFLOAD_RSS_F;
 
 	if (dev->rx_offloads & (DEV_RX_OFFLOAD_TCP_CKSUM |
diff --git a/drivers/net/octeontx2/otx2_ethdev.h b/drivers/net/octeontx2/otx2_ethdev.h
index 7b15d6bc8..0cca6746d 100644
--- a/drivers/net/octeontx2/otx2_ethdev.h
+++ b/drivers/net/octeontx2/otx2_ethdev.h
@@ -122,8 +122,8 @@
 	DEV_TX_OFFLOAD_MT_LOCKFREE	| \
 	DEV_TX_OFFLOAD_VLAN_INSERT	| \
 	DEV_TX_OFFLOAD_QINQ_INSERT	| \
-	DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM | \
-	DEV_TX_OFFLOAD_OUTER_UDP_CKSUM  | \
+	DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM	| \
+	DEV_TX_OFFLOAD_OUTER_UDP_CKSUM	| \
 	DEV_TX_OFFLOAD_TCP_CKSUM	| \
 	DEV_TX_OFFLOAD_UDP_CKSUM	| \
 	DEV_TX_OFFLOAD_SCTP_CKSUM	| \
@@ -136,11 +136,12 @@
 	DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM | \
 	DEV_RX_OFFLOAD_SCATTER		| \
 	DEV_RX_OFFLOAD_JUMBO_FRAME	| \
-	DEV_RX_OFFLOAD_OUTER_UDP_CKSUM | \
-	DEV_RX_OFFLOAD_VLAN_STRIP | \
-	DEV_RX_OFFLOAD_VLAN_FILTER | \
-	DEV_RX_OFFLOAD_QINQ_STRIP | \
-	DEV_RX_OFFLOAD_TIMESTAMP)
+	DEV_RX_OFFLOAD_OUTER_UDP_CKSUM	| \
+	DEV_RX_OFFLOAD_VLAN_STRIP	| \
+	DEV_RX_OFFLOAD_VLAN_FILTER	| \
+	DEV_RX_OFFLOAD_QINQ_STRIP	| \
+	DEV_RX_OFFLOAD_TIMESTAMP	| \
+	DEV_RX_OFFLOAD_RSS_HASH)
 
 #define NIX_DEFAULT_RSS_CTX_GROUP  0
 #define NIX_DEFAULT_RSS_MCAM_IDX  -1
diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index 528b33e8c..da25b26df 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -1291,7 +1291,8 @@ qede_dev_info_get(struct rte_eth_dev *eth_dev,
 				     DEV_RX_OFFLOAD_SCATTER	|
 				     DEV_RX_OFFLOAD_JUMBO_FRAME |
 				     DEV_RX_OFFLOAD_VLAN_FILTER |
-				     DEV_RX_OFFLOAD_VLAN_STRIP);
+				     DEV_RX_OFFLOAD_VLAN_STRIP  |
+				     DEV_RX_OFFLOAD_RSS_HASH);
 	dev_info->rx_queue_offload_capa = 0;
 
 	/* TX offloads are on a per-packet basis, so it is applicable
diff --git a/drivers/net/sfc/sfc_ef10_essb_rx.c b/drivers/net/sfc/sfc_ef10_essb_rx.c
index 63da807ea..220ef0e47 100644
--- a/drivers/net/sfc/sfc_ef10_essb_rx.c
+++ b/drivers/net/sfc/sfc_ef10_essb_rx.c
@@ -716,7 +716,7 @@ struct sfc_dp_rx sfc_ef10_essb_rx = {
 	.features		= SFC_DP_RX_FEAT_FLOW_FLAG |
 				  SFC_DP_RX_FEAT_FLOW_MARK,
 	.dev_offload_capa	= DEV_RX_OFFLOAD_CHECKSUM,
-	.queue_offload_capa	= 0,
+	.queue_offload_capa	= DEV_RX_OFFLOAD_RSS_HASH,
 	.get_dev_info		= sfc_ef10_essb_rx_get_dev_info,
 	.pool_ops_supported	= sfc_ef10_essb_rx_pool_ops_supported,
 	.qsize_up_rings		= sfc_ef10_essb_rx_qsize_up_rings,
diff --git a/drivers/net/sfc/sfc_ef10_rx.c b/drivers/net/sfc/sfc_ef10_rx.c
index f2fc6e70a..85b5df466 100644
--- a/drivers/net/sfc/sfc_ef10_rx.c
+++ b/drivers/net/sfc/sfc_ef10_rx.c
@@ -797,7 +797,8 @@ struct sfc_dp_rx sfc_ef10_rx = {
 				  SFC_DP_RX_FEAT_INTR,
 	.dev_offload_capa	= DEV_RX_OFFLOAD_CHECKSUM |
 				  DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM,
-	.queue_offload_capa	= DEV_RX_OFFLOAD_SCATTER,
+	.queue_offload_capa	= DEV_RX_OFFLOAD_SCATTER |
+				  DEV_RX_OFFLOAD_RSS_HASH,
 	.get_dev_info		= sfc_ef10_rx_get_dev_info,
 	.qsize_up_rings		= sfc_ef10_rx_qsize_up_rings,
 	.qcreate		= sfc_ef10_rx_qcreate,
diff --git a/drivers/net/sfc/sfc_rx.c b/drivers/net/sfc/sfc_rx.c
index e6809bb64..695580b22 100644
--- a/drivers/net/sfc/sfc_rx.c
+++ b/drivers/net/sfc/sfc_rx.c
@@ -618,7 +618,8 @@ struct sfc_dp_rx sfc_efx_rx = {
 	},
 	.features		= SFC_DP_RX_FEAT_INTR,
 	.dev_offload_capa	= DEV_RX_OFFLOAD_CHECKSUM,
-	.queue_offload_capa	= DEV_RX_OFFLOAD_SCATTER,
+	.queue_offload_capa	= DEV_RX_OFFLOAD_SCATTER |
+				  DEV_RX_OFFLOAD_RSS_HASH,
 	.qsize_up_rings		= sfc_efx_rx_qsize_up_rings,
 	.qcreate		= sfc_efx_rx_qcreate,
 	.qdestroy		= sfc_efx_rx_qdestroy,
diff --git a/drivers/net/thunderx/nicvf_ethdev.h b/drivers/net/thunderx/nicvf_ethdev.h
index c0bfbf848..391411799 100644
--- a/drivers/net/thunderx/nicvf_ethdev.h
+++ b/drivers/net/thunderx/nicvf_ethdev.h
@@ -41,7 +41,8 @@
 	DEV_RX_OFFLOAD_CHECKSUM    | \
 	DEV_RX_OFFLOAD_VLAN_STRIP  | \
 	DEV_RX_OFFLOAD_JUMBO_FRAME | \
-	DEV_RX_OFFLOAD_SCATTER)
+	DEV_RX_OFFLOAD_SCATTER     | \
+	DEV_RX_OFFLOAD_RSS_HASH)
 
 #define NICVF_DEFAULT_RX_FREE_THRESH    224
 #define NICVF_DEFAULT_TX_FREE_THRESH    224
diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c
index 9cd5eb65b..da768ced7 100644
--- a/drivers/net/vmxnet3/vmxnet3_ethdev.c
+++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c
@@ -56,7 +56,8 @@
 	 DEV_RX_OFFLOAD_UDP_CKSUM |	\
 	 DEV_RX_OFFLOAD_TCP_CKSUM |	\
 	 DEV_RX_OFFLOAD_TCP_LRO |	\
-	 DEV_RX_OFFLOAD_JUMBO_FRAME)
+	 DEV_RX_OFFLOAD_JUMBO_FRAME |   \
+	 DEV_RX_OFFLOAD_RSS_HASH)
 
 static int eth_vmxnet3_dev_init(struct rte_eth_dev *eth_dev);
 static int eth_vmxnet3_dev_uninit(struct rte_eth_dev *eth_dev);
-- 
2.17.1


^ permalink raw reply	[flat|nested] 245+ messages in thread

* [dpdk-dev] [PATCH v5 5/7] drivers/net: update Rx flow flag and mark capabilities
  2019-10-01  6:41     ` [dpdk-dev] [PATCH v5 0/7] ethdev: add new Rx offload flags pbhagavatula
                         ` (3 preceding siblings ...)
  2019-10-01  6:41       ` [dpdk-dev] [PATCH v5 4/7] drivers/net: update Rx RSS hash offload capabilities pbhagavatula
@ 2019-10-01  6:41       ` pbhagavatula
  2019-10-01  7:11         ` Andrew Rybchenko
  2019-10-01  6:41       ` [dpdk-dev] [PATCH v5 6/7] examples/eventdev_pipeline: add new Rx RSS hash offload pbhagavatula
                         ` (2 subsequent siblings)
  7 siblings, 1 reply; 245+ messages in thread
From: pbhagavatula @ 2019-10-01  6:41 UTC (permalink / raw)
  To: arybchenko, jerinj, Ajit Khaparde, Somnath Kotur, John Daley,
	Hyong Youb Kim, Beilei Xing, Qi Zhang, Jingjing Wu, Wenzhuo Lu,
	Qiming Yang, Konstantin Ananyev, Matan Azrad, Shahaf Shuler,
	Viacheslav Ovsiienko, Nithin Dabilpuram, Kiran Kumar K
  Cc: dev, Pavan Nikhilesh

From: Pavan Nikhilesh <pbhagavatula@marvell.com>

Add DEV_RX_OFFLOAD_FLOW_MARK flag for all PMDs that support flow action
flag and mark.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
 drivers/net/bnxt/bnxt_ethdev.c          | 3 ++-
 drivers/net/enic/enic_res.c             | 3 ++-
 drivers/net/i40e/i40e_ethdev.c          | 3 ++-
 drivers/net/iavf/iavf_ethdev.c          | 3 ++-
 drivers/net/ice/ice_ethdev.c            | 3 ++-
 drivers/net/ixgbe/ixgbe_rxtx.c          | 3 ++-
 drivers/net/mlx5/mlx5_rxq.c             | 3 ++-
 drivers/net/octeontx2/otx2_ethdev.h     | 3 ++-
 drivers/net/octeontx2/otx2_flow_parse.c | 3 ++-
 drivers/net/sfc/sfc_ef10_essb_rx.c      | 3 ++-
 10 files changed, 20 insertions(+), 10 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 6c106baf7..fd1fb7eda 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -161,7 +161,8 @@ static const struct rte_pci_id bnxt_pci_id_map[] = {
 				     DEV_RX_OFFLOAD_JUMBO_FRAME | \
 				     DEV_RX_OFFLOAD_KEEP_CRC | \
 				     DEV_RX_OFFLOAD_TCP_LRO | \
-				     DEV_RX_OFFLOAD_RSS_HASH)
+				     DEV_RX_OFFLOAD_RSS_HASH | \
+				     DEV_RX_OFFLOAD_FLOW_MARK)
 
 static int bnxt_vlan_offload_set_op(struct rte_eth_dev *dev, int mask);
 static void bnxt_print_link_info(struct rte_eth_dev *eth_dev);
diff --git a/drivers/net/enic/enic_res.c b/drivers/net/enic/enic_res.c
index 607a085f8..3503d5d7e 100644
--- a/drivers/net/enic/enic_res.c
+++ b/drivers/net/enic/enic_res.c
@@ -199,7 +199,8 @@ int enic_get_vnic_config(struct enic *enic)
 		DEV_RX_OFFLOAD_IPV4_CKSUM |
 		DEV_RX_OFFLOAD_UDP_CKSUM |
 		DEV_RX_OFFLOAD_TCP_CKSUM |
-		DEV_RX_OFFLOAD_RSS_HASH;
+		DEV_RX_OFFLOAD_RSS_HASH |
+		DEV_RX_OFFLOAD_FLOW_MARK;
 	enic->tx_offload_mask =
 		PKT_TX_IPV6 |
 		PKT_TX_IPV4 |
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 7058e0213..6311943be 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -3512,7 +3512,8 @@ i40e_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 		DEV_RX_OFFLOAD_VLAN_EXTEND |
 		DEV_RX_OFFLOAD_VLAN_FILTER |
 		DEV_RX_OFFLOAD_JUMBO_FRAME |
-		DEV_RX_OFFLOAD_RSS_HASH;
+		DEV_RX_OFFLOAD_RSS_HASH |
+		DEV_RX_OFFLOAD_FLOW_MARK;
 
 	dev_info->tx_queue_offload_capa = DEV_TX_OFFLOAD_MBUF_FAST_FREE;
 	dev_info->tx_offload_capa =
diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index aef91a79b..7bdaa87b1 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -518,7 +518,8 @@ iavf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 		DEV_RX_OFFLOAD_SCATTER |
 		DEV_RX_OFFLOAD_JUMBO_FRAME |
 		DEV_RX_OFFLOAD_VLAN_FILTER |
-		DEV_RX_OFFLOAD_RSS_HASH;
+		DEV_RX_OFFLOAD_RSS_HASH |
+		DEV_RX_OFFLOAD_FLOW_MARK;
 	dev_info->tx_offload_capa =
 		DEV_TX_OFFLOAD_VLAN_INSERT |
 		DEV_TX_OFFLOAD_QINQ_INSERT |
diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index 2e2a6b2af..984af659f 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -2146,7 +2146,8 @@ ice_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 			DEV_RX_OFFLOAD_QINQ_STRIP |
 			DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM |
 			DEV_RX_OFFLOAD_VLAN_EXTEND |
-			DEV_RX_OFFLOAD_RSS_HASH;
+			DEV_RX_OFFLOAD_RSS_HASH |
+			DEV_RX_OFFLOAD_FLOW_MARK;
 		dev_info->tx_offload_capa |=
 			DEV_TX_OFFLOAD_QINQ_INSERT |
 			DEV_TX_OFFLOAD_IPV4_CKSUM |
diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c
index fa572d184..1481e2426 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx.c
@@ -2873,7 +2873,8 @@ ixgbe_get_rx_port_offloads(struct rte_eth_dev *dev)
 		   DEV_RX_OFFLOAD_JUMBO_FRAME |
 		   DEV_RX_OFFLOAD_VLAN_FILTER |
 		   DEV_RX_OFFLOAD_SCATTER |
-		   DEV_RX_OFFLOAD_RSS_HASH;
+		   DEV_RX_OFFLOAD_RSS_HASH |
+		   DEV_RX_OFFLOAD_FLOW_MARK;
 
 	if (hw->mac.type == ixgbe_mac_82598EB)
 		offloads |= DEV_RX_OFFLOAD_VLAN_STRIP;
diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
index b5fd57693..1bf01bda3 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -369,7 +369,8 @@ mlx5_get_rx_queue_offloads(struct rte_eth_dev *dev)
 	uint64_t offloads = (DEV_RX_OFFLOAD_SCATTER |
 			     DEV_RX_OFFLOAD_TIMESTAMP |
 			     DEV_RX_OFFLOAD_JUMBO_FRAME |
-			     DEV_RX_OFFLOAD_RSS_HASH);
+			     DEV_RX_OFFLOAD_RSS_HASH |
+			     DEV_RX_OFFLOAD_FLOW_MARK);
 
 	if (config->hw_fcs_strip)
 		offloads |= DEV_RX_OFFLOAD_KEEP_CRC;
diff --git a/drivers/net/octeontx2/otx2_ethdev.h b/drivers/net/octeontx2/otx2_ethdev.h
index 0cca6746d..97c1a636a 100644
--- a/drivers/net/octeontx2/otx2_ethdev.h
+++ b/drivers/net/octeontx2/otx2_ethdev.h
@@ -141,7 +141,8 @@
 	DEV_RX_OFFLOAD_VLAN_FILTER	| \
 	DEV_RX_OFFLOAD_QINQ_STRIP	| \
 	DEV_RX_OFFLOAD_TIMESTAMP	| \
-	DEV_RX_OFFLOAD_RSS_HASH)
+	DEV_RX_OFFLOAD_RSS_HASH		| \
+	DEV_RX_OFFLOAD_FLOW_MARK)
 
 #define NIX_DEFAULT_RSS_CTX_GROUP  0
 #define NIX_DEFAULT_RSS_MCAM_IDX  -1
diff --git a/drivers/net/octeontx2/otx2_flow_parse.c b/drivers/net/octeontx2/otx2_flow_parse.c
index 6670c1a70..6eb69a8b2 100644
--- a/drivers/net/octeontx2/otx2_flow_parse.c
+++ b/drivers/net/octeontx2/otx2_flow_parse.c
@@ -979,7 +979,8 @@ otx2_flow_parse_actions(struct rte_eth_dev *dev,
 	if (mark)
 		flow->npc_action |= (uint64_t)mark << 40;
 
-	if (rte_atomic32_read(&npc->mark_actions) == 1) {
+	if (rte_atomic32_read(&npc->mark_actions) == 1 &&
+			(hw->rx_offloads & DEV_RX_OFFLOAD_FLOW_MARK)) {
 		hw->rx_offload_flags |=
 			NIX_RX_OFFLOAD_MARK_UPDATE_F;
 		otx2_eth_set_rx_function(dev);
diff --git a/drivers/net/sfc/sfc_ef10_essb_rx.c b/drivers/net/sfc/sfc_ef10_essb_rx.c
index 220ef0e47..1887731e2 100644
--- a/drivers/net/sfc/sfc_ef10_essb_rx.c
+++ b/drivers/net/sfc/sfc_ef10_essb_rx.c
@@ -716,7 +716,8 @@ struct sfc_dp_rx sfc_ef10_essb_rx = {
 	.features		= SFC_DP_RX_FEAT_FLOW_FLAG |
 				  SFC_DP_RX_FEAT_FLOW_MARK,
 	.dev_offload_capa	= DEV_RX_OFFLOAD_CHECKSUM,
-	.queue_offload_capa	= DEV_RX_OFFLOAD_RSS_HASH,
+	.queue_offload_capa	= DEV_RX_OFFLOAD_RSS_HASH |
+				  DEV_RX_OFFLOAD_FLOW_MARK,
 	.get_dev_info		= sfc_ef10_essb_rx_get_dev_info,
 	.pool_ops_supported	= sfc_ef10_essb_rx_pool_ops_supported,
 	.qsize_up_rings		= sfc_ef10_essb_rx_qsize_up_rings,
-- 
2.17.1


^ permalink raw reply	[flat|nested] 245+ messages in thread

* [dpdk-dev] [PATCH v5 6/7] examples/eventdev_pipeline: add new Rx RSS hash offload
  2019-10-01  6:41     ` [dpdk-dev] [PATCH v5 0/7] ethdev: add new Rx offload flags pbhagavatula
                         ` (4 preceding siblings ...)
  2019-10-01  6:41       ` [dpdk-dev] [PATCH v5 5/7] drivers/net: update Rx flow flag and mark capabilities pbhagavatula
@ 2019-10-01  6:41       ` pbhagavatula
  2019-10-01  6:41       ` [dpdk-dev] [PATCH v5 7/7] examples: disable Rx packet type parsing pbhagavatula
  2019-10-01 18:52       ` [dpdk-dev] [PATCH v6 0/7] ethdev: add new Rx offload flags pbhagavatula
  7 siblings, 0 replies; 245+ messages in thread
From: pbhagavatula @ 2019-10-01  6:41 UTC (permalink / raw)
  To: arybchenko, jerinj, Harry van Haaren; +Cc: dev, Pavan Nikhilesh

From: Pavan Nikhilesh <pbhagavatula@marvell.com>

Since pipeline_generic uses `rte_mbuf::hash::rss` add the new Rx offload
flag `DEV_RX_OFFLOAD_RSS_HASH` to inform PMD to copy the RSS hash result
into the mbuf.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
 examples/eventdev_pipeline/main.c             | 113 -----------------
 .../pipeline_worker_generic.c                 | 118 ++++++++++++++++++
 .../eventdev_pipeline/pipeline_worker_tx.c    | 114 +++++++++++++++++
 3 files changed, 232 insertions(+), 113 deletions(-)

diff --git a/examples/eventdev_pipeline/main.c b/examples/eventdev_pipeline/main.c
index f4e57f541..a73b61d59 100644
--- a/examples/eventdev_pipeline/main.c
+++ b/examples/eventdev_pipeline/main.c
@@ -242,118 +242,6 @@ parse_app_args(int argc, char **argv)
 	}
 }
 
-/*
- * Initializes a given port using global settings and with the RX buffers
- * coming from the mbuf_pool passed as a parameter.
- */
-static inline int
-port_init(uint8_t port, struct rte_mempool *mbuf_pool)
-{
-	struct rte_eth_rxconf rx_conf;
-	static const struct rte_eth_conf port_conf_default = {
-		.rxmode = {
-			.mq_mode = ETH_MQ_RX_RSS,
-			.max_rx_pkt_len = RTE_ETHER_MAX_LEN,
-		},
-		.rx_adv_conf = {
-			.rss_conf = {
-				.rss_hf = ETH_RSS_IP |
-					  ETH_RSS_TCP |
-					  ETH_RSS_UDP,
-			}
-		}
-	};
-	const uint16_t rx_rings = 1, tx_rings = 1;
-	const uint16_t rx_ring_size = 512, tx_ring_size = 512;
-	struct rte_eth_conf port_conf = port_conf_default;
-	int retval;
-	uint16_t q;
-	struct rte_eth_dev_info dev_info;
-	struct rte_eth_txconf txconf;
-
-	if (!rte_eth_dev_is_valid_port(port))
-		return -1;
-
-	rte_eth_dev_info_get(port, &dev_info);
-	if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_MBUF_FAST_FREE)
-		port_conf.txmode.offloads |=
-			DEV_TX_OFFLOAD_MBUF_FAST_FREE;
-	rx_conf = dev_info.default_rxconf;
-	rx_conf.offloads = port_conf.rxmode.offloads;
-
-	port_conf.rx_adv_conf.rss_conf.rss_hf &=
-		dev_info.flow_type_rss_offloads;
-	if (port_conf.rx_adv_conf.rss_conf.rss_hf !=
-			port_conf_default.rx_adv_conf.rss_conf.rss_hf) {
-		printf("Port %u modified RSS hash function based on hardware support,"
-			"requested:%#"PRIx64" configured:%#"PRIx64"\n",
-			port,
-			port_conf_default.rx_adv_conf.rss_conf.rss_hf,
-			port_conf.rx_adv_conf.rss_conf.rss_hf);
-	}
-
-	/* Configure the Ethernet device. */
-	retval = rte_eth_dev_configure(port, rx_rings, tx_rings, &port_conf);
-	if (retval != 0)
-		return retval;
-
-	/* Allocate and set up 1 RX queue per Ethernet port. */
-	for (q = 0; q < rx_rings; q++) {
-		retval = rte_eth_rx_queue_setup(port, q, rx_ring_size,
-				rte_eth_dev_socket_id(port), &rx_conf,
-				mbuf_pool);
-		if (retval < 0)
-			return retval;
-	}
-
-	txconf = dev_info.default_txconf;
-	txconf.offloads = port_conf_default.txmode.offloads;
-	/* Allocate and set up 1 TX queue per Ethernet port. */
-	for (q = 0; q < tx_rings; q++) {
-		retval = rte_eth_tx_queue_setup(port, q, tx_ring_size,
-				rte_eth_dev_socket_id(port), &txconf);
-		if (retval < 0)
-			return retval;
-	}
-
-	/* Display the port MAC address. */
-	struct rte_ether_addr addr;
-	rte_eth_macaddr_get(port, &addr);
-	printf("Port %u MAC: %02" PRIx8 " %02" PRIx8 " %02" PRIx8
-			   " %02" PRIx8 " %02" PRIx8 " %02" PRIx8 "\n",
-			(unsigned int)port,
-			addr.addr_bytes[0], addr.addr_bytes[1],
-			addr.addr_bytes[2], addr.addr_bytes[3],
-			addr.addr_bytes[4], addr.addr_bytes[5]);
-
-	/* Enable RX in promiscuous mode for the Ethernet device. */
-	rte_eth_promiscuous_enable(port);
-
-	return 0;
-}
-
-static int
-init_ports(uint16_t num_ports)
-{
-	uint16_t portid;
-
-	if (!cdata.num_mbuf)
-		cdata.num_mbuf = 16384 * num_ports;
-
-	struct rte_mempool *mp = rte_pktmbuf_pool_create("packet_pool",
-			/* mbufs */ cdata.num_mbuf,
-			/* cache_size */ 512,
-			/* priv_size*/ 0,
-			/* data_room_size */ RTE_MBUF_DEFAULT_BUF_SIZE,
-			rte_socket_id());
-
-	RTE_ETH_FOREACH_DEV(portid)
-		if (port_init(portid, mp) != 0)
-			rte_exit(EXIT_FAILURE, "Cannot init port %"PRIu16 "\n",
-					portid);
-
-	return 0;
-}
 
 static void
 do_capability_setup(uint8_t eventdev_id)
@@ -501,7 +389,6 @@ main(int argc, char **argv)
 	if (dev_id < 0)
 		rte_exit(EXIT_FAILURE, "Error setting up eventdev\n");
 
-	init_ports(num_ports);
 	fdata->cap.adptr_setup(num_ports);
 
 	/* Start the Ethernet port. */
diff --git a/examples/eventdev_pipeline/pipeline_worker_generic.c b/examples/eventdev_pipeline/pipeline_worker_generic.c
index 766c8e958..aa1678fe7 100644
--- a/examples/eventdev_pipeline/pipeline_worker_generic.c
+++ b/examples/eventdev_pipeline/pipeline_worker_generic.c
@@ -271,6 +271,123 @@ setup_eventdev_generic(struct worker_data *worker_data)
 	return dev_id;
 }
 
+/*
+ * Initializes a given port using global settings and with the RX buffers
+ * coming from the mbuf_pool passed as a parameter.
+ */
+static inline int
+port_init(uint8_t port, struct rte_mempool *mbuf_pool)
+{
+	struct rte_eth_rxconf rx_conf;
+	static const struct rte_eth_conf port_conf_default = {
+		.rxmode = {
+			.mq_mode = ETH_MQ_RX_RSS,
+			.max_rx_pkt_len = RTE_ETHER_MAX_LEN,
+		},
+		.rx_adv_conf = {
+			.rss_conf = {
+				.rss_hf = ETH_RSS_IP |
+					  ETH_RSS_TCP |
+					  ETH_RSS_UDP,
+			}
+		}
+	};
+	const uint16_t rx_rings = 1, tx_rings = 1;
+	const uint16_t rx_ring_size = 512, tx_ring_size = 512;
+	struct rte_eth_conf port_conf = port_conf_default;
+	int retval;
+	uint16_t q;
+	struct rte_eth_dev_info dev_info;
+	struct rte_eth_txconf txconf;
+
+	if (!rte_eth_dev_is_valid_port(port))
+		return -1;
+
+	rte_eth_dev_info_get(port, &dev_info);
+	if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_MBUF_FAST_FREE)
+		port_conf.txmode.offloads |=
+			DEV_TX_OFFLOAD_MBUF_FAST_FREE;
+
+	if (dev_info.rx_offload_capa & DEV_RX_OFFLOAD_RSS_HASH)
+		port_conf.rxmode.offloads |= DEV_RX_OFFLOAD_RSS_HASH;
+
+	rx_conf = dev_info.default_rxconf;
+	rx_conf.offloads = port_conf.rxmode.offloads;
+
+	port_conf.rx_adv_conf.rss_conf.rss_hf &=
+		dev_info.flow_type_rss_offloads;
+	if (port_conf.rx_adv_conf.rss_conf.rss_hf !=
+			port_conf_default.rx_adv_conf.rss_conf.rss_hf) {
+		printf("Port %u modified RSS hash function based on hardware support,"
+			"requested:%#"PRIx64" configured:%#"PRIx64"\n",
+			port,
+			port_conf_default.rx_adv_conf.rss_conf.rss_hf,
+			port_conf.rx_adv_conf.rss_conf.rss_hf);
+	}
+
+	/* Configure the Ethernet device. */
+	retval = rte_eth_dev_configure(port, rx_rings, tx_rings, &port_conf);
+	if (retval != 0)
+		return retval;
+
+	/* Allocate and set up 1 RX queue per Ethernet port. */
+	for (q = 0; q < rx_rings; q++) {
+		retval = rte_eth_rx_queue_setup(port, q, rx_ring_size,
+				rte_eth_dev_socket_id(port), &rx_conf,
+				mbuf_pool);
+		if (retval < 0)
+			return retval;
+	}
+
+	txconf = dev_info.default_txconf;
+	txconf.offloads = port_conf_default.txmode.offloads;
+	/* Allocate and set up 1 TX queue per Ethernet port. */
+	for (q = 0; q < tx_rings; q++) {
+		retval = rte_eth_tx_queue_setup(port, q, tx_ring_size,
+				rte_eth_dev_socket_id(port), &txconf);
+		if (retval < 0)
+			return retval;
+	}
+
+	/* Display the port MAC address. */
+	struct rte_ether_addr addr;
+	rte_eth_macaddr_get(port, &addr);
+	printf("Port %u MAC: %02" PRIx8 " %02" PRIx8 " %02" PRIx8
+			   " %02" PRIx8 " %02" PRIx8 " %02" PRIx8 "\n",
+			(unsigned int)port,
+			addr.addr_bytes[0], addr.addr_bytes[1],
+			addr.addr_bytes[2], addr.addr_bytes[3],
+			addr.addr_bytes[4], addr.addr_bytes[5]);
+
+	/* Enable RX in promiscuous mode for the Ethernet device. */
+	rte_eth_promiscuous_enable(port);
+
+	return 0;
+}
+
+static int
+init_ports(uint16_t num_ports)
+{
+	uint16_t portid;
+
+	if (!cdata.num_mbuf)
+		cdata.num_mbuf = 16384 * num_ports;
+
+	struct rte_mempool *mp = rte_pktmbuf_pool_create("packet_pool",
+			/* mbufs */ cdata.num_mbuf,
+			/* cache_size */ 512,
+			/* priv_size*/ 0,
+			/* data_room_size */ RTE_MBUF_DEFAULT_BUF_SIZE,
+			rte_socket_id());
+
+	RTE_ETH_FOREACH_DEV(portid)
+		if (port_init(portid, mp) != 0)
+			rte_exit(EXIT_FAILURE, "Cannot init port %"PRIu16 "\n",
+					portid);
+
+	return 0;
+}
+
 static void
 init_adapters(uint16_t nb_ports)
 {
@@ -297,6 +414,7 @@ init_adapters(uint16_t nb_ports)
 		adptr_p_conf.enqueue_depth =
 			dev_info.max_event_port_enqueue_depth;
 
+	init_ports(nb_ports);
 	/* Create one adapter for all the ethernet ports. */
 	ret = rte_event_eth_rx_adapter_create(cdata.rx_adapter_id, evdev_id,
 			&adptr_p_conf);
diff --git a/examples/eventdev_pipeline/pipeline_worker_tx.c b/examples/eventdev_pipeline/pipeline_worker_tx.c
index 8961cd656..52a1b4174 100644
--- a/examples/eventdev_pipeline/pipeline_worker_tx.c
+++ b/examples/eventdev_pipeline/pipeline_worker_tx.c
@@ -603,6 +603,119 @@ service_rx_adapter(void *arg)
 	return 0;
 }
 
+/*
+ * Initializes a given port using global settings and with the RX buffers
+ * coming from the mbuf_pool passed as a parameter.
+ */
+static inline int
+port_init(uint8_t port, struct rte_mempool *mbuf_pool)
+{
+	struct rte_eth_rxconf rx_conf;
+	static const struct rte_eth_conf port_conf_default = {
+		.rxmode = {
+			.mq_mode = ETH_MQ_RX_RSS,
+			.max_rx_pkt_len = RTE_ETHER_MAX_LEN,
+		},
+		.rx_adv_conf = {
+			.rss_conf = {
+				.rss_hf = ETH_RSS_IP |
+					  ETH_RSS_TCP |
+					  ETH_RSS_UDP,
+			}
+		}
+	};
+	const uint16_t rx_rings = 1, tx_rings = 1;
+	const uint16_t rx_ring_size = 512, tx_ring_size = 512;
+	struct rte_eth_conf port_conf = port_conf_default;
+	int retval;
+	uint16_t q;
+	struct rte_eth_dev_info dev_info;
+	struct rte_eth_txconf txconf;
+
+	if (!rte_eth_dev_is_valid_port(port))
+		return -1;
+
+	rte_eth_dev_info_get(port, &dev_info);
+	if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_MBUF_FAST_FREE)
+		port_conf.txmode.offloads |=
+			DEV_TX_OFFLOAD_MBUF_FAST_FREE;
+	rx_conf = dev_info.default_rxconf;
+	rx_conf.offloads = port_conf.rxmode.offloads;
+
+	port_conf.rx_adv_conf.rss_conf.rss_hf &=
+		dev_info.flow_type_rss_offloads;
+	if (port_conf.rx_adv_conf.rss_conf.rss_hf !=
+			port_conf_default.rx_adv_conf.rss_conf.rss_hf) {
+		printf("Port %u modified RSS hash function based on hardware support,"
+			"requested:%#"PRIx64" configured:%#"PRIx64"\n",
+			port,
+			port_conf_default.rx_adv_conf.rss_conf.rss_hf,
+			port_conf.rx_adv_conf.rss_conf.rss_hf);
+	}
+
+	/* Configure the Ethernet device. */
+	retval = rte_eth_dev_configure(port, rx_rings, tx_rings, &port_conf);
+	if (retval != 0)
+		return retval;
+
+	/* Allocate and set up 1 RX queue per Ethernet port. */
+	for (q = 0; q < rx_rings; q++) {
+		retval = rte_eth_rx_queue_setup(port, q, rx_ring_size,
+				rte_eth_dev_socket_id(port), &rx_conf,
+				mbuf_pool);
+		if (retval < 0)
+			return retval;
+	}
+
+	txconf = dev_info.default_txconf;
+	txconf.offloads = port_conf_default.txmode.offloads;
+	/* Allocate and set up 1 TX queue per Ethernet port. */
+	for (q = 0; q < tx_rings; q++) {
+		retval = rte_eth_tx_queue_setup(port, q, tx_ring_size,
+				rte_eth_dev_socket_id(port), &txconf);
+		if (retval < 0)
+			return retval;
+	}
+
+	/* Display the port MAC address. */
+	struct rte_ether_addr addr;
+	rte_eth_macaddr_get(port, &addr);
+	printf("Port %u MAC: %02" PRIx8 " %02" PRIx8 " %02" PRIx8
+			   " %02" PRIx8 " %02" PRIx8 " %02" PRIx8 "\n",
+			(unsigned int)port,
+			addr.addr_bytes[0], addr.addr_bytes[1],
+			addr.addr_bytes[2], addr.addr_bytes[3],
+			addr.addr_bytes[4], addr.addr_bytes[5]);
+
+	/* Enable RX in promiscuous mode for the Ethernet device. */
+	rte_eth_promiscuous_enable(port);
+
+	return 0;
+}
+
+static int
+init_ports(uint16_t num_ports)
+{
+	uint16_t portid;
+
+	if (!cdata.num_mbuf)
+		cdata.num_mbuf = 16384 * num_ports;
+
+	struct rte_mempool *mp = rte_pktmbuf_pool_create("packet_pool",
+			/* mbufs */ cdata.num_mbuf,
+			/* cache_size */ 512,
+			/* priv_size*/ 0,
+			/* data_room_size */ RTE_MBUF_DEFAULT_BUF_SIZE,
+			rte_socket_id());
+
+	RTE_ETH_FOREACH_DEV(portid)
+		if (port_init(portid, mp) != 0)
+			rte_exit(EXIT_FAILURE, "Cannot init port %"PRIu16 "\n",
+					portid);
+
+	return 0;
+}
+
 static void
 init_adapters(uint16_t nb_ports)
 {
@@ -621,6 +734,7 @@ init_adapters(uint16_t nb_ports)
 		.new_event_threshold = 4096,
 	};
 
+	init_ports(nb_ports);
 	if (adptr_p_conf.new_event_threshold > dev_info.max_num_events)
 		adptr_p_conf.new_event_threshold = dev_info.max_num_events;
 	if (adptr_p_conf.dequeue_depth > dev_info.max_event_port_dequeue_depth)
-- 
2.17.1


^ permalink raw reply	[flat|nested] 245+ messages in thread

* [dpdk-dev] [PATCH v5 7/7] examples: disable Rx packet type parsing
  2019-10-01  6:41     ` [dpdk-dev] [PATCH v5 0/7] ethdev: add new Rx offload flags pbhagavatula
                         ` (5 preceding siblings ...)
  2019-10-01  6:41       ` [dpdk-dev] [PATCH v5 6/7] examples/eventdev_pipeline: add new Rx RSS hash offload pbhagavatula
@ 2019-10-01  6:41       ` pbhagavatula
  2019-10-01 18:52       ` [dpdk-dev] [PATCH v6 0/7] ethdev: add new Rx offload flags pbhagavatula
  7 siblings, 0 replies; 245+ messages in thread
From: pbhagavatula @ 2019-10-01  6:41 UTC (permalink / raw)
  To: arybchenko, jerinj, Nicolas Chautru, Chas Williams, David Hunt,
	Harry van Haaren, Marko Kovacevic, Ori Kam, Bruce Richardson,
	Radu Nicolau, Akhil Goyal, Tomasz Kantecki, Bernard Iremonger,
	Cristian Dumitrescu, Konstantin Ananyev, Ferruh Yigit,
	Declan Doherty, Reshma Pattan, John McNamara, Xiaoyun Li,
	Jasvinder Singh, Byron Marohn, Yipeng Wang, Maxime Coquelin,
	Tiwei Bie, Zhihong Wang
  Cc: dev, Pavan Nikhilesh

From: Pavan Nikhilesh <pbhagavatula@marvell.com>

Disable packet type parsing in examples that don't use
`rte_mbuf::packet_type` by setting ptype_mask as 0 in
`rte_eth_dev_set_supported_ptypes`

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
 examples/bbdev_app/main.c                  | 1 +
 examples/bond/main.c                       | 2 ++
 examples/distributor/Makefile              | 1 +
 examples/distributor/main.c                | 1 +
 examples/distributor/meson.build           | 1 +
 examples/eventdev_pipeline/main.c          | 2 ++
 examples/eventdev_pipeline/meson.build     | 1 +
 examples/exception_path/Makefile           | 1 +
 examples/exception_path/main.c             | 1 +
 examples/exception_path/meson.build        | 1 +
 examples/flow_classify/flow_classify.c     | 1 +
 examples/flow_filtering/Makefile           | 1 +
 examples/flow_filtering/main.c             | 1 +
 examples/flow_filtering/meson.build        | 1 +
 examples/ip_pipeline/link.c                | 1 +
 examples/ip_reassembly/Makefile            | 1 +
 examples/ip_reassembly/main.c              | 2 ++
 examples/ip_reassembly/meson.build         | 1 +
 examples/ipsec-secgw/ipsec-secgw.c         | 2 ++
 examples/ipv4_multicast/Makefile           | 1 +
 examples/ipv4_multicast/main.c             | 2 ++
 examples/ipv4_multicast/meson.build        | 1 +
 examples/kni/main.c                        | 1 +
 examples/l2fwd-cat/Makefile                | 1 +
 examples/l2fwd-cat/l2fwd-cat.c             | 1 +
 examples/l2fwd-cat/meson.build             | 1 +
 examples/l2fwd-crypto/main.c               | 2 ++
 examples/l2fwd-jobstats/Makefile           | 1 +
 examples/l2fwd-jobstats/main.c             | 2 ++
 examples/l2fwd-jobstats/meson.build        | 1 +
 examples/l2fwd-keepalive/Makefile          | 1 +
 examples/l2fwd-keepalive/main.c            | 2 ++
 examples/l2fwd-keepalive/meson.build       | 1 +
 examples/l2fwd/Makefile                    | 1 +
 examples/l2fwd/main.c                      | 2 ++
 examples/l2fwd/meson.build                 | 1 +
 examples/l3fwd-acl/Makefile                | 1 +
 examples/l3fwd-acl/main.c                  | 2 ++
 examples/l3fwd-acl/meson.build             | 1 +
 examples/l3fwd-vf/Makefile                 | 1 +
 examples/l3fwd-vf/main.c                   | 2 ++
 examples/l3fwd-vf/meson.build              | 1 +
 examples/link_status_interrupt/Makefile    | 1 +
 examples/link_status_interrupt/main.c      | 2 ++
 examples/link_status_interrupt/meson.build | 1 +
 examples/load_balancer/Makefile            | 1 +
 examples/load_balancer/init.c              | 2 ++
 examples/load_balancer/meson.build         | 1 +
 examples/packet_ordering/Makefile          | 1 +
 examples/packet_ordering/main.c            | 1 +
 examples/packet_ordering/meson.build       | 1 +
 examples/ptpclient/Makefile                | 1 +
 examples/ptpclient/meson.build             | 1 +
 examples/ptpclient/ptpclient.c             | 1 +
 examples/qos_meter/Makefile                | 1 +
 examples/qos_meter/main.c                  | 2 ++
 examples/qos_meter/meson.build             | 1 +
 examples/qos_sched/Makefile                | 1 +
 examples/qos_sched/init.c                  | 1 +
 examples/qos_sched/meson.build             | 1 +
 examples/quota_watermark/qw/Makefile       | 1 +
 examples/quota_watermark/qw/init.c         | 1 +
 examples/rxtx_callbacks/main.c             | 1 +
 examples/server_node_efd/server/Makefile   | 1 +
 examples/server_node_efd/server/init.c     | 1 +
 examples/skeleton/Makefile                 | 1 +
 examples/skeleton/basicfwd.c               | 1 +
 examples/skeleton/meson.build              | 1 +
 examples/tep_termination/Makefile          | 1 +
 examples/tep_termination/meson.build       | 1 +
 examples/tep_termination/vxlan_setup.c     | 1 +
 examples/vhost/Makefile                    | 1 +
 examples/vhost/main.c                      | 1 +
 examples/vm_power_manager/Makefile         | 1 +
 examples/vm_power_manager/main.c           | 1 +
 examples/vm_power_manager/meson.build      | 1 +
 examples/vmdq/Makefile                     | 1 +
 examples/vmdq/main.c                       | 1 +
 examples/vmdq/meson.build                  | 1 +
 examples/vmdq_dcb/Makefile                 | 1 +
 examples/vmdq_dcb/main.c                   | 1 +
 examples/vmdq_dcb/meson.build              | 1 +
 82 files changed, 96 insertions(+)

diff --git a/examples/bbdev_app/main.c b/examples/bbdev_app/main.c
index 9acf666dc..277725a6b 100644
--- a/examples/bbdev_app/main.c
+++ b/examples/bbdev_app/main.c
@@ -478,6 +478,7 @@ initialize_ports(struct app_config_params *app_params,
 	}
 
 	rte_eth_promiscuous_enable(port_id);
+	rte_eth_dev_set_supported_ptypes(port_id, RTE_PTYPE_UNKNOWN, NULL, 0);
 
 	rte_eth_macaddr_get(port_id, &bbdev_port_eth_addr);
 	print_mac(port_id, &bbdev_port_eth_addr);
diff --git a/examples/bond/main.c b/examples/bond/main.c
index 1c0df9d46..f92104908 100644
--- a/examples/bond/main.c
+++ b/examples/bond/main.c
@@ -195,6 +195,7 @@ slave_port_init(uint16_t portid, struct rte_mempool *mbuf_pool)
 		rte_exit(retval, "port %u: TX queue 0 setup failed (res=%d)",
 				portid, retval);
 
+	rte_eth_dev_set_supported_ptypes(portid, RTE_PTYPE_UNKNOWN, NULL, 0);
 	retval  = rte_eth_dev_start(portid);
 	if (retval < 0)
 		rte_exit(retval,
@@ -271,6 +272,7 @@ bond_port_init(struct rte_mempool *mbuf_pool)
 		rte_exit(retval, "port %u: TX queue 0 setup failed (res=%d)",
 				BOND_PORT, retval);
 
+	rte_eth_dev_set_supported_ptypes(BOND_PORT, RTE_PTYPE_UNKNOWN, NULL, 0);
 	retval  = rte_eth_dev_start(BOND_PORT);
 	if (retval < 0)
 		rte_exit(retval, "Start port %d failed (res=%d)", BOND_PORT, retval);
diff --git a/examples/distributor/Makefile b/examples/distributor/Makefile
index bac8d5578..a2a477279 100644
--- a/examples/distributor/Makefile
+++ b/examples/distributor/Makefile
@@ -50,6 +50,7 @@ RTE_TARGET ?= $(notdir $(abspath $(dir $(firstword $(wildcard $(RTE_SDK)/*/.conf
 include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 # workaround for a gcc bug with noreturn attribute
 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603
diff --git a/examples/distributor/main.c b/examples/distributor/main.c
index 81d7ca61d..35930d8a3 100644
--- a/examples/distributor/main.c
+++ b/examples/distributor/main.c
@@ -162,6 +162,7 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool)
 			return retval;
 	}
 
+	rte_eth_dev_set_supported_ptypes(port, RTE_PTYPE_UNKNOWN, NULL, 0);
 	retval = rte_eth_dev_start(port);
 	if (retval < 0)
 		return retval;
diff --git a/examples/distributor/meson.build b/examples/distributor/meson.build
index 26f108d65..c2976f6bd 100644
--- a/examples/distributor/meson.build
+++ b/examples/distributor/meson.build
@@ -10,6 +10,7 @@
 build = dpdk_conf.has('RTE_LIBRTE_POWER')
 
 deps += ['distributor', 'power']
+allow_experimental_apis = true
 sources = files(
 	'main.c'
 )
diff --git a/examples/eventdev_pipeline/main.c b/examples/eventdev_pipeline/main.c
index a73b61d59..66b6420f9 100644
--- a/examples/eventdev_pipeline/main.c
+++ b/examples/eventdev_pipeline/main.c
@@ -393,6 +393,8 @@ main(int argc, char **argv)
 
 	/* Start the Ethernet port. */
 	RTE_ETH_FOREACH_DEV(portid) {
+		rte_eth_dev_set_supported_ptypes(portid, RTE_PTYPE_UNKNOWN,
+						 NULL, 0);
 		err = rte_eth_dev_start(portid);
 		if (err < 0)
 			rte_exit(EXIT_FAILURE, "Error starting ethdev %d\n",
diff --git a/examples/eventdev_pipeline/meson.build b/examples/eventdev_pipeline/meson.build
index a54c35aa7..0fc916b05 100644
--- a/examples/eventdev_pipeline/meson.build
+++ b/examples/eventdev_pipeline/meson.build
@@ -7,6 +7,7 @@
 # DPDK instance, use 'make'
 
 deps += 'eventdev'
+allow_experimental_apis = true
 sources = files(
 	'main.c',
 	'pipeline_worker_generic.c',
diff --git a/examples/exception_path/Makefile b/examples/exception_path/Makefile
index 90c7f133a..a7c961276 100644
--- a/examples/exception_path/Makefile
+++ b/examples/exception_path/Makefile
@@ -51,6 +51,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 include $(RTE_SDK)/mk/rte.extapp.mk
 
diff --git a/examples/exception_path/main.c b/examples/exception_path/main.c
index 0d79e5a24..0165e4553 100644
--- a/examples/exception_path/main.c
+++ b/examples/exception_path/main.c
@@ -464,6 +464,7 @@ init_port(uint16_t port)
 		FATAL_ERROR("Could not setup up TX queue for port%u (%d)",
 				port, ret);
 
+	rte_eth_dev_set_supported_ptypes(port, RTE_PTYPE_UNKNOWN, NULL, 0);
 	ret = rte_eth_dev_start(port);
 	if (ret < 0)
 		FATAL_ERROR("Could not start port%u (%d)", port, ret);
diff --git a/examples/exception_path/meson.build b/examples/exception_path/meson.build
index c34e11e36..2b0a25036 100644
--- a/examples/exception_path/meson.build
+++ b/examples/exception_path/meson.build
@@ -6,6 +6,7 @@
 # To build this example as a standalone application with an already-installed
 # DPDK instance, use 'make'
 
+allow_experimental_apis = true
 sources = files(
 	'main.c'
 )
diff --git a/examples/flow_classify/flow_classify.c b/examples/flow_classify/flow_classify.c
index bc7f43ea9..f34d27428 100644
--- a/examples/flow_classify/flow_classify.c
+++ b/examples/flow_classify/flow_classify.c
@@ -231,6 +231,7 @@ port_init(uint8_t port, struct rte_mempool *mbuf_pool)
 	}
 
 	/* Start the Ethernet port. */
+	rte_eth_dev_set_supported_ptypes(port, RTE_PTYPE_UNKNOWN, NULL, 0);
 	retval = rte_eth_dev_start(port);
 	if (retval < 0)
 		return retval;
diff --git a/examples/flow_filtering/Makefile b/examples/flow_filtering/Makefile
index a63a75555..793a08fae 100644
--- a/examples/flow_filtering/Makefile
+++ b/examples/flow_filtering/Makefile
@@ -49,6 +49,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 include $(RTE_SDK)/mk/rte.extapp.mk
 
diff --git a/examples/flow_filtering/main.c b/examples/flow_filtering/main.c
index a0487be77..4b8712324 100644
--- a/examples/flow_filtering/main.c
+++ b/examples/flow_filtering/main.c
@@ -176,6 +176,7 @@ init_port(void)
 	}
 
 	rte_eth_promiscuous_enable(port_id);
+	rte_eth_dev_set_supported_ptypes(port_id, RTE_PTYPE_UNKNOWN, NULL, 0);
 	ret = rte_eth_dev_start(port_id);
 	if (ret < 0) {
 		rte_exit(EXIT_FAILURE,
diff --git a/examples/flow_filtering/meson.build b/examples/flow_filtering/meson.build
index 407795c42..6f5d1b08a 100644
--- a/examples/flow_filtering/meson.build
+++ b/examples/flow_filtering/meson.build
@@ -6,6 +6,7 @@
 # To build this example as a standalone application with an already-installed
 # DPDK instance, use 'make'
 
+allow_experimental_apis = true
 sources = files(
 	'main.c',
 )
diff --git a/examples/ip_pipeline/link.c b/examples/ip_pipeline/link.c
index 787eb866a..7d02962e3 100644
--- a/examples/ip_pipeline/link.c
+++ b/examples/ip_pipeline/link.c
@@ -205,6 +205,7 @@ link_create(const char *name, struct link_params *params)
 			return NULL;
 	}
 
+	rte_eth_dev_set_supported_ptypes(port_id, RTE_PTYPE_UNKNOWN, NULL, 0);
 	/* Port start */
 	status = rte_eth_dev_start(port_id);
 	if (status < 0)
diff --git a/examples/ip_reassembly/Makefile b/examples/ip_reassembly/Makefile
index 0b1a904e0..19c462388 100644
--- a/examples/ip_reassembly/Makefile
+++ b/examples/ip_reassembly/Makefile
@@ -52,6 +52,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 # workaround for a gcc bug with noreturn attribute
 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603
diff --git a/examples/ip_reassembly/main.c b/examples/ip_reassembly/main.c
index 38b39be6b..f2c28ef76 100644
--- a/examples/ip_reassembly/main.c
+++ b/examples/ip_reassembly/main.c
@@ -1158,6 +1158,8 @@ main(int argc, char **argv)
 		if ((enabled_port_mask & (1 << portid)) == 0) {
 			continue;
 		}
+		rte_eth_dev_set_supported_ptypes(portid, RTE_PTYPE_UNKNOWN,
+						 NULL, 0);
 		/* Start device */
 		ret = rte_eth_dev_start(portid);
 		if (ret < 0)
diff --git a/examples/ip_reassembly/meson.build b/examples/ip_reassembly/meson.build
index 8ebd48291..8a667c265 100644
--- a/examples/ip_reassembly/meson.build
+++ b/examples/ip_reassembly/meson.build
@@ -7,6 +7,7 @@
 # DPDK instance, use 'make'
 
 deps += ['lpm', 'ip_frag']
+allow_experimental_apis = true
 sources = files(
 	'main.c'
 )
diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c
index 0d1fd6af6..2aceaf549 100644
--- a/examples/ipsec-secgw/ipsec-secgw.c
+++ b/examples/ipsec-secgw/ipsec-secgw.c
@@ -2448,6 +2448,8 @@ main(int32_t argc, char **argv)
 		if ((enabled_port_mask & (1 << portid)) == 0)
 			continue;
 
+		rte_eth_dev_set_supported_ptypes(portid, RTE_PTYPE_UNKNOWN,
+						 NULL, 0);
 		/*
 		 * Start device
 		 * note: device must be started before a flow rule
diff --git a/examples/ipv4_multicast/Makefile b/examples/ipv4_multicast/Makefile
index 5f8a67dd4..5171f7ab2 100644
--- a/examples/ipv4_multicast/Makefile
+++ b/examples/ipv4_multicast/Makefile
@@ -52,6 +52,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 # workaround for a gcc bug with noreturn attribute
 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603
diff --git a/examples/ipv4_multicast/main.c b/examples/ipv4_multicast/main.c
index 72eaadc51..3d327a00b 100644
--- a/examples/ipv4_multicast/main.c
+++ b/examples/ipv4_multicast/main.c
@@ -765,6 +765,8 @@ main(int argc, char **argv)
 			qconf->tx_queue_id[portid] = queueid;
 			queueid++;
 		}
+		rte_eth_dev_set_supported_ptypes(portid, RTE_PTYPE_UNKNOWN,
+						 NULL, 0);
 		rte_eth_allmulticast_enable(portid);
 		/* Start device */
 		ret = rte_eth_dev_start(portid);
diff --git a/examples/ipv4_multicast/meson.build b/examples/ipv4_multicast/meson.build
index d9e4c7c21..6969e2c54 100644
--- a/examples/ipv4_multicast/meson.build
+++ b/examples/ipv4_multicast/meson.build
@@ -7,6 +7,7 @@
 # DPDK instance, use 'make'
 
 deps += 'hash'
+allow_experimental_apis = true
 sources = files(
 	'main.c'
 )
diff --git a/examples/kni/main.c b/examples/kni/main.c
index 4710d7176..99f500e25 100644
--- a/examples/kni/main.c
+++ b/examples/kni/main.c
@@ -625,6 +625,7 @@ init_port(uint16_t port)
 		rte_exit(EXIT_FAILURE, "Could not setup up TX queue for "
 				"port%u (%d)\n", (unsigned)port, ret);
 
+	rte_eth_dev_set_supported_ptypes(port, RTE_PTYPE_UNKNOWN, NULL, 0);
 	ret = rte_eth_dev_start(port);
 	if (ret < 0)
 		rte_exit(EXIT_FAILURE, "Could not start port%u (%d)\n",
diff --git a/examples/l2fwd-cat/Makefile b/examples/l2fwd-cat/Makefile
index c1960d6d3..d6a25e42a 100644
--- a/examples/l2fwd-cat/Makefile
+++ b/examples/l2fwd-cat/Makefile
@@ -66,6 +66,7 @@ endif
 EXTRA_CFLAGS += -O3 -g -Wfatal-errors
 
 CFLAGS += -I$(PQOS_INSTALL_PATH)/../include
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 LDLIBS += -L$(PQOS_INSTALL_PATH)
 LDLIBS += -lpqos
diff --git a/examples/l2fwd-cat/l2fwd-cat.c b/examples/l2fwd-cat/l2fwd-cat.c
index b34b40a00..a54a1ed25 100644
--- a/examples/l2fwd-cat/l2fwd-cat.c
+++ b/examples/l2fwd-cat/l2fwd-cat.c
@@ -67,6 +67,7 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool)
 			return retval;
 	}
 
+	rte_eth_dev_set_supported_ptypes(port, RTE_PTYPE_UNKNOWN, NULL, 0);
 	/* Start the Ethernet port. */
 	retval = rte_eth_dev_start(port);
 	if (retval < 0)
diff --git a/examples/l2fwd-cat/meson.build b/examples/l2fwd-cat/meson.build
index 4e2777a03..37c96040d 100644
--- a/examples/l2fwd-cat/meson.build
+++ b/examples/l2fwd-cat/meson.build
@@ -10,6 +10,7 @@ pqos = cc.find_library('pqos', required: false)
 build = pqos.found()
 ext_deps += pqos
 cflags += '-I/usr/local/include' # assume pqos lib installed in /usr/local
+allow_experimental_apis = true
 sources = files(
 	'cat.c', 'l2fwd-cat.c'
 )
diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c
index 3fe2ba725..5071ef389 100644
--- a/examples/l2fwd-crypto/main.c
+++ b/examples/l2fwd-crypto/main.c
@@ -2559,6 +2559,8 @@ initialize_ports(struct l2fwd_crypto_options *options)
 			return -1;
 		}
 
+		rte_eth_dev_set_supported_ptypes(portid, RTE_PTYPE_UNKNOWN,
+						 NULL, 0);
 		/* Start device */
 		retval = rte_eth_dev_start(portid);
 		if (retval < 0) {
diff --git a/examples/l2fwd-jobstats/Makefile b/examples/l2fwd-jobstats/Makefile
index 729a39e93..09834e979 100644
--- a/examples/l2fwd-jobstats/Makefile
+++ b/examples/l2fwd-jobstats/Makefile
@@ -52,6 +52,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 include $(RTE_SDK)/mk/rte.extapp.mk
 endif
diff --git a/examples/l2fwd-jobstats/main.c b/examples/l2fwd-jobstats/main.c
index 77e44dc82..03d986a68 100644
--- a/examples/l2fwd-jobstats/main.c
+++ b/examples/l2fwd-jobstats/main.c
@@ -902,6 +902,8 @@ main(int argc, char **argv)
 			"Cannot set error callback for tx buffer on port %u\n",
 				 portid);
 
+		rte_eth_dev_set_supported_ptypes(portid, RTE_PTYPE_UNKNOWN,
+						 NULL, 0);
 		/* Start device */
 		ret = rte_eth_dev_start(portid);
 		if (ret < 0)
diff --git a/examples/l2fwd-jobstats/meson.build b/examples/l2fwd-jobstats/meson.build
index 1ffd484e2..3653aa7ec 100644
--- a/examples/l2fwd-jobstats/meson.build
+++ b/examples/l2fwd-jobstats/meson.build
@@ -7,6 +7,7 @@
 # DPDK instance, use 'make'
 
 deps += ['jobstats', 'timer']
+allow_experimental_apis = true
 sources = files(
 	'main.c'
 )
diff --git a/examples/l2fwd-keepalive/Makefile b/examples/l2fwd-keepalive/Makefile
index 37de27a6f..584257ae2 100644
--- a/examples/l2fwd-keepalive/Makefile
+++ b/examples/l2fwd-keepalive/Makefile
@@ -53,6 +53,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 LDFLAGS += -lrt
 
 include $(RTE_SDK)/mk/rte.extapp.mk
diff --git a/examples/l2fwd-keepalive/main.c b/examples/l2fwd-keepalive/main.c
index 9831a4323..8d3e5eadd 100644
--- a/examples/l2fwd-keepalive/main.c
+++ b/examples/l2fwd-keepalive/main.c
@@ -696,6 +696,8 @@ main(int argc, char **argv)
 			"Cannot set error callback for tx buffer on port %u\n",
 				 portid);
 
+		rte_eth_dev_set_supported_ptypes(portid, RTE_PTYPE_UNKNOWN,
+						 NULL, 0);
 		/* Start device */
 		ret = rte_eth_dev_start(portid);
 		if (ret < 0)
diff --git a/examples/l2fwd-keepalive/meson.build b/examples/l2fwd-keepalive/meson.build
index 6f7b007e1..2dffffaaa 100644
--- a/examples/l2fwd-keepalive/meson.build
+++ b/examples/l2fwd-keepalive/meson.build
@@ -8,6 +8,7 @@
 
 ext_deps += cc.find_library('rt')
 deps += 'timer'
+allow_experimental_apis = true
 sources = files(
 	'main.c', 'shm.c'
 )
diff --git a/examples/l2fwd/Makefile b/examples/l2fwd/Makefile
index 230352093..123e6161c 100644
--- a/examples/l2fwd/Makefile
+++ b/examples/l2fwd/Makefile
@@ -51,6 +51,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 include $(RTE_SDK)/mk/rte.extapp.mk
 endif
diff --git a/examples/l2fwd/main.c b/examples/l2fwd/main.c
index 1e2b14297..b7d6ee2ff 100644
--- a/examples/l2fwd/main.c
+++ b/examples/l2fwd/main.c
@@ -694,6 +694,8 @@ main(int argc, char **argv)
 			"Cannot set error callback for tx buffer on port %u\n",
 				 portid);
 
+		rte_eth_dev_set_supported_ptypes(portid, RTE_PTYPE_UNKNOWN,
+						 NULL, 0);
 		/* Start device */
 		ret = rte_eth_dev_start(portid);
 		if (ret < 0)
diff --git a/examples/l2fwd/meson.build b/examples/l2fwd/meson.build
index c34e11e36..2b0a25036 100644
--- a/examples/l2fwd/meson.build
+++ b/examples/l2fwd/meson.build
@@ -6,6 +6,7 @@
 # To build this example as a standalone application with an already-installed
 # DPDK instance, use 'make'
 
+allow_experimental_apis = true
 sources = files(
 	'main.c'
 )
diff --git a/examples/l3fwd-acl/Makefile b/examples/l3fwd-acl/Makefile
index e2c989f71..df590f8e9 100644
--- a/examples/l3fwd-acl/Makefile
+++ b/examples/l3fwd-acl/Makefile
@@ -51,6 +51,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 # workaround for a gcc bug with noreturn attribute
 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603
diff --git a/examples/l3fwd-acl/main.c b/examples/l3fwd-acl/main.c
index 0c44df767..e113b1a4d 100644
--- a/examples/l3fwd-acl/main.c
+++ b/examples/l3fwd-acl/main.c
@@ -2056,6 +2056,8 @@ main(int argc, char **argv)
 		if ((enabled_port_mask & (1 << portid)) == 0)
 			continue;
 
+		rte_eth_dev_set_supported_ptypes(portid, RTE_PTYPE_UNKNOWN,
+						 NULL, 0);
 		/* Start device */
 		ret = rte_eth_dev_start(portid);
 		if (ret < 0)
diff --git a/examples/l3fwd-acl/meson.build b/examples/l3fwd-acl/meson.build
index 7096e00c1..68cebd6ce 100644
--- a/examples/l3fwd-acl/meson.build
+++ b/examples/l3fwd-acl/meson.build
@@ -7,6 +7,7 @@
 # DPDK instance, use 'make'
 
 deps += ['acl', 'lpm', 'hash']
+allow_experimental_apis = true
 sources = files(
 	'main.c'
 )
diff --git a/examples/l3fwd-vf/Makefile b/examples/l3fwd-vf/Makefile
index 7b186a23c..db7f51f2f 100644
--- a/examples/l3fwd-vf/Makefile
+++ b/examples/l3fwd-vf/Makefile
@@ -51,6 +51,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += -O3 $(USER_FLAGS)
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 # workaround for a gcc bug with noreturn attribute
 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603
diff --git a/examples/l3fwd-vf/main.c b/examples/l3fwd-vf/main.c
index 572e74cf5..5bf70f52d 100644
--- a/examples/l3fwd-vf/main.c
+++ b/examples/l3fwd-vf/main.c
@@ -1051,6 +1051,8 @@ main(int argc, char **argv)
 		if ((enabled_port_mask & (1 << portid)) == 0) {
 			continue;
 		}
+		rte_eth_dev_set_supported_ptypes(portid, RTE_PTYPE_UNKNOWN,
+						 NULL, 0);
 		/* Start device */
 		ret = rte_eth_dev_start(portid);
 		if (ret < 0)
diff --git a/examples/l3fwd-vf/meson.build b/examples/l3fwd-vf/meson.build
index 226286e74..00f3c38f4 100644
--- a/examples/l3fwd-vf/meson.build
+++ b/examples/l3fwd-vf/meson.build
@@ -7,6 +7,7 @@
 # DPDK instance, use 'make'
 
 deps += ['lpm', 'hash']
+allow_experimental_apis = true
 sources = files(
 	'main.c'
 )
diff --git a/examples/link_status_interrupt/Makefile b/examples/link_status_interrupt/Makefile
index 97e5a14a8..6ddedd4de 100644
--- a/examples/link_status_interrupt/Makefile
+++ b/examples/link_status_interrupt/Makefile
@@ -51,6 +51,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 include $(RTE_SDK)/mk/rte.extapp.mk
 endif
diff --git a/examples/link_status_interrupt/main.c b/examples/link_status_interrupt/main.c
index 9cd4dc7a6..04da4732b 100644
--- a/examples/link_status_interrupt/main.c
+++ b/examples/link_status_interrupt/main.c
@@ -676,6 +676,8 @@ main(int argc, char **argv)
 			rte_exit(EXIT_FAILURE, "Cannot set error callback for "
 					"tx buffer on port %u\n", (unsigned) portid);
 
+		rte_eth_dev_set_supported_ptypes(portid, RTE_PTYPE_UNKNOWN,
+						 NULL, 0);
 		/* Start device */
 		ret = rte_eth_dev_start(portid);
 		if (ret < 0)
diff --git a/examples/link_status_interrupt/meson.build b/examples/link_status_interrupt/meson.build
index c34e11e36..2b0a25036 100644
--- a/examples/link_status_interrupt/meson.build
+++ b/examples/link_status_interrupt/meson.build
@@ -6,6 +6,7 @@
 # To build this example as a standalone application with an already-installed
 # DPDK instance, use 'make'
 
+allow_experimental_apis = true
 sources = files(
 	'main.c'
 )
diff --git a/examples/load_balancer/Makefile b/examples/load_balancer/Makefile
index caae8a107..dcba9194c 100644
--- a/examples/load_balancer/Makefile
+++ b/examples/load_balancer/Makefile
@@ -51,6 +51,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += -O3 -g
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 # workaround for a gcc bug with noreturn attribute
 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603
diff --git a/examples/load_balancer/init.c b/examples/load_balancer/init.c
index 3ab7d0211..d49d61474 100644
--- a/examples/load_balancer/init.c
+++ b/examples/load_balancer/init.c
@@ -496,6 +496,8 @@ app_init_nics(void)
 			}
 		}
 
+		rte_eth_dev_set_supported_ptypes(port, RTE_PTYPE_UNKNOWN,
+						 NULL, 0);
 		/* Start port */
 		ret = rte_eth_dev_start(port);
 		if (ret < 0) {
diff --git a/examples/load_balancer/meson.build b/examples/load_balancer/meson.build
index 4f7ac3999..19708974c 100644
--- a/examples/load_balancer/meson.build
+++ b/examples/load_balancer/meson.build
@@ -7,6 +7,7 @@
 # DPDK instance, use 'make'
 
 deps += 'lpm'
+allow_experimental_apis = true
 sources = files(
 	'config.c', 'init.c', 'main.c', 'runtime.c'
 )
diff --git a/examples/packet_ordering/Makefile b/examples/packet_ordering/Makefile
index 51acaf7eb..9ba3fa9e8 100644
--- a/examples/packet_ordering/Makefile
+++ b/examples/packet_ordering/Makefile
@@ -51,6 +51,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 include $(RTE_SDK)/mk/rte.extapp.mk
 endif
diff --git a/examples/packet_ordering/main.c b/examples/packet_ordering/main.c
index 030e92299..59354fad5 100644
--- a/examples/packet_ordering/main.c
+++ b/examples/packet_ordering/main.c
@@ -312,6 +312,7 @@ configure_eth_port(uint16_t port_id)
 			return ret;
 	}
 
+	rte_eth_dev_set_supported_ptypes(port_id, RTE_PTYPE_UNKNOWN, NULL, 0);
 	ret = rte_eth_dev_start(port_id);
 	if (ret < 0)
 		return ret;
diff --git a/examples/packet_ordering/meson.build b/examples/packet_ordering/meson.build
index 6c2fccdcb..a3776946f 100644
--- a/examples/packet_ordering/meson.build
+++ b/examples/packet_ordering/meson.build
@@ -7,6 +7,7 @@
 # DPDK instance, use 'make'
 
 deps += 'reorder'
+allow_experimental_apis = true
 sources = files(
 	'main.c'
 )
diff --git a/examples/ptpclient/Makefile b/examples/ptpclient/Makefile
index 89e2bacbd..f158d96b9 100644
--- a/examples/ptpclient/Makefile
+++ b/examples/ptpclient/Makefile
@@ -50,6 +50,7 @@ RTE_TARGET ?= $(notdir $(abspath $(dir $(firstword $(wildcard $(RTE_SDK)/*/.conf
 include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += -O3
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 CFLAGS += $(WERROR_FLAGS)
 
 # workaround for a gcc bug with noreturn attribute
diff --git a/examples/ptpclient/meson.build b/examples/ptpclient/meson.build
index fa0cbe93c..d4171a218 100644
--- a/examples/ptpclient/meson.build
+++ b/examples/ptpclient/meson.build
@@ -6,6 +6,7 @@
 # To build this example as a standalone application with an already-installed
 # DPDK instance, use 'make'
 
+allow_experimental_apis = true
 sources = files(
 	'ptpclient.c'
 )
diff --git a/examples/ptpclient/ptpclient.c b/examples/ptpclient/ptpclient.c
index 31778fd95..e2cf4b136 100644
--- a/examples/ptpclient/ptpclient.c
+++ b/examples/ptpclient/ptpclient.c
@@ -227,6 +227,7 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool)
 			return retval;
 	}
 
+	rte_eth_dev_set_supported_ptypes(port, RTE_PTYPE_UNKNOWN, NULL, 0);
 	/* Start the Ethernet port. */
 	retval = rte_eth_dev_start(port);
 	if (retval < 0)
diff --git a/examples/qos_meter/Makefile b/examples/qos_meter/Makefile
index e5217cf7c..a1533d08f 100644
--- a/examples/qos_meter/Makefile
+++ b/examples/qos_meter/Makefile
@@ -52,6 +52,7 @@ RTE_TARGET ?= $(notdir $(abspath $(dir $(firstword $(wildcard $(RTE_SDK)/*/.conf
 include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += -O3
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 CFLAGS += $(WERROR_FLAGS)
 
 # workaround for a gcc bug with noreturn attribute
diff --git a/examples/qos_meter/main.c b/examples/qos_meter/main.c
index da7afe8be..ade8e49c3 100644
--- a/examples/qos_meter/main.c
+++ b/examples/qos_meter/main.c
@@ -419,10 +419,12 @@ main(int argc, char **argv)
 
 	rte_eth_tx_buffer_init(tx_buffer, PKT_TX_BURST_MAX);
 
+	rte_eth_dev_set_supported_ptypes(port_rx, RTE_PTYPE_UNKNOWN, NULL, 0);
 	ret = rte_eth_dev_start(port_rx);
 	if (ret < 0)
 		rte_exit(EXIT_FAILURE, "Port %d start error (%d)\n", port_rx, ret);
 
+	rte_eth_dev_set_supported_ptypes(port_tx, RTE_PTYPE_UNKNOWN, NULL, 0);
 	ret = rte_eth_dev_start(port_tx);
 	if (ret < 0)
 		rte_exit(EXIT_FAILURE, "Port %d start error (%d)\n", port_tx, ret);
diff --git a/examples/qos_meter/meson.build b/examples/qos_meter/meson.build
index ef7779f2f..10cd4bc79 100644
--- a/examples/qos_meter/meson.build
+++ b/examples/qos_meter/meson.build
@@ -7,6 +7,7 @@
 # DPDK instance, use 'make'
 
 deps += 'meter'
+allow_experimental_apis = true
 sources = files(
 	'main.c', 'rte_policer.c'
 )
diff --git a/examples/qos_sched/Makefile b/examples/qos_sched/Makefile
index ce2d25371..7d3d3019f 100644
--- a/examples/qos_sched/Makefile
+++ b/examples/qos_sched/Makefile
@@ -58,6 +58,7 @@ else
 
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 include $(RTE_SDK)/mk/rte.extapp.mk
 
diff --git a/examples/qos_sched/init.c b/examples/qos_sched/init.c
index b05206d5a..d165b3dd4 100644
--- a/examples/qos_sched/init.c
+++ b/examples/qos_sched/init.c
@@ -138,6 +138,7 @@ app_init_port(uint16_t portid, struct rte_mempool *mp)
 			 "rte_eth_tx_queue_setup: err=%d, port=%u queue=%d\n",
 			 ret, portid, 0);
 
+	rte_eth_dev_set_supported_ptypes(portid, RTE_PTYPE_UNKNOWN, NULL, 0);
 	/* Start device */
 	ret = rte_eth_dev_start(portid);
 	if (ret < 0)
diff --git a/examples/qos_sched/meson.build b/examples/qos_sched/meson.build
index 289b81ce8..5101652af 100644
--- a/examples/qos_sched/meson.build
+++ b/examples/qos_sched/meson.build
@@ -7,6 +7,7 @@
 # DPDK instance, use 'make'
 
 deps += ['sched', 'cfgfile']
+allow_experimental_apis = true
 sources = files(
 	'app_thread.c', 'args.c', 'cfg_file.c', 'cmdline.c',
 	'init.c', 'main.c', 'stats.c'
diff --git a/examples/quota_watermark/qw/Makefile b/examples/quota_watermark/qw/Makefile
index 3f10f01c3..e06f4482b 100644
--- a/examples/quota_watermark/qw/Makefile
+++ b/examples/quota_watermark/qw/Makefile
@@ -18,5 +18,6 @@ SRCS-y := args.c init.c main.c
 
 CFLAGS += -O3 -DQW_SOFTWARE_FC
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 include $(RTE_SDK)/mk/rte.extapp.mk
diff --git a/examples/quota_watermark/qw/init.c b/examples/quota_watermark/qw/init.c
index 5a0f64f45..4753eb900 100644
--- a/examples/quota_watermark/qw/init.c
+++ b/examples/quota_watermark/qw/init.c
@@ -96,6 +96,7 @@ void configure_eth_port(uint16_t port_id)
 				"Failed to setup hardware flow control on port %u (error %d)\n",
 				(unsigned int) port_id, ret);
 
+	rte_eth_dev_set_supported_ptypes(port_id, RTE_PTYPE_UNKNOWN, NULL, 0);
 	/* Start the port */
 	ret = rte_eth_dev_start(port_id);
 	if (ret < 0)
diff --git a/examples/rxtx_callbacks/main.c b/examples/rxtx_callbacks/main.c
index dbcd9f4fc..8949f0d93 100644
--- a/examples/rxtx_callbacks/main.c
+++ b/examples/rxtx_callbacks/main.c
@@ -152,6 +152,7 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool)
 			return retval;
 	}
 
+	rte_eth_dev_set_supported_ptypes(port, RTE_PTYPE_UNKNOWN, NULL, 0);
 	retval  = rte_eth_dev_start(port);
 	if (retval < 0)
 		return retval;
diff --git a/examples/server_node_efd/server/Makefile b/examples/server_node_efd/server/Makefile
index 4837bd3ea..acbd12ae2 100644
--- a/examples/server_node_efd/server/Makefile
+++ b/examples/server_node_efd/server/Makefile
@@ -25,5 +25,6 @@ INC := $(sort $(wildcard *.h))
 
 CFLAGS += $(WERROR_FLAGS) -O3
 CFLAGS += -I$(SRCDIR)/../shared
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 include $(RTE_SDK)/mk/rte.extapp.mk
diff --git a/examples/server_node_efd/server/init.c b/examples/server_node_efd/server/init.c
index af5a18e28..bbea0c4c9 100644
--- a/examples/server_node_efd/server/init.c
+++ b/examples/server_node_efd/server/init.c
@@ -149,6 +149,7 @@ init_port(uint16_t port_num)
 
 	rte_eth_promiscuous_enable(port_num);
 
+	rte_eth_dev_set_supported_ptypes(port_num, RTE_PTYPE_UNKNOWN, NULL, 0);
 	retval = rte_eth_dev_start(port_num);
 	if (retval < 0)
 		return retval;
diff --git a/examples/skeleton/Makefile b/examples/skeleton/Makefile
index c5ac26029..0037d6b25 100644
--- a/examples/skeleton/Makefile
+++ b/examples/skeleton/Makefile
@@ -50,6 +50,7 @@ RTE_TARGET ?= $(notdir $(abspath $(dir $(firstword $(wildcard $(RTE_SDK)/*/.conf
 include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 # workaround for a gcc bug with noreturn attribute
 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603
diff --git a/examples/skeleton/basicfwd.c b/examples/skeleton/basicfwd.c
index a8a8e98f0..423ce05f8 100644
--- a/examples/skeleton/basicfwd.c
+++ b/examples/skeleton/basicfwd.c
@@ -76,6 +76,7 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool)
 			return retval;
 	}
 
+	rte_eth_dev_set_supported_ptypes(port, RTE_PTYPE_UNKNOWN, NULL, 0);
 	/* Start the Ethernet port. */
 	retval = rte_eth_dev_start(port);
 	if (retval < 0)
diff --git a/examples/skeleton/meson.build b/examples/skeleton/meson.build
index 9bb9ec329..ef46b187e 100644
--- a/examples/skeleton/meson.build
+++ b/examples/skeleton/meson.build
@@ -6,6 +6,7 @@
 # To build this example as a standalone application with an already-installed
 # DPDK instance, use 'make'
 
+allow_experimental_apis = true
 sources = files(
 	'basicfwd.c'
 )
diff --git a/examples/tep_termination/Makefile b/examples/tep_termination/Makefile
index 31165bd92..586838676 100644
--- a/examples/tep_termination/Makefile
+++ b/examples/tep_termination/Makefile
@@ -61,6 +61,7 @@ endif
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
 CFLAGS += -Wno-deprecated-declarations
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 include $(RTE_SDK)/mk/rte.extapp.mk
 endif
diff --git a/examples/tep_termination/meson.build b/examples/tep_termination/meson.build
index f65d68980..f40b1c0b8 100644
--- a/examples/tep_termination/meson.build
+++ b/examples/tep_termination/meson.build
@@ -11,6 +11,7 @@ if not is_linux
 endif
 deps += ['hash', 'vhost']
 cflags += '-Wno-deprecated-declarations'
+allow_experimental_apis = true
 sources = files(
 	'main.c', 'vxlan.c', 'vxlan_setup.c'
 )
diff --git a/examples/tep_termination/vxlan_setup.c b/examples/tep_termination/vxlan_setup.c
index 9a0880002..219d3e215 100644
--- a/examples/tep_termination/vxlan_setup.c
+++ b/examples/tep_termination/vxlan_setup.c
@@ -167,6 +167,7 @@ vxlan_port_init(uint16_t port, struct rte_mempool *mbuf_pool)
 			return retval;
 	}
 
+	rte_eth_dev_set_supported_ptypes(port, RTE_PTYPE_UNKNOWN, NULL, 0);
 	/* Start the device. */
 	retval  = rte_eth_dev_start(port);
 	if (retval < 0)
diff --git a/examples/vhost/Makefile b/examples/vhost/Makefile
index f84b7f017..7722e81c7 100644
--- a/examples/vhost/Makefile
+++ b/examples/vhost/Makefile
@@ -62,6 +62,7 @@ else
 CFLAGS += -DALLOW_EXPERIMENTAL_API
 CFLAGS += -O2 -D_FILE_OFFSET_BITS=64
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 include $(RTE_SDK)/mk/rte.extapp.mk
 
diff --git a/examples/vhost/main.c b/examples/vhost/main.c
index 0961db080..3d9f125e5 100644
--- a/examples/vhost/main.c
+++ b/examples/vhost/main.c
@@ -321,6 +321,7 @@ port_init(uint16_t port)
 		}
 	}
 
+	rte_eth_dev_set_supported_ptypes(port, RTE_PTYPE_UNKNOWN, NULL, 0);
 	/* Start the device. */
 	retval  = rte_eth_dev_start(port);
 	if (retval < 0) {
diff --git a/examples/vm_power_manager/Makefile b/examples/vm_power_manager/Makefile
index 2fdb991d7..65c2ad179 100644
--- a/examples/vm_power_manager/Makefile
+++ b/examples/vm_power_manager/Makefile
@@ -28,6 +28,7 @@ endif
 
 CFLAGS += -O3 -I$(RTE_SDK)/lib/librte_power/
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 LDLIBS += -lvirt
 
diff --git a/examples/vm_power_manager/main.c b/examples/vm_power_manager/main.c
index 54c704610..4cb4ccecf 100644
--- a/examples/vm_power_manager/main.c
+++ b/examples/vm_power_manager/main.c
@@ -99,6 +99,7 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool)
 			return retval;
 	}
 
+	rte_eth_dev_set_supported_ptypes(port, RTE_PTYPE_UNKNOWN, NULL, 0);
 	/* Start the Ethernet port. */
 	retval = rte_eth_dev_start(port);
 	if (retval < 0)
diff --git a/examples/vm_power_manager/meson.build b/examples/vm_power_manager/meson.build
index 20a4a05b3..54e2b584f 100644
--- a/examples/vm_power_manager/meson.build
+++ b/examples/vm_power_manager/meson.build
@@ -25,6 +25,7 @@ if dpdk_conf.has('RTE_LIBRTE_IXGBE_PMD')
 	deps += ['pmd_ixgbe']
 endif
 
+allow_experimental_apis = true
 sources = files(
 	'channel_manager.c', 'channel_monitor.c', 'main.c', 'parse.c', 'power_manager.c', 'vm_power_cli.c'
 )
diff --git a/examples/vmdq/Makefile b/examples/vmdq/Makefile
index 1557ee86b..2168747cc 100644
--- a/examples/vmdq/Makefile
+++ b/examples/vmdq/Makefile
@@ -50,6 +50,7 @@ RTE_TARGET ?= $(notdir $(abspath $(dir $(firstword $(wildcard $(RTE_SDK)/*/.conf
 include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 EXTRA_CFLAGS += -O3
 
diff --git a/examples/vmdq/main.c b/examples/vmdq/main.c
index 7281ffd7f..65431f95e 100644
--- a/examples/vmdq/main.c
+++ b/examples/vmdq/main.c
@@ -258,6 +258,7 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool)
 		}
 	}
 
+	rte_eth_dev_set_supported_ptypes(port, RTE_PTYPE_UNKNOWN, NULL, 0);
 	retval  = rte_eth_dev_start(port);
 	if (retval < 0) {
 		printf("port %d start failed\n", port);
diff --git a/examples/vmdq/meson.build b/examples/vmdq/meson.build
index c34e11e36..2b0a25036 100644
--- a/examples/vmdq/meson.build
+++ b/examples/vmdq/meson.build
@@ -6,6 +6,7 @@
 # To build this example as a standalone application with an already-installed
 # DPDK instance, use 'make'
 
+allow_experimental_apis = true
 sources = files(
 	'main.c'
 )
diff --git a/examples/vmdq_dcb/Makefile b/examples/vmdq_dcb/Makefile
index 391096cfb..ea1574d91 100644
--- a/examples/vmdq_dcb/Makefile
+++ b/examples/vmdq_dcb/Makefile
@@ -50,6 +50,7 @@ RTE_TARGET ?= $(notdir $(abspath $(dir $(firstword $(wildcard $(RTE_SDK)/*/.conf
 include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 # workaround for a gcc bug with noreturn attribute
 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603
diff --git a/examples/vmdq_dcb/main.c b/examples/vmdq_dcb/main.c
index 389000327..44fe63482 100644
--- a/examples/vmdq_dcb/main.c
+++ b/examples/vmdq_dcb/main.c
@@ -313,6 +313,7 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool)
 		}
 	}
 
+	rte_eth_dev_set_supported_ptypes(port, RTE_PTYPE_UNKNOWN, NULL, 0);
 	retval  = rte_eth_dev_start(port);
 	if (retval < 0) {
 		printf("port %d start failed\n", port);
diff --git a/examples/vmdq_dcb/meson.build b/examples/vmdq_dcb/meson.build
index c34e11e36..2b0a25036 100644
--- a/examples/vmdq_dcb/meson.build
+++ b/examples/vmdq_dcb/meson.build
@@ -6,6 +6,7 @@
 # To build this example as a standalone application with an already-installed
 # DPDK instance, use 'make'
 
+allow_experimental_apis = true
 sources = files(
 	'main.c'
 )
-- 
2.17.1


^ permalink raw reply	[flat|nested] 245+ messages in thread

* Re: [dpdk-dev] [PATCH v4 1/7] ethdev: add set ptype function
  2019-10-01  6:34     ` [dpdk-dev] [PATCH v4 1/7] ethdev: add set ptype function pbhagavatula
@ 2019-10-01  7:04       ` Andrew Rybchenko
  0 siblings, 0 replies; 245+ messages in thread
From: Andrew Rybchenko @ 2019-10-01  7:04 UTC (permalink / raw)
  To: pbhagavatula, jerinj, John McNamara, Marko Kovacevic,
	Thomas Monjalon, Ferruh Yigit
  Cc: dev

On 10/1/19 9:34 AM, pbhagavatula@marvell.com wrote:
> From: Pavan Nikhilesh <pbhagavatula@marvell.com>
>
> Add `rte_eth_dev_set_supported_ptypes` function that will allow the
> application to inform the PMD the packet types it is interested in.
> 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_supported_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_supported_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_supported_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>



> diff --git a/doc/guides/rel_notes/release_19_11.rst b/doc/guides/rel_notes/release_19_11.rst
> index 27cfbd9e3..7e31b9401 100644
> --- a/doc/guides/rel_notes/release_19_11.rst
> +++ b/doc/guides/rel_notes/release_19_11.rst
> @@ -56,6 +56,13 @@ New Features
>        Also, make sure to start the actual text at the margin.
>        =========================================================
>   
> +* **Added ethdev API to set supported packet types**
> +
> +  *  Added new API ``rte_eth_dev_set_supported_ptypes`` that allows an
> +     application to inform PMD about packet types classification the application
> +     is interested in
> +  *  This scheme will allow PMDs to avoid lookup to internal ptype table on Rx
> +     and thereby improve Rx performance if application wishes do so.

Extra empty line is required here in accordance with documentation 
guidelines.

>   Removed Items
>   -------------
> diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
> index 17d183e1f..061de7ac5 100644
> --- a/lib/librte_ethdev/rte_ethdev.c
> +++ b/lib/librte_ethdev/rte_ethdev.c
> @@ -2602,6 +2602,44 @@ rte_eth_dev_get_supported_ptypes(uint16_t port_id, uint32_t ptype_mask,
>   	return j;
>   }
>   
> +int
> +rte_eth_dev_set_supported_ptypes(uint16_t port_id, uint32_t ptype_mask,
> +				 uint32_t *set_ptypes, int num)

May be num should be unsigned int?

> +{
> +	int i, j;
> +	struct rte_eth_dev *dev;
> +	const uint32_t *all_ptypes;
> +
> +	RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
> +	dev = &rte_eth_devices[port_id];
> +	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_supported_ptypes_get, 0);
> +	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_supported_ptypes_set, 0);

if (num > 0 && set_ptypes == NULL)
     return -EINVAL;

> +
> +	if (ptype_mask == 0)

if (num > 0)
      set_ptypes[0] = RTE_PTYPE_UNKNOWN;

> +		return (*dev->dev_ops->dev_supported_ptypes_set)(dev,
> +				ptype_mask);
> +
> +	all_ptypes = (*dev->dev_ops->dev_supported_ptypes_get)(dev);
> +	if (all_ptypes == NULL)

if (num > 0)
      set_ptypes[0] = RTE_PTYPE_UNKNOWN;

> +		return 0;
> +
> +	for (i = 0, j = 0; set_ptypes && (all_ptypes[i] != RTE_PTYPE_UNKNOWN);

set_ptypes != NULL in accordance with coding guidelines

> +									++i) {

Please, consider to put condition check and increment in its own lines.
IMHO, above it a bit hard to read.

> +		if (ptype_mask & all_ptypes[i]) {

Should it be done if all_ptypes[i] have some bits out of ptype_mask?
Should set_ptypes have bits out of ptype_mask when set below?

> +			if (j < num - 1) {
> +				set_ptypes[j] = all_ptypes[i];
> +				j++;
> +				continue;
> +			}
> +			break;

Do we need an indication if provided set_ptype is not enough
to return all ptypes? I think it should be explained/highlighted
in the function description with explanation why.

> +		}
> +	}
> +
> +	set_ptypes[j] = RTE_PTYPE_UNKNOWN;

I think we should allow set_ptypes == NULL if num == 0.
So, it should be set here if not NULL only.

> +
> +	return (*dev->dev_ops->dev_supported_ptypes_set)(dev, ptype_mask);
> +}
> +
>   void
>   rte_eth_macaddr_get(uint16_t port_id, struct rte_ether_addr *mac_addr)
>   {
> diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
> index d9871782e..6c5fd789a 100644
> --- a/lib/librte_ethdev/rte_ethdev.h
> +++ b/lib/librte_ethdev/rte_ethdev.h
> @@ -2431,6 +2431,35 @@ int rte_eth_dev_fw_version_get(uint16_t port_id,
>    */
>   int rte_eth_dev_get_supported_ptypes(uint16_t port_id, uint32_t ptype_mask,
>   				     uint32_t *ptypes, int num);
> +/**
> + * @warning
> + * @b EXPERIMENTAL: this API may change without prior notice.
> + *
> + * Inform Ethernet device of the packet types classification in which
> + * the recipient is interested.
> + *
> + * Application can use this function to set only specific ptypes that it's
> + * interested. This information can be used by the PMD to optimize Rx path.
> + *
> + * @param port_id
> + *   The port identifier of the Ethernet device.
> + * @param ptype_mask
> + *   The ptype family that application is interested in.
> + * @param set_ptypes
> + *   An array pointer to store set packet types, allocated by caller. The
> + *   function marks the end of array with RTE_PTYPE_UNKNOWN.
> + * @param num
> + *   Size of the array pointed by param ptypes.
> + *   Should be rte_eth_dev_get_supported_ptypes() + 1 to accomodate the
> + *   set ptypes.
> + * @return
> + *   - (0) if Success.
> + *   - (-ENODEV) if *port_id* invalid.
> + *   - (-EINVAL) if *ptype_mask* is invalid.

or set_ptype is NULL when num is greater than zero.

> + */
> +__rte_experimental
> +int rte_eth_dev_set_supported_ptypes(uint16_t port_id, uint32_t ptype_mask,
> +				     uint32_t *set_ptypes, int num);
>   
>   /**
>    * Retrieve the MTU of an Ethernet device.
> diff --git a/lib/librte_ethdev/rte_ethdev_core.h b/lib/librte_ethdev/rte_ethdev_core.h
> index 2922d5b7c..93bc34480 100644
> --- a/lib/librte_ethdev/rte_ethdev_core.h
> +++ b/lib/librte_ethdev/rte_ethdev_core.h
> @@ -110,6 +110,10 @@ typedef void (*eth_dev_infos_get_t)(struct rte_eth_dev *dev,
>   typedef const uint32_t *(*eth_dev_supported_ptypes_get_t)(struct rte_eth_dev *dev);
>   /**< @internal Get supported ptypes of an Ethernet device. */
>   
> +typedef uint32_t (*eth_dev_supported_ptypes_set_t)(struct rte_eth_dev *dev,
> +					      uint32_t ptype_mask);
> +/**< @internal Inform device about packet types in which the recipient is interested. */
> +
>   typedef int (*eth_queue_start_t)(struct rte_eth_dev *dev,
>   				    uint16_t queue_id);
>   /**< @internal Start rx and tx of a queue of an Ethernet device. */
> @@ -421,6 +425,8 @@ struct eth_dev_ops {
>   	eth_fw_version_get_t       fw_version_get; /**< Get firmware version. */
>   	eth_dev_supported_ptypes_get_t dev_supported_ptypes_get;
>   	/**< Get packet types supported and identified by device. */
> +	eth_dev_supported_ptypes_set_t dev_supported_ptypes_set;
> +	/**< Inform device about packet types in which the recipient is interested. */
>   
>   	vlan_filter_set_t          vlan_filter_set; /**< Filter VLAN Setup. */
>   	vlan_tpid_set_t            vlan_tpid_set; /**< Outer/Inner VLAN TPID Setup. */
> diff --git a/lib/librte_ethdev/rte_ethdev_version.map b/lib/librte_ethdev/rte_ethdev_version.map
> index 6df42a47b..e14745b9c 100644
> --- a/lib/librte_ethdev/rte_ethdev_version.map
> +++ b/lib/librte_ethdev/rte_ethdev_version.map
> @@ -283,4 +283,7 @@ EXPERIMENTAL {
>   
>   	# added in 19.08
>   	rte_eth_read_clock;
> +
> +	# added in 19.11
> +	rte_eth_dev_set_supported_ptypes;
>   };


^ permalink raw reply	[flat|nested] 245+ messages in thread

* Re: [dpdk-dev] [PATCH v5 4/7] drivers/net: update Rx RSS hash offload capabilities
  2019-10-01  6:41       ` [dpdk-dev] [PATCH v5 4/7] drivers/net: update Rx RSS hash offload capabilities pbhagavatula
@ 2019-10-01  7:10         ` Andrew Rybchenko
  2019-10-01 11:50         ` Hemant Agrawal
  1 sibling, 0 replies; 245+ messages in thread
From: Andrew Rybchenko @ 2019-10-01  7:10 UTC (permalink / raw)
  To: pbhagavatula, jerinj, Ajit Khaparde, Somnath Kotur,
	Rahul Lakkireddy, Hemant Agrawal, Sachin Saxena, Wenzhuo Lu,
	John Daley, Hyong Youb Kim, Qi Zhang, Xiao Wang, Ziyang Xuan,
	Xiaoyun Wang, Guoyang Zhou, Beilei Xing, Jingjing Wu,
	Qiming Yang, Konstantin Ananyev, Shijith Thotton,
	Srisivasubramanian Srinivasan, Matan Azrad, Shahaf Shuler,
	Viacheslav Ovsiienko, Stephen Hemminger, K. Y. Srinivasan,
	Haiyang Zhang, Alejandro Lucero, Nithin Dabilpuram,
	Kiran Kumar K, Rasesh Mody, Shahed Shaikh, Maciej Czekaj,
	Yong Wang
  Cc: dev

On 10/1/19 9:41 AM, pbhagavatula@marvell.com wrote:
> From: Pavan Nikhilesh <pbhagavatula@marvell.com>
>
> Add DEV_RX_OFFLOAD_RSS_HASH flag for all PMDs that support RSS hash
> delivery.
>
> Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>

[snip]

> diff --git a/drivers/net/sfc/sfc_ef10_essb_rx.c b/drivers/net/sfc/sfc_ef10_essb_rx.c
> index 63da807ea..220ef0e47 100644
> --- a/drivers/net/sfc/sfc_ef10_essb_rx.c
> +++ b/drivers/net/sfc/sfc_ef10_essb_rx.c
> @@ -716,7 +716,7 @@ struct sfc_dp_rx sfc_ef10_essb_rx = {
>   	.features		= SFC_DP_RX_FEAT_FLOW_FLAG |
>   				  SFC_DP_RX_FEAT_FLOW_MARK,
>   	.dev_offload_capa	= DEV_RX_OFFLOAD_CHECKSUM,
> -	.queue_offload_capa	= 0,
> +	.queue_offload_capa	= DEV_RX_OFFLOAD_RSS_HASH,
>   	.get_dev_info		= sfc_ef10_essb_rx_get_dev_info,
>   	.pool_ops_supported	= sfc_ef10_essb_rx_pool_ops_supported,
>   	.qsize_up_rings		= sfc_ef10_essb_rx_qsize_up_rings,
> diff --git a/drivers/net/sfc/sfc_ef10_rx.c b/drivers/net/sfc/sfc_ef10_rx.c
> index f2fc6e70a..85b5df466 100644
> --- a/drivers/net/sfc/sfc_ef10_rx.c
> +++ b/drivers/net/sfc/sfc_ef10_rx.c
> @@ -797,7 +797,8 @@ struct sfc_dp_rx sfc_ef10_rx = {
>   				  SFC_DP_RX_FEAT_INTR,
>   	.dev_offload_capa	= DEV_RX_OFFLOAD_CHECKSUM |
>   				  DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM,
> -	.queue_offload_capa	= DEV_RX_OFFLOAD_SCATTER,
> +	.queue_offload_capa	= DEV_RX_OFFLOAD_SCATTER |
> +				  DEV_RX_OFFLOAD_RSS_HASH,
>   	.get_dev_info		= sfc_ef10_rx_get_dev_info,
>   	.qsize_up_rings		= sfc_ef10_rx_qsize_up_rings,
>   	.qcreate		= sfc_ef10_rx_qcreate,
> diff --git a/drivers/net/sfc/sfc_rx.c b/drivers/net/sfc/sfc_rx.c
> index e6809bb64..695580b22 100644
> --- a/drivers/net/sfc/sfc_rx.c
> +++ b/drivers/net/sfc/sfc_rx.c
> @@ -618,7 +618,8 @@ struct sfc_dp_rx sfc_efx_rx = {
>   	},
>   	.features		= SFC_DP_RX_FEAT_INTR,
>   	.dev_offload_capa	= DEV_RX_OFFLOAD_CHECKSUM,
> -	.queue_offload_capa	= DEV_RX_OFFLOAD_SCATTER,
> +	.queue_offload_capa	= DEV_RX_OFFLOAD_SCATTER |
> +				  DEV_RX_OFFLOAD_RSS_HASH,
>   	.qsize_up_rings		= sfc_efx_rx_qsize_up_rings,
>   	.qcreate		= sfc_efx_rx_qcreate,
>   	.qdestroy		= sfc_efx_rx_qdestroy,
> diff --git a/drivers/net/thunderx/nicvf_ethdev.h b/drivers/net/thunderx/nicvf_ethdev.h
> index c0bfbf848..391411799 100644
> --- a/drivers/net/thunderx/nicvf_ethdev.h
> +++ b/drivers/net/thunderx/nicvf_ethdev.h
> @@ -41,7 +41,8 @@
>   	DEV_RX_OFFLOAD_CHECKSUM    | \
>   	DEV_RX_OFFLOAD_VLAN_STRIP  | \
>   	DEV_RX_OFFLOAD_JUMBO_FRAME | \
> -	DEV_RX_OFFLOAD_SCATTER)
> +	DEV_RX_OFFLOAD_SCATTER     | \
> +	DEV_RX_OFFLOAD_RSS_HASH)
>   
>   #define NICVF_DEFAULT_RX_FREE_THRESH    224
>   #define NICVF_DEFAULT_TX_FREE_THRESH    224

For net/sfc:
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>


^ permalink raw reply	[flat|nested] 245+ messages in thread

* Re: [dpdk-dev] [PATCH v5 5/7] drivers/net: update Rx flow flag and mark capabilities
  2019-10-01  6:41       ` [dpdk-dev] [PATCH v5 5/7] drivers/net: update Rx flow flag and mark capabilities pbhagavatula
@ 2019-10-01  7:11         ` Andrew Rybchenko
  0 siblings, 0 replies; 245+ messages in thread
From: Andrew Rybchenko @ 2019-10-01  7:11 UTC (permalink / raw)
  To: pbhagavatula, jerinj, Ajit Khaparde, Somnath Kotur, John Daley,
	Hyong Youb Kim, Beilei Xing, Qi Zhang, Jingjing Wu, Wenzhuo Lu,
	Qiming Yang, Konstantin Ananyev, Matan Azrad, Shahaf Shuler,
	Viacheslav Ovsiienko, Nithin Dabilpuram, Kiran Kumar K
  Cc: dev

On 10/1/19 9:41 AM, pbhagavatula@marvell.com wrote:
> From: Pavan Nikhilesh <pbhagavatula@marvell.com>
>
> Add DEV_RX_OFFLOAD_FLOW_MARK flag for all PMDs that support flow action
> flag and mark.
>
> Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>

[snip]

> diff --git a/drivers/net/sfc/sfc_ef10_essb_rx.c b/drivers/net/sfc/sfc_ef10_essb_rx.c
> index 220ef0e47..1887731e2 100644
> --- a/drivers/net/sfc/sfc_ef10_essb_rx.c
> +++ b/drivers/net/sfc/sfc_ef10_essb_rx.c
> @@ -716,7 +716,8 @@ struct sfc_dp_rx sfc_ef10_essb_rx = {
>   	.features		= SFC_DP_RX_FEAT_FLOW_FLAG |
>   				  SFC_DP_RX_FEAT_FLOW_MARK,
>   	.dev_offload_capa	= DEV_RX_OFFLOAD_CHECKSUM,
> -	.queue_offload_capa	= DEV_RX_OFFLOAD_RSS_HASH,
> +	.queue_offload_capa	= DEV_RX_OFFLOAD_RSS_HASH |
> +				  DEV_RX_OFFLOAD_FLOW_MARK,
>   	.get_dev_info		= sfc_ef10_essb_rx_get_dev_info,
>   	.pool_ops_supported	= sfc_ef10_essb_rx_pool_ops_supported,
>   	.qsize_up_rings		= sfc_ef10_essb_rx_qsize_up_rings,

For net/sfc:
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>


^ permalink raw reply	[flat|nested] 245+ messages in thread

* Re: [dpdk-dev] [PATCH v5 4/7] drivers/net: update Rx RSS hash offload capabilities
  2019-10-01  6:41       ` [dpdk-dev] [PATCH v5 4/7] drivers/net: update Rx RSS hash offload capabilities pbhagavatula
  2019-10-01  7:10         ` Andrew Rybchenko
@ 2019-10-01 11:50         ` Hemant Agrawal
  1 sibling, 0 replies; 245+ messages in thread
From: Hemant Agrawal @ 2019-10-01 11:50 UTC (permalink / raw)
  To: pbhagavatula, arybchenko, jerinj, Ajit Khaparde, Somnath Kotur,
	Rahul Lakkireddy, Sachin Saxena, Wenzhuo Lu, John Daley,
	Hyong Youb Kim, Qi Zhang, Xiao Wang, Ziyang Xuan, Xiaoyun Wang,
	Guoyang Zhou, Beilei Xing, Jingjing Wu, Qiming Yang,
	Konstantin Ananyev, Shijith Thotton,
	Srisivasubramanian Srinivasan, Matan Azrad, Shahaf Shuler,
	Viacheslav Ovsiienko, Stephen Hemminger, K. Y. Srinivasan,
	Haiyang Zhang, Alejandro Lucero, Nithin Dabilpuram,
	Kiran Kumar K, Rasesh Mody, Shahed Shaikh, Maciej Czekaj,
	Yong Wang
  Cc: dev

> diff --git a/drivers/net/dpaa/dpaa_ethdev.c
> b/drivers/net/dpaa/dpaa_ethdev.c index 7154fb9b4..18c7bd0d5 100644
> --- a/drivers/net/dpaa/dpaa_ethdev.c
> +++ b/drivers/net/dpaa/dpaa_ethdev.c
> @@ -49,7 +49,8 @@
>  /* Supported Rx offloads */
>  static uint64_t dev_rx_offloads_sup =
>  		DEV_RX_OFFLOAD_JUMBO_FRAME |
> -		DEV_RX_OFFLOAD_SCATTER;
> +		DEV_RX_OFFLOAD_SCATTER |
> +		DEV_RX_OFFLOAD_RSS_HASH;
> 
>  /* Rx offloads which cannot be disabled */  static uint64_t
> dev_rx_offloads_nodis = diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c
> b/drivers/net/dpaa2/dpaa2_ethdev.c
> index dd6a78f9f..55a1c4455 100644
> --- a/drivers/net/dpaa2/dpaa2_ethdev.c
> +++ b/drivers/net/dpaa2/dpaa2_ethdev.c
> @@ -38,7 +38,8 @@ static uint64_t dev_rx_offloads_sup =
>  		DEV_RX_OFFLOAD_TCP_CKSUM |
>  		DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM |
>  		DEV_RX_OFFLOAD_VLAN_FILTER |
> -		DEV_RX_OFFLOAD_JUMBO_FRAME;
> +		DEV_RX_OFFLOAD_JUMBO_FRAME |
> +		DEV_RX_OFFLOAD_RSS_HASH;
> 

[Hemant] This patch is currently conflicting with other NXP driver enhancement patch series.
Not sure, which one will get merged.  Anyway:

Reviewed-by: Hemant Agrawal <hemant.agrawal@nxp.com>



^ permalink raw reply	[flat|nested] 245+ messages in thread

* Re: [dpdk-dev] [PATCH v2 4/7] drivers/net: update Rx RSS hash offload capabilities
  2019-08-21 20:47 ` [dpdk-dev] [PATCH v2 4/7] drivers/net: update Rx RSS hash offload capabilities pbhagavatula
@ 2019-10-01 14:43   ` Jerin Jacob
  2019-10-01 15:40   ` Ajit Khaparde
  1 sibling, 0 replies; 245+ messages in thread
From: Jerin Jacob @ 2019-10-01 14:43 UTC (permalink / raw)
  To: Pavan Nikhilesh
  Cc: arybchenko, Jerin Jacob, Ajit Khaparde, Somnath Kotur,
	Rahul Lakkireddy, Hemant Agrawal, Sachin Saxena, Wenzhuo Lu,
	John Daley, Hyong Youb Kim, Qi Zhang, Xiao Wang, Ziyang Xuan,
	Xiaoyun Wang, Guoyang Zhou, Beilei Xing, Jingjing Wu,
	Qiming Yang, Konstantin Ananyev, Shijith Thotton,
	Srisivasubramanian Srinivasan, Matan Azrad, Shahaf Shuler,
	Yongseok Koh, Viacheslav Ovsiienko, Stephen Hemminger,
	K. Y. Srinivasan, Haiyang Zhang, Alejandro Lucero,
	Nithin Dabilpuram, Kiran Kumar K, Rasesh Mody, Shahed Shaikh,
	Maciej Czekaj, Yong Wang, dpdk-dev

On Thu, Aug 22, 2019 at 2:18 AM <pbhagavatula@marvell.com> wrote:
>
> From: Pavan Nikhilesh <pbhagavatula@marvell.com>
>
> Add DEV_RX_OFFLOAD_RSS_HASH flag for all PMDs that support RSS hash
> delivery.
>
> Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>

For net/octeontx2:

Acked-by: Jerin Jacob <jerinj@marvell.com>

^ permalink raw reply	[flat|nested] 245+ messages in thread

* Re: [dpdk-dev] [PATCH v2 5/7] drivers/net: update Rx flow flag and mark capabilities
  2019-08-21 20:47 ` [dpdk-dev] [PATCH v2 5/7] drivers/net: update Rx flow flag and mark capabilities pbhagavatula
  2019-08-23 10:03   ` Andrew Rybchenko
@ 2019-10-01 14:48   ` Jerin Jacob
  1 sibling, 0 replies; 245+ messages in thread
From: Jerin Jacob @ 2019-10-01 14:48 UTC (permalink / raw)
  To: Pavan Nikhilesh
  Cc: arybchenko, Jerin Jacob, Ajit Khaparde, Somnath Kotur,
	John Daley, Hyong Youb Kim, Beilei Xing, Qi Zhang, Jingjing Wu,
	Wenzhuo Lu, Qiming Yang, Konstantin Ananyev, Shahaf Shuler,
	Yongseok Koh, Viacheslav Ovsiienko, Nithin Dabilpuram,
	Kiran Kumar K, dpdk-dev

On Thu, Aug 22, 2019 at 2:18 AM <pbhagavatula@marvell.com> wrote:
>
> From: Pavan Nikhilesh <pbhagavatula@marvell.com>
>
> Add DEV_RX_OFFLOAD_FLOW_MARK flag for all PMDs that support flow action
> flag and mark.
>
> Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
> ---
> diff --git a/drivers/net/octeontx2/otx2_flow_parse.c b/drivers/net/octeontx2/otx2_flow_parse.c
> index 6670c1a70..6eb69a8b2 100644
> --- a/drivers/net/octeontx2/otx2_flow_parse.c
> +++ b/drivers/net/octeontx2/otx2_flow_parse.c
> @@ -979,7 +979,8 @@ otx2_flow_parse_actions(struct rte_eth_dev *dev,
>         if (mark)
>                 flow->npc_action |= (uint64_t)mark << 40;
>
> -       if (rte_atomic32_read(&npc->mark_actions) == 1) {
> +       if (rte_atomic32_read(&npc->mark_actions) == 1 &&

npc->mark_actions was kind of emulating the DEV_RX_OFFLOAD_FLOW_MARK.
Now that we have explicit DEV_RX_OFFLOAD_FLOW_MARK flag, We can remove
npc->mark_actions.

> +                       (hw->rx_offloads & DEV_RX_OFFLOAD_FLOW_MARK)) {
>                 hw->rx_offload_flags |=
>                         NIX_RX_OFFLOAD_MARK_UPDATE_F;
>                 otx2_eth_set_rx_function(dev);

^ permalink raw reply	[flat|nested] 245+ messages in thread

* Re: [dpdk-dev] [PATCH v2 1/7] ethdev: add set ptype function
  2019-08-21 20:47 ` [dpdk-dev] [PATCH v2 1/7] ethdev: add set ptype function pbhagavatula
  2019-08-23  9:44   ` Andrew Rybchenko
@ 2019-10-01 14:54   ` Jerin Jacob
  1 sibling, 0 replies; 245+ messages in thread
From: Jerin Jacob @ 2019-10-01 14:54 UTC (permalink / raw)
  To: Pavan Nikhilesh
  Cc: arybchenko, Jerin Jacob, John McNamara, Marko Kovacevic,
	Thomas Monjalon, Ferruh Yigit, dpdk-dev

On Thu, Aug 22, 2019 at 2:18 AM <pbhagavatula@marvell.com> wrote:
>
> From: Pavan Nikhilesh <pbhagavatula@marvell.com>
>
> Add `rte_eth_dev_set_supported_ptypes` function that will allow the
> application to inform the PMD the packet types it is interested in.
> 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_supported_ptypes(ethdev_id, RTE_PTYPE_UNKNOWN)` and PMD
> will set rte_mbuf::packet_type to 0.
>
> -If application doesn’t call `rte_eth_dev_set_supported_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_supported_ptypes(ethdev_id,
>                 RTE_PTYPE_L2_MASK | RTE_PTYPE_L3_MASK)`.
>
> Suggested-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
> Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
> ---
>  doc/guides/nics/features.rst             | 12 ++++++---
>  doc/guides/rel_notes/release_19_11.rst   |  7 ++++++
>  lib/librte_ethdev/rte_ethdev.c           | 32 ++++++++++++++++++++++++
>  lib/librte_ethdev/rte_ethdev.h           | 16 ++++++++++++
>  lib/librte_ethdev/rte_ethdev_core.h      |  6 +++++
>  lib/librte_ethdev/rte_ethdev_version.map |  3 +++


For octeontx2, This feature was enabled through devargs as
"ptype_disable" argument.
Now that, We have public API, Could you remove the "ptype_disable"
devargs from octeontx2 driver
as a separate patch with devargs update in doc/guides/nics/octeontx2.rst.

^ permalink raw reply	[flat|nested] 245+ messages in thread

* Re: [dpdk-dev] [PATCH v2 4/7] drivers/net: update Rx RSS hash offload capabilities
  2019-08-21 20:47 ` [dpdk-dev] [PATCH v2 4/7] drivers/net: update Rx RSS hash offload capabilities pbhagavatula
  2019-10-01 14:43   ` Jerin Jacob
@ 2019-10-01 15:40   ` Ajit Khaparde
  1 sibling, 0 replies; 245+ messages in thread
From: Ajit Khaparde @ 2019-10-01 15:40 UTC (permalink / raw)
  To: pbhagavatula
  Cc: Andrew Rybchenko, Jerin Jacob Kollanukkaran, Somnath Kotur,
	Rahul Lakkireddy, Hemant Agrawal, Sachin Saxena, Wenzhuo Lu,
	John Daley, Hyong Youb Kim, Qi Zhang, Xiao Wang, Ziyang Xuan,
	Xiaoyun Wang, Guoyang Zhou, Beilei Xing, Jingjing Wu,
	Qiming Yang, Konstantin Ananyev, Shijith Thotton,
	Srisivasubramanian Srinivasan, Matan Azrad, Shahaf Shuler,
	Yongseok Koh, Viacheslav Ovsiienko, Stephen Hemminger,
	K. Y. Srinivasan, Haiyang Zhang, Alejandro Lucero,
	Nithin Dabilpuram, Kiran Kumar K, Rasesh Mody, Shahed Shaikh,
	Maciej Czekaj, Yong Wang, dev

On Wed, Aug 21, 2019 at 1:48 PM <pbhagavatula@marvell.com> wrote:

> From: Pavan Nikhilesh <pbhagavatula@marvell.com>
>
> Add DEV_RX_OFFLOAD_RSS_HASH flag for all PMDs that support RSS hash
> delivery.
>
> Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
>
For net/bnxt:

Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>

> ---
>  drivers/net/bnxt/bnxt_ethdev.c       |  3 ++-
>  drivers/net/cxgbe/cxgbe.h            |  3 ++-
>  drivers/net/dpaa/dpaa_ethdev.c       |  3 ++-
>  drivers/net/dpaa2/dpaa2_ethdev.c     |  3 ++-
>  drivers/net/e1000/igb_rxtx.c         |  3 ++-
>  drivers/net/enic/enic_res.c          |  3 ++-
>  drivers/net/fm10k/fm10k_ethdev.c     |  3 ++-
>  drivers/net/hinic/hinic_pmd_ethdev.c |  3 ++-
>  drivers/net/i40e/i40e_ethdev.c       |  3 ++-
>  drivers/net/iavf/iavf_ethdev.c       |  3 ++-
>  drivers/net/ice/ice_ethdev.c         |  3 ++-
>  drivers/net/ixgbe/ixgbe_rxtx.c       |  3 ++-
>  drivers/net/liquidio/lio_ethdev.c    |  3 ++-
>  drivers/net/mlx4/mlx4_rxq.c          |  3 ++-
>  drivers/net/mlx5/mlx5_rxq.c          |  3 ++-
>  drivers/net/netvsc/hn_rndis.c        |  3 ++-
>  drivers/net/nfp/nfp_net.c            |  3 ++-
>  drivers/net/octeontx2/otx2_ethdev.c  |  3 ++-
>  drivers/net/octeontx2/otx2_ethdev.h  | 15 ++++++++-------
>  drivers/net/qede/qede_ethdev.c       |  3 ++-
>  drivers/net/sfc/sfc_ef10_essb_rx.c   |  2 +-
>  drivers/net/sfc/sfc_ef10_rx.c        |  3 ++-
>  drivers/net/sfc/sfc_rx.c             |  3 ++-
>  drivers/net/thunderx/nicvf_ethdev.h  |  3 ++-
>  drivers/net/vmxnet3/vmxnet3_ethdev.c |  3 ++-
>  25 files changed, 55 insertions(+), 31 deletions(-)
>
> diff --git a/drivers/net/bnxt/bnxt_ethdev.c
> b/drivers/net/bnxt/bnxt_ethdev.c
> index 6685ee7d9..6c106baf7 100644
> --- a/drivers/net/bnxt/bnxt_ethdev.c
> +++ b/drivers/net/bnxt/bnxt_ethdev.c
> @@ -160,7 +160,8 @@ static const struct rte_pci_id bnxt_pci_id_map[] = {
>                                      DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM | \
>                                      DEV_RX_OFFLOAD_JUMBO_FRAME | \
>                                      DEV_RX_OFFLOAD_KEEP_CRC | \
> -                                    DEV_RX_OFFLOAD_TCP_LRO)
> +                                    DEV_RX_OFFLOAD_TCP_LRO | \
> +                                    DEV_RX_OFFLOAD_RSS_HASH)
>
>  static int bnxt_vlan_offload_set_op(struct rte_eth_dev *dev, int mask);
>  static void bnxt_print_link_info(struct rte_eth_dev *eth_dev);
> diff --git a/drivers/net/cxgbe/cxgbe.h b/drivers/net/cxgbe/cxgbe.h
> index 3f97fa58b..22e61a55c 100644
> --- a/drivers/net/cxgbe/cxgbe.h
> +++ b/drivers/net/cxgbe/cxgbe.h
> @@ -47,7 +47,8 @@
>                            DEV_RX_OFFLOAD_UDP_CKSUM | \
>                            DEV_RX_OFFLOAD_TCP_CKSUM | \
>                            DEV_RX_OFFLOAD_JUMBO_FRAME | \
> -                          DEV_RX_OFFLOAD_SCATTER)
> +                          DEV_RX_OFFLOAD_SCATTER | \
> +                          DEV_RX_OFFLOAD_RSS_HASH)
>
>
>  #define CXGBE_DEVARG_KEEP_OVLAN "keep_ovlan"
> diff --git a/drivers/net/dpaa/dpaa_ethdev.c
> b/drivers/net/dpaa/dpaa_ethdev.c
> index 7154fb9b4..18c7bd0d5 100644
> --- a/drivers/net/dpaa/dpaa_ethdev.c
> +++ b/drivers/net/dpaa/dpaa_ethdev.c
> @@ -49,7 +49,8 @@
>  /* Supported Rx offloads */
>  static uint64_t dev_rx_offloads_sup =
>                 DEV_RX_OFFLOAD_JUMBO_FRAME |
> -               DEV_RX_OFFLOAD_SCATTER;
> +               DEV_RX_OFFLOAD_SCATTER |
> +               DEV_RX_OFFLOAD_RSS_HASH;
>
>  /* Rx offloads which cannot be disabled */
>  static uint64_t dev_rx_offloads_nodis =
> diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c
> b/drivers/net/dpaa2/dpaa2_ethdev.c
> index dd6a78f9f..55a1c4455 100644
> --- a/drivers/net/dpaa2/dpaa2_ethdev.c
> +++ b/drivers/net/dpaa2/dpaa2_ethdev.c
> @@ -38,7 +38,8 @@ static uint64_t dev_rx_offloads_sup =
>                 DEV_RX_OFFLOAD_TCP_CKSUM |
>                 DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM |
>                 DEV_RX_OFFLOAD_VLAN_FILTER |
> -               DEV_RX_OFFLOAD_JUMBO_FRAME;
> +               DEV_RX_OFFLOAD_JUMBO_FRAME |
> +               DEV_RX_OFFLOAD_RSS_HASH;
>
>  /* Rx offloads which cannot be disabled */
>  static uint64_t dev_rx_offloads_nodis =
> diff --git a/drivers/net/e1000/igb_rxtx.c b/drivers/net/e1000/igb_rxtx.c
> index c5606de5d..684fa4ad8 100644
> --- a/drivers/net/e1000/igb_rxtx.c
> +++ b/drivers/net/e1000/igb_rxtx.c
> @@ -1646,7 +1646,8 @@ igb_get_rx_port_offloads_capa(struct rte_eth_dev
> *dev)
>                           DEV_RX_OFFLOAD_TCP_CKSUM   |
>                           DEV_RX_OFFLOAD_JUMBO_FRAME |
>                           DEV_RX_OFFLOAD_KEEP_CRC    |
> -                         DEV_RX_OFFLOAD_SCATTER;
> +                         DEV_RX_OFFLOAD_SCATTER     |
> +                         DEV_RX_OFFLOAD_RSS_HASH;
>
>         return rx_offload_capa;
>  }
> diff --git a/drivers/net/enic/enic_res.c b/drivers/net/enic/enic_res.c
> index 9405e1933..607a085f8 100644
> --- a/drivers/net/enic/enic_res.c
> +++ b/drivers/net/enic/enic_res.c
> @@ -198,7 +198,8 @@ int enic_get_vnic_config(struct enic *enic)
>                 DEV_RX_OFFLOAD_VLAN_STRIP |
>                 DEV_RX_OFFLOAD_IPV4_CKSUM |
>                 DEV_RX_OFFLOAD_UDP_CKSUM |
> -               DEV_RX_OFFLOAD_TCP_CKSUM;
> +               DEV_RX_OFFLOAD_TCP_CKSUM |
> +               DEV_RX_OFFLOAD_RSS_HASH;
>         enic->tx_offload_mask =
>                 PKT_TX_IPV6 |
>                 PKT_TX_IPV4 |
> diff --git a/drivers/net/fm10k/fm10k_ethdev.c
> b/drivers/net/fm10k/fm10k_ethdev.c
> index db4d72129..ba9b174cf 100644
> --- a/drivers/net/fm10k/fm10k_ethdev.c
> +++ b/drivers/net/fm10k/fm10k_ethdev.c
> @@ -1797,7 +1797,8 @@ static uint64_t
> fm10k_get_rx_port_offloads_capa(struct rte_eth_dev *dev)
>                            DEV_RX_OFFLOAD_UDP_CKSUM   |
>                            DEV_RX_OFFLOAD_TCP_CKSUM   |
>                            DEV_RX_OFFLOAD_JUMBO_FRAME |
> -                          DEV_RX_OFFLOAD_HEADER_SPLIT);
> +                          DEV_RX_OFFLOAD_HEADER_SPLIT |
> +                          DEV_RX_OFFLOAD_RSS_HASH);
>  }
>
>  static int
> diff --git a/drivers/net/hinic/hinic_pmd_ethdev.c
> b/drivers/net/hinic/hinic_pmd_ethdev.c
> index 044af9053..53bd2b9ae 100644
> --- a/drivers/net/hinic/hinic_pmd_ethdev.c
> +++ b/drivers/net/hinic/hinic_pmd_ethdev.c
> @@ -680,7 +680,8 @@ hinic_dev_infos_get(struct rte_eth_dev *dev, struct
> rte_eth_dev_info *info)
>         info->rx_offload_capa = DEV_RX_OFFLOAD_VLAN_STRIP |
>                                 DEV_RX_OFFLOAD_IPV4_CKSUM |
>                                 DEV_RX_OFFLOAD_UDP_CKSUM |
> -                               DEV_RX_OFFLOAD_TCP_CKSUM;
> +                               DEV_RX_OFFLOAD_TCP_CKSUM |
> +                               DEV_RX_OFFLOAD_RSS_HASH;
>
>         info->tx_queue_offload_capa = 0;
>         info->tx_offload_capa = DEV_TX_OFFLOAD_VLAN_INSERT |
> diff --git a/drivers/net/i40e/i40e_ethdev.c
> b/drivers/net/i40e/i40e_ethdev.c
> index 4e40b7ab5..7058e0213 100644
> --- a/drivers/net/i40e/i40e_ethdev.c
> +++ b/drivers/net/i40e/i40e_ethdev.c
> @@ -3511,7 +3511,8 @@ i40e_dev_info_get(struct rte_eth_dev *dev, struct
> rte_eth_dev_info *dev_info)
>                 DEV_RX_OFFLOAD_SCATTER |
>                 DEV_RX_OFFLOAD_VLAN_EXTEND |
>                 DEV_RX_OFFLOAD_VLAN_FILTER |
> -               DEV_RX_OFFLOAD_JUMBO_FRAME;
> +               DEV_RX_OFFLOAD_JUMBO_FRAME |
> +               DEV_RX_OFFLOAD_RSS_HASH;
>
>         dev_info->tx_queue_offload_capa = DEV_TX_OFFLOAD_MBUF_FAST_FREE;
>         dev_info->tx_offload_capa =
> diff --git a/drivers/net/iavf/iavf_ethdev.c
> b/drivers/net/iavf/iavf_ethdev.c
> index 8f3907378..aef91a79b 100644
> --- a/drivers/net/iavf/iavf_ethdev.c
> +++ b/drivers/net/iavf/iavf_ethdev.c
> @@ -517,7 +517,8 @@ iavf_dev_info_get(struct rte_eth_dev *dev, struct
> rte_eth_dev_info *dev_info)
>                 DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM |
>                 DEV_RX_OFFLOAD_SCATTER |
>                 DEV_RX_OFFLOAD_JUMBO_FRAME |
> -               DEV_RX_OFFLOAD_VLAN_FILTER;
> +               DEV_RX_OFFLOAD_VLAN_FILTER |
> +               DEV_RX_OFFLOAD_RSS_HASH;
>         dev_info->tx_offload_capa =
>                 DEV_TX_OFFLOAD_VLAN_INSERT |
>                 DEV_TX_OFFLOAD_QINQ_INSERT |
> diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
> index 44a14cb8a..fc0f0003f 100644
> --- a/drivers/net/ice/ice_ethdev.c
> +++ b/drivers/net/ice/ice_ethdev.c
> @@ -2133,7 +2133,8 @@ ice_dev_info_get(struct rte_eth_dev *dev, struct
> rte_eth_dev_info *dev_info)
>                         DEV_RX_OFFLOAD_TCP_CKSUM |
>                         DEV_RX_OFFLOAD_QINQ_STRIP |
>                         DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM |
> -                       DEV_RX_OFFLOAD_VLAN_EXTEND;
> +                       DEV_RX_OFFLOAD_VLAN_EXTEND |
> +                       DEV_RX_OFFLOAD_RSS_HASH;
>                 dev_info->tx_offload_capa |=
>                         DEV_TX_OFFLOAD_QINQ_INSERT |
>                         DEV_TX_OFFLOAD_IPV4_CKSUM |
> diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c
> b/drivers/net/ixgbe/ixgbe_rxtx.c
> index edcfa60ce..fa572d184 100644
> --- a/drivers/net/ixgbe/ixgbe_rxtx.c
> +++ b/drivers/net/ixgbe/ixgbe_rxtx.c
> @@ -2872,7 +2872,8 @@ ixgbe_get_rx_port_offloads(struct rte_eth_dev *dev)
>                    DEV_RX_OFFLOAD_KEEP_CRC    |
>                    DEV_RX_OFFLOAD_JUMBO_FRAME |
>                    DEV_RX_OFFLOAD_VLAN_FILTER |
> -                  DEV_RX_OFFLOAD_SCATTER;
> +                  DEV_RX_OFFLOAD_SCATTER |
> +                  DEV_RX_OFFLOAD_RSS_HASH;
>
>         if (hw->mac.type == ixgbe_mac_82598EB)
>                 offloads |= DEV_RX_OFFLOAD_VLAN_STRIP;
> diff --git a/drivers/net/liquidio/lio_ethdev.c
> b/drivers/net/liquidio/lio_ethdev.c
> index c25dab00c..ff118586e 100644
> --- a/drivers/net/liquidio/lio_ethdev.c
> +++ b/drivers/net/liquidio/lio_ethdev.c
> @@ -406,7 +406,8 @@ lio_dev_info_get(struct rte_eth_dev *eth_dev,
>         devinfo->rx_offload_capa = (DEV_RX_OFFLOAD_IPV4_CKSUM           |
>                                     DEV_RX_OFFLOAD_UDP_CKSUM            |
>                                     DEV_RX_OFFLOAD_TCP_CKSUM            |
> -                                   DEV_RX_OFFLOAD_VLAN_STRIP);
> +                                   DEV_RX_OFFLOAD_VLAN_STRIP           |
> +                                   DEV_RX_OFFLOAD_RSS_HASH);
>         devinfo->tx_offload_capa = (DEV_TX_OFFLOAD_IPV4_CKSUM           |
>                                     DEV_TX_OFFLOAD_UDP_CKSUM            |
>                                     DEV_TX_OFFLOAD_TCP_CKSUM            |
> diff --git a/drivers/net/mlx4/mlx4_rxq.c b/drivers/net/mlx4/mlx4_rxq.c
> index f45c1ff85..4a6fbd922 100644
> --- a/drivers/net/mlx4/mlx4_rxq.c
> +++ b/drivers/net/mlx4/mlx4_rxq.c
> @@ -685,7 +685,8 @@ mlx4_get_rx_queue_offloads(struct mlx4_priv *priv)
>  {
>         uint64_t offloads = DEV_RX_OFFLOAD_SCATTER |
>                             DEV_RX_OFFLOAD_KEEP_CRC |
> -                           DEV_RX_OFFLOAD_JUMBO_FRAME;
> +                           DEV_RX_OFFLOAD_JUMBO_FRAME |
> +                           DEV_RX_OFFLOAD_RSS_HASH;
>
>         if (priv->hw_csum)
>                 offloads |= DEV_RX_OFFLOAD_CHECKSUM;
> diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
> index a1fdeef2a..b5fd57693 100644
> --- a/drivers/net/mlx5/mlx5_rxq.c
> +++ b/drivers/net/mlx5/mlx5_rxq.c
> @@ -368,7 +368,8 @@ mlx5_get_rx_queue_offloads(struct rte_eth_dev *dev)
>         struct mlx5_dev_config *config = &priv->config;
>         uint64_t offloads = (DEV_RX_OFFLOAD_SCATTER |
>                              DEV_RX_OFFLOAD_TIMESTAMP |
> -                            DEV_RX_OFFLOAD_JUMBO_FRAME);
> +                            DEV_RX_OFFLOAD_JUMBO_FRAME |
> +                            DEV_RX_OFFLOAD_RSS_HASH);
>
>         if (config->hw_fcs_strip)
>                 offloads |= DEV_RX_OFFLOAD_KEEP_CRC;
> diff --git a/drivers/net/netvsc/hn_rndis.c b/drivers/net/netvsc/hn_rndis.c
> index a67bc7a79..2b4714042 100644
> --- a/drivers/net/netvsc/hn_rndis.c
> +++ b/drivers/net/netvsc/hn_rndis.c
> @@ -897,7 +897,8 @@ int hn_rndis_get_offload(struct hn_data *hv,
>             == HN_NDIS_LSOV2_CAP_IP6)
>                 dev_info->tx_offload_capa |= DEV_TX_OFFLOAD_TCP_TSO;
>
> -       dev_info->rx_offload_capa = DEV_RX_OFFLOAD_VLAN_STRIP;
> +       dev_info->rx_offload_capa = DEV_RX_OFFLOAD_VLAN_STRIP |
> +                                   DEV_RX_OFFLOAD_RSS_HASH;
>
>         if (hwcaps.ndis_csum.ndis_ip4_rxcsum & NDIS_RXCSUM_CAP_IP4)
>                 dev_info->rx_offload_capa |= DEV_RX_OFFLOAD_IPV4_CKSUM;
> diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
> index f1a3ef2f9..230d64c8a 100644
> --- a/drivers/net/nfp/nfp_net.c
> +++ b/drivers/net/nfp/nfp_net.c
> @@ -1226,7 +1226,8 @@ nfp_net_infos_get(struct rte_eth_dev *dev, struct
> rte_eth_dev_info *dev_info)
>                                              DEV_RX_OFFLOAD_UDP_CKSUM |
>                                              DEV_RX_OFFLOAD_TCP_CKSUM;
>
> -       dev_info->rx_offload_capa |= DEV_RX_OFFLOAD_JUMBO_FRAME;
> +       dev_info->rx_offload_capa |= DEV_RX_OFFLOAD_JUMBO_FRAME |
> +                                    DEV_RX_OFFLOAD_RSS_HASH;
>
>         if (hw->cap & NFP_NET_CFG_CTRL_TXVLAN)
>                 dev_info->tx_offload_capa = DEV_TX_OFFLOAD_VLAN_INSERT;
> diff --git a/drivers/net/octeontx2/otx2_ethdev.c
> b/drivers/net/octeontx2/otx2_ethdev.c
> index b84128fef..2e88d1844 100644
> --- a/drivers/net/octeontx2/otx2_ethdev.c
> +++ b/drivers/net/octeontx2/otx2_ethdev.c
> @@ -569,7 +569,8 @@ nix_rx_offload_flags(struct rte_eth_dev *eth_dev)
>         struct rte_eth_rxmode *rxmode = &conf->rxmode;
>         uint16_t flags = 0;
>
> -       if (rxmode->mq_mode == ETH_MQ_RX_RSS)
> +       if (rxmode->mq_mode == ETH_MQ_RX_RSS &&
> +                       (dev->rx_offloads & DEV_RX_OFFLOAD_RSS_HASH))
>                 flags |= NIX_RX_OFFLOAD_RSS_F;
>
>         if (dev->rx_offloads & (DEV_RX_OFFLOAD_TCP_CKSUM |
> diff --git a/drivers/net/octeontx2/otx2_ethdev.h
> b/drivers/net/octeontx2/otx2_ethdev.h
> index 7b15d6bc8..0cca6746d 100644
> --- a/drivers/net/octeontx2/otx2_ethdev.h
> +++ b/drivers/net/octeontx2/otx2_ethdev.h
> @@ -122,8 +122,8 @@
>         DEV_TX_OFFLOAD_MT_LOCKFREE      | \
>         DEV_TX_OFFLOAD_VLAN_INSERT      | \
>         DEV_TX_OFFLOAD_QINQ_INSERT      | \
> -       DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM | \
> -       DEV_TX_OFFLOAD_OUTER_UDP_CKSUM  | \
> +       DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM | \
> +       DEV_TX_OFFLOAD_OUTER_UDP_CKSUM  | \
>         DEV_TX_OFFLOAD_TCP_CKSUM        | \
>         DEV_TX_OFFLOAD_UDP_CKSUM        | \
>         DEV_TX_OFFLOAD_SCTP_CKSUM       | \
> @@ -136,11 +136,12 @@
>         DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM | \
>         DEV_RX_OFFLOAD_SCATTER          | \
>         DEV_RX_OFFLOAD_JUMBO_FRAME      | \
> -       DEV_RX_OFFLOAD_OUTER_UDP_CKSUM | \
> -       DEV_RX_OFFLOAD_VLAN_STRIP | \
> -       DEV_RX_OFFLOAD_VLAN_FILTER | \
> -       DEV_RX_OFFLOAD_QINQ_STRIP | \
> -       DEV_RX_OFFLOAD_TIMESTAMP)
> +       DEV_RX_OFFLOAD_OUTER_UDP_CKSUM  | \
> +       DEV_RX_OFFLOAD_VLAN_STRIP       | \
> +       DEV_RX_OFFLOAD_VLAN_FILTER      | \
> +       DEV_RX_OFFLOAD_QINQ_STRIP       | \
> +       DEV_RX_OFFLOAD_TIMESTAMP        | \
> +       DEV_RX_OFFLOAD_RSS_HASH)
>
>  #define NIX_DEFAULT_RSS_CTX_GROUP  0
>  #define NIX_DEFAULT_RSS_MCAM_IDX  -1
> diff --git a/drivers/net/qede/qede_ethdev.c
> b/drivers/net/qede/qede_ethdev.c
> index 528b33e8c..da25b26df 100644
> --- a/drivers/net/qede/qede_ethdev.c
> +++ b/drivers/net/qede/qede_ethdev.c
> @@ -1291,7 +1291,8 @@ qede_dev_info_get(struct rte_eth_dev *eth_dev,
>                                      DEV_RX_OFFLOAD_SCATTER     |
>                                      DEV_RX_OFFLOAD_JUMBO_FRAME |
>                                      DEV_RX_OFFLOAD_VLAN_FILTER |
> -                                    DEV_RX_OFFLOAD_VLAN_STRIP);
> +                                    DEV_RX_OFFLOAD_VLAN_STRIP  |
> +                                    DEV_RX_OFFLOAD_RSS_HASH);
>         dev_info->rx_queue_offload_capa = 0;
>
>         /* TX offloads are on a per-packet basis, so it is applicable
> diff --git a/drivers/net/sfc/sfc_ef10_essb_rx.c
> b/drivers/net/sfc/sfc_ef10_essb_rx.c
> index 63da807ea..220ef0e47 100644
> --- a/drivers/net/sfc/sfc_ef10_essb_rx.c
> +++ b/drivers/net/sfc/sfc_ef10_essb_rx.c
> @@ -716,7 +716,7 @@ struct sfc_dp_rx sfc_ef10_essb_rx = {
>         .features               = SFC_DP_RX_FEAT_FLOW_FLAG |
>                                   SFC_DP_RX_FEAT_FLOW_MARK,
>         .dev_offload_capa       = DEV_RX_OFFLOAD_CHECKSUM,
> -       .queue_offload_capa     = 0,
> +       .queue_offload_capa     = DEV_RX_OFFLOAD_RSS_HASH,
>         .get_dev_info           = sfc_ef10_essb_rx_get_dev_info,
>         .pool_ops_supported     = sfc_ef10_essb_rx_pool_ops_supported,
>         .qsize_up_rings         = sfc_ef10_essb_rx_qsize_up_rings,
> diff --git a/drivers/net/sfc/sfc_ef10_rx.c b/drivers/net/sfc/sfc_ef10_rx.c
> index f2fc6e70a..85b5df466 100644
> --- a/drivers/net/sfc/sfc_ef10_rx.c
> +++ b/drivers/net/sfc/sfc_ef10_rx.c
> @@ -797,7 +797,8 @@ struct sfc_dp_rx sfc_ef10_rx = {
>                                   SFC_DP_RX_FEAT_INTR,
>         .dev_offload_capa       = DEV_RX_OFFLOAD_CHECKSUM |
>                                   DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM,
> -       .queue_offload_capa     = DEV_RX_OFFLOAD_SCATTER,
> +       .queue_offload_capa     = DEV_RX_OFFLOAD_SCATTER |
> +                                 DEV_RX_OFFLOAD_RSS_HASH,
>         .get_dev_info           = sfc_ef10_rx_get_dev_info,
>         .qsize_up_rings         = sfc_ef10_rx_qsize_up_rings,
>         .qcreate                = sfc_ef10_rx_qcreate,
> diff --git a/drivers/net/sfc/sfc_rx.c b/drivers/net/sfc/sfc_rx.c
> index e6809bb64..695580b22 100644
> --- a/drivers/net/sfc/sfc_rx.c
> +++ b/drivers/net/sfc/sfc_rx.c
> @@ -618,7 +618,8 @@ struct sfc_dp_rx sfc_efx_rx = {
>         },
>         .features               = SFC_DP_RX_FEAT_INTR,
>         .dev_offload_capa       = DEV_RX_OFFLOAD_CHECKSUM,
> -       .queue_offload_capa     = DEV_RX_OFFLOAD_SCATTER,
> +       .queue_offload_capa     = DEV_RX_OFFLOAD_SCATTER |
> +                                 DEV_RX_OFFLOAD_RSS_HASH,
>         .qsize_up_rings         = sfc_efx_rx_qsize_up_rings,
>         .qcreate                = sfc_efx_rx_qcreate,
>         .qdestroy               = sfc_efx_rx_qdestroy,
> diff --git a/drivers/net/thunderx/nicvf_ethdev.h
> b/drivers/net/thunderx/nicvf_ethdev.h
> index c0bfbf848..391411799 100644
> --- a/drivers/net/thunderx/nicvf_ethdev.h
> +++ b/drivers/net/thunderx/nicvf_ethdev.h
> @@ -41,7 +41,8 @@
>         DEV_RX_OFFLOAD_CHECKSUM    | \
>         DEV_RX_OFFLOAD_VLAN_STRIP  | \
>         DEV_RX_OFFLOAD_JUMBO_FRAME | \
> -       DEV_RX_OFFLOAD_SCATTER)
> +       DEV_RX_OFFLOAD_SCATTER     | \
> +       DEV_RX_OFFLOAD_RSS_HASH)
>
>  #define NICVF_DEFAULT_RX_FREE_THRESH    224
>  #define NICVF_DEFAULT_TX_FREE_THRESH    224
> diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c
> b/drivers/net/vmxnet3/vmxnet3_ethdev.c
> index 57feb3773..a1bdf3482 100644
> --- a/drivers/net/vmxnet3/vmxnet3_ethdev.c
> +++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c
> @@ -58,7 +58,8 @@
>          DEV_RX_OFFLOAD_UDP_CKSUM |     \
>          DEV_RX_OFFLOAD_TCP_CKSUM |     \
>          DEV_RX_OFFLOAD_TCP_LRO |       \
> -        DEV_RX_OFFLOAD_JUMBO_FRAME)
> +        DEV_RX_OFFLOAD_JUMBO_FRAME |   \
> +        DEV_RX_OFFLOAD_RSS_HASH)
>
>  static int eth_vmxnet3_dev_init(struct rte_eth_dev *eth_dev);
>  static int eth_vmxnet3_dev_uninit(struct rte_eth_dev *eth_dev);
> --
> 2.22.0
>
>

^ permalink raw reply	[flat|nested] 245+ messages in thread

* [dpdk-dev]  [PATCH v6 0/7] ethdev: add new Rx offload flags
  2019-10-01  6:41     ` [dpdk-dev] [PATCH v5 0/7] ethdev: add new Rx offload flags pbhagavatula
                         ` (6 preceding siblings ...)
  2019-10-01  6:41       ` [dpdk-dev] [PATCH v5 7/7] examples: disable Rx packet type parsing pbhagavatula
@ 2019-10-01 18:52       ` pbhagavatula
  2019-10-01 18:52         ` [dpdk-dev] [PATCH v6 1/7] ethdev: add set ptype function pbhagavatula
                           ` (7 more replies)
  7 siblings, 8 replies; 245+ messages in thread
From: pbhagavatula @ 2019-10-01 18:52 UTC (permalink / raw)
  To: arybchenko, jerinj; +Cc: dev, Pavan Nikhilesh

From: Pavan Nikhilesh <pbhagavatula@marvell.com>

Add new Rx offload flags `DEV_RX_OFFLOAD_RSS_HASH` and
`DEV_RX_OFFLOAD_FLOW_MARK`. These flags can be used to
enable/disable PMD writes to rte_mbuf fields `hash.rss` and `hash.fdir.hi`
and also `ol_flags:PKT_RX_RSS` and `ol_flags:PKT_RX_FDIR`.

Add new packet type set function `rte_eth_dev_set_supported_ptypes`,
allows application to inform PMDs about the packet types it is interested
in. Based on ptypes requested by application PMDs can optimize the Rx path.

For example, if a given PMD doesn't support any packet types that the
application is interested in then the application can disable[1] writes to
`mbuf.packet_type` done by the PMD and use a software ptype parser.
     [1] rte_eth_dev_set_supported_ptypes(*port_id*, RTE_PTYPE_UNKNOWN, NULL,
					  0);

v6 Changes:
----------
- Add additional checks for set supported ptypes.(Andrew)
- Clarify `rte_eth_dev_set_supported_ptypes` documentation.
- Remove DEV_RX_OFFLOAD_FLOW_MARK emulation from net/octeontx2.

v5 Changes:
----------
- Fix typos.

v4 Changes:
----------
- Set the last element in set_ptype array as RTE_PTYPE_UNKNOWN to mark the end
  of array.
- Fix invalid set ptype function call in examples.
- Remove setting rte_eth_dev_set_supported_ptypes to UNKNOWN in l3fwd-power.

v3 Changes:
----------
- Add missing release notes. (Andrew)
- Re-word various descriptions.
- Fix ptype set logic.

v2 Changes:
----------
- Update release notes. (Andrew)
- Redo commit logs. (Andrew)
- Disable ptype parsing for unsupported examples. (Jerin)
- Disable RSS write only in generic mode eventdev_pipeline. (Jerin)
- Modify set_supported_ptypes function to return successfuly set mask
  instead of failure.
- Dropped set_supported_ptypes to drivers by handling in library
  layer, interested PMD can add it in.


Pavan Nikhilesh (7):
  ethdev: add set ptype function
  ethdev: add mbuf RSS update as an offload
  ethdev: add flow action type update as an offload
  drivers/net: update Rx RSS hash offload capabilities
  drivers/net: update Rx flow flag and mark capabilities
  examples/eventdev_pipeline: add new Rx RSS hash offload
  examples: disable Rx packet type parsing

 doc/guides/nics/features.rst                  |  22 +++-
 doc/guides/rel_notes/release_19_11.rst        |  24 ++++
 drivers/net/bnxt/bnxt_ethdev.c                |   4 +-
 drivers/net/cxgbe/cxgbe.h                     |   3 +-
 drivers/net/dpaa/dpaa_ethdev.c                |   3 +-
 drivers/net/dpaa2/dpaa2_ethdev.c              |   3 +-
 drivers/net/e1000/igb_rxtx.c                  |   3 +-
 drivers/net/enic/enic_res.c                   |   4 +-
 drivers/net/fm10k/fm10k_ethdev.c              |   3 +-
 drivers/net/hinic/hinic_pmd_ethdev.c          |   3 +-
 drivers/net/i40e/i40e_ethdev.c                |   4 +-
 drivers/net/iavf/iavf_ethdev.c                |   4 +-
 drivers/net/ice/ice_ethdev.c                  |   4 +-
 drivers/net/ixgbe/ixgbe_rxtx.c                |   4 +-
 drivers/net/liquidio/lio_ethdev.c             |   3 +-
 drivers/net/mlx4/mlx4_rxq.c                   |   3 +-
 drivers/net/mlx5/mlx5_rxq.c                   |   4 +-
 drivers/net/netvsc/hn_rndis.c                 |   3 +-
 drivers/net/nfp/nfp_net.c                     |   3 +-
 drivers/net/octeontx2/otx2_ethdev.c           |   3 +-
 drivers/net/octeontx2/otx2_ethdev.h           |  16 +--
 drivers/net/octeontx2/otx2_flow.c             |   9 +-
 drivers/net/octeontx2/otx2_flow.h             |   1 -
 drivers/net/octeontx2/otx2_flow_parse.c       |   4 +-
 drivers/net/qede/qede_ethdev.c                |   3 +-
 drivers/net/sfc/sfc_ef10_essb_rx.c            |   3 +-
 drivers/net/sfc/sfc_ef10_rx.c                 |   3 +-
 drivers/net/sfc/sfc_rx.c                      |   3 +-
 drivers/net/thunderx/nicvf_ethdev.h           |   3 +-
 drivers/net/vmxnet3/vmxnet3_ethdev.c          |   3 +-
 examples/bbdev_app/main.c                     |   1 +
 examples/bond/main.c                          |   2 +
 examples/distributor/Makefile                 |   1 +
 examples/distributor/main.c                   |   1 +
 examples/distributor/meson.build              |   1 +
 examples/eventdev_pipeline/main.c             | 115 +----------------
 examples/eventdev_pipeline/meson.build        |   1 +
 .../pipeline_worker_generic.c                 | 118 ++++++++++++++++++
 .../eventdev_pipeline/pipeline_worker_tx.c    | 114 +++++++++++++++++
 examples/exception_path/Makefile              |   1 +
 examples/exception_path/main.c                |   1 +
 examples/exception_path/meson.build           |   1 +
 examples/flow_classify/flow_classify.c        |   1 +
 examples/flow_filtering/Makefile              |   1 +
 examples/flow_filtering/main.c                |   1 +
 examples/flow_filtering/meson.build           |   1 +
 examples/ip_pipeline/link.c                   |   1 +
 examples/ip_reassembly/Makefile               |   1 +
 examples/ip_reassembly/main.c                 |   2 +
 examples/ip_reassembly/meson.build            |   1 +
 examples/ipsec-secgw/ipsec-secgw.c            |   2 +
 examples/ipv4_multicast/Makefile              |   1 +
 examples/ipv4_multicast/main.c                |   2 +
 examples/ipv4_multicast/meson.build           |   1 +
 examples/kni/main.c                           |   1 +
 examples/l2fwd-cat/Makefile                   |   1 +
 examples/l2fwd-cat/l2fwd-cat.c                |   1 +
 examples/l2fwd-cat/meson.build                |   1 +
 examples/l2fwd-crypto/main.c                  |   2 +
 examples/l2fwd-jobstats/Makefile              |   1 +
 examples/l2fwd-jobstats/main.c                |   2 +
 examples/l2fwd-jobstats/meson.build           |   1 +
 examples/l2fwd-keepalive/Makefile             |   1 +
 examples/l2fwd-keepalive/main.c               |   2 +
 examples/l2fwd-keepalive/meson.build          |   1 +
 examples/l2fwd/Makefile                       |   1 +
 examples/l2fwd/main.c                         |   2 +
 examples/l2fwd/meson.build                    |   1 +
 examples/l3fwd-acl/Makefile                   |   1 +
 examples/l3fwd-acl/main.c                     |   2 +
 examples/l3fwd-acl/meson.build                |   1 +
 examples/l3fwd-vf/Makefile                    |   1 +
 examples/l3fwd-vf/main.c                      |   2 +
 examples/l3fwd-vf/meson.build                 |   1 +
 examples/link_status_interrupt/Makefile       |   1 +
 examples/link_status_interrupt/main.c         |   2 +
 examples/link_status_interrupt/meson.build    |   1 +
 examples/load_balancer/Makefile               |   1 +
 examples/load_balancer/init.c                 |   2 +
 examples/load_balancer/meson.build            |   1 +
 examples/packet_ordering/Makefile             |   1 +
 examples/packet_ordering/main.c               |   1 +
 examples/packet_ordering/meson.build          |   1 +
 examples/ptpclient/Makefile                   |   1 +
 examples/ptpclient/meson.build                |   1 +
 examples/ptpclient/ptpclient.c                |   1 +
 examples/qos_meter/Makefile                   |   1 +
 examples/qos_meter/main.c                     |   2 +
 examples/qos_meter/meson.build                |   1 +
 examples/qos_sched/Makefile                   |   1 +
 examples/qos_sched/init.c                     |   1 +
 examples/qos_sched/meson.build                |   1 +
 examples/quota_watermark/qw/Makefile          |   1 +
 examples/quota_watermark/qw/init.c            |   1 +
 examples/rxtx_callbacks/main.c                |   1 +
 examples/server_node_efd/server/Makefile      |   1 +
 examples/server_node_efd/server/init.c        |   1 +
 examples/skeleton/Makefile                    |   1 +
 examples/skeleton/basicfwd.c                  |   1 +
 examples/skeleton/meson.build                 |   1 +
 examples/tep_termination/Makefile             |   1 +
 examples/tep_termination/meson.build          |   1 +
 examples/tep_termination/vxlan_setup.c        |   1 +
 examples/vhost/Makefile                       |   1 +
 examples/vhost/main.c                         |   1 +
 examples/vm_power_manager/Makefile            |   1 +
 examples/vm_power_manager/main.c              |   1 +
 examples/vm_power_manager/meson.build         |   1 +
 examples/vmdq/Makefile                        |   1 +
 examples/vmdq/main.c                          |   1 +
 examples/vmdq/meson.build                     |   1 +
 examples/vmdq_dcb/Makefile                    |   1 +
 examples/vmdq_dcb/main.c                      |   1 +
 examples/vmdq_dcb/meson.build                 |   1 +
 lib/librte_ethdev/rte_ethdev.c                |  52 ++++++++
 lib/librte_ethdev/rte_ethdev.h                |  38 ++++++
 lib/librte_ethdev/rte_ethdev_core.h           |   6 +
 lib/librte_ethdev/rte_ethdev_version.map      |   3 +
 lib/librte_ethdev/rte_flow.h                  |   6 +-
 119 files changed, 542 insertions(+), 159 deletions(-)

--
2.17.1


^ permalink raw reply	[flat|nested] 245+ messages in thread

* [dpdk-dev]  [PATCH v6 1/7] ethdev: add set ptype function
  2019-10-01 18:52       ` [dpdk-dev] [PATCH v6 0/7] ethdev: add new Rx offload flags pbhagavatula
@ 2019-10-01 18:52         ` pbhagavatula
  2019-10-01 18:52         ` [dpdk-dev] [PATCH v6 2/7] ethdev: add mbuf RSS update as an offload pbhagavatula
                           ` (6 subsequent siblings)
  7 siblings, 0 replies; 245+ messages in thread
From: pbhagavatula @ 2019-10-01 18:52 UTC (permalink / raw)
  To: arybchenko, jerinj, John McNamara, Marko Kovacevic,
	Thomas Monjalon, Ferruh Yigit
  Cc: dev, Pavan Nikhilesh

From: Pavan Nikhilesh <pbhagavatula@marvell.com>

Add `rte_eth_dev_set_supported_ptypes` function that will allow the
application to inform the PMD the packet types it is interested in.
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_supported_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_supported_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_supported_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>
---
 doc/guides/nics/features.rst             |  8 +++-
 doc/guides/rel_notes/release_19_11.rst   |  8 ++++
 lib/librte_ethdev/rte_ethdev.c           | 50 ++++++++++++++++++++++++
 lib/librte_ethdev/rte_ethdev.h           | 36 +++++++++++++++++
 lib/librte_ethdev/rte_ethdev_core.h      |  6 +++
 lib/librte_ethdev/rte_ethdev_version.map |  3 ++
 6 files changed, 109 insertions(+), 2 deletions(-)

diff --git a/doc/guides/nics/features.rst b/doc/guides/nics/features.rst
index c4e128d2f..1756fa73a 100644
--- a/doc/guides/nics/features.rst
+++ b/doc/guides/nics/features.rst
@@ -583,9 +583,13 @@ 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``,
+  ``dev_supported_ptypes_set``.
+* **[related]    API**: ``rte_eth_dev_get_supported_ptypes()``,
+  ``rte_eth_dev_set_supported_ptypes()``.
+* **[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 27cfbd9e3..abb7b6529 100644
--- a/doc/guides/rel_notes/release_19_11.rst
+++ b/doc/guides/rel_notes/release_19_11.rst
@@ -56,6 +56,14 @@ New Features
      Also, make sure to start the actual text at the margin.
      =========================================================
 
+* **Added ethdev API to set supported packet types**
+
+  *  Added new API ``rte_eth_dev_set_supported_ptypes`` that allows an
+     application to inform PMD about packet types classification the application
+     is interested in
+  *  This scheme will allow PMDs to avoid lookup to internal ptype table on Rx
+     and thereby improve Rx performance if application wishes do so.
+
 
 Removed Items
 -------------
diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
index 17d183e1f..b1588fe7a 100644
--- a/lib/librte_ethdev/rte_ethdev.c
+++ b/lib/librte_ethdev/rte_ethdev.c
@@ -2602,6 +2602,56 @@ rte_eth_dev_get_supported_ptypes(uint16_t port_id, uint32_t ptype_mask,
 	return j;
 }
 
+int
+rte_eth_dev_set_supported_ptypes(uint16_t port_id, uint32_t ptype_mask,
+				 uint32_t *set_ptypes, unsigned int num)
+{
+	unsigned int i, j;
+	struct rte_eth_dev *dev;
+	const uint32_t *all_ptypes;
+
+	RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
+	dev = &rte_eth_devices[port_id];
+	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_supported_ptypes_get, 0);
+	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_supported_ptypes_set, 0);
+
+	if (num > 0 && set_ptypes == NULL)
+		return -EINVAL;
+
+	if (ptype_mask == 0) {
+		if (num > 0)
+			set_ptypes[0] = RTE_PTYPE_UNKNOWN;
+
+		return (*dev->dev_ops->dev_supported_ptypes_set)(dev,
+				ptype_mask);
+	}
+
+	all_ptypes = (*dev->dev_ops->dev_supported_ptypes_get)(dev);
+	if (all_ptypes == NULL) {
+		if (num > 0)
+			set_ptypes[0] = RTE_PTYPE_UNKNOWN;
+
+		return 0;
+	}
+
+	for (i = 0, j = 0; set_ptypes != NULL &&
+				(all_ptypes[i] != RTE_PTYPE_UNKNOWN); ++i) {
+		if (ptype_mask & all_ptypes[i]) {
+			if (j < num - 1) {
+				set_ptypes[j] = all_ptypes[i];
+				j++;
+				continue;
+			}
+			break;
+		}
+	}
+
+	if (set_ptypes != NULL)
+		set_ptypes[j] = RTE_PTYPE_UNKNOWN;
+
+	return (*dev->dev_ops->dev_supported_ptypes_set)(dev, ptype_mask);
+}
+
 void
 rte_eth_macaddr_get(uint16_t port_id, struct rte_ether_addr *mac_addr)
 {
diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
index d9871782e..c577a9172 100644
--- a/lib/librte_ethdev/rte_ethdev.h
+++ b/lib/librte_ethdev/rte_ethdev.h
@@ -2431,6 +2431,42 @@ int rte_eth_dev_fw_version_get(uint16_t port_id,
  */
 int rte_eth_dev_get_supported_ptypes(uint16_t port_id, uint32_t ptype_mask,
 				     uint32_t *ptypes, int num);
+/**
+ * @warning
+ * @b EXPERIMENTAL: this API may change without prior notice.
+ *
+ * Inform Ethernet device of the packet types classification in which
+ * the recipient is interested.
+ *
+ * Application can use this function to set only specific ptypes that it's
+ * interested. This information can be used by the PMD to optimize Rx path.
+ *
+ * The function accepts an array `set_ptypes` allocated by the caller to
+ * store the packet types set by the driver, the last element of the array
+ * is set to RTE_PTYPE_UNKNOWN. The size of the `set_ptype` array should be
+ * `rte_eth_dev_get_supported_ptypes() + 1` else it might only be filled
+ * partially.
+ *
+ * @param port_id
+ *   The port identifier of the Ethernet device.
+ * @param ptype_mask
+ *   The ptype family that application is interested in.
+ * @param set_ptypes
+ *   An array pointer to store set packet types, allocated by caller. The
+ *   function marks the end of array with RTE_PTYPE_UNKNOWN.
+ * @param num
+ *   Size of the array pointed by param ptypes.
+ *   Should be rte_eth_dev_get_supported_ptypes() + 1 to accommodate the
+ *   set ptypes.
+ * @return
+ *   - (0) if Success.
+ *   - (-ENODEV) if *port_id* invalid.
+ *   - (-EINVAL) if *ptype_mask* is invalid (or) set_ptypes is NULL and
+ *     num > 0.
+ */
+__rte_experimental
+int rte_eth_dev_set_supported_ptypes(uint16_t port_id, uint32_t ptype_mask,
+				     uint32_t *set_ptypes, unsigned int num);
 
 /**
  * Retrieve the MTU of an Ethernet device.
diff --git a/lib/librte_ethdev/rte_ethdev_core.h b/lib/librte_ethdev/rte_ethdev_core.h
index 2922d5b7c..93bc34480 100644
--- a/lib/librte_ethdev/rte_ethdev_core.h
+++ b/lib/librte_ethdev/rte_ethdev_core.h
@@ -110,6 +110,10 @@ typedef void (*eth_dev_infos_get_t)(struct rte_eth_dev *dev,
 typedef const uint32_t *(*eth_dev_supported_ptypes_get_t)(struct rte_eth_dev *dev);
 /**< @internal Get supported ptypes of an Ethernet device. */
 
+typedef uint32_t (*eth_dev_supported_ptypes_set_t)(struct rte_eth_dev *dev,
+					      uint32_t ptype_mask);
+/**< @internal Inform device about packet types in which the recipient is interested. */
+
 typedef int (*eth_queue_start_t)(struct rte_eth_dev *dev,
 				    uint16_t queue_id);
 /**< @internal Start rx and tx of a queue of an Ethernet device. */
@@ -421,6 +425,8 @@ struct eth_dev_ops {
 	eth_fw_version_get_t       fw_version_get; /**< Get firmware version. */
 	eth_dev_supported_ptypes_get_t dev_supported_ptypes_get;
 	/**< Get packet types supported and identified by device. */
+	eth_dev_supported_ptypes_set_t dev_supported_ptypes_set;
+	/**< Inform device about packet types in which the recipient is interested. */
 
 	vlan_filter_set_t          vlan_filter_set; /**< Filter VLAN Setup. */
 	vlan_tpid_set_t            vlan_tpid_set; /**< Outer/Inner VLAN TPID Setup. */
diff --git a/lib/librte_ethdev/rte_ethdev_version.map b/lib/librte_ethdev/rte_ethdev_version.map
index 6df42a47b..e14745b9c 100644
--- a/lib/librte_ethdev/rte_ethdev_version.map
+++ b/lib/librte_ethdev/rte_ethdev_version.map
@@ -283,4 +283,7 @@ EXPERIMENTAL {
 
 	# added in 19.08
 	rte_eth_read_clock;
+
+	# added in 19.11
+	rte_eth_dev_set_supported_ptypes;
 };
-- 
2.17.1


^ permalink raw reply	[flat|nested] 245+ messages in thread

* [dpdk-dev] [PATCH v6 2/7] ethdev: add mbuf RSS update as an offload
  2019-10-01 18:52       ` [dpdk-dev] [PATCH v6 0/7] ethdev: add new Rx offload flags pbhagavatula
  2019-10-01 18:52         ` [dpdk-dev] [PATCH v6 1/7] ethdev: add set ptype function pbhagavatula
@ 2019-10-01 18:52         ` pbhagavatula
  2019-10-01 18:52         ` [dpdk-dev] [PATCH v6 3/7] ethdev: add flow action type " pbhagavatula
                           ` (5 subsequent siblings)
  7 siblings, 0 replies; 245+ messages in thread
From: pbhagavatula @ 2019-10-01 18:52 UTC (permalink / raw)
  To: arybchenko, jerinj, John McNamara, Marko Kovacevic,
	Thomas Monjalon, Ferruh Yigit
  Cc: dev, Pavan Nikhilesh

From: Pavan Nikhilesh <pbhagavatula@marvell.com>

Add new Rx offload flag `DEV_RX_OFFLOAD_RSS_HASH` which can be used to
enable/disable PMDs write to `rte_mbuf::hash::rss`.
PMDs notify the validity of `rte_mbuf::hash:rss` to the applcation
by enabling `PKT_RX_RSS_HASH ` flag in `rte_mbuf::ol_flags`.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 doc/guides/nics/features.rst           | 2 ++
 doc/guides/rel_notes/release_19_11.rst | 7 +++++++
 lib/librte_ethdev/rte_ethdev.c         | 1 +
 lib/librte_ethdev/rte_ethdev.h         | 1 +
 4 files changed, 11 insertions(+)

diff --git a/doc/guides/nics/features.rst b/doc/guides/nics/features.rst
index 1756fa73a..f7c6d918f 100644
--- a/doc/guides/nics/features.rst
+++ b/doc/guides/nics/features.rst
@@ -274,6 +274,7 @@ Supports RSS hashing on RX.
 
 * **[uses]     user config**: ``dev_conf.rxmode.mq_mode`` = ``ETH_MQ_RX_RSS_FLAG``.
 * **[uses]     user config**: ``dev_conf.rx_adv_conf.rss_conf``.
+* **[uses]     rte_eth_rxconf,rte_eth_rxmode**: ``offloads:DEV_RX_OFFLOAD_RSS_HASH``.
 * **[provides] rte_eth_dev_info**: ``flow_type_rss_offloads``.
 * **[provides] mbuf**: ``mbuf.ol_flags:PKT_RX_RSS_HASH``, ``mbuf.rss``.
 
@@ -286,6 +287,7 @@ Inner RSS
 Supports RX RSS hashing on Inner headers.
 
 * **[uses]    rte_flow_action_rss**: ``level``.
+* **[uses]    rte_eth_rxconf,rte_eth_rxmode**: ``offloads:DEV_RX_OFFLOAD_RSS_HASH``.
 * **[provides] mbuf**: ``mbuf.ol_flags:PKT_RX_RSS_HASH``, ``mbuf.rss``.
 
 
diff --git a/doc/guides/rel_notes/release_19_11.rst b/doc/guides/rel_notes/release_19_11.rst
index abb7b6529..724228faa 100644
--- a/doc/guides/rel_notes/release_19_11.rst
+++ b/doc/guides/rel_notes/release_19_11.rst
@@ -64,6 +64,13 @@ New Features
   *  This scheme will allow PMDs to avoid lookup to internal ptype table on Rx
      and thereby improve Rx performance if application wishes do so.
 
+* **Added Rx offload flag to enable or disable RSS update**
+
+  *  Added new Rx offload flag `DEV_RX_OFFLOAD_RSS_HASH` which can be used to
+     enable/disable PMDs write to `rte_mbuf::hash::rss`.
+  *  PMDs notify the validity of `rte_mbuf::hash:rss` to the application
+     by enabling `PKT_RX_RSS_HASH ` flag in `rte_mbuf::ol_flags`.
+
 
 Removed Items
 -------------
diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
index b1588fe7a..19bd4795e 100644
--- a/lib/librte_ethdev/rte_ethdev.c
+++ b/lib/librte_ethdev/rte_ethdev.c
@@ -129,6 +129,7 @@ static const struct {
 	RTE_RX_OFFLOAD_BIT2STR(KEEP_CRC),
 	RTE_RX_OFFLOAD_BIT2STR(SCTP_CKSUM),
 	RTE_RX_OFFLOAD_BIT2STR(OUTER_UDP_CKSUM),
+	RTE_RX_OFFLOAD_BIT2STR(RSS_HASH),
 };
 
 #undef RTE_RX_OFFLOAD_BIT2STR
diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
index c577a9172..c3fa69412 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_RSS_HASH		0x00080000
 
 #define DEV_RX_OFFLOAD_CHECKSUM (DEV_RX_OFFLOAD_IPV4_CKSUM | \
 				 DEV_RX_OFFLOAD_UDP_CKSUM | \
-- 
2.17.1


^ permalink raw reply	[flat|nested] 245+ messages in thread

* [dpdk-dev] [PATCH v6 3/7] ethdev: add flow action type update as an offload
  2019-10-01 18:52       ` [dpdk-dev] [PATCH v6 0/7] ethdev: add new Rx offload flags pbhagavatula
  2019-10-01 18:52         ` [dpdk-dev] [PATCH v6 1/7] ethdev: add set ptype function pbhagavatula
  2019-10-01 18:52         ` [dpdk-dev] [PATCH v6 2/7] ethdev: add mbuf RSS update as an offload pbhagavatula
@ 2019-10-01 18:52         ` " pbhagavatula
  2019-10-01 18:52         ` [dpdk-dev] [PATCH v6 4/7] drivers/net: update Rx RSS hash offload capabilities pbhagavatula
                           ` (4 subsequent siblings)
  7 siblings, 0 replies; 245+ messages in thread
From: pbhagavatula @ 2019-10-01 18:52 UTC (permalink / raw)
  To: arybchenko, jerinj, John McNamara, Marko Kovacevic,
	Thomas Monjalon, Ferruh Yigit, Adrien Mazarguil
  Cc: dev, Pavan Nikhilesh

From: Pavan Nikhilesh <pbhagavatula@marvell.com>

Add new Rx offload flag `DEV_RX_OFFLOAD_FLOW_MARK` that can be used to
enable/disable PMDs write to `rte_mbuf::hash::fdir::hi` and
`rte_mbuf::ol_flags` when flow actions `RTE_FLOW_ACTION_MARK` and
`RTE_FLOW_ACTION_FLAG` are enabled.

PMDs notify the validity of `rte_mbuf::hash:fdir::hi` to the applcation
by enabling `PKT_RX_FDIR_ID` flag in `rte_mbuf::ol_flags`.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 doc/guides/nics/features.rst           | 12 ++++++++++++
 doc/guides/rel_notes/release_19_11.rst |  9 +++++++++
 lib/librte_ethdev/rte_ethdev.c         |  1 +
 lib/librte_ethdev/rte_ethdev.h         |  1 +
 lib/librte_ethdev/rte_flow.h           |  6 ++++--
 5 files changed, 27 insertions(+), 2 deletions(-)

diff --git a/doc/guides/nics/features.rst b/doc/guides/nics/features.rst
index f7c6d918f..9737ff7a1 100644
--- a/doc/guides/nics/features.rst
+++ b/doc/guides/nics/features.rst
@@ -594,6 +594,18 @@ Allows application to set ptypes it is interested in.
 * **[provides]   mbuf**: ``mbuf.packet_type``.
 
 
+.. _nic_features_flow_flag_mark:
+
+Flow flag/mark update
+---------------------
+
+Supports flow action type update to ``mbuf.ol_flags`` and ``mbuf.hash.fdir.hi``.
+
+* **[uses]     rte_eth_rxconf,rte_eth_rxmode**: ``offloads:DEV_RX_OFFLOAD_FLOW_MARK``.
+* **[provides] mbuf**: ``mbuf.ol_flags:PKT_RX_FDIR``, ``mbuf.ol_flags:PKT_RX_FDIR_ID;``,
+  ``mbuf.hash.fdir.hi``
+
+
 .. _nic_features_timesync:
 
 Timesync
diff --git a/doc/guides/rel_notes/release_19_11.rst b/doc/guides/rel_notes/release_19_11.rst
index 724228faa..670fbfd36 100644
--- a/doc/guides/rel_notes/release_19_11.rst
+++ b/doc/guides/rel_notes/release_19_11.rst
@@ -71,6 +71,15 @@ New Features
   *  PMDs notify the validity of `rte_mbuf::hash:rss` to the application
      by enabling `PKT_RX_RSS_HASH ` flag in `rte_mbuf::ol_flags`.
 
+* **Added Rx offload flag to enable or disable flow action type update**
+
+  *  Add new Rx offload flag `DEV_RX_OFFLOAD_FLOW_MARK` that can be used to
+     enable/disable PMDs write to `rte_mbuf::hash::fdir::hi` and
+     `rte_mbuf::ol_flags` when flow actions `RTE_FLOW_ACTION_MARK` and
+     `RTE_FLOW_ACTION_FLAG` are enabled.
+  *  PMDs notify the validity of `rte_mbuf::hash:fdir::hi` to the application
+     by enabling `PKT_RX_FDIR_ID` flag in `rte_mbuf::ol_flags`.
+
 
 Removed Items
 -------------
diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
index 19bd4795e..08f8ba107 100644
--- a/lib/librte_ethdev/rte_ethdev.c
+++ b/lib/librte_ethdev/rte_ethdev.c
@@ -130,6 +130,7 @@ static const struct {
 	RTE_RX_OFFLOAD_BIT2STR(SCTP_CKSUM),
 	RTE_RX_OFFLOAD_BIT2STR(OUTER_UDP_CKSUM),
 	RTE_RX_OFFLOAD_BIT2STR(RSS_HASH),
+	RTE_RX_OFFLOAD_BIT2STR(FLOW_MARK),
 };
 
 #undef RTE_RX_OFFLOAD_BIT2STR
diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
index c3fa69412..a2e86d155 100644
--- a/lib/librte_ethdev/rte_ethdev.h
+++ b/lib/librte_ethdev/rte_ethdev.h
@@ -1014,6 +1014,7 @@ struct rte_eth_conf {
 #define DEV_RX_OFFLOAD_SCTP_CKSUM	0x00020000
 #define DEV_RX_OFFLOAD_OUTER_UDP_CKSUM  0x00040000
 #define DEV_RX_OFFLOAD_RSS_HASH		0x00080000
+#define DEV_RX_OFFLOAD_FLOW_MARK	0x00100000
 
 #define DEV_RX_OFFLOAD_CHECKSUM (DEV_RX_OFFLOAD_IPV4_CKSUM | \
 				 DEV_RX_OFFLOAD_UDP_CKSUM | \
diff --git a/lib/librte_ethdev/rte_flow.h b/lib/librte_ethdev/rte_flow.h
index 354cb1dd0..5d62686c0 100644
--- a/lib/librte_ethdev/rte_flow.h
+++ b/lib/librte_ethdev/rte_flow.h
@@ -1316,7 +1316,8 @@ enum rte_flow_action_type {
 
 	/**
 	 * Attaches an integer value to packets and sets PKT_RX_FDIR and
-	 * PKT_RX_FDIR_ID mbuf flags.
+	 * PKT_RX_FDIR_ID mbuf flags when
+	 * `rx_mode:offloads:DEV_RX_OFFLOAD_FLOW_MARK` is enabled.
 	 *
 	 * See struct rte_flow_action_mark.
 	 */
@@ -1324,7 +1325,8 @@ enum rte_flow_action_type {
 
 	/**
 	 * Flags packets. Similar to MARK without a specific value; only
-	 * sets the PKT_RX_FDIR mbuf flag.
+	 * sets the PKT_RX_FDIR mbuf flag when
+	 * `rx_mode:offloads:DEV_RX_OFFLOAD_FLOW_MARK` is enabled.
 	 *
 	 * No associated configuration structure.
 	 */
-- 
2.17.1


^ permalink raw reply	[flat|nested] 245+ messages in thread

* [dpdk-dev] [PATCH v6 4/7] drivers/net: update Rx RSS hash offload capabilities
  2019-10-01 18:52       ` [dpdk-dev] [PATCH v6 0/7] ethdev: add new Rx offload flags pbhagavatula
                           ` (2 preceding siblings ...)
  2019-10-01 18:52         ` [dpdk-dev] [PATCH v6 3/7] ethdev: add flow action type " pbhagavatula
@ 2019-10-01 18:52         ` pbhagavatula
  2019-10-01 18:52         ` [dpdk-dev] [PATCH v6 5/7] drivers/net: update Rx flow flag and mark capabilities pbhagavatula
                           ` (3 subsequent siblings)
  7 siblings, 0 replies; 245+ messages in thread
From: pbhagavatula @ 2019-10-01 18:52 UTC (permalink / raw)
  To: arybchenko, jerinj, Ajit Khaparde, Somnath Kotur,
	Rahul Lakkireddy, Hemant Agrawal, Sachin Saxena, Wenzhuo Lu,
	John Daley, Hyong Youb Kim, Qi Zhang, Xiao Wang, Ziyang Xuan,
	Xiaoyun Wang, Guoyang Zhou, Beilei Xing, Jingjing Wu,
	Qiming Yang, Konstantin Ananyev, Shijith Thotton,
	Srisivasubramanian Srinivasan, Matan Azrad, Shahaf Shuler,
	Viacheslav Ovsiienko, Stephen Hemminger, K. Y. Srinivasan,
	Haiyang Zhang, Alejandro Lucero, Nithin Dabilpuram,
	Kiran Kumar K, Rasesh Mody, Shahed Shaikh, Maciej Czekaj,
	Yong Wang
  Cc: dev, Pavan Nikhilesh

From: Pavan Nikhilesh <pbhagavatula@marvell.com>

Add DEV_RX_OFFLOAD_RSS_HASH flag for all PMDs that support RSS hash
delivery.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_ethdev.c       |  3 ++-
 drivers/net/cxgbe/cxgbe.h            |  3 ++-
 drivers/net/dpaa/dpaa_ethdev.c       |  3 ++-
 drivers/net/dpaa2/dpaa2_ethdev.c     |  3 ++-
 drivers/net/e1000/igb_rxtx.c         |  3 ++-
 drivers/net/enic/enic_res.c          |  3 ++-
 drivers/net/fm10k/fm10k_ethdev.c     |  3 ++-
 drivers/net/hinic/hinic_pmd_ethdev.c |  3 ++-
 drivers/net/i40e/i40e_ethdev.c       |  3 ++-
 drivers/net/iavf/iavf_ethdev.c       |  3 ++-
 drivers/net/ice/ice_ethdev.c         |  3 ++-
 drivers/net/ixgbe/ixgbe_rxtx.c       |  3 ++-
 drivers/net/liquidio/lio_ethdev.c    |  3 ++-
 drivers/net/mlx4/mlx4_rxq.c          |  3 ++-
 drivers/net/mlx5/mlx5_rxq.c          |  3 ++-
 drivers/net/netvsc/hn_rndis.c        |  3 ++-
 drivers/net/nfp/nfp_net.c            |  3 ++-
 drivers/net/octeontx2/otx2_ethdev.c  |  3 ++-
 drivers/net/octeontx2/otx2_ethdev.h  | 15 ++++++++-------
 drivers/net/qede/qede_ethdev.c       |  3 ++-
 drivers/net/sfc/sfc_ef10_essb_rx.c   |  2 +-
 drivers/net/sfc/sfc_ef10_rx.c        |  3 ++-
 drivers/net/sfc/sfc_rx.c             |  3 ++-
 drivers/net/thunderx/nicvf_ethdev.h  |  3 ++-
 drivers/net/vmxnet3/vmxnet3_ethdev.c |  3 ++-
 25 files changed, 55 insertions(+), 31 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 6685ee7d9..6c106baf7 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -160,7 +160,8 @@ static const struct rte_pci_id bnxt_pci_id_map[] = {
 				     DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM | \
 				     DEV_RX_OFFLOAD_JUMBO_FRAME | \
 				     DEV_RX_OFFLOAD_KEEP_CRC | \
-				     DEV_RX_OFFLOAD_TCP_LRO)
+				     DEV_RX_OFFLOAD_TCP_LRO | \
+				     DEV_RX_OFFLOAD_RSS_HASH)
 
 static int bnxt_vlan_offload_set_op(struct rte_eth_dev *dev, int mask);
 static void bnxt_print_link_info(struct rte_eth_dev *eth_dev);
diff --git a/drivers/net/cxgbe/cxgbe.h b/drivers/net/cxgbe/cxgbe.h
index 3f97fa58b..22e61a55c 100644
--- a/drivers/net/cxgbe/cxgbe.h
+++ b/drivers/net/cxgbe/cxgbe.h
@@ -47,7 +47,8 @@
 			   DEV_RX_OFFLOAD_UDP_CKSUM | \
 			   DEV_RX_OFFLOAD_TCP_CKSUM | \
 			   DEV_RX_OFFLOAD_JUMBO_FRAME | \
-			   DEV_RX_OFFLOAD_SCATTER)
+			   DEV_RX_OFFLOAD_SCATTER | \
+			   DEV_RX_OFFLOAD_RSS_HASH)
 
 
 #define CXGBE_DEVARG_KEEP_OVLAN "keep_ovlan"
diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
index 7154fb9b4..18c7bd0d5 100644
--- a/drivers/net/dpaa/dpaa_ethdev.c
+++ b/drivers/net/dpaa/dpaa_ethdev.c
@@ -49,7 +49,8 @@
 /* Supported Rx offloads */
 static uint64_t dev_rx_offloads_sup =
 		DEV_RX_OFFLOAD_JUMBO_FRAME |
-		DEV_RX_OFFLOAD_SCATTER;
+		DEV_RX_OFFLOAD_SCATTER |
+		DEV_RX_OFFLOAD_RSS_HASH;
 
 /* Rx offloads which cannot be disabled */
 static uint64_t dev_rx_offloads_nodis =
diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c
index dd6a78f9f..55a1c4455 100644
--- a/drivers/net/dpaa2/dpaa2_ethdev.c
+++ b/drivers/net/dpaa2/dpaa2_ethdev.c
@@ -38,7 +38,8 @@ static uint64_t dev_rx_offloads_sup =
 		DEV_RX_OFFLOAD_TCP_CKSUM |
 		DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM |
 		DEV_RX_OFFLOAD_VLAN_FILTER |
-		DEV_RX_OFFLOAD_JUMBO_FRAME;
+		DEV_RX_OFFLOAD_JUMBO_FRAME |
+		DEV_RX_OFFLOAD_RSS_HASH;
 
 /* Rx offloads which cannot be disabled */
 static uint64_t dev_rx_offloads_nodis =
diff --git a/drivers/net/e1000/igb_rxtx.c b/drivers/net/e1000/igb_rxtx.c
index c5606de5d..684fa4ad8 100644
--- a/drivers/net/e1000/igb_rxtx.c
+++ b/drivers/net/e1000/igb_rxtx.c
@@ -1646,7 +1646,8 @@ igb_get_rx_port_offloads_capa(struct rte_eth_dev *dev)
 			  DEV_RX_OFFLOAD_TCP_CKSUM   |
 			  DEV_RX_OFFLOAD_JUMBO_FRAME |
 			  DEV_RX_OFFLOAD_KEEP_CRC    |
-			  DEV_RX_OFFLOAD_SCATTER;
+			  DEV_RX_OFFLOAD_SCATTER     |
+			  DEV_RX_OFFLOAD_RSS_HASH;
 
 	return rx_offload_capa;
 }
diff --git a/drivers/net/enic/enic_res.c b/drivers/net/enic/enic_res.c
index 9405e1933..607a085f8 100644
--- a/drivers/net/enic/enic_res.c
+++ b/drivers/net/enic/enic_res.c
@@ -198,7 +198,8 @@ int enic_get_vnic_config(struct enic *enic)
 		DEV_RX_OFFLOAD_VLAN_STRIP |
 		DEV_RX_OFFLOAD_IPV4_CKSUM |
 		DEV_RX_OFFLOAD_UDP_CKSUM |
-		DEV_RX_OFFLOAD_TCP_CKSUM;
+		DEV_RX_OFFLOAD_TCP_CKSUM |
+		DEV_RX_OFFLOAD_RSS_HASH;
 	enic->tx_offload_mask =
 		PKT_TX_IPV6 |
 		PKT_TX_IPV4 |
diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c
index db4d72129..ba9b174cf 100644
--- a/drivers/net/fm10k/fm10k_ethdev.c
+++ b/drivers/net/fm10k/fm10k_ethdev.c
@@ -1797,7 +1797,8 @@ static uint64_t fm10k_get_rx_port_offloads_capa(struct rte_eth_dev *dev)
 			   DEV_RX_OFFLOAD_UDP_CKSUM   |
 			   DEV_RX_OFFLOAD_TCP_CKSUM   |
 			   DEV_RX_OFFLOAD_JUMBO_FRAME |
-			   DEV_RX_OFFLOAD_HEADER_SPLIT);
+			   DEV_RX_OFFLOAD_HEADER_SPLIT |
+			   DEV_RX_OFFLOAD_RSS_HASH);
 }
 
 static int
diff --git a/drivers/net/hinic/hinic_pmd_ethdev.c b/drivers/net/hinic/hinic_pmd_ethdev.c
index 044af9053..53bd2b9ae 100644
--- a/drivers/net/hinic/hinic_pmd_ethdev.c
+++ b/drivers/net/hinic/hinic_pmd_ethdev.c
@@ -680,7 +680,8 @@ hinic_dev_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *info)
 	info->rx_offload_capa = DEV_RX_OFFLOAD_VLAN_STRIP |
 				DEV_RX_OFFLOAD_IPV4_CKSUM |
 				DEV_RX_OFFLOAD_UDP_CKSUM |
-				DEV_RX_OFFLOAD_TCP_CKSUM;
+				DEV_RX_OFFLOAD_TCP_CKSUM |
+				DEV_RX_OFFLOAD_RSS_HASH;
 
 	info->tx_queue_offload_capa = 0;
 	info->tx_offload_capa = DEV_TX_OFFLOAD_VLAN_INSERT |
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 4e40b7ab5..7058e0213 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -3511,7 +3511,8 @@ i40e_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 		DEV_RX_OFFLOAD_SCATTER |
 		DEV_RX_OFFLOAD_VLAN_EXTEND |
 		DEV_RX_OFFLOAD_VLAN_FILTER |
-		DEV_RX_OFFLOAD_JUMBO_FRAME;
+		DEV_RX_OFFLOAD_JUMBO_FRAME |
+		DEV_RX_OFFLOAD_RSS_HASH;
 
 	dev_info->tx_queue_offload_capa = DEV_TX_OFFLOAD_MBUF_FAST_FREE;
 	dev_info->tx_offload_capa =
diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index 8f3907378..aef91a79b 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -517,7 +517,8 @@ iavf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 		DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM |
 		DEV_RX_OFFLOAD_SCATTER |
 		DEV_RX_OFFLOAD_JUMBO_FRAME |
-		DEV_RX_OFFLOAD_VLAN_FILTER;
+		DEV_RX_OFFLOAD_VLAN_FILTER |
+		DEV_RX_OFFLOAD_RSS_HASH;
 	dev_info->tx_offload_capa =
 		DEV_TX_OFFLOAD_VLAN_INSERT |
 		DEV_TX_OFFLOAD_QINQ_INSERT |
diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index 63997fdfb..2e2a6b2af 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -2145,7 +2145,8 @@ ice_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 			DEV_RX_OFFLOAD_TCP_CKSUM |
 			DEV_RX_OFFLOAD_QINQ_STRIP |
 			DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM |
-			DEV_RX_OFFLOAD_VLAN_EXTEND;
+			DEV_RX_OFFLOAD_VLAN_EXTEND |
+			DEV_RX_OFFLOAD_RSS_HASH;
 		dev_info->tx_offload_capa |=
 			DEV_TX_OFFLOAD_QINQ_INSERT |
 			DEV_TX_OFFLOAD_IPV4_CKSUM |
diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c
index edcfa60ce..fa572d184 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx.c
@@ -2872,7 +2872,8 @@ ixgbe_get_rx_port_offloads(struct rte_eth_dev *dev)
 		   DEV_RX_OFFLOAD_KEEP_CRC    |
 		   DEV_RX_OFFLOAD_JUMBO_FRAME |
 		   DEV_RX_OFFLOAD_VLAN_FILTER |
-		   DEV_RX_OFFLOAD_SCATTER;
+		   DEV_RX_OFFLOAD_SCATTER |
+		   DEV_RX_OFFLOAD_RSS_HASH;
 
 	if (hw->mac.type == ixgbe_mac_82598EB)
 		offloads |= DEV_RX_OFFLOAD_VLAN_STRIP;
diff --git a/drivers/net/liquidio/lio_ethdev.c b/drivers/net/liquidio/lio_ethdev.c
index c25dab00c..ff118586e 100644
--- a/drivers/net/liquidio/lio_ethdev.c
+++ b/drivers/net/liquidio/lio_ethdev.c
@@ -406,7 +406,8 @@ lio_dev_info_get(struct rte_eth_dev *eth_dev,
 	devinfo->rx_offload_capa = (DEV_RX_OFFLOAD_IPV4_CKSUM		|
 				    DEV_RX_OFFLOAD_UDP_CKSUM		|
 				    DEV_RX_OFFLOAD_TCP_CKSUM		|
-				    DEV_RX_OFFLOAD_VLAN_STRIP);
+				    DEV_RX_OFFLOAD_VLAN_STRIP		|
+				    DEV_RX_OFFLOAD_RSS_HASH);
 	devinfo->tx_offload_capa = (DEV_TX_OFFLOAD_IPV4_CKSUM		|
 				    DEV_TX_OFFLOAD_UDP_CKSUM		|
 				    DEV_TX_OFFLOAD_TCP_CKSUM		|
diff --git a/drivers/net/mlx4/mlx4_rxq.c b/drivers/net/mlx4/mlx4_rxq.c
index f45c1ff85..4a6fbd922 100644
--- a/drivers/net/mlx4/mlx4_rxq.c
+++ b/drivers/net/mlx4/mlx4_rxq.c
@@ -685,7 +685,8 @@ mlx4_get_rx_queue_offloads(struct mlx4_priv *priv)
 {
 	uint64_t offloads = DEV_RX_OFFLOAD_SCATTER |
 			    DEV_RX_OFFLOAD_KEEP_CRC |
-			    DEV_RX_OFFLOAD_JUMBO_FRAME;
+			    DEV_RX_OFFLOAD_JUMBO_FRAME |
+			    DEV_RX_OFFLOAD_RSS_HASH;
 
 	if (priv->hw_csum)
 		offloads |= DEV_RX_OFFLOAD_CHECKSUM;
diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
index a1fdeef2a..b5fd57693 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -368,7 +368,8 @@ mlx5_get_rx_queue_offloads(struct rte_eth_dev *dev)
 	struct mlx5_dev_config *config = &priv->config;
 	uint64_t offloads = (DEV_RX_OFFLOAD_SCATTER |
 			     DEV_RX_OFFLOAD_TIMESTAMP |
-			     DEV_RX_OFFLOAD_JUMBO_FRAME);
+			     DEV_RX_OFFLOAD_JUMBO_FRAME |
+			     DEV_RX_OFFLOAD_RSS_HASH);
 
 	if (config->hw_fcs_strip)
 		offloads |= DEV_RX_OFFLOAD_KEEP_CRC;
diff --git a/drivers/net/netvsc/hn_rndis.c b/drivers/net/netvsc/hn_rndis.c
index a67bc7a79..2b4714042 100644
--- a/drivers/net/netvsc/hn_rndis.c
+++ b/drivers/net/netvsc/hn_rndis.c
@@ -897,7 +897,8 @@ int hn_rndis_get_offload(struct hn_data *hv,
 	    == HN_NDIS_LSOV2_CAP_IP6)
 		dev_info->tx_offload_capa |= DEV_TX_OFFLOAD_TCP_TSO;
 
-	dev_info->rx_offload_capa = DEV_RX_OFFLOAD_VLAN_STRIP;
+	dev_info->rx_offload_capa = DEV_RX_OFFLOAD_VLAN_STRIP |
+				    DEV_RX_OFFLOAD_RSS_HASH;
 
 	if (hwcaps.ndis_csum.ndis_ip4_rxcsum & NDIS_RXCSUM_CAP_IP4)
 		dev_info->rx_offload_capa |= DEV_RX_OFFLOAD_IPV4_CKSUM;
diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
index f1a3ef2f9..230d64c8a 100644
--- a/drivers/net/nfp/nfp_net.c
+++ b/drivers/net/nfp/nfp_net.c
@@ -1226,7 +1226,8 @@ nfp_net_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 					     DEV_RX_OFFLOAD_UDP_CKSUM |
 					     DEV_RX_OFFLOAD_TCP_CKSUM;
 
-	dev_info->rx_offload_capa |= DEV_RX_OFFLOAD_JUMBO_FRAME;
+	dev_info->rx_offload_capa |= DEV_RX_OFFLOAD_JUMBO_FRAME |
+				     DEV_RX_OFFLOAD_RSS_HASH;
 
 	if (hw->cap & NFP_NET_CFG_CTRL_TXVLAN)
 		dev_info->tx_offload_capa = DEV_TX_OFFLOAD_VLAN_INSERT;
diff --git a/drivers/net/octeontx2/otx2_ethdev.c b/drivers/net/octeontx2/otx2_ethdev.c
index b84128fef..2e88d1844 100644
--- a/drivers/net/octeontx2/otx2_ethdev.c
+++ b/drivers/net/octeontx2/otx2_ethdev.c
@@ -569,7 +569,8 @@ nix_rx_offload_flags(struct rte_eth_dev *eth_dev)
 	struct rte_eth_rxmode *rxmode = &conf->rxmode;
 	uint16_t flags = 0;
 
-	if (rxmode->mq_mode == ETH_MQ_RX_RSS)
+	if (rxmode->mq_mode == ETH_MQ_RX_RSS &&
+			(dev->rx_offloads & DEV_RX_OFFLOAD_RSS_HASH))
 		flags |= NIX_RX_OFFLOAD_RSS_F;
 
 	if (dev->rx_offloads & (DEV_RX_OFFLOAD_TCP_CKSUM |
diff --git a/drivers/net/octeontx2/otx2_ethdev.h b/drivers/net/octeontx2/otx2_ethdev.h
index 7b15d6bc8..0cca6746d 100644
--- a/drivers/net/octeontx2/otx2_ethdev.h
+++ b/drivers/net/octeontx2/otx2_ethdev.h
@@ -122,8 +122,8 @@
 	DEV_TX_OFFLOAD_MT_LOCKFREE	| \
 	DEV_TX_OFFLOAD_VLAN_INSERT	| \
 	DEV_TX_OFFLOAD_QINQ_INSERT	| \
-	DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM | \
-	DEV_TX_OFFLOAD_OUTER_UDP_CKSUM  | \
+	DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM	| \
+	DEV_TX_OFFLOAD_OUTER_UDP_CKSUM	| \
 	DEV_TX_OFFLOAD_TCP_CKSUM	| \
 	DEV_TX_OFFLOAD_UDP_CKSUM	| \
 	DEV_TX_OFFLOAD_SCTP_CKSUM	| \
@@ -136,11 +136,12 @@
 	DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM | \
 	DEV_RX_OFFLOAD_SCATTER		| \
 	DEV_RX_OFFLOAD_JUMBO_FRAME	| \
-	DEV_RX_OFFLOAD_OUTER_UDP_CKSUM | \
-	DEV_RX_OFFLOAD_VLAN_STRIP | \
-	DEV_RX_OFFLOAD_VLAN_FILTER | \
-	DEV_RX_OFFLOAD_QINQ_STRIP | \
-	DEV_RX_OFFLOAD_TIMESTAMP)
+	DEV_RX_OFFLOAD_OUTER_UDP_CKSUM	| \
+	DEV_RX_OFFLOAD_VLAN_STRIP	| \
+	DEV_RX_OFFLOAD_VLAN_FILTER	| \
+	DEV_RX_OFFLOAD_QINQ_STRIP	| \
+	DEV_RX_OFFLOAD_TIMESTAMP	| \
+	DEV_RX_OFFLOAD_RSS_HASH)
 
 #define NIX_DEFAULT_RSS_CTX_GROUP  0
 #define NIX_DEFAULT_RSS_MCAM_IDX  -1
diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index 528b33e8c..da25b26df 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -1291,7 +1291,8 @@ qede_dev_info_get(struct rte_eth_dev *eth_dev,
 				     DEV_RX_OFFLOAD_SCATTER	|
 				     DEV_RX_OFFLOAD_JUMBO_FRAME |
 				     DEV_RX_OFFLOAD_VLAN_FILTER |
-				     DEV_RX_OFFLOAD_VLAN_STRIP);
+				     DEV_RX_OFFLOAD_VLAN_STRIP  |
+				     DEV_RX_OFFLOAD_RSS_HASH);
 	dev_info->rx_queue_offload_capa = 0;
 
 	/* TX offloads are on a per-packet basis, so it is applicable
diff --git a/drivers/net/sfc/sfc_ef10_essb_rx.c b/drivers/net/sfc/sfc_ef10_essb_rx.c
index 63da807ea..220ef0e47 100644
--- a/drivers/net/sfc/sfc_ef10_essb_rx.c
+++ b/drivers/net/sfc/sfc_ef10_essb_rx.c
@@ -716,7 +716,7 @@ struct sfc_dp_rx sfc_ef10_essb_rx = {
 	.features		= SFC_DP_RX_FEAT_FLOW_FLAG |
 				  SFC_DP_RX_FEAT_FLOW_MARK,
 	.dev_offload_capa	= DEV_RX_OFFLOAD_CHECKSUM,
-	.queue_offload_capa	= 0,
+	.queue_offload_capa	= DEV_RX_OFFLOAD_RSS_HASH,
 	.get_dev_info		= sfc_ef10_essb_rx_get_dev_info,
 	.pool_ops_supported	= sfc_ef10_essb_rx_pool_ops_supported,
 	.qsize_up_rings		= sfc_ef10_essb_rx_qsize_up_rings,
diff --git a/drivers/net/sfc/sfc_ef10_rx.c b/drivers/net/sfc/sfc_ef10_rx.c
index f2fc6e70a..85b5df466 100644
--- a/drivers/net/sfc/sfc_ef10_rx.c
+++ b/drivers/net/sfc/sfc_ef10_rx.c
@@ -797,7 +797,8 @@ struct sfc_dp_rx sfc_ef10_rx = {
 				  SFC_DP_RX_FEAT_INTR,
 	.dev_offload_capa	= DEV_RX_OFFLOAD_CHECKSUM |
 				  DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM,
-	.queue_offload_capa	= DEV_RX_OFFLOAD_SCATTER,
+	.queue_offload_capa	= DEV_RX_OFFLOAD_SCATTER |
+				  DEV_RX_OFFLOAD_RSS_HASH,
 	.get_dev_info		= sfc_ef10_rx_get_dev_info,
 	.qsize_up_rings		= sfc_ef10_rx_qsize_up_rings,
 	.qcreate		= sfc_ef10_rx_qcreate,
diff --git a/drivers/net/sfc/sfc_rx.c b/drivers/net/sfc/sfc_rx.c
index e6809bb64..695580b22 100644
--- a/drivers/net/sfc/sfc_rx.c
+++ b/drivers/net/sfc/sfc_rx.c
@@ -618,7 +618,8 @@ struct sfc_dp_rx sfc_efx_rx = {
 	},
 	.features		= SFC_DP_RX_FEAT_INTR,
 	.dev_offload_capa	= DEV_RX_OFFLOAD_CHECKSUM,
-	.queue_offload_capa	= DEV_RX_OFFLOAD_SCATTER,
+	.queue_offload_capa	= DEV_RX_OFFLOAD_SCATTER |
+				  DEV_RX_OFFLOAD_RSS_HASH,
 	.qsize_up_rings		= sfc_efx_rx_qsize_up_rings,
 	.qcreate		= sfc_efx_rx_qcreate,
 	.qdestroy		= sfc_efx_rx_qdestroy,
diff --git a/drivers/net/thunderx/nicvf_ethdev.h b/drivers/net/thunderx/nicvf_ethdev.h
index c0bfbf848..391411799 100644
--- a/drivers/net/thunderx/nicvf_ethdev.h
+++ b/drivers/net/thunderx/nicvf_ethdev.h
@@ -41,7 +41,8 @@
 	DEV_RX_OFFLOAD_CHECKSUM    | \
 	DEV_RX_OFFLOAD_VLAN_STRIP  | \
 	DEV_RX_OFFLOAD_JUMBO_FRAME | \
-	DEV_RX_OFFLOAD_SCATTER)
+	DEV_RX_OFFLOAD_SCATTER     | \
+	DEV_RX_OFFLOAD_RSS_HASH)
 
 #define NICVF_DEFAULT_RX_FREE_THRESH    224
 #define NICVF_DEFAULT_TX_FREE_THRESH    224
diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c
index 9cd5eb65b..da768ced7 100644
--- a/drivers/net/vmxnet3/vmxnet3_ethdev.c
+++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c
@@ -56,7 +56,8 @@
 	 DEV_RX_OFFLOAD_UDP_CKSUM |	\
 	 DEV_RX_OFFLOAD_TCP_CKSUM |	\
 	 DEV_RX_OFFLOAD_TCP_LRO |	\
-	 DEV_RX_OFFLOAD_JUMBO_FRAME)
+	 DEV_RX_OFFLOAD_JUMBO_FRAME |   \
+	 DEV_RX_OFFLOAD_RSS_HASH)
 
 static int eth_vmxnet3_dev_init(struct rte_eth_dev *eth_dev);
 static int eth_vmxnet3_dev_uninit(struct rte_eth_dev *eth_dev);
-- 
2.17.1


^ permalink raw reply	[flat|nested] 245+ messages in thread

* [dpdk-dev] [PATCH v6 5/7] drivers/net: update Rx flow flag and mark capabilities
  2019-10-01 18:52       ` [dpdk-dev] [PATCH v6 0/7] ethdev: add new Rx offload flags pbhagavatula
                           ` (3 preceding siblings ...)
  2019-10-01 18:52         ` [dpdk-dev] [PATCH v6 4/7] drivers/net: update Rx RSS hash offload capabilities pbhagavatula
@ 2019-10-01 18:52         ` pbhagavatula
  2019-10-01 18:52         ` [dpdk-dev] [PATCH v6 6/7] examples/eventdev_pipeline: add new Rx RSS hash offload pbhagavatula
                           ` (2 subsequent siblings)
  7 siblings, 0 replies; 245+ messages in thread
From: pbhagavatula @ 2019-10-01 18:52 UTC (permalink / raw)
  To: arybchenko, jerinj, Ajit Khaparde, Somnath Kotur, John Daley,
	Hyong Youb Kim, Beilei Xing, Qi Zhang, Jingjing Wu, Wenzhuo Lu,
	Qiming Yang, Konstantin Ananyev, Matan Azrad, Shahaf Shuler,
	Viacheslav Ovsiienko, Nithin Dabilpuram, Kiran Kumar K
  Cc: dev, Pavan Nikhilesh

From: Pavan Nikhilesh <pbhagavatula@marvell.com>

Add DEV_RX_OFFLOAD_FLOW_MARK flag for all PMDs that support flow action
flag and mark.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 drivers/net/bnxt/bnxt_ethdev.c          | 3 ++-
 drivers/net/enic/enic_res.c             | 3 ++-
 drivers/net/i40e/i40e_ethdev.c          | 3 ++-
 drivers/net/iavf/iavf_ethdev.c          | 3 ++-
 drivers/net/ice/ice_ethdev.c            | 3 ++-
 drivers/net/ixgbe/ixgbe_rxtx.c          | 3 ++-
 drivers/net/mlx5/mlx5_rxq.c             | 3 ++-
 drivers/net/octeontx2/otx2_ethdev.h     | 3 ++-
 drivers/net/octeontx2/otx2_flow.c       | 9 ++-------
 drivers/net/octeontx2/otx2_flow.h       | 1 -
 drivers/net/octeontx2/otx2_flow_parse.c | 4 +---
 drivers/net/sfc/sfc_ef10_essb_rx.c      | 3 ++-
 12 files changed, 21 insertions(+), 20 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 6c106baf7..fd1fb7eda 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -161,7 +161,8 @@ static const struct rte_pci_id bnxt_pci_id_map[] = {
 				     DEV_RX_OFFLOAD_JUMBO_FRAME | \
 				     DEV_RX_OFFLOAD_KEEP_CRC | \
 				     DEV_RX_OFFLOAD_TCP_LRO | \
-				     DEV_RX_OFFLOAD_RSS_HASH)
+				     DEV_RX_OFFLOAD_RSS_HASH | \
+				     DEV_RX_OFFLOAD_FLOW_MARK)
 
 static int bnxt_vlan_offload_set_op(struct rte_eth_dev *dev, int mask);
 static void bnxt_print_link_info(struct rte_eth_dev *eth_dev);
diff --git a/drivers/net/enic/enic_res.c b/drivers/net/enic/enic_res.c
index 607a085f8..3503d5d7e 100644
--- a/drivers/net/enic/enic_res.c
+++ b/drivers/net/enic/enic_res.c
@@ -199,7 +199,8 @@ int enic_get_vnic_config(struct enic *enic)
 		DEV_RX_OFFLOAD_IPV4_CKSUM |
 		DEV_RX_OFFLOAD_UDP_CKSUM |
 		DEV_RX_OFFLOAD_TCP_CKSUM |
-		DEV_RX_OFFLOAD_RSS_HASH;
+		DEV_RX_OFFLOAD_RSS_HASH |
+		DEV_RX_OFFLOAD_FLOW_MARK;
 	enic->tx_offload_mask =
 		PKT_TX_IPV6 |
 		PKT_TX_IPV4 |
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 7058e0213..6311943be 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -3512,7 +3512,8 @@ i40e_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 		DEV_RX_OFFLOAD_VLAN_EXTEND |
 		DEV_RX_OFFLOAD_VLAN_FILTER |
 		DEV_RX_OFFLOAD_JUMBO_FRAME |
-		DEV_RX_OFFLOAD_RSS_HASH;
+		DEV_RX_OFFLOAD_RSS_HASH |
+		DEV_RX_OFFLOAD_FLOW_MARK;
 
 	dev_info->tx_queue_offload_capa = DEV_TX_OFFLOAD_MBUF_FAST_FREE;
 	dev_info->tx_offload_capa =
diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index aef91a79b..7bdaa87b1 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -518,7 +518,8 @@ iavf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 		DEV_RX_OFFLOAD_SCATTER |
 		DEV_RX_OFFLOAD_JUMBO_FRAME |
 		DEV_RX_OFFLOAD_VLAN_FILTER |
-		DEV_RX_OFFLOAD_RSS_HASH;
+		DEV_RX_OFFLOAD_RSS_HASH |
+		DEV_RX_OFFLOAD_FLOW_MARK;
 	dev_info->tx_offload_capa =
 		DEV_TX_OFFLOAD_VLAN_INSERT |
 		DEV_TX_OFFLOAD_QINQ_INSERT |
diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index 2e2a6b2af..984af659f 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -2146,7 +2146,8 @@ ice_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 			DEV_RX_OFFLOAD_QINQ_STRIP |
 			DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM |
 			DEV_RX_OFFLOAD_VLAN_EXTEND |
-			DEV_RX_OFFLOAD_RSS_HASH;
+			DEV_RX_OFFLOAD_RSS_HASH |
+			DEV_RX_OFFLOAD_FLOW_MARK;
 		dev_info->tx_offload_capa |=
 			DEV_TX_OFFLOAD_QINQ_INSERT |
 			DEV_TX_OFFLOAD_IPV4_CKSUM |
diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c
index fa572d184..1481e2426 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx.c
@@ -2873,7 +2873,8 @@ ixgbe_get_rx_port_offloads(struct rte_eth_dev *dev)
 		   DEV_RX_OFFLOAD_JUMBO_FRAME |
 		   DEV_RX_OFFLOAD_VLAN_FILTER |
 		   DEV_RX_OFFLOAD_SCATTER |
-		   DEV_RX_OFFLOAD_RSS_HASH;
+		   DEV_RX_OFFLOAD_RSS_HASH |
+		   DEV_RX_OFFLOAD_FLOW_MARK;
 
 	if (hw->mac.type == ixgbe_mac_82598EB)
 		offloads |= DEV_RX_OFFLOAD_VLAN_STRIP;
diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
index b5fd57693..1bf01bda3 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -369,7 +369,8 @@ mlx5_get_rx_queue_offloads(struct rte_eth_dev *dev)
 	uint64_t offloads = (DEV_RX_OFFLOAD_SCATTER |
 			     DEV_RX_OFFLOAD_TIMESTAMP |
 			     DEV_RX_OFFLOAD_JUMBO_FRAME |
-			     DEV_RX_OFFLOAD_RSS_HASH);
+			     DEV_RX_OFFLOAD_RSS_HASH |
+			     DEV_RX_OFFLOAD_FLOW_MARK);
 
 	if (config->hw_fcs_strip)
 		offloads |= DEV_RX_OFFLOAD_KEEP_CRC;
diff --git a/drivers/net/octeontx2/otx2_ethdev.h b/drivers/net/octeontx2/otx2_ethdev.h
index 0cca6746d..97c1a636a 100644
--- a/drivers/net/octeontx2/otx2_ethdev.h
+++ b/drivers/net/octeontx2/otx2_ethdev.h
@@ -141,7 +141,8 @@
 	DEV_RX_OFFLOAD_VLAN_FILTER	| \
 	DEV_RX_OFFLOAD_QINQ_STRIP	| \
 	DEV_RX_OFFLOAD_TIMESTAMP	| \
-	DEV_RX_OFFLOAD_RSS_HASH)
+	DEV_RX_OFFLOAD_RSS_HASH		| \
+	DEV_RX_OFFLOAD_FLOW_MARK)
 
 #define NIX_DEFAULT_RSS_CTX_GROUP  0
 #define NIX_DEFAULT_RSS_MCAM_IDX  -1
diff --git a/drivers/net/octeontx2/otx2_flow.c b/drivers/net/octeontx2/otx2_flow.c
index bdbf123a9..ea4e380b1 100644
--- a/drivers/net/octeontx2/otx2_flow.c
+++ b/drivers/net/octeontx2/otx2_flow.c
@@ -524,11 +524,8 @@ otx2_flow_destroy(struct rte_eth_dev *dev,
 		NIX_RX_ACT_MATCH_MASK;
 
 	if (match_id && match_id < OTX2_FLOW_ACTION_FLAG_DEFAULT) {
-		if (rte_atomic32_read(&npc->mark_actions) == 0)
-			return -EINVAL;
-
-		/* Clear mark offload flag if there are no more mark actions */
-		if (rte_atomic32_sub_return(&npc->mark_actions, 1) == 0) {
+		/* Clear mark offload flag if there is no more mark action */
+		if (hw->rx_offloads & DEV_RX_OFFLOAD_FLOW_MARK) {
 			hw->rx_offload_flags &= ~NIX_RX_OFFLOAD_MARK_UPDATE_F;
 			otx2_eth_set_rx_function(dev);
 		}
@@ -821,8 +818,6 @@ otx2_flow_init(struct otx2_eth_dev *hw)
 		return rc;
 	}
 
-	rte_atomic32_init(&npc->mark_actions);
-
 	npc->mcam_entries = NPC_MCAM_TOT_ENTRIES >> npc->keyw[NPC_MCAM_RX];
 	/* Free, free_rev, live and live_rev entries */
 	bmap_sz = rte_bitmap_get_memory_footprint(npc->mcam_entries);
diff --git a/drivers/net/octeontx2/otx2_flow.h b/drivers/net/octeontx2/otx2_flow.h
index ab068b088..85129cc9d 100644
--- a/drivers/net/octeontx2/otx2_flow.h
+++ b/drivers/net/octeontx2/otx2_flow.h
@@ -160,7 +160,6 @@ TAILQ_HEAD(otx2_flow_list, rte_flow);
 
 /* Accessed from ethdev private - otx2_eth_dev */
 struct otx2_npc_flow_info {
-	rte_atomic32_t mark_actions;
 	uint32_t keyx_supp_nmask[NPC_MAX_INTF];/* nibble mask */
 	uint32_t keyx_len[NPC_MAX_INTF];	/* per intf key len in bits */
 	uint32_t datax_len[NPC_MAX_INTF];	/* per intf data len in bits */
diff --git a/drivers/net/octeontx2/otx2_flow_parse.c b/drivers/net/octeontx2/otx2_flow_parse.c
index 6670c1a70..6312d9942 100644
--- a/drivers/net/octeontx2/otx2_flow_parse.c
+++ b/drivers/net/octeontx2/otx2_flow_parse.c
@@ -795,13 +795,11 @@ otx2_flow_parse_actions(struct rte_eth_dev *dev,
 			}
 			mark = act_mark->id + 1;
 			req_act |= OTX2_FLOW_ACT_MARK;
-			rte_atomic32_inc(&npc->mark_actions);
 			break;
 
 		case RTE_FLOW_ACTION_TYPE_FLAG:
 			mark = OTX2_FLOW_FLAG_VAL;
 			req_act |= OTX2_FLOW_ACT_FLAG;
-			rte_atomic32_inc(&npc->mark_actions);
 			break;
 
 		case RTE_FLOW_ACTION_TYPE_COUNT:
@@ -979,7 +977,7 @@ otx2_flow_parse_actions(struct rte_eth_dev *dev,
 	if (mark)
 		flow->npc_action |= (uint64_t)mark << 40;
 
-	if (rte_atomic32_read(&npc->mark_actions) == 1) {
+	if (hw->rx_offloads & DEV_RX_OFFLOAD_FLOW_MARK) {
 		hw->rx_offload_flags |=
 			NIX_RX_OFFLOAD_MARK_UPDATE_F;
 		otx2_eth_set_rx_function(dev);
diff --git a/drivers/net/sfc/sfc_ef10_essb_rx.c b/drivers/net/sfc/sfc_ef10_essb_rx.c
index 220ef0e47..1887731e2 100644
--- a/drivers/net/sfc/sfc_ef10_essb_rx.c
+++ b/drivers/net/sfc/sfc_ef10_essb_rx.c
@@ -716,7 +716,8 @@ struct sfc_dp_rx sfc_ef10_essb_rx = {
 	.features		= SFC_DP_RX_FEAT_FLOW_FLAG |
 				  SFC_DP_RX_FEAT_FLOW_MARK,
 	.dev_offload_capa	= DEV_RX_OFFLOAD_CHECKSUM,
-	.queue_offload_capa	= DEV_RX_OFFLOAD_RSS_HASH,
+	.queue_offload_capa	= DEV_RX_OFFLOAD_RSS_HASH |
+				  DEV_RX_OFFLOAD_FLOW_MARK,
 	.get_dev_info		= sfc_ef10_essb_rx_get_dev_info,
 	.pool_ops_supported	= sfc_ef10_essb_rx_pool_ops_supported,
 	.qsize_up_rings		= sfc_ef10_essb_rx_qsize_up_rings,
-- 
2.17.1


^ permalink raw reply	[flat|nested] 245+ messages in thread

* [dpdk-dev] [PATCH v6 6/7] examples/eventdev_pipeline: add new Rx RSS hash offload
  2019-10-01 18:52       ` [dpdk-dev] [PATCH v6 0/7] ethdev: add new Rx offload flags pbhagavatula
                           ` (4 preceding siblings ...)
  2019-10-01 18:52         ` [dpdk-dev] [PATCH v6 5/7] drivers/net: update Rx flow flag and mark capabilities pbhagavatula
@ 2019-10-01 18:52         ` pbhagavatula
  2019-10-01 18:52         ` [dpdk-dev] [PATCH v6 7/7] examples: disable Rx packet type parsing pbhagavatula
  2019-10-02  3:47         ` [dpdk-dev] [PATCH v5 0/7] ethdev: add new Rx offload flags pbhagavatula
  7 siblings, 0 replies; 245+ messages in thread
From: pbhagavatula @ 2019-10-01 18:52 UTC (permalink / raw)
  To: arybchenko, jerinj, Harry van Haaren; +Cc: dev, Pavan Nikhilesh

From: Pavan Nikhilesh <pbhagavatula@marvell.com>

Since pipeline_generic uses `rte_mbuf::hash::rss` add the new Rx offload
flag `DEV_RX_OFFLOAD_RSS_HASH` to inform PMD to copy the RSS hash result
into the mbuf.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
 examples/eventdev_pipeline/main.c             | 113 -----------------
 .../pipeline_worker_generic.c                 | 118 ++++++++++++++++++
 .../eventdev_pipeline/pipeline_worker_tx.c    | 114 +++++++++++++++++
 3 files changed, 232 insertions(+), 113 deletions(-)

diff --git a/examples/eventdev_pipeline/main.c b/examples/eventdev_pipeline/main.c
index f4e57f541..a73b61d59 100644
--- a/examples/eventdev_pipeline/main.c
+++ b/examples/eventdev_pipeline/main.c
@@ -242,118 +242,6 @@ parse_app_args(int argc, char **argv)
 	}
 }
 
-/*
- * Initializes a given port using global settings and with the RX buffers
- * coming from the mbuf_pool passed as a parameter.
- */
-static inline int
-port_init(uint8_t port, struct rte_mempool *mbuf_pool)
-{
-	struct rte_eth_rxconf rx_conf;
-	static const struct rte_eth_conf port_conf_default = {
-		.rxmode = {
-			.mq_mode = ETH_MQ_RX_RSS,
-			.max_rx_pkt_len = RTE_ETHER_MAX_LEN,
-		},
-		.rx_adv_conf = {
-			.rss_conf = {
-				.rss_hf = ETH_RSS_IP |
-					  ETH_RSS_TCP |
-					  ETH_RSS_UDP,
-			}
-		}
-	};
-	const uint16_t rx_rings = 1, tx_rings = 1;
-	const uint16_t rx_ring_size = 512, tx_ring_size = 512;
-	struct rte_eth_conf port_conf = port_conf_default;
-	int retval;
-	uint16_t q;
-	struct rte_eth_dev_info dev_info;
-	struct rte_eth_txconf txconf;
-
-	if (!rte_eth_dev_is_valid_port(port))
-		return -1;
-
-	rte_eth_dev_info_get(port, &dev_info);
-	if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_MBUF_FAST_FREE)
-		port_conf.txmode.offloads |=
-			DEV_TX_OFFLOAD_MBUF_FAST_FREE;
-	rx_conf = dev_info.default_rxconf;
-	rx_conf.offloads = port_conf.rxmode.offloads;
-
-	port_conf.rx_adv_conf.rss_conf.rss_hf &=
-		dev_info.flow_type_rss_offloads;
-	if (port_conf.rx_adv_conf.rss_conf.rss_hf !=
-			port_conf_default.rx_adv_conf.rss_conf.rss_hf) {
-		printf("Port %u modified RSS hash function based on hardware support,"
-			"requested:%#"PRIx64" configured:%#"PRIx64"\n",
-			port,
-			port_conf_default.rx_adv_conf.rss_conf.rss_hf,
-			port_conf.rx_adv_conf.rss_conf.rss_hf);
-	}
-
-	/* Configure the Ethernet device. */
-	retval = rte_eth_dev_configure(port, rx_rings, tx_rings, &port_conf);
-	if (retval != 0)
-		return retval;
-
-	/* Allocate and set up 1 RX queue per Ethernet port. */
-	for (q = 0; q < rx_rings; q++) {
-		retval = rte_eth_rx_queue_setup(port, q, rx_ring_size,
-				rte_eth_dev_socket_id(port), &rx_conf,
-				mbuf_pool);
-		if (retval < 0)
-			return retval;
-	}
-
-	txconf = dev_info.default_txconf;
-	txconf.offloads = port_conf_default.txmode.offloads;
-	/* Allocate and set up 1 TX queue per Ethernet port. */
-	for (q = 0; q < tx_rings; q++) {
-		retval = rte_eth_tx_queue_setup(port, q, tx_ring_size,
-				rte_eth_dev_socket_id(port), &txconf);
-		if (retval < 0)
-			return retval;
-	}
-
-	/* Display the port MAC address. */
-	struct rte_ether_addr addr;
-	rte_eth_macaddr_get(port, &addr);
-	printf("Port %u MAC: %02" PRIx8 " %02" PRIx8 " %02" PRIx8
-			   " %02" PRIx8 " %02" PRIx8 " %02" PRIx8 "\n",
-			(unsigned int)port,
-			addr.addr_bytes[0], addr.addr_bytes[1],
-			addr.addr_bytes[2], addr.addr_bytes[3],
-			addr.addr_bytes[4], addr.addr_bytes[5]);
-
-	/* Enable RX in promiscuous mode for the Ethernet device. */
-	rte_eth_promiscuous_enable(port);
-
-	return 0;
-}
-
-static int
-init_ports(uint16_t num_ports)
-{
-	uint16_t portid;
-
-	if (!cdata.num_mbuf)
-		cdata.num_mbuf = 16384 * num_ports;
-
-	struct rte_mempool *mp = rte_pktmbuf_pool_create("packet_pool",
-			/* mbufs */ cdata.num_mbuf,
-			/* cache_size */ 512,
-			/* priv_size*/ 0,
-			/* data_room_size */ RTE_MBUF_DEFAULT_BUF_SIZE,
-			rte_socket_id());
-
-	RTE_ETH_FOREACH_DEV(portid)
-		if (port_init(portid, mp) != 0)
-			rte_exit(EXIT_FAILURE, "Cannot init port %"PRIu16 "\n",
-					portid);
-
-	return 0;
-}
 
 static void
 do_capability_setup(uint8_t eventdev_id)
@@ -501,7 +389,6 @@ main(int argc, char **argv)
 	if (dev_id < 0)
 		rte_exit(EXIT_FAILURE, "Error setting up eventdev\n");
 
-	init_ports(num_ports);
 	fdata->cap.adptr_setup(num_ports);
 
 	/* Start the Ethernet port. */
diff --git a/examples/eventdev_pipeline/pipeline_worker_generic.c b/examples/eventdev_pipeline/pipeline_worker_generic.c
index 766c8e958..aa1678fe7 100644
--- a/examples/eventdev_pipeline/pipeline_worker_generic.c
+++ b/examples/eventdev_pipeline/pipeline_worker_generic.c
@@ -271,6 +271,123 @@ setup_eventdev_generic(struct worker_data *worker_data)
 	return dev_id;
 }
 
+/*
+ * Initializes a given port using global settings and with the RX buffers
+ * coming from the mbuf_pool passed as a parameter.
+ */
+static inline int
+port_init(uint8_t port, struct rte_mempool *mbuf_pool)
+{
+	struct rte_eth_rxconf rx_conf;
+	static const struct rte_eth_conf port_conf_default = {
+		.rxmode = {
+			.mq_mode = ETH_MQ_RX_RSS,
+			.max_rx_pkt_len = RTE_ETHER_MAX_LEN,
+		},
+		.rx_adv_conf = {
+			.rss_conf = {
+				.rss_hf = ETH_RSS_IP |
+					  ETH_RSS_TCP |
+					  ETH_RSS_UDP,
+			}
+		}
+	};
+	const uint16_t rx_rings = 1, tx_rings = 1;
+	const uint16_t rx_ring_size = 512, tx_ring_size = 512;
+	struct rte_eth_conf port_conf = port_conf_default;
+	int retval;
+	uint16_t q;
+	struct rte_eth_dev_info dev_info;
+	struct rte_eth_txconf txconf;
+
+	if (!rte_eth_dev_is_valid_port(port))
+		return -1;
+
+	rte_eth_dev_info_get(port, &dev_info);
+	if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_MBUF_FAST_FREE)
+		port_conf.txmode.offloads |=
+			DEV_TX_OFFLOAD_MBUF_FAST_FREE;
+
+	if (dev_info.rx_offload_capa & DEV_RX_OFFLOAD_RSS_HASH)
+		port_conf.rxmode.offloads |= DEV_RX_OFFLOAD_RSS_HASH;
+
+	rx_conf = dev_info.default_rxconf;
+	rx_conf.offloads = port_conf.rxmode.offloads;
+
+	port_conf.rx_adv_conf.rss_conf.rss_hf &=
+		dev_info.flow_type_rss_offloads;
+	if (port_conf.rx_adv_conf.rss_conf.rss_hf !=
+			port_conf_default.rx_adv_conf.rss_conf.rss_hf) {
+		printf("Port %u modified RSS hash function based on hardware support,"
+			"requested:%#"PRIx64" configured:%#"PRIx64"\n",
+			port,
+			port_conf_default.rx_adv_conf.rss_conf.rss_hf,
+			port_conf.rx_adv_conf.rss_conf.rss_hf);
+	}
+
+	/* Configure the Ethernet device. */
+	retval = rte_eth_dev_configure(port, rx_rings, tx_rings, &port_conf);
+	if (retval != 0)
+		return retval;
+
+	/* Allocate and set up 1 RX queue per Ethernet port. */
+	for (q = 0; q < rx_rings; q++) {
+		retval = rte_eth_rx_queue_setup(port, q, rx_ring_size,
+				rte_eth_dev_socket_id(port), &rx_conf,
+				mbuf_pool);
+		if (retval < 0)
+			return retval;
+	}
+
+	txconf = dev_info.default_txconf;
+	txconf.offloads = port_conf_default.txmode.offloads;
+	/* Allocate and set up 1 TX queue per Ethernet port. */
+	for (q = 0; q < tx_rings; q++) {
+		retval = rte_eth_tx_queue_setup(port, q, tx_ring_size,
+				rte_eth_dev_socket_id(port), &txconf);
+		if (retval < 0)
+			return retval;
+	}
+
+	/* Display the port MAC address. */
+	struct rte_ether_addr addr;
+	rte_eth_macaddr_get(port, &addr);
+	printf("Port %u MAC: %02" PRIx8 " %02" PRIx8 " %02" PRIx8
+			   " %02" PRIx8 " %02" PRIx8 " %02" PRIx8 "\n",
+			(unsigned int)port,
+			addr.addr_bytes[0], addr.addr_bytes[1],
+			addr.addr_bytes[2], addr.addr_bytes[3],
+			addr.addr_bytes[4], addr.addr_bytes[5]);
+
+	/* Enable RX in promiscuous mode for the Ethernet device. */
+	rte_eth_promiscuous_enable(port);
+
+	return 0;
+}
+
+static int
+init_ports(uint16_t num_ports)
+{
+	uint16_t portid;
+
+	if (!cdata.num_mbuf)
+		cdata.num_mbuf = 16384 * num_ports;
+
+	struct rte_mempool *mp = rte_pktmbuf_pool_create("packet_pool",
+			/* mbufs */ cdata.num_mbuf,
+			/* cache_size */ 512,
+			/* priv_size*/ 0,
+			/* data_room_size */ RTE_MBUF_DEFAULT_BUF_SIZE,
+			rte_socket_id());
+
+	RTE_ETH_FOREACH_DEV(portid)
+		if (port_init(portid, mp) != 0)
+			rte_exit(EXIT_FAILURE, "Cannot init port %"PRIu16 "\n",
+					portid);
+
+	return 0;
+}
+
 static void
 init_adapters(uint16_t nb_ports)
 {
@@ -297,6 +414,7 @@ init_adapters(uint16_t nb_ports)
 		adptr_p_conf.enqueue_depth =
 			dev_info.max_event_port_enqueue_depth;
 
+	init_ports(nb_ports);
 	/* Create one adapter for all the ethernet ports. */
 	ret = rte_event_eth_rx_adapter_create(cdata.rx_adapter_id, evdev_id,
 			&adptr_p_conf);
diff --git a/examples/eventdev_pipeline/pipeline_worker_tx.c b/examples/eventdev_pipeline/pipeline_worker_tx.c
index 8961cd656..52a1b4174 100644
--- a/examples/eventdev_pipeline/pipeline_worker_tx.c
+++ b/examples/eventdev_pipeline/pipeline_worker_tx.c
@@ -603,6 +603,119 @@ service_rx_adapter(void *arg)
 	return 0;
 }
 
+/*
+ * Initializes a given port using global settings and with the RX buffers
+ * coming from the mbuf_pool passed as a parameter.
+ */
+static inline int
+port_init(uint8_t port, struct rte_mempool *mbuf_pool)
+{
+	struct rte_eth_rxconf rx_conf;
+	static const struct rte_eth_conf port_conf_default = {
+		.rxmode = {
+			.mq_mode = ETH_MQ_RX_RSS,
+			.max_rx_pkt_len = RTE_ETHER_MAX_LEN,
+		},
+		.rx_adv_conf = {
+			.rss_conf = {
+				.rss_hf = ETH_RSS_IP |
+					  ETH_RSS_TCP |
+					  ETH_RSS_UDP,
+			}
+		}
+	};
+	const uint16_t rx_rings = 1, tx_rings = 1;
+	const uint16_t rx_ring_size = 512, tx_ring_size = 512;
+	struct rte_eth_conf port_conf = port_conf_default;
+	int retval;
+	uint16_t q;
+	struct rte_eth_dev_info dev_info;
+	struct rte_eth_txconf txconf;
+
+	if (!rte_eth_dev_is_valid_port(port))
+		return -1;
+
+	rte_eth_dev_info_get(port, &dev_info);
+	if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_MBUF_FAST_FREE)
+		port_conf.txmode.offloads |=
+			DEV_TX_OFFLOAD_MBUF_FAST_FREE;
+	rx_conf = dev_info.default_rxconf;
+	rx_conf.offloads = port_conf.rxmode.offloads;
+
+	port_conf.rx_adv_conf.rss_conf.rss_hf &=
+		dev_info.flow_type_rss_offloads;
+	if (port_conf.rx_adv_conf.rss_conf.rss_hf !=
+			port_conf_default.rx_adv_conf.rss_conf.rss_hf) {
+		printf("Port %u modified RSS hash function based on hardware support,"
+			"requested:%#"PRIx64" configured:%#"PRIx64"\n",
+			port,
+			port_conf_default.rx_adv_conf.rss_conf.rss_hf,
+			port_conf.rx_adv_conf.rss_conf.rss_hf);
+	}
+
+	/* Configure the Ethernet device. */
+	retval = rte_eth_dev_configure(port, rx_rings, tx_rings, &port_conf);
+	if (retval != 0)
+		return retval;
+
+	/* Allocate and set up 1 RX queue per Ethernet port. */
+	for (q = 0; q < rx_rings; q++) {
+		retval = rte_eth_rx_queue_setup(port, q, rx_ring_size,
+				rte_eth_dev_socket_id(port), &rx_conf,
+				mbuf_pool);
+		if (retval < 0)
+			return retval;
+	}
+
+	txconf = dev_info.default_txconf;
+	txconf.offloads = port_conf_default.txmode.offloads;
+	/* Allocate and set up 1 TX queue per Ethernet port. */
+	for (q = 0; q < tx_rings; q++) {
+		retval = rte_eth_tx_queue_setup(port, q, tx_ring_size,
+				rte_eth_dev_socket_id(port), &txconf);
+		if (retval < 0)
+			return retval;
+	}
+
+	/* Display the port MAC address. */
+	struct rte_ether_addr addr;
+	rte_eth_macaddr_get(port, &addr);
+	printf("Port %u MAC: %02" PRIx8 " %02" PRIx8 " %02" PRIx8
+			   " %02" PRIx8 " %02" PRIx8 " %02" PRIx8 "\n",
+			(unsigned int)port,
+			addr.addr_bytes[0], addr.addr_bytes[1],
+			addr.addr_bytes[2], addr.addr_bytes[3],
+			addr.addr_bytes[4], addr.addr_bytes[5]);
+
+	/* Enable RX in promiscuous mode for the Ethernet device. */
+	rte_eth_promiscuous_enable(port);
+
+	return 0;
+}
+
+static int
+init_ports(uint16_t num_ports)
+{
+	uint16_t portid;
+
+	if (!cdata.num_mbuf)
+		cdata.num_mbuf = 16384 * num_ports;
+
+	struct rte_mempool *mp = rte_pktmbuf_pool_create("packet_pool",
+			/* mbufs */ cdata.num_mbuf,
+			/* cache_size */ 512,
+			/* priv_size*/ 0,
+			/* data_room_size */ RTE_MBUF_DEFAULT_BUF_SIZE,
+			rte_socket_id());
+
+	RTE_ETH_FOREACH_DEV(portid)
+		if (port_init(portid, mp) != 0)
+			rte_exit(EXIT_FAILURE, "Cannot init port %"PRIu16 "\n",
+					portid);
+
+	return 0;
+}
+
 static void
 init_adapters(uint16_t nb_ports)
 {
@@ -621,6 +734,7 @@ init_adapters(uint16_t nb_ports)
 		.new_event_threshold = 4096,
 	};
 
+	init_ports(nb_ports);
 	if (adptr_p_conf.new_event_threshold > dev_info.max_num_events)
 		adptr_p_conf.new_event_threshold = dev_info.max_num_events;
 	if (adptr_p_conf.dequeue_depth > dev_info.max_event_port_dequeue_depth)
-- 
2.17.1


^ permalink raw reply	[flat|nested] 245+ messages in thread

* [dpdk-dev] [PATCH v6 7/7] examples: disable Rx packet type parsing
  2019-10-01 18:52       ` [dpdk-dev] [PATCH v6 0/7] ethdev: add new Rx offload flags pbhagavatula
                           ` (5 preceding siblings ...)
  2019-10-01 18:52         ` [dpdk-dev] [PATCH v6 6/7] examples/eventdev_pipeline: add new Rx RSS hash offload pbhagavatula
@ 2019-10-01 18:52         ` pbhagavatula
  2019-10-02  3:47         ` [dpdk-dev] [PATCH v5 0/7] ethdev: add new Rx offload flags pbhagavatula
  7 siblings, 0 replies; 245+ messages in thread
From: pbhagavatula @ 2019-10-01 18:52 UTC (permalink / raw)
  To: arybchenko, jerinj, Nicolas Chautru, Chas Williams, David Hunt,
	Harry van Haaren, Marko Kovacevic, Ori Kam, Bruce Richardson,
	Radu Nicolau, Akhil Goyal, Tomasz Kantecki, Bernard Iremonger,
	Cristian Dumitrescu, Konstantin Ananyev, Ferruh Yigit,
	Declan Doherty, Reshma Pattan, John McNamara, Xiaoyun Li,
	Jasvinder Singh, Byron Marohn, Yipeng Wang, Maxime Coquelin,
	Tiwei Bie, Zhihong Wang
  Cc: dev, Pavan Nikhilesh

From: Pavan Nikhilesh <pbhagavatula@marvell.com>

Disable packet type parsing in examples that don't use
`rte_mbuf::packet_type` by setting ptype_mask as 0 in
`rte_eth_dev_set_supported_ptypes`

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
 examples/bbdev_app/main.c                  | 1 +
 examples/bond/main.c                       | 2 ++
 examples/distributor/Makefile              | 1 +
 examples/distributor/main.c                | 1 +
 examples/distributor/meson.build           | 1 +
 examples/eventdev_pipeline/main.c          | 2 ++
 examples/eventdev_pipeline/meson.build     | 1 +
 examples/exception_path/Makefile           | 1 +
 examples/exception_path/main.c             | 1 +
 examples/exception_path/meson.build        | 1 +
 examples/flow_classify/flow_classify.c     | 1 +
 examples/flow_filtering/Makefile           | 1 +
 examples/flow_filtering/main.c             | 1 +
 examples/flow_filtering/meson.build        | 1 +
 examples/ip_pipeline/link.c                | 1 +
 examples/ip_reassembly/Makefile            | 1 +
 examples/ip_reassembly/main.c              | 2 ++
 examples/ip_reassembly/meson.build         | 1 +
 examples/ipsec-secgw/ipsec-secgw.c         | 2 ++
 examples/ipv4_multicast/Makefile           | 1 +
 examples/ipv4_multicast/main.c             | 2 ++
 examples/ipv4_multicast/meson.build        | 1 +
 examples/kni/main.c                        | 1 +
 examples/l2fwd-cat/Makefile                | 1 +
 examples/l2fwd-cat/l2fwd-cat.c             | 1 +
 examples/l2fwd-cat/meson.build             | 1 +
 examples/l2fwd-crypto/main.c               | 2 ++
 examples/l2fwd-jobstats/Makefile           | 1 +
 examples/l2fwd-jobstats/main.c             | 2 ++
 examples/l2fwd-jobstats/meson.build        | 1 +
 examples/l2fwd-keepalive/Makefile          | 1 +
 examples/l2fwd-keepalive/main.c            | 2 ++
 examples/l2fwd-keepalive/meson.build       | 1 +
 examples/l2fwd/Makefile                    | 1 +
 examples/l2fwd/main.c                      | 2 ++
 examples/l2fwd/meson.build                 | 1 +
 examples/l3fwd-acl/Makefile                | 1 +
 examples/l3fwd-acl/main.c                  | 2 ++
 examples/l3fwd-acl/meson.build             | 1 +
 examples/l3fwd-vf/Makefile                 | 1 +
 examples/l3fwd-vf/main.c                   | 2 ++
 examples/l3fwd-vf/meson.build              | 1 +
 examples/link_status_interrupt/Makefile    | 1 +
 examples/link_status_interrupt/main.c      | 2 ++
 examples/link_status_interrupt/meson.build | 1 +
 examples/load_balancer/Makefile            | 1 +
 examples/load_balancer/init.c              | 2 ++
 examples/load_balancer/meson.build         | 1 +
 examples/packet_ordering/Makefile          | 1 +
 examples/packet_ordering/main.c            | 1 +
 examples/packet_ordering/meson.build       | 1 +
 examples/ptpclient/Makefile                | 1 +
 examples/ptpclient/meson.build             | 1 +
 examples/ptpclient/ptpclient.c             | 1 +
 examples/qos_meter/Makefile                | 1 +
 examples/qos_meter/main.c                  | 2 ++
 examples/qos_meter/meson.build             | 1 +
 examples/qos_sched/Makefile                | 1 +
 examples/qos_sched/init.c                  | 1 +
 examples/qos_sched/meson.build             | 1 +
 examples/quota_watermark/qw/Makefile       | 1 +
 examples/quota_watermark/qw/init.c         | 1 +
 examples/rxtx_callbacks/main.c             | 1 +
 examples/server_node_efd/server/Makefile   | 1 +
 examples/server_node_efd/server/init.c     | 1 +
 examples/skeleton/Makefile                 | 1 +
 examples/skeleton/basicfwd.c               | 1 +
 examples/skeleton/meson.build              | 1 +
 examples/tep_termination/Makefile          | 1 +
 examples/tep_termination/meson.build       | 1 +
 examples/tep_termination/vxlan_setup.c     | 1 +
 examples/vhost/Makefile                    | 1 +
 examples/vhost/main.c                      | 1 +
 examples/vm_power_manager/Makefile         | 1 +
 examples/vm_power_manager/main.c           | 1 +
 examples/vm_power_manager/meson.build      | 1 +
 examples/vmdq/Makefile                     | 1 +
 examples/vmdq/main.c                       | 1 +
 examples/vmdq/meson.build                  | 1 +
 examples/vmdq_dcb/Makefile                 | 1 +
 examples/vmdq_dcb/main.c                   | 1 +
 examples/vmdq_dcb/meson.build              | 1 +
 82 files changed, 96 insertions(+)

diff --git a/examples/bbdev_app/main.c b/examples/bbdev_app/main.c
index 9acf666dc..277725a6b 100644
--- a/examples/bbdev_app/main.c
+++ b/examples/bbdev_app/main.c
@@ -478,6 +478,7 @@ initialize_ports(struct app_config_params *app_params,
 	}
 
 	rte_eth_promiscuous_enable(port_id);
+	rte_eth_dev_set_supported_ptypes(port_id, RTE_PTYPE_UNKNOWN, NULL, 0);
 
 	rte_eth_macaddr_get(port_id, &bbdev_port_eth_addr);
 	print_mac(port_id, &bbdev_port_eth_addr);
diff --git a/examples/bond/main.c b/examples/bond/main.c
index 1c0df9d46..f92104908 100644
--- a/examples/bond/main.c
+++ b/examples/bond/main.c
@@ -195,6 +195,7 @@ slave_port_init(uint16_t portid, struct rte_mempool *mbuf_pool)
 		rte_exit(retval, "port %u: TX queue 0 setup failed (res=%d)",
 				portid, retval);
 
+	rte_eth_dev_set_supported_ptypes(portid, RTE_PTYPE_UNKNOWN, NULL, 0);
 	retval  = rte_eth_dev_start(portid);
 	if (retval < 0)
 		rte_exit(retval,
@@ -271,6 +272,7 @@ bond_port_init(struct rte_mempool *mbuf_pool)
 		rte_exit(retval, "port %u: TX queue 0 setup failed (res=%d)",
 				BOND_PORT, retval);
 
+	rte_eth_dev_set_supported_ptypes(BOND_PORT, RTE_PTYPE_UNKNOWN, NULL, 0);
 	retval  = rte_eth_dev_start(BOND_PORT);
 	if (retval < 0)
 		rte_exit(retval, "Start port %d failed (res=%d)", BOND_PORT, retval);
diff --git a/examples/distributor/Makefile b/examples/distributor/Makefile
index bac8d5578..a2a477279 100644
--- a/examples/distributor/Makefile
+++ b/examples/distributor/Makefile
@@ -50,6 +50,7 @@ RTE_TARGET ?= $(notdir $(abspath $(dir $(firstword $(wildcard $(RTE_SDK)/*/.conf
 include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 # workaround for a gcc bug with noreturn attribute
 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603
diff --git a/examples/distributor/main.c b/examples/distributor/main.c
index 81d7ca61d..35930d8a3 100644
--- a/examples/distributor/main.c
+++ b/examples/distributor/main.c
@@ -162,6 +162,7 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool)
 			return retval;
 	}
 
+	rte_eth_dev_set_supported_ptypes(port, RTE_PTYPE_UNKNOWN, NULL, 0);
 	retval = rte_eth_dev_start(port);
 	if (retval < 0)
 		return retval;
diff --git a/examples/distributor/meson.build b/examples/distributor/meson.build
index 26f108d65..c2976f6bd 100644
--- a/examples/distributor/meson.build
+++ b/examples/distributor/meson.build
@@ -10,6 +10,7 @@
 build = dpdk_conf.has('RTE_LIBRTE_POWER')
 
 deps += ['distributor', 'power']
+allow_experimental_apis = true
 sources = files(
 	'main.c'
 )
diff --git a/examples/eventdev_pipeline/main.c b/examples/eventdev_pipeline/main.c
index a73b61d59..66b6420f9 100644
--- a/examples/eventdev_pipeline/main.c
+++ b/examples/eventdev_pipeline/main.c
@@ -393,6 +393,8 @@ main(int argc, char **argv)
 
 	/* Start the Ethernet port. */
 	RTE_ETH_FOREACH_DEV(portid) {
+		rte_eth_dev_set_supported_ptypes(portid, RTE_PTYPE_UNKNOWN,
+						 NULL, 0);
 		err = rte_eth_dev_start(portid);
 		if (err < 0)
 			rte_exit(EXIT_FAILURE, "Error starting ethdev %d\n",
diff --git a/examples/eventdev_pipeline/meson.build b/examples/eventdev_pipeline/meson.build
index a54c35aa7..0fc916b05 100644
--- a/examples/eventdev_pipeline/meson.build
+++ b/examples/eventdev_pipeline/meson.build
@@ -7,6 +7,7 @@
 # DPDK instance, use 'make'
 
 deps += 'eventdev'
+allow_experimental_apis = true
 sources = files(
 	'main.c',
 	'pipeline_worker_generic.c',
diff --git a/examples/exception_path/Makefile b/examples/exception_path/Makefile
index 90c7f133a..a7c961276 100644
--- a/examples/exception_path/Makefile
+++ b/examples/exception_path/Makefile
@@ -51,6 +51,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 include $(RTE_SDK)/mk/rte.extapp.mk
 
diff --git a/examples/exception_path/main.c b/examples/exception_path/main.c
index 0d79e5a24..0165e4553 100644
--- a/examples/exception_path/main.c
+++ b/examples/exception_path/main.c
@@ -464,6 +464,7 @@ init_port(uint16_t port)
 		FATAL_ERROR("Could not setup up TX queue for port%u (%d)",
 				port, ret);
 
+	rte_eth_dev_set_supported_ptypes(port, RTE_PTYPE_UNKNOWN, NULL, 0);
 	ret = rte_eth_dev_start(port);
 	if (ret < 0)
 		FATAL_ERROR("Could not start port%u (%d)", port, ret);
diff --git a/examples/exception_path/meson.build b/examples/exception_path/meson.build
index c34e11e36..2b0a25036 100644
--- a/examples/exception_path/meson.build
+++ b/examples/exception_path/meson.build
@@ -6,6 +6,7 @@
 # To build this example as a standalone application with an already-installed
 # DPDK instance, use 'make'
 
+allow_experimental_apis = true
 sources = files(
 	'main.c'
 )
diff --git a/examples/flow_classify/flow_classify.c b/examples/flow_classify/flow_classify.c
index bc7f43ea9..f34d27428 100644
--- a/examples/flow_classify/flow_classify.c
+++ b/examples/flow_classify/flow_classify.c
@@ -231,6 +231,7 @@ port_init(uint8_t port, struct rte_mempool *mbuf_pool)
 	}
 
 	/* Start the Ethernet port. */
+	rte_eth_dev_set_supported_ptypes(port, RTE_PTYPE_UNKNOWN, NULL, 0);
 	retval = rte_eth_dev_start(port);
 	if (retval < 0)
 		return retval;
diff --git a/examples/flow_filtering/Makefile b/examples/flow_filtering/Makefile
index a63a75555..793a08fae 100644
--- a/examples/flow_filtering/Makefile
+++ b/examples/flow_filtering/Makefile
@@ -49,6 +49,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 include $(RTE_SDK)/mk/rte.extapp.mk
 
diff --git a/examples/flow_filtering/main.c b/examples/flow_filtering/main.c
index a0487be77..4b8712324 100644
--- a/examples/flow_filtering/main.c
+++ b/examples/flow_filtering/main.c
@@ -176,6 +176,7 @@ init_port(void)
 	}
 
 	rte_eth_promiscuous_enable(port_id);
+	rte_eth_dev_set_supported_ptypes(port_id, RTE_PTYPE_UNKNOWN, NULL, 0);
 	ret = rte_eth_dev_start(port_id);
 	if (ret < 0) {
 		rte_exit(EXIT_FAILURE,
diff --git a/examples/flow_filtering/meson.build b/examples/flow_filtering/meson.build
index 407795c42..6f5d1b08a 100644
--- a/examples/flow_filtering/meson.build
+++ b/examples/flow_filtering/meson.build
@@ -6,6 +6,7 @@
 # To build this example as a standalone application with an already-installed
 # DPDK instance, use 'make'
 
+allow_experimental_apis = true
 sources = files(
 	'main.c',
 )
diff --git a/examples/ip_pipeline/link.c b/examples/ip_pipeline/link.c
index 787eb866a..7d02962e3 100644
--- a/examples/ip_pipeline/link.c
+++ b/examples/ip_pipeline/link.c
@@ -205,6 +205,7 @@ link_create(const char *name, struct link_params *params)
 			return NULL;
 	}
 
+	rte_eth_dev_set_supported_ptypes(port_id, RTE_PTYPE_UNKNOWN, NULL, 0);
 	/* Port start */
 	status = rte_eth_dev_start(port_id);
 	if (status < 0)
diff --git a/examples/ip_reassembly/Makefile b/examples/ip_reassembly/Makefile
index 0b1a904e0..19c462388 100644
--- a/examples/ip_reassembly/Makefile
+++ b/examples/ip_reassembly/Makefile
@@ -52,6 +52,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 # workaround for a gcc bug with noreturn attribute
 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603
diff --git a/examples/ip_reassembly/main.c b/examples/ip_reassembly/main.c
index 38b39be6b..f2c28ef76 100644
--- a/examples/ip_reassembly/main.c
+++ b/examples/ip_reassembly/main.c
@@ -1158,6 +1158,8 @@ main(int argc, char **argv)
 		if ((enabled_port_mask & (1 << portid)) == 0) {
 			continue;
 		}
+		rte_eth_dev_set_supported_ptypes(portid, RTE_PTYPE_UNKNOWN,
+						 NULL, 0);
 		/* Start device */
 		ret = rte_eth_dev_start(portid);
 		if (ret < 0)
diff --git a/examples/ip_reassembly/meson.build b/examples/ip_reassembly/meson.build
index 8ebd48291..8a667c265 100644
--- a/examples/ip_reassembly/meson.build
+++ b/examples/ip_reassembly/meson.build
@@ -7,6 +7,7 @@
 # DPDK instance, use 'make'
 
 deps += ['lpm', 'ip_frag']
+allow_experimental_apis = true
 sources = files(
 	'main.c'
 )
diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c
index 0d1fd6af6..2aceaf549 100644
--- a/examples/ipsec-secgw/ipsec-secgw.c
+++ b/examples/ipsec-secgw/ipsec-secgw.c
@@ -2448,6 +2448,8 @@ main(int32_t argc, char **argv)
 		if ((enabled_port_mask & (1 << portid)) == 0)
 			continue;
 
+		rte_eth_dev_set_supported_ptypes(portid, RTE_PTYPE_UNKNOWN,
+						 NULL, 0);
 		/*
 		 * Start device
 		 * note: device must be started before a flow rule
diff --git a/examples/ipv4_multicast/Makefile b/examples/ipv4_multicast/Makefile
index 5f8a67dd4..5171f7ab2 100644
--- a/examples/ipv4_multicast/Makefile
+++ b/examples/ipv4_multicast/Makefile
@@ -52,6 +52,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 # workaround for a gcc bug with noreturn attribute
 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603
diff --git a/examples/ipv4_multicast/main.c b/examples/ipv4_multicast/main.c
index 72eaadc51..3d327a00b 100644
--- a/examples/ipv4_multicast/main.c
+++ b/examples/ipv4_multicast/main.c
@@ -765,6 +765,8 @@ main(int argc, char **argv)
 			qconf->tx_queue_id[portid] = queueid;
 			queueid++;
 		}
+		rte_eth_dev_set_supported_ptypes(portid, RTE_PTYPE_UNKNOWN,
+						 NULL, 0);
 		rte_eth_allmulticast_enable(portid);
 		/* Start device */
 		ret = rte_eth_dev_start(portid);
diff --git a/examples/ipv4_multicast/meson.build b/examples/ipv4_multicast/meson.build
index d9e4c7c21..6969e2c54 100644
--- a/examples/ipv4_multicast/meson.build
+++ b/examples/ipv4_multicast/meson.build
@@ -7,6 +7,7 @@
 # DPDK instance, use 'make'
 
 deps += 'hash'
+allow_experimental_apis = true
 sources = files(
 	'main.c'
 )
diff --git a/examples/kni/main.c b/examples/kni/main.c
index 4710d7176..99f500e25 100644
--- a/examples/kni/main.c
+++ b/examples/kni/main.c
@@ -625,6 +625,7 @@ init_port(uint16_t port)
 		rte_exit(EXIT_FAILURE, "Could not setup up TX queue for "
 				"port%u (%d)\n", (unsigned)port, ret);
 
+	rte_eth_dev_set_supported_ptypes(port, RTE_PTYPE_UNKNOWN, NULL, 0);
 	ret = rte_eth_dev_start(port);
 	if (ret < 0)
 		rte_exit(EXIT_FAILURE, "Could not start port%u (%d)\n",
diff --git a/examples/l2fwd-cat/Makefile b/examples/l2fwd-cat/Makefile
index c1960d6d3..d6a25e42a 100644
--- a/examples/l2fwd-cat/Makefile
+++ b/examples/l2fwd-cat/Makefile
@@ -66,6 +66,7 @@ endif
 EXTRA_CFLAGS += -O3 -g -Wfatal-errors
 
 CFLAGS += -I$(PQOS_INSTALL_PATH)/../include
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 LDLIBS += -L$(PQOS_INSTALL_PATH)
 LDLIBS += -lpqos
diff --git a/examples/l2fwd-cat/l2fwd-cat.c b/examples/l2fwd-cat/l2fwd-cat.c
index b34b40a00..a54a1ed25 100644
--- a/examples/l2fwd-cat/l2fwd-cat.c
+++ b/examples/l2fwd-cat/l2fwd-cat.c
@@ -67,6 +67,7 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool)
 			return retval;
 	}
 
+	rte_eth_dev_set_supported_ptypes(port, RTE_PTYPE_UNKNOWN, NULL, 0);
 	/* Start the Ethernet port. */
 	retval = rte_eth_dev_start(port);
 	if (retval < 0)
diff --git a/examples/l2fwd-cat/meson.build b/examples/l2fwd-cat/meson.build
index 4e2777a03..37c96040d 100644
--- a/examples/l2fwd-cat/meson.build
+++ b/examples/l2fwd-cat/meson.build
@@ -10,6 +10,7 @@ pqos = cc.find_library('pqos', required: false)
 build = pqos.found()
 ext_deps += pqos
 cflags += '-I/usr/local/include' # assume pqos lib installed in /usr/local
+allow_experimental_apis = true
 sources = files(
 	'cat.c', 'l2fwd-cat.c'
 )
diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c
index 3fe2ba725..5071ef389 100644
--- a/examples/l2fwd-crypto/main.c
+++ b/examples/l2fwd-crypto/main.c
@@ -2559,6 +2559,8 @@ initialize_ports(struct l2fwd_crypto_options *options)
 			return -1;
 		}
 
+		rte_eth_dev_set_supported_ptypes(portid, RTE_PTYPE_UNKNOWN,
+						 NULL, 0);
 		/* Start device */
 		retval = rte_eth_dev_start(portid);
 		if (retval < 0) {
diff --git a/examples/l2fwd-jobstats/Makefile b/examples/l2fwd-jobstats/Makefile
index 729a39e93..09834e979 100644
--- a/examples/l2fwd-jobstats/Makefile
+++ b/examples/l2fwd-jobstats/Makefile
@@ -52,6 +52,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 include $(RTE_SDK)/mk/rte.extapp.mk
 endif
diff --git a/examples/l2fwd-jobstats/main.c b/examples/l2fwd-jobstats/main.c
index 77e44dc82..03d986a68 100644
--- a/examples/l2fwd-jobstats/main.c
+++ b/examples/l2fwd-jobstats/main.c
@@ -902,6 +902,8 @@ main(int argc, char **argv)
 			"Cannot set error callback for tx buffer on port %u\n",
 				 portid);
 
+		rte_eth_dev_set_supported_ptypes(portid, RTE_PTYPE_UNKNOWN,
+						 NULL, 0);
 		/* Start device */
 		ret = rte_eth_dev_start(portid);
 		if (ret < 0)
diff --git a/examples/l2fwd-jobstats/meson.build b/examples/l2fwd-jobstats/meson.build
index 1ffd484e2..3653aa7ec 100644
--- a/examples/l2fwd-jobstats/meson.build
+++ b/examples/l2fwd-jobstats/meson.build
@@ -7,6 +7,7 @@
 # DPDK instance, use 'make'
 
 deps += ['jobstats', 'timer']
+allow_experimental_apis = true
 sources = files(
 	'main.c'
 )
diff --git a/examples/l2fwd-keepalive/Makefile b/examples/l2fwd-keepalive/Makefile
index 37de27a6f..584257ae2 100644
--- a/examples/l2fwd-keepalive/Makefile
+++ b/examples/l2fwd-keepalive/Makefile
@@ -53,6 +53,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 LDFLAGS += -lrt
 
 include $(RTE_SDK)/mk/rte.extapp.mk
diff --git a/examples/l2fwd-keepalive/main.c b/examples/l2fwd-keepalive/main.c
index 9831a4323..8d3e5eadd 100644
--- a/examples/l2fwd-keepalive/main.c
+++ b/examples/l2fwd-keepalive/main.c
@@ -696,6 +696,8 @@ main(int argc, char **argv)
 			"Cannot set error callback for tx buffer on port %u\n",
 				 portid);
 
+		rte_eth_dev_set_supported_ptypes(portid, RTE_PTYPE_UNKNOWN,
+						 NULL, 0);
 		/* Start device */
 		ret = rte_eth_dev_start(portid);
 		if (ret < 0)
diff --git a/examples/l2fwd-keepalive/meson.build b/examples/l2fwd-keepalive/meson.build
index 6f7b007e1..2dffffaaa 100644
--- a/examples/l2fwd-keepalive/meson.build
+++ b/examples/l2fwd-keepalive/meson.build
@@ -8,6 +8,7 @@
 
 ext_deps += cc.find_library('rt')
 deps += 'timer'
+allow_experimental_apis = true
 sources = files(
 	'main.c', 'shm.c'
 )
diff --git a/examples/l2fwd/Makefile b/examples/l2fwd/Makefile
index 230352093..123e6161c 100644
--- a/examples/l2fwd/Makefile
+++ b/examples/l2fwd/Makefile
@@ -51,6 +51,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 include $(RTE_SDK)/mk/rte.extapp.mk
 endif
diff --git a/examples/l2fwd/main.c b/examples/l2fwd/main.c
index 1e2b14297..b7d6ee2ff 100644
--- a/examples/l2fwd/main.c
+++ b/examples/l2fwd/main.c
@@ -694,6 +694,8 @@ main(int argc, char **argv)
 			"Cannot set error callback for tx buffer on port %u\n",
 				 portid);
 
+		rte_eth_dev_set_supported_ptypes(portid, RTE_PTYPE_UNKNOWN,
+						 NULL, 0);
 		/* Start device */
 		ret = rte_eth_dev_start(portid);
 		if (ret < 0)
diff --git a/examples/l2fwd/meson.build b/examples/l2fwd/meson.build
index c34e11e36..2b0a25036 100644
--- a/examples/l2fwd/meson.build
+++ b/examples/l2fwd/meson.build
@@ -6,6 +6,7 @@
 # To build this example as a standalone application with an already-installed
 # DPDK instance, use 'make'
 
+allow_experimental_apis = true
 sources = files(
 	'main.c'
 )
diff --git a/examples/l3fwd-acl/Makefile b/examples/l3fwd-acl/Makefile
index e2c989f71..df590f8e9 100644
--- a/examples/l3fwd-acl/Makefile
+++ b/examples/l3fwd-acl/Makefile
@@ -51,6 +51,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 # workaround for a gcc bug with noreturn attribute
 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603
diff --git a/examples/l3fwd-acl/main.c b/examples/l3fwd-acl/main.c
index 0c44df767..e113b1a4d 100644
--- a/examples/l3fwd-acl/main.c
+++ b/examples/l3fwd-acl/main.c
@@ -2056,6 +2056,8 @@ main(int argc, char **argv)
 		if ((enabled_port_mask & (1 << portid)) == 0)
 			continue;
 
+		rte_eth_dev_set_supported_ptypes(portid, RTE_PTYPE_UNKNOWN,
+						 NULL, 0);
 		/* Start device */
 		ret = rte_eth_dev_start(portid);
 		if (ret < 0)
diff --git a/examples/l3fwd-acl/meson.build b/examples/l3fwd-acl/meson.build
index 7096e00c1..68cebd6ce 100644
--- a/examples/l3fwd-acl/meson.build
+++ b/examples/l3fwd-acl/meson.build
@@ -7,6 +7,7 @@
 # DPDK instance, use 'make'
 
 deps += ['acl', 'lpm', 'hash']
+allow_experimental_apis = true
 sources = files(
 	'main.c'
 )
diff --git a/examples/l3fwd-vf/Makefile b/examples/l3fwd-vf/Makefile
index 7b186a23c..db7f51f2f 100644
--- a/examples/l3fwd-vf/Makefile
+++ b/examples/l3fwd-vf/Makefile
@@ -51,6 +51,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += -O3 $(USER_FLAGS)
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 # workaround for a gcc bug with noreturn attribute
 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603
diff --git a/examples/l3fwd-vf/main.c b/examples/l3fwd-vf/main.c
index 572e74cf5..5bf70f52d 100644
--- a/examples/l3fwd-vf/main.c
+++ b/examples/l3fwd-vf/main.c
@@ -1051,6 +1051,8 @@ main(int argc, char **argv)
 		if ((enabled_port_mask & (1 << portid)) == 0) {
 			continue;
 		}
+		rte_eth_dev_set_supported_ptypes(portid, RTE_PTYPE_UNKNOWN,
+						 NULL, 0);
 		/* Start device */
 		ret = rte_eth_dev_start(portid);
 		if (ret < 0)
diff --git a/examples/l3fwd-vf/meson.build b/examples/l3fwd-vf/meson.build
index 226286e74..00f3c38f4 100644
--- a/examples/l3fwd-vf/meson.build
+++ b/examples/l3fwd-vf/meson.build
@@ -7,6 +7,7 @@
 # DPDK instance, use 'make'
 
 deps += ['lpm', 'hash']
+allow_experimental_apis = true
 sources = files(
 	'main.c'
 )
diff --git a/examples/link_status_interrupt/Makefile b/examples/link_status_interrupt/Makefile
index 97e5a14a8..6ddedd4de 100644
--- a/examples/link_status_interrupt/Makefile
+++ b/examples/link_status_interrupt/Makefile
@@ -51,6 +51,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 include $(RTE_SDK)/mk/rte.extapp.mk
 endif
diff --git a/examples/link_status_interrupt/main.c b/examples/link_status_interrupt/main.c
index 9cd4dc7a6..04da4732b 100644
--- a/examples/link_status_interrupt/main.c
+++ b/examples/link_status_interrupt/main.c
@@ -676,6 +676,8 @@ main(int argc, char **argv)
 			rte_exit(EXIT_FAILURE, "Cannot set error callback for "
 					"tx buffer on port %u\n", (unsigned) portid);
 
+		rte_eth_dev_set_supported_ptypes(portid, RTE_PTYPE_UNKNOWN,
+						 NULL, 0);
 		/* Start device */
 		ret = rte_eth_dev_start(portid);
 		if (ret < 0)
diff --git a/examples/link_status_interrupt/meson.build b/examples/link_status_interrupt/meson.build
index c34e11e36..2b0a25036 100644
--- a/examples/link_status_interrupt/meson.build
+++ b/examples/link_status_interrupt/meson.build
@@ -6,6 +6,7 @@
 # To build this example as a standalone application with an already-installed
 # DPDK instance, use 'make'
 
+allow_experimental_apis = true
 sources = files(
 	'main.c'
 )
diff --git a/examples/load_balancer/Makefile b/examples/load_balancer/Makefile
index caae8a107..dcba9194c 100644
--- a/examples/load_balancer/Makefile
+++ b/examples/load_balancer/Makefile
@@ -51,6 +51,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += -O3 -g
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 # workaround for a gcc bug with noreturn attribute
 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603
diff --git a/examples/load_balancer/init.c b/examples/load_balancer/init.c
index 3ab7d0211..d49d61474 100644
--- a/examples/load_balancer/init.c
+++ b/examples/load_balancer/init.c
@@ -496,6 +496,8 @@ app_init_nics(void)
 			}
 		}
 
+		rte_eth_dev_set_supported_ptypes(port, RTE_PTYPE_UNKNOWN,
+						 NULL, 0);
 		/* Start port */
 		ret = rte_eth_dev_start(port);
 		if (ret < 0) {
diff --git a/examples/load_balancer/meson.build b/examples/load_balancer/meson.build
index 4f7ac3999..19708974c 100644
--- a/examples/load_balancer/meson.build
+++ b/examples/load_balancer/meson.build
@@ -7,6 +7,7 @@
 # DPDK instance, use 'make'
 
 deps += 'lpm'
+allow_experimental_apis = true
 sources = files(
 	'config.c', 'init.c', 'main.c', 'runtime.c'
 )
diff --git a/examples/packet_ordering/Makefile b/examples/packet_ordering/Makefile
index 51acaf7eb..9ba3fa9e8 100644
--- a/examples/packet_ordering/Makefile
+++ b/examples/packet_ordering/Makefile
@@ -51,6 +51,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 include $(RTE_SDK)/mk/rte.extapp.mk
 endif
diff --git a/examples/packet_ordering/main.c b/examples/packet_ordering/main.c
index 030e92299..59354fad5 100644
--- a/examples/packet_ordering/main.c
+++ b/examples/packet_ordering/main.c
@@ -312,6 +312,7 @@ configure_eth_port(uint16_t port_id)
 			return ret;
 	}
 
+	rte_eth_dev_set_supported_ptypes(port_id, RTE_PTYPE_UNKNOWN, NULL, 0);
 	ret = rte_eth_dev_start(port_id);
 	if (ret < 0)
 		return ret;
diff --git a/examples/packet_ordering/meson.build b/examples/packet_ordering/meson.build
index 6c2fccdcb..a3776946f 100644
--- a/examples/packet_ordering/meson.build
+++ b/examples/packet_ordering/meson.build
@@ -7,6 +7,7 @@
 # DPDK instance, use 'make'
 
 deps += 'reorder'
+allow_experimental_apis = true
 sources = files(
 	'main.c'
 )
diff --git a/examples/ptpclient/Makefile b/examples/ptpclient/Makefile
index 89e2bacbd..f158d96b9 100644
--- a/examples/ptpclient/Makefile
+++ b/examples/ptpclient/Makefile
@@ -50,6 +50,7 @@ RTE_TARGET ?= $(notdir $(abspath $(dir $(firstword $(wildcard $(RTE_SDK)/*/.conf
 include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += -O3
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 CFLAGS += $(WERROR_FLAGS)
 
 # workaround for a gcc bug with noreturn attribute
diff --git a/examples/ptpclient/meson.build b/examples/ptpclient/meson.build
index fa0cbe93c..d4171a218 100644
--- a/examples/ptpclient/meson.build
+++ b/examples/ptpclient/meson.build
@@ -6,6 +6,7 @@
 # To build this example as a standalone application with an already-installed
 # DPDK instance, use 'make'
 
+allow_experimental_apis = true
 sources = files(
 	'ptpclient.c'
 )
diff --git a/examples/ptpclient/ptpclient.c b/examples/ptpclient/ptpclient.c
index 31778fd95..e2cf4b136 100644
--- a/examples/ptpclient/ptpclient.c
+++ b/examples/ptpclient/ptpclient.c
@@ -227,6 +227,7 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool)
 			return retval;
 	}
 
+	rte_eth_dev_set_supported_ptypes(port, RTE_PTYPE_UNKNOWN, NULL, 0);
 	/* Start the Ethernet port. */
 	retval = rte_eth_dev_start(port);
 	if (retval < 0)
diff --git a/examples/qos_meter/Makefile b/examples/qos_meter/Makefile
index e5217cf7c..a1533d08f 100644
--- a/examples/qos_meter/Makefile
+++ b/examples/qos_meter/Makefile
@@ -52,6 +52,7 @@ RTE_TARGET ?= $(notdir $(abspath $(dir $(firstword $(wildcard $(RTE_SDK)/*/.conf
 include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += -O3
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 CFLAGS += $(WERROR_FLAGS)
 
 # workaround for a gcc bug with noreturn attribute
diff --git a/examples/qos_meter/main.c b/examples/qos_meter/main.c
index da7afe8be..ade8e49c3 100644
--- a/examples/qos_meter/main.c
+++ b/examples/qos_meter/main.c
@@ -419,10 +419,12 @@ main(int argc, char **argv)
 
 	rte_eth_tx_buffer_init(tx_buffer, PKT_TX_BURST_MAX);
 
+	rte_eth_dev_set_supported_ptypes(port_rx, RTE_PTYPE_UNKNOWN, NULL, 0);
 	ret = rte_eth_dev_start(port_rx);
 	if (ret < 0)
 		rte_exit(EXIT_FAILURE, "Port %d start error (%d)\n", port_rx, ret);
 
+	rte_eth_dev_set_supported_ptypes(port_tx, RTE_PTYPE_UNKNOWN, NULL, 0);
 	ret = rte_eth_dev_start(port_tx);
 	if (ret < 0)
 		rte_exit(EXIT_FAILURE, "Port %d start error (%d)\n", port_tx, ret);
diff --git a/examples/qos_meter/meson.build b/examples/qos_meter/meson.build
index ef7779f2f..10cd4bc79 100644
--- a/examples/qos_meter/meson.build
+++ b/examples/qos_meter/meson.build
@@ -7,6 +7,7 @@
 # DPDK instance, use 'make'
 
 deps += 'meter'
+allow_experimental_apis = true
 sources = files(
 	'main.c', 'rte_policer.c'
 )
diff --git a/examples/qos_sched/Makefile b/examples/qos_sched/Makefile
index ce2d25371..7d3d3019f 100644
--- a/examples/qos_sched/Makefile
+++ b/examples/qos_sched/Makefile
@@ -58,6 +58,7 @@ else
 
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 include $(RTE_SDK)/mk/rte.extapp.mk
 
diff --git a/examples/qos_sched/init.c b/examples/qos_sched/init.c
index b05206d5a..d165b3dd4 100644
--- a/examples/qos_sched/init.c
+++ b/examples/qos_sched/init.c
@@ -138,6 +138,7 @@ app_init_port(uint16_t portid, struct rte_mempool *mp)
 			 "rte_eth_tx_queue_setup: err=%d, port=%u queue=%d\n",
 			 ret, portid, 0);
 
+	rte_eth_dev_set_supported_ptypes(portid, RTE_PTYPE_UNKNOWN, NULL, 0);
 	/* Start device */
 	ret = rte_eth_dev_start(portid);
 	if (ret < 0)
diff --git a/examples/qos_sched/meson.build b/examples/qos_sched/meson.build
index 289b81ce8..5101652af 100644
--- a/examples/qos_sched/meson.build
+++ b/examples/qos_sched/meson.build
@@ -7,6 +7,7 @@
 # DPDK instance, use 'make'
 
 deps += ['sched', 'cfgfile']
+allow_experimental_apis = true
 sources = files(
 	'app_thread.c', 'args.c', 'cfg_file.c', 'cmdline.c',
 	'init.c', 'main.c', 'stats.c'
diff --git a/examples/quota_watermark/qw/Makefile b/examples/quota_watermark/qw/Makefile
index 3f10f01c3..e06f4482b 100644
--- a/examples/quota_watermark/qw/Makefile
+++ b/examples/quota_watermark/qw/Makefile
@@ -18,5 +18,6 @@ SRCS-y := args.c init.c main.c
 
 CFLAGS += -O3 -DQW_SOFTWARE_FC
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 include $(RTE_SDK)/mk/rte.extapp.mk
diff --git a/examples/quota_watermark/qw/init.c b/examples/quota_watermark/qw/init.c
index 5a0f64f45..4753eb900 100644
--- a/examples/quota_watermark/qw/init.c
+++ b/examples/quota_watermark/qw/init.c
@@ -96,6 +96,7 @@ void configure_eth_port(uint16_t port_id)
 				"Failed to setup hardware flow control on port %u (error %d)\n",
 				(unsigned int) port_id, ret);
 
+	rte_eth_dev_set_supported_ptypes(port_id, RTE_PTYPE_UNKNOWN, NULL, 0);
 	/* Start the port */
 	ret = rte_eth_dev_start(port_id);
 	if (ret < 0)
diff --git a/examples/rxtx_callbacks/main.c b/examples/rxtx_callbacks/main.c
index dbcd9f4fc..8949f0d93 100644
--- a/examples/rxtx_callbacks/main.c
+++ b/examples/rxtx_callbacks/main.c
@@ -152,6 +152,7 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool)
 			return retval;
 	}
 
+	rte_eth_dev_set_supported_ptypes(port, RTE_PTYPE_UNKNOWN, NULL, 0);
 	retval  = rte_eth_dev_start(port);
 	if (retval < 0)
 		return retval;
diff --git a/examples/server_node_efd/server/Makefile b/examples/server_node_efd/server/Makefile
index 4837bd3ea..acbd12ae2 100644
--- a/examples/server_node_efd/server/Makefile
+++ b/examples/server_node_efd/server/Makefile
@@ -25,5 +25,6 @@ INC := $(sort $(wildcard *.h))
 
 CFLAGS += $(WERROR_FLAGS) -O3
 CFLAGS += -I$(SRCDIR)/../shared
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 include $(RTE_SDK)/mk/rte.extapp.mk
diff --git a/examples/server_node_efd/server/init.c b/examples/server_node_efd/server/init.c
index af5a18e28..bbea0c4c9 100644
--- a/examples/server_node_efd/server/init.c
+++ b/examples/server_node_efd/server/init.c
@@ -149,6 +149,7 @@ init_port(uint16_t port_num)
 
 	rte_eth_promiscuous_enable(port_num);
 
+	rte_eth_dev_set_supported_ptypes(port_num, RTE_PTYPE_UNKNOWN, NULL, 0);
 	retval = rte_eth_dev_start(port_num);
 	if (retval < 0)
 		return retval;
diff --git a/examples/skeleton/Makefile b/examples/skeleton/Makefile
index c5ac26029..0037d6b25 100644
--- a/examples/skeleton/Makefile
+++ b/examples/skeleton/Makefile
@@ -50,6 +50,7 @@ RTE_TARGET ?= $(notdir $(abspath $(dir $(firstword $(wildcard $(RTE_SDK)/*/.conf
 include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 # workaround for a gcc bug with noreturn attribute
 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603
diff --git a/examples/skeleton/basicfwd.c b/examples/skeleton/basicfwd.c
index a8a8e98f0..423ce05f8 100644
--- a/examples/skeleton/basicfwd.c
+++ b/examples/skeleton/basicfwd.c
@@ -76,6 +76,7 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool)
 			return retval;
 	}
 
+	rte_eth_dev_set_supported_ptypes(port, RTE_PTYPE_UNKNOWN, NULL, 0);
 	/* Start the Ethernet port. */
 	retval = rte_eth_dev_start(port);
 	if (retval < 0)
diff --git a/examples/skeleton/meson.build b/examples/skeleton/meson.build
index 9bb9ec329..ef46b187e 100644
--- a/examples/skeleton/meson.build
+++ b/examples/skeleton/meson.build
@@ -6,6 +6,7 @@
 # To build this example as a standalone application with an already-installed
 # DPDK instance, use 'make'
 
+allow_experimental_apis = true
 sources = files(
 	'basicfwd.c'
 )
diff --git a/examples/tep_termination/Makefile b/examples/tep_termination/Makefile
index 31165bd92..586838676 100644
--- a/examples/tep_termination/Makefile
+++ b/examples/tep_termination/Makefile
@@ -61,6 +61,7 @@ endif
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
 CFLAGS += -Wno-deprecated-declarations
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 include $(RTE_SDK)/mk/rte.extapp.mk
 endif
diff --git a/examples/tep_termination/meson.build b/examples/tep_termination/meson.build
index f65d68980..f40b1c0b8 100644
--- a/examples/tep_termination/meson.build
+++ b/examples/tep_termination/meson.build
@@ -11,6 +11,7 @@ if not is_linux
 endif
 deps += ['hash', 'vhost']
 cflags += '-Wno-deprecated-declarations'
+allow_experimental_apis = true
 sources = files(
 	'main.c', 'vxlan.c', 'vxlan_setup.c'
 )
diff --git a/examples/tep_termination/vxlan_setup.c b/examples/tep_termination/vxlan_setup.c
index 9a0880002..219d3e215 100644
--- a/examples/tep_termination/vxlan_setup.c
+++ b/examples/tep_termination/vxlan_setup.c
@@ -167,6 +167,7 @@ vxlan_port_init(uint16_t port, struct rte_mempool *mbuf_pool)
 			return retval;
 	}
 
+	rte_eth_dev_set_supported_ptypes(port, RTE_PTYPE_UNKNOWN, NULL, 0);
 	/* Start the device. */
 	retval  = rte_eth_dev_start(port);
 	if (retval < 0)
diff --git a/examples/vhost/Makefile b/examples/vhost/Makefile
index f84b7f017..7722e81c7 100644
--- a/examples/vhost/Makefile
+++ b/examples/vhost/Makefile
@@ -62,6 +62,7 @@ else
 CFLAGS += -DALLOW_EXPERIMENTAL_API
 CFLAGS += -O2 -D_FILE_OFFSET_BITS=64
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 include $(RTE_SDK)/mk/rte.extapp.mk
 
diff --git a/examples/vhost/main.c b/examples/vhost/main.c
index 0961db080..3d9f125e5 100644
--- a/examples/vhost/main.c
+++ b/examples/vhost/main.c
@@ -321,6 +321,7 @@ port_init(uint16_t port)
 		}
 	}
 
+	rte_eth_dev_set_supported_ptypes(port, RTE_PTYPE_UNKNOWN, NULL, 0);
 	/* Start the device. */
 	retval  = rte_eth_dev_start(port);
 	if (retval < 0) {
diff --git a/examples/vm_power_manager/Makefile b/examples/vm_power_manager/Makefile
index 2fdb991d7..65c2ad179 100644
--- a/examples/vm_power_manager/Makefile
+++ b/examples/vm_power_manager/Makefile
@@ -28,6 +28,7 @@ endif
 
 CFLAGS += -O3 -I$(RTE_SDK)/lib/librte_power/
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 LDLIBS += -lvirt
 
diff --git a/examples/vm_power_manager/main.c b/examples/vm_power_manager/main.c
index 54c704610..4cb4ccecf 100644
--- a/examples/vm_power_manager/main.c
+++ b/examples/vm_power_manager/main.c
@@ -99,6 +99,7 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool)
 			return retval;
 	}
 
+	rte_eth_dev_set_supported_ptypes(port, RTE_PTYPE_UNKNOWN, NULL, 0);
 	/* Start the Ethernet port. */
 	retval = rte_eth_dev_start(port);
 	if (retval < 0)
diff --git a/examples/vm_power_manager/meson.build b/examples/vm_power_manager/meson.build
index 20a4a05b3..54e2b584f 100644
--- a/examples/vm_power_manager/meson.build
+++ b/examples/vm_power_manager/meson.build
@@ -25,6 +25,7 @@ if dpdk_conf.has('RTE_LIBRTE_IXGBE_PMD')
 	deps += ['pmd_ixgbe']
 endif
 
+allow_experimental_apis = true
 sources = files(
 	'channel_manager.c', 'channel_monitor.c', 'main.c', 'parse.c', 'power_manager.c', 'vm_power_cli.c'
 )
diff --git a/examples/vmdq/Makefile b/examples/vmdq/Makefile
index 1557ee86b..2168747cc 100644
--- a/examples/vmdq/Makefile
+++ b/examples/vmdq/Makefile
@@ -50,6 +50,7 @@ RTE_TARGET ?= $(notdir $(abspath $(dir $(firstword $(wildcard $(RTE_SDK)/*/.conf
 include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 EXTRA_CFLAGS += -O3
 
diff --git a/examples/vmdq/main.c b/examples/vmdq/main.c
index 7281ffd7f..65431f95e 100644
--- a/examples/vmdq/main.c
+++ b/examples/vmdq/main.c
@@ -258,6 +258,7 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool)
 		}
 	}
 
+	rte_eth_dev_set_supported_ptypes(port, RTE_PTYPE_UNKNOWN, NULL, 0);
 	retval  = rte_eth_dev_start(port);
 	if (retval < 0) {
 		printf("port %d start failed\n", port);
diff --git a/examples/vmdq/meson.build b/examples/vmdq/meson.build
index c34e11e36..2b0a25036 100644
--- a/examples/vmdq/meson.build
+++ b/examples/vmdq/meson.build
@@ -6,6 +6,7 @@
 # To build this example as a standalone application with an already-installed
 # DPDK instance, use 'make'
 
+allow_experimental_apis = true
 sources = files(
 	'main.c'
 )
diff --git a/examples/vmdq_dcb/Makefile b/examples/vmdq_dcb/Makefile
index 391096cfb..ea1574d91 100644
--- a/examples/vmdq_dcb/Makefile
+++ b/examples/vmdq_dcb/Makefile
@@ -50,6 +50,7 @@ RTE_TARGET ?= $(notdir $(abspath $(dir $(firstword $(wildcard $(RTE_SDK)/*/.conf
 include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 # workaround for a gcc bug with noreturn attribute
 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603
diff --git a/examples/vmdq_dcb/main.c b/examples/vmdq_dcb/main.c
index 389000327..44fe63482 100644
--- a/examples/vmdq_dcb/main.c
+++ b/examples/vmdq_dcb/main.c
@@ -313,6 +313,7 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool)
 		}
 	}
 
+	rte_eth_dev_set_supported_ptypes(port, RTE_PTYPE_UNKNOWN, NULL, 0);
 	retval  = rte_eth_dev_start(port);
 	if (retval < 0) {
 		printf("port %d start failed\n", port);
diff --git a/examples/vmdq_dcb/meson.build b/examples/vmdq_dcb/meson.build
index c34e11e36..2b0a25036 100644
--- a/examples/vmdq_dcb/meson.build
+++ b/examples/vmdq_dcb/meson.build
@@ -6,6 +6,7 @@
 # To build this example as a standalone application with an already-installed
 # DPDK instance, use 'make'
 
+allow_experimental_apis = true
 sources = files(
 	'main.c'
 )
-- 
2.17.1


^ permalink raw reply	[flat|nested] 245+ messages in thread

* [dpdk-dev]  [PATCH v5 0/7] ethdev: add new Rx offload flags
  2019-10-01 18:52       ` [dpdk-dev] [PATCH v6 0/7] ethdev: add new Rx offload flags pbhagavatula
                           ` (6 preceding siblings ...)
  2019-10-01 18:52         ` [dpdk-dev] [PATCH v6 7/7] examples: disable Rx packet type parsing pbhagavatula
@ 2019-10-02  3:47         ` pbhagavatula
  2019-10-02  3:47           ` [dpdk-dev] [PATCH v7 1/7] ethdev: add set ptype function pbhagavatula
                             ` (7 more replies)
  7 siblings, 8 replies; 245+ messages in thread
From: pbhagavatula @ 2019-10-02  3:47 UTC (permalink / raw)
  To: arybchenko, jerinj; +Cc: dev, Pavan Nikhilesh

From: Pavan Nikhilesh <pbhagavatula@marvell.com>

Add new Rx offload flags `DEV_RX_OFFLOAD_RSS_HASH` and
`DEV_RX_OFFLOAD_FLOW_MARK`. These flags can be used to
enable/disable PMD writes to rte_mbuf fields `hash.rss` and `hash.fdir.hi`
and also `ol_flags:PKT_RX_RSS` and `ol_flags:PKT_RX_FDIR`.

Add new packet type set function `rte_eth_dev_set_supported_ptypes`,
allows application to inform PMDs about the packet types it is interested
in. Based on ptypes requested by application PMDs can optimize the Rx path.

For example, if a given PMD doesn't support any packet types that the
application is interested in then the application can disable[1] writes to
`mbuf.packet_type` done by the PMD and use a software ptype parser.
     [1] rte_eth_dev_set_supported_ptypes(*port_id*, RTE_PTYPE_UNKNOWN, NULL,
					  0);
v7 Changes:
----------
- Fix unused variable in net/octeontx2

v6 Changes:
----------
- Add additional checks for set supported ptypes.(Andrew)
- Clarify `rte_eth_dev_set_supported_ptypes` documentation.
- Remove DEV_RX_OFFLOAD_FLOW_MARK emulation from net/octeontx2.

v5 Changes:
----------
- Fix typos.

v4 Changes:
----------
- Set the last element in set_ptype array as RTE_PTYPE_UNKNOWN to mark the end
  of array.
- Fix invalid set ptype function call in examples.
- Remove setting rte_eth_dev_set_supported_ptypes to UNKNOWN in l3fwd-power.

v3 Changes:
----------
- Add missing release notes. (Andrew)
- Re-word various descriptions.
- Fix ptype set logic.

v2 Changes:
----------
- Update release notes. (Andrew)
- Redo commit logs. (Andrew)
- Disable ptype parsing for unsupported examples. (Jerin)
- Disable RSS write only in generic mode eventdev_pipeline. (Jerin)
- Modify set_supported_ptypes function to return successfuly set mask
  instead of failure.
- Dropped set_supported_ptypes to drivers by handling in library
  layer, interested PMD can add it in.


Pavan Nikhilesh (7):
  ethdev: add set ptype function
  ethdev: add mbuf RSS update as an offload
  ethdev: add flow action type update as an offload
  drivers/net: update Rx RSS hash offload capabilities
  drivers/net: update Rx flow flag and mark capabilities
  examples/eventdev_pipeline: add new Rx RSS hash offload
  examples: disable Rx packet type parsing

 doc/guides/nics/features.rst                  |  22 +++-
 doc/guides/rel_notes/release_19_11.rst        |  24 ++++
 drivers/net/bnxt/bnxt_ethdev.c                |   4 +-
 drivers/net/cxgbe/cxgbe.h                     |   3 +-
 drivers/net/dpaa/dpaa_ethdev.c                |   3 +-
 drivers/net/dpaa2/dpaa2_ethdev.c              |   3 +-
 drivers/net/e1000/igb_rxtx.c                  |   3 +-
 drivers/net/enic/enic_res.c                   |   4 +-
 drivers/net/fm10k/fm10k_ethdev.c              |   3 +-
 drivers/net/hinic/hinic_pmd_ethdev.c          |   3 +-
 drivers/net/i40e/i40e_ethdev.c                |   4 +-
 drivers/net/iavf/iavf_ethdev.c                |   4 +-
 drivers/net/ice/ice_ethdev.c                  |   4 +-
 drivers/net/ixgbe/ixgbe_rxtx.c                |   4 +-
 drivers/net/liquidio/lio_ethdev.c             |   3 +-
 drivers/net/mlx4/mlx4_rxq.c                   |   3 +-
 drivers/net/mlx5/mlx5_rxq.c                   |   4 +-
 drivers/net/netvsc/hn_rndis.c                 |   3 +-
 drivers/net/nfp/nfp_net.c                     |   3 +-
 drivers/net/octeontx2/otx2_ethdev.c           |   3 +-
 drivers/net/octeontx2/otx2_ethdev.h           |  16 +--
 drivers/net/octeontx2/otx2_flow.c             |   9 +-
 drivers/net/octeontx2/otx2_flow.h             |   1 -
 drivers/net/octeontx2/otx2_flow_parse.c       |   5 +-
 drivers/net/qede/qede_ethdev.c                |   3 +-
 drivers/net/sfc/sfc_ef10_essb_rx.c            |   3 +-
 drivers/net/sfc/sfc_ef10_rx.c                 |   3 +-
 drivers/net/sfc/sfc_rx.c                      |   3 +-
 drivers/net/thunderx/nicvf_ethdev.h           |   3 +-
 drivers/net/vmxnet3/vmxnet3_ethdev.c          |   3 +-
 examples/bbdev_app/main.c                     |   1 +
 examples/bond/main.c                          |   2 +
 examples/distributor/Makefile                 |   1 +
 examples/distributor/main.c                   |   1 +
 examples/distributor/meson.build              |   1 +
 examples/eventdev_pipeline/main.c             | 115 +----------------
 examples/eventdev_pipeline/meson.build        |   1 +
 .../pipeline_worker_generic.c                 | 118 ++++++++++++++++++
 .../eventdev_pipeline/pipeline_worker_tx.c    | 114 +++++++++++++++++
 examples/exception_path/Makefile              |   1 +
 examples/exception_path/main.c                |   1 +
 examples/exception_path/meson.build           |   1 +
 examples/flow_classify/flow_classify.c        |   1 +
 examples/flow_filtering/Makefile              |   1 +
 examples/flow_filtering/main.c                |   1 +
 examples/flow_filtering/meson.build           |   1 +
 examples/ip_pipeline/link.c                   |   1 +
 examples/ip_reassembly/Makefile               |   1 +
 examples/ip_reassembly/main.c                 |   2 +
 examples/ip_reassembly/meson.build            |   1 +
 examples/ipsec-secgw/ipsec-secgw.c            |   2 +
 examples/ipv4_multicast/Makefile              |   1 +
 examples/ipv4_multicast/main.c                |   2 +
 examples/ipv4_multicast/meson.build           |   1 +
 examples/kni/main.c                           |   1 +
 examples/l2fwd-cat/Makefile                   |   1 +
 examples/l2fwd-cat/l2fwd-cat.c                |   1 +
 examples/l2fwd-cat/meson.build                |   1 +
 examples/l2fwd-crypto/main.c                  |   2 +
 examples/l2fwd-jobstats/Makefile              |   1 +
 examples/l2fwd-jobstats/main.c                |   2 +
 examples/l2fwd-jobstats/meson.build           |   1 +
 examples/l2fwd-keepalive/Makefile             |   1 +
 examples/l2fwd-keepalive/main.c               |   2 +
 examples/l2fwd-keepalive/meson.build          |   1 +
 examples/l2fwd/Makefile                       |   1 +
 examples/l2fwd/main.c                         |   2 +
 examples/l2fwd/meson.build                    |   1 +
 examples/l3fwd-acl/Makefile                   |   1 +
 examples/l3fwd-acl/main.c                     |   2 +
 examples/l3fwd-acl/meson.build                |   1 +
 examples/l3fwd-vf/Makefile                    |   1 +
 examples/l3fwd-vf/main.c                      |   2 +
 examples/l3fwd-vf/meson.build                 |   1 +
 examples/link_status_interrupt/Makefile       |   1 +
 examples/link_status_interrupt/main.c         |   2 +
 examples/link_status_interrupt/meson.build    |   1 +
 examples/load_balancer/Makefile               |   1 +
 examples/load_balancer/init.c                 |   2 +
 examples/load_balancer/meson.build            |   1 +
 examples/packet_ordering/Makefile             |   1 +
 examples/packet_ordering/main.c               |   1 +
 examples/packet_ordering/meson.build          |   1 +
 examples/ptpclient/Makefile                   |   1 +
 examples/ptpclient/meson.build                |   1 +
 examples/ptpclient/ptpclient.c                |   1 +
 examples/qos_meter/Makefile                   |   1 +
 examples/qos_meter/main.c                     |   2 +
 examples/qos_meter/meson.build                |   1 +
 examples/qos_sched/Makefile                   |   1 +
 examples/qos_sched/init.c                     |   1 +
 examples/qos_sched/meson.build                |   1 +
 examples/quota_watermark/qw/Makefile          |   1 +
 examples/quota_watermark/qw/init.c            |   1 +
 examples/rxtx_callbacks/main.c                |   1 +
 examples/server_node_efd/server/Makefile      |   1 +
 examples/server_node_efd/server/init.c        |   1 +
 examples/skeleton/Makefile                    |   1 +
 examples/skeleton/basicfwd.c                  |   1 +
 examples/skeleton/meson.build                 |   1 +
 examples/tep_termination/Makefile             |   1 +
 examples/tep_termination/meson.build          |   1 +
 examples/tep_termination/vxlan_setup.c        |   1 +
 examples/vhost/Makefile                       |   1 +
 examples/vhost/main.c                         |   1 +
 examples/vm_power_manager/Makefile            |   1 +
 examples/vm_power_manager/main.c              |   1 +
 examples/vm_power_manager/meson.build         |   1 +
 examples/vmdq/Makefile                        |   1 +
 examples/vmdq/main.c                          |   1 +
 examples/vmdq/meson.build                     |   1 +
 examples/vmdq_dcb/Makefile                    |   1 +
 examples/vmdq_dcb/main.c