DPDK patches and discussions
 help / color / mirror / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download: 
* [dpdk-dev] [PATCH v5 04/13] crypto: move internal symbols into INTERNAL section
    2020-05-14 14:24  3%         ` [dpdk-dev] [PATCH v5 01/13] common/dpaax: move internal symbols into INTERNAL section Hemant Agrawal
  2020-05-14 14:24  1%         ` [dpdk-dev] [PATCH v5 02/13] bus/fslmc: " Hemant Agrawal
@ 2020-05-14 14:24  3%         ` Hemant Agrawal
  2 siblings, 0 replies; 200+ results
From: Hemant Agrawal @ 2020-05-14 14:24 UTC (permalink / raw)
  To: dev, david.marchand, mdr; +Cc: Hemant Agrawal

This patch moves the internal symbols to INTERNAL sections
so that any change in them is not reported as ABI breakage.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 devtools/libabigail.abignore                           | 4 ++++
 drivers/crypto/dpaa2_sec/dpaa2_sec_event.h             | 5 +++--
 drivers/crypto/dpaa2_sec/rte_pmd_dpaa2_sec_version.map | 2 +-
 drivers/crypto/dpaa_sec/dpaa_sec_event.h               | 8 ++++----
 drivers/crypto/dpaa_sec/rte_pmd_dpaa_sec_version.map   | 4 +---
 5 files changed, 13 insertions(+), 10 deletions(-)

diff --git a/devtools/libabigail.abignore b/devtools/libabigail.abignore
index ab34302d0c..8db64f267d 100644
--- a/devtools/libabigail.abignore
+++ b/devtools/libabigail.abignore
@@ -55,3 +55,7 @@
 	file_name_regexp = ^librte_bus_fslmc\.
 [suppress_file]
 	file_name_regexp = ^librte_bus_dpaa\.
+[suppress_file]
+	file_name_regexp = ^librte_pmd_dpaa2_sec\.
+[suppress_file]
+	file_name_regexp = ^librte_pmd_dpaa_sec\.
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_event.h b/drivers/crypto/dpaa2_sec/dpaa2_sec_event.h
index c779d5d837..675cbbb81d 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_event.h
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_event.h
@@ -6,12 +6,13 @@
 #ifndef _DPAA2_SEC_EVENT_H_
 #define _DPAA2_SEC_EVENT_H_
 
-int
-dpaa2_sec_eventq_attach(const struct rte_cryptodev *dev,
+__rte_internal
+int dpaa2_sec_eventq_attach(const struct rte_cryptodev *dev,
 		int qp_id,
 		struct dpaa2_dpcon_dev *dpcon,
 		const struct rte_event *event);
 
+__rte_internal
 int dpaa2_sec_eventq_detach(const struct rte_cryptodev *dev,
 		int qp_id);
 
diff --git a/drivers/crypto/dpaa2_sec/rte_pmd_dpaa2_sec_version.map b/drivers/crypto/dpaa2_sec/rte_pmd_dpaa2_sec_version.map
index 5952d645fd..1352f576e5 100644
--- a/drivers/crypto/dpaa2_sec/rte_pmd_dpaa2_sec_version.map
+++ b/drivers/crypto/dpaa2_sec/rte_pmd_dpaa2_sec_version.map
@@ -1,4 +1,4 @@
-DPDK_20.0 {
+INTERNAL {
 	global:
 
 	dpaa2_sec_eventq_attach;
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec_event.h b/drivers/crypto/dpaa_sec/dpaa_sec_event.h
index 8d1a018096..0b09fa8f75 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec_event.h
+++ b/drivers/crypto/dpaa_sec/dpaa_sec_event.h
@@ -6,14 +6,14 @@
 #ifndef _DPAA_SEC_EVENT_H_
 #define _DPAA_SEC_EVENT_H_
 
-int
-dpaa_sec_eventq_attach(const struct rte_cryptodev *dev,
+__rte_internal
+int dpaa_sec_eventq_attach(const struct rte_cryptodev *dev,
 		int qp_id,
 		uint16_t ch_id,
 		const struct rte_event *event);
 
-int
-dpaa_sec_eventq_detach(const struct rte_cryptodev *dev,
+__rte_internal
+int dpaa_sec_eventq_detach(const struct rte_cryptodev *dev,
 		int qp_id);
 
 #endif /* _DPAA_SEC_EVENT_H_ */
diff --git a/drivers/crypto/dpaa_sec/rte_pmd_dpaa_sec_version.map b/drivers/crypto/dpaa_sec/rte_pmd_dpaa_sec_version.map
index 8580fa13db..aed07fb371 100644
--- a/drivers/crypto/dpaa_sec/rte_pmd_dpaa_sec_version.map
+++ b/drivers/crypto/dpaa_sec/rte_pmd_dpaa_sec_version.map
@@ -1,8 +1,6 @@
-DPDK_20.0 {
+INTERNAL {
 	global:
 
 	dpaa_sec_eventq_attach;
 	dpaa_sec_eventq_detach;
-
-	local: *;
 };
-- 
2.17.1


^ permalink raw reply	[relevance 3%]

* [dpdk-dev] [PATCH v5 02/13] bus/fslmc: move internal symbols into INTERNAL section
    2020-05-14 14:24  3%         ` [dpdk-dev] [PATCH v5 01/13] common/dpaax: move internal symbols into INTERNAL section Hemant Agrawal
@ 2020-05-14 14:24  1%         ` Hemant Agrawal
  2020-05-14 14:24  3%         ` [dpdk-dev] [PATCH v5 04/13] crypto: " Hemant Agrawal
  2 siblings, 0 replies; 200+ results
From: Hemant Agrawal @ 2020-05-14 14:24 UTC (permalink / raw)
  To: dev, david.marchand, mdr; +Cc: Hemant Agrawal

This patch moves the internal symbols to INTERNAL sections
so that any change in them is not reported as ABI breakage.

This patch also removes two symbols, which were not used
anywhere else i.e. rte_fslmc_vfio_dmamap & dpaa2_get_qbman_swp

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 devtools/libabigail.abignore                  |  2 +
 drivers/bus/fslmc/fslmc_vfio.h                |  4 ++
 drivers/bus/fslmc/mc/fsl_dpbp.h               |  6 +++
 drivers/bus/fslmc/mc/fsl_dpci.h               |  3 ++
 drivers/bus/fslmc/mc/fsl_dpcon.h              |  2 +
 drivers/bus/fslmc/mc/fsl_dpdmai.h             |  8 ++++
 drivers/bus/fslmc/mc/fsl_dpio.h               |  9 ++++
 drivers/bus/fslmc/mc/fsl_dpmng.h              |  2 +
 drivers/bus/fslmc/mc/fsl_mc_cmd.h             |  1 +
 drivers/bus/fslmc/portal/dpaa2_hw_dpio.h      |  5 +++
 drivers/bus/fslmc/portal/dpaa2_hw_pvt.h       |  8 ++++
 .../bus/fslmc/qbman/include/fsl_qbman_debug.h |  3 ++
 .../fslmc/qbman/include/fsl_qbman_portal.h    | 41 +++++++++++++++++++
 drivers/bus/fslmc/rte_bus_fslmc_version.map   |  4 +-
 drivers/bus/fslmc/rte_fslmc.h                 |  4 ++
 15 files changed, 99 insertions(+), 3 deletions(-)

diff --git a/devtools/libabigail.abignore b/devtools/libabigail.abignore
index b1488d5549..877c6d5be8 100644
--- a/devtools/libabigail.abignore
+++ b/devtools/libabigail.abignore
@@ -51,3 +51,5 @@
 ; Ignore moving DPAAx stable functions to INTERNAL tag
 [suppress_file]
 	file_name_regexp = ^librte_common_dpaax\.
+[suppress_file]
+	file_name_regexp = ^librte_bus_fslmc\.
diff --git a/drivers/bus/fslmc/fslmc_vfio.h b/drivers/bus/fslmc/fslmc_vfio.h
index c988121294..609e48aea3 100644
--- a/drivers/bus/fslmc/fslmc_vfio.h
+++ b/drivers/bus/fslmc/fslmc_vfio.h
@@ -41,7 +41,11 @@ typedef struct fslmc_vfio_container {
 } fslmc_vfio_container;
 
 extern char *fslmc_container;
+
+__rte_internal
 int rte_dpaa2_intr_enable(struct rte_intr_handle *intr_handle, int index);
+
+__rte_internal
 int rte_dpaa2_intr_disable(struct rte_intr_handle *intr_handle, int index);
 
 int rte_dpaa2_vfio_setup_intr(struct rte_intr_handle *intr_handle,
diff --git a/drivers/bus/fslmc/mc/fsl_dpbp.h b/drivers/bus/fslmc/mc/fsl_dpbp.h
index 9d405b42c4..7b537a21be 100644
--- a/drivers/bus/fslmc/mc/fsl_dpbp.h
+++ b/drivers/bus/fslmc/mc/fsl_dpbp.h
@@ -14,6 +14,7 @@
 
 struct fsl_mc_io;
 
+__rte_internal
 int dpbp_open(struct fsl_mc_io *mc_io,
 	      uint32_t cmd_flags,
 	      int dpbp_id,
@@ -42,10 +43,12 @@ int dpbp_destroy(struct fsl_mc_io *mc_io,
 		 uint32_t cmd_flags,
 		 uint32_t obj_id);
 
+__rte_internal
 int dpbp_enable(struct fsl_mc_io *mc_io,
 		uint32_t cmd_flags,
 		uint16_t token);
 
+__rte_internal
 int dpbp_disable(struct fsl_mc_io *mc_io,
 		 uint32_t cmd_flags,
 		 uint16_t token);
@@ -55,6 +58,7 @@ int dpbp_is_enabled(struct fsl_mc_io *mc_io,
 		    uint16_t token,
 		    int *en);
 
+__rte_internal
 int dpbp_reset(struct fsl_mc_io *mc_io,
 	       uint32_t cmd_flags,
 	       uint16_t token);
@@ -70,6 +74,7 @@ struct dpbp_attr {
 	uint16_t bpid;
 };
 
+__rte_internal
 int dpbp_get_attributes(struct fsl_mc_io *mc_io,
 			uint32_t cmd_flags,
 			uint16_t token,
@@ -88,6 +93,7 @@ int dpbp_get_api_version(struct fsl_mc_io *mc_io,
 			 uint16_t *major_ver,
 			 uint16_t *minor_ver);
 
+__rte_internal
 int dpbp_get_num_free_bufs(struct fsl_mc_io *mc_io,
 			   uint32_t cmd_flags,
 			   uint16_t token,
diff --git a/drivers/bus/fslmc/mc/fsl_dpci.h b/drivers/bus/fslmc/mc/fsl_dpci.h
index a0ee5bfe69..81fd3438aa 100644
--- a/drivers/bus/fslmc/mc/fsl_dpci.h
+++ b/drivers/bus/fslmc/mc/fsl_dpci.h
@@ -181,6 +181,7 @@ struct dpci_rx_queue_cfg {
 	int order_preservation_en;
 };
 
+__rte_internal
 int dpci_set_rx_queue(struct fsl_mc_io *mc_io,
 		      uint32_t cmd_flags,
 		      uint16_t token,
@@ -228,6 +229,7 @@ int dpci_get_api_version(struct fsl_mc_io *mc_io,
 			 uint16_t *major_ver,
 			 uint16_t *minor_ver);
 
+__rte_internal
 int dpci_set_opr(struct fsl_mc_io *mc_io,
 		 uint32_t cmd_flags,
 		 uint16_t token,
@@ -235,6 +237,7 @@ int dpci_set_opr(struct fsl_mc_io *mc_io,
 		 uint8_t options,
 		 struct opr_cfg *cfg);
 
+__rte_internal
 int dpci_get_opr(struct fsl_mc_io *mc_io,
 		 uint32_t cmd_flags,
 		 uint16_t token,
diff --git a/drivers/bus/fslmc/mc/fsl_dpcon.h b/drivers/bus/fslmc/mc/fsl_dpcon.h
index af81d51195..7caa6c68a1 100644
--- a/drivers/bus/fslmc/mc/fsl_dpcon.h
+++ b/drivers/bus/fslmc/mc/fsl_dpcon.h
@@ -20,6 +20,7 @@ struct fsl_mc_io;
  */
 #define DPCON_INVALID_DPIO_ID		(int)(-1)
 
+__rte_internal
 int dpcon_open(struct fsl_mc_io *mc_io,
 	       uint32_t cmd_flags,
 	       int dpcon_id,
@@ -77,6 +78,7 @@ struct dpcon_attr {
 	uint8_t num_priorities;
 };
 
+__rte_internal
 int dpcon_get_attributes(struct fsl_mc_io *mc_io,
 			 uint32_t cmd_flags,
 			 uint16_t token,
diff --git a/drivers/bus/fslmc/mc/fsl_dpdmai.h b/drivers/bus/fslmc/mc/fsl_dpdmai.h
index 40469cc139..e7e8a5dda9 100644
--- a/drivers/bus/fslmc/mc/fsl_dpdmai.h
+++ b/drivers/bus/fslmc/mc/fsl_dpdmai.h
@@ -23,11 +23,13 @@ struct fsl_mc_io;
  */
 #define DPDMAI_ALL_QUEUES	(uint8_t)(-1)
 
+__rte_internal
 int dpdmai_open(struct fsl_mc_io *mc_io,
 		uint32_t cmd_flags,
 		int dpdmai_id,
 		uint16_t *token);
 
+__rte_internal
 int dpdmai_close(struct fsl_mc_io *mc_io,
 		 uint32_t cmd_flags,
 		 uint16_t token);
@@ -54,10 +56,12 @@ int dpdmai_destroy(struct fsl_mc_io *mc_io,
 		   uint32_t cmd_flags,
 		   uint32_t object_id);
 
+__rte_internal
 int dpdmai_enable(struct fsl_mc_io *mc_io,
 		  uint32_t cmd_flags,
 		  uint16_t token);
 
+__rte_internal
 int dpdmai_disable(struct fsl_mc_io *mc_io,
 		   uint32_t cmd_flags,
 		   uint16_t token);
@@ -82,6 +86,7 @@ struct dpdmai_attr {
 	uint8_t num_of_queues;
 };
 
+__rte_internal
 int dpdmai_get_attributes(struct fsl_mc_io *mc_io,
 			  uint32_t cmd_flags,
 			  uint16_t token,
@@ -148,6 +153,7 @@ struct dpdmai_rx_queue_cfg {
 
 };
 
+__rte_internal
 int dpdmai_set_rx_queue(struct fsl_mc_io *mc_io,
 			uint32_t cmd_flags,
 			uint16_t token,
@@ -168,6 +174,7 @@ struct dpdmai_rx_queue_attr {
 	uint32_t fqid;
 };
 
+__rte_internal
 int dpdmai_get_rx_queue(struct fsl_mc_io *mc_io,
 			uint32_t cmd_flags,
 			uint16_t token,
@@ -184,6 +191,7 @@ struct dpdmai_tx_queue_attr {
 	uint32_t fqid;
 };
 
+__rte_internal
 int dpdmai_get_tx_queue(struct fsl_mc_io *mc_io,
 			uint32_t cmd_flags,
 			uint16_t token,
diff --git a/drivers/bus/fslmc/mc/fsl_dpio.h b/drivers/bus/fslmc/mc/fsl_dpio.h
index 3158f53191..92e97db94b 100644
--- a/drivers/bus/fslmc/mc/fsl_dpio.h
+++ b/drivers/bus/fslmc/mc/fsl_dpio.h
@@ -13,11 +13,13 @@
 
 struct fsl_mc_io;
 
+__rte_internal
 int dpio_open(struct fsl_mc_io *mc_io,
 	      uint32_t cmd_flags,
 	      int dpio_id,
 	      uint16_t *token);
 
+__rte_internal
 int dpio_close(struct fsl_mc_io *mc_io,
 	       uint32_t cmd_flags,
 	       uint16_t token);
@@ -57,10 +59,12 @@ int dpio_destroy(struct fsl_mc_io *mc_io,
 		 uint32_t cmd_flags,
 		 uint32_t object_id);
 
+__rte_internal
 int dpio_enable(struct fsl_mc_io *mc_io,
 		uint32_t cmd_flags,
 		uint16_t token);
 
+__rte_internal
 int dpio_disable(struct fsl_mc_io *mc_io,
 		 uint32_t cmd_flags,
 		 uint16_t token);
@@ -70,10 +74,12 @@ int dpio_is_enabled(struct fsl_mc_io *mc_io,
 		    uint16_t token,
 		    int *en);
 
+__rte_internal
 int dpio_reset(struct fsl_mc_io *mc_io,
 	       uint32_t cmd_flags,
 	       uint16_t token);
 
+__rte_internal
 int dpio_set_stashing_destination(struct fsl_mc_io *mc_io,
 				  uint32_t cmd_flags,
 				  uint16_t token,
@@ -84,12 +90,14 @@ int dpio_get_stashing_destination(struct fsl_mc_io *mc_io,
 				  uint16_t token,
 				  uint8_t *sdest);
 
+__rte_internal
 int dpio_add_static_dequeue_channel(struct fsl_mc_io *mc_io,
 				    uint32_t cmd_flags,
 				    uint16_t token,
 				    int dpcon_id,
 				    uint8_t *channel_index);
 
+__rte_internal
 int dpio_remove_static_dequeue_channel(struct fsl_mc_io *mc_io,
 				       uint32_t cmd_flags,
 				       uint16_t token,
@@ -119,6 +127,7 @@ struct dpio_attr {
 	uint32_t clk;
 };
 
+__rte_internal
 int dpio_get_attributes(struct fsl_mc_io *mc_io,
 			uint32_t cmd_flags,
 			uint16_t token,
diff --git a/drivers/bus/fslmc/mc/fsl_dpmng.h b/drivers/bus/fslmc/mc/fsl_dpmng.h
index 36c387af27..cdd8506625 100644
--- a/drivers/bus/fslmc/mc/fsl_dpmng.h
+++ b/drivers/bus/fslmc/mc/fsl_dpmng.h
@@ -34,6 +34,7 @@ struct mc_version {
 	uint32_t revision;
 };
 
+__rte_internal
 int mc_get_version(struct fsl_mc_io *mc_io,
 		   uint32_t cmd_flags,
 		   struct mc_version *mc_ver_info);
@@ -48,6 +49,7 @@ struct mc_soc_version {
 	uint32_t pvr;
 };
 
+__rte_internal
 int mc_get_soc_version(struct fsl_mc_io *mc_io,
 		       uint32_t cmd_flags,
 		       struct mc_soc_version *mc_platform_info);
diff --git a/drivers/bus/fslmc/mc/fsl_mc_cmd.h b/drivers/bus/fslmc/mc/fsl_mc_cmd.h
index ac919610cf..06ea41a3b2 100644
--- a/drivers/bus/fslmc/mc/fsl_mc_cmd.h
+++ b/drivers/bus/fslmc/mc/fsl_mc_cmd.h
@@ -80,6 +80,7 @@ enum mc_cmd_status {
 
 #define MC_CMD_HDR_FLAGS_MASK	0xFF00FF00
 
+__rte_internal
 int mc_send_command(struct fsl_mc_io *mc_io, struct mc_command *cmd);
 
 static inline uint64_t mc_encode_cmd_header(uint16_t cmd_id,
diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.h b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.h
index 2829c93806..7c5966241a 100644
--- a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.h
+++ b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.h
@@ -36,20 +36,25 @@ extern uint8_t dpaa2_eqcr_size;
 extern struct dpaa2_io_portal_t dpaa2_io_portal[RTE_MAX_LCORE];
 
 /* Affine a DPIO portal to current processing thread */
+__rte_internal
 int dpaa2_affine_qbman_swp(void);
 
 /* Affine additional DPIO portal to current crypto processing thread */
+__rte_internal
 int dpaa2_affine_qbman_ethrx_swp(void);
 
 /* allocate memory for FQ - dq storage */
+__rte_internal
 int
 dpaa2_alloc_dq_storage(struct queue_storage_info_t *q_storage);
 
 /* free memory for FQ- dq storage */
+__rte_internal
 void
 dpaa2_free_dq_storage(struct queue_storage_info_t *q_storage);
 
 /* free the enqueue response descriptors */
+__rte_internal
 uint32_t
 dpaa2_free_eq_descriptors(void);
 
diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h
index 368fe7c688..33b191f823 100644
--- a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h
+++ b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h
@@ -426,11 +426,19 @@ void set_swp_active_dqs(uint16_t dpio_index, struct qbman_result *dqs)
 {
 	rte_global_active_dqs_list[dpio_index].global_active_dqs = dqs;
 }
+__rte_internal
 struct dpaa2_dpbp_dev *dpaa2_alloc_dpbp_dev(void);
+
+__rte_internal
 void dpaa2_free_dpbp_dev(struct dpaa2_dpbp_dev *dpbp);
+
+__rte_internal
 int dpaa2_dpbp_supported(void);
 
+__rte_internal
 struct dpaa2_dpci_dev *rte_dpaa2_alloc_dpci_dev(void);
+
+__rte_internal
 void rte_dpaa2_free_dpci_dev(struct dpaa2_dpci_dev *dpci);
 
 #endif
diff --git a/drivers/bus/fslmc/qbman/include/fsl_qbman_debug.h b/drivers/bus/fslmc/qbman/include/fsl_qbman_debug.h
index e010b1b6ae..328f2022fc 100644
--- a/drivers/bus/fslmc/qbman/include/fsl_qbman_debug.h
+++ b/drivers/bus/fslmc/qbman/include/fsl_qbman_debug.h
@@ -24,7 +24,10 @@ uint8_t verb;
 	uint8_t reserved2[29];
 };
 
+__rte_internal
 int qbman_fq_query_state(struct qbman_swp *s, uint32_t fqid,
 			 struct qbman_fq_query_np_rslt *r);
+
+__rte_internal
 uint32_t qbman_fq_state_frame_count(const struct qbman_fq_query_np_rslt *r);
 uint32_t qbman_fq_state_byte_count(const struct qbman_fq_query_np_rslt *r);
diff --git a/drivers/bus/fslmc/qbman/include/fsl_qbman_portal.h b/drivers/bus/fslmc/qbman/include/fsl_qbman_portal.h
index 88f0a99686..7ac0f82106 100644
--- a/drivers/bus/fslmc/qbman/include/fsl_qbman_portal.h
+++ b/drivers/bus/fslmc/qbman/include/fsl_qbman_portal.h
@@ -117,6 +117,7 @@ uint32_t qbman_swp_interrupt_read_status(struct qbman_swp *p);
  * @p: the given software portal object.
  * @mask: The value to set in SWP_ISR register.
  */
+__rte_internal
 void qbman_swp_interrupt_clear_status(struct qbman_swp *p, uint32_t mask);
 
 /**
@@ -286,6 +287,7 @@ void qbman_swp_push_get(struct qbman_swp *s, uint8_t channel_idx, int *enabled);
  * rather by specifying the index (from 0 to 15) that has been mapped to the
  * desired channel.
  */
+__rte_internal
 void qbman_swp_push_set(struct qbman_swp *s, uint8_t channel_idx, int enable);
 
 /* ------------------- */
@@ -325,6 +327,7 @@ enum qbman_pull_type_e {
  * default/starting state.
  * @d: the pull dequeue descriptor to be cleared.
  */
+__rte_internal
 void qbman_pull_desc_clear(struct qbman_pull_desc *d);
 
 /**
@@ -340,6 +343,7 @@ void qbman_pull_desc_clear(struct qbman_pull_desc *d);
  * the caller provides in 'storage_phys'), and 'stash' controls whether or not
  * those writes to main-memory express a cache-warming attribute.
  */
+__rte_internal
 void qbman_pull_desc_set_storage(struct qbman_pull_desc *d,
 				 struct qbman_result *storage,
 				 uint64_t storage_phys,
@@ -349,6 +353,7 @@ void qbman_pull_desc_set_storage(struct qbman_pull_desc *d,
  * @d: the pull dequeue descriptor to be set.
  * @numframes: number of frames to be set, must be between 1 and 16, inclusive.
  */
+__rte_internal
 void qbman_pull_desc_set_numframes(struct qbman_pull_desc *d,
 				   uint8_t numframes);
 /**
@@ -372,6 +377,7 @@ void qbman_pull_desc_set_token(struct qbman_pull_desc *d, uint8_t token);
  * qbman_pull_desc_set_fq() - Set fqid from which the dequeue command dequeues.
  * @fqid: the frame queue index of the given FQ.
  */
+__rte_internal
 void qbman_pull_desc_set_fq(struct qbman_pull_desc *d, uint32_t fqid);
 
 /**
@@ -407,6 +413,7 @@ void qbman_pull_desc_set_rad(struct qbman_pull_desc *d, int rad);
  * Return 0 for success, and -EBUSY if the software portal is not ready
  * to do pull dequeue.
  */
+__rte_internal
 int qbman_swp_pull(struct qbman_swp *s, struct qbman_pull_desc *d);
 
 /* -------------------------------- */
@@ -421,12 +428,14 @@ int qbman_swp_pull(struct qbman_swp *s, struct qbman_pull_desc *d);
  * only once, so repeated calls can return a sequence of DQRR entries, without
  * requiring they be consumed immediately or in any particular order.
  */
+__rte_internal
 const struct qbman_result *qbman_swp_dqrr_next(struct qbman_swp *p);
 
 /**
  * qbman_swp_prefetch_dqrr_next() - prefetch the next DQRR entry.
  * @s: the software portal object.
  */
+__rte_internal
 void qbman_swp_prefetch_dqrr_next(struct qbman_swp *s);
 
 /**
@@ -435,6 +444,7 @@ void qbman_swp_prefetch_dqrr_next(struct qbman_swp *s);
  * @s: the software portal object.
  * @dq: the DQRR entry to be consumed.
  */
+__rte_internal
 void qbman_swp_dqrr_consume(struct qbman_swp *s, const struct qbman_result *dq);
 
 /**
@@ -442,6 +452,7 @@ void qbman_swp_dqrr_consume(struct qbman_swp *s, const struct qbman_result *dq);
  * @s: the software portal object.
  * @dqrr_index: the DQRR index entry to be consumed.
  */
+__rte_internal
 void qbman_swp_dqrr_idx_consume(struct qbman_swp *s, uint8_t dqrr_index);
 
 /**
@@ -450,6 +461,7 @@ void qbman_swp_dqrr_idx_consume(struct qbman_swp *s, uint8_t dqrr_index);
  *
  * Return dqrr index.
  */
+__rte_internal
 uint8_t qbman_get_dqrr_idx(const struct qbman_result *dqrr);
 
 /**
@@ -460,6 +472,7 @@ uint8_t qbman_get_dqrr_idx(const struct qbman_result *dqrr);
  *
  * Return dqrr entry object.
  */
+__rte_internal
 struct qbman_result *qbman_get_dqrr_from_idx(struct qbman_swp *s, uint8_t idx);
 
 /* ------------------------------------------------- */
@@ -485,6 +498,7 @@ struct qbman_result *qbman_get_dqrr_from_idx(struct qbman_swp *s, uint8_t idx);
  * Return 1 for getting a valid dequeue result, or 0 for not getting a valid
  * dequeue result.
  */
+__rte_internal
 int qbman_result_has_new_result(struct qbman_swp *s,
 				struct qbman_result *dq);
 
@@ -497,8 +511,10 @@ int qbman_result_has_new_result(struct qbman_swp *s,
  * Return 1 for getting a valid dequeue result, or 0 for not getting a valid
  * dequeue result.
  */
+__rte_internal
 int qbman_check_command_complete(struct qbman_result *dq);
 
+__rte_internal
 int qbman_check_new_result(struct qbman_result *dq);
 
 /* -------------------------------------------------------- */
@@ -624,6 +640,7 @@ int qbman_result_is_FQPN(const struct qbman_result *dq);
  *
  * Return the state field.
  */
+__rte_internal
 uint8_t qbman_result_DQ_flags(const struct qbman_result *dq);
 
 /**
@@ -658,6 +675,7 @@ static inline int qbman_result_DQ_is_pull_complete(
  *
  * Return seqnum.
  */
+__rte_internal
 uint16_t qbman_result_DQ_seqnum(const struct qbman_result *dq);
 
 /**
@@ -667,6 +685,7 @@ uint16_t qbman_result_DQ_seqnum(const struct qbman_result *dq);
  *
  * Return odpid.
  */
+__rte_internal
 uint16_t qbman_result_DQ_odpid(const struct qbman_result *dq);
 
 /**
@@ -699,6 +718,7 @@ uint32_t qbman_result_DQ_frame_count(const struct qbman_result *dq);
  *
  * Return the frame queue context.
  */
+__rte_internal
 uint64_t qbman_result_DQ_fqd_ctx(const struct qbman_result *dq);
 
 /**
@@ -707,6 +727,7 @@ uint64_t qbman_result_DQ_fqd_ctx(const struct qbman_result *dq);
  *
  * Return the frame descriptor.
  */
+__rte_internal
 const struct qbman_fd *qbman_result_DQ_fd(const struct qbman_result *dq);
 
 /* State-change notifications (FQDAN/CDAN/CSCN/...). */
@@ -717,6 +738,7 @@ const struct qbman_fd *qbman_result_DQ_fd(const struct qbman_result *dq);
  *
  * Return the state in the notifiation.
  */
+__rte_internal
 uint8_t qbman_result_SCN_state(const struct qbman_result *scn);
 
 /**
@@ -850,6 +872,7 @@ struct qbman_eq_response {
  * default/starting state.
  * @d: the given enqueue descriptor.
  */
+__rte_internal
 void qbman_eq_desc_clear(struct qbman_eq_desc *d);
 
 /* Exactly one of the following descriptor "actions" should be set. (Calling
@@ -870,6 +893,7 @@ void qbman_eq_desc_clear(struct qbman_eq_desc *d);
  * @response_success: 1 = enqueue with response always; 0 = enqueue with
  * rejections returned on a FQ.
  */
+__rte_internal
 void qbman_eq_desc_set_no_orp(struct qbman_eq_desc *d, int respond_success);
 /**
  * qbman_eq_desc_set_orp() - Set order-resotration in the enqueue descriptor
@@ -881,6 +905,7 @@ void qbman_eq_desc_set_no_orp(struct qbman_eq_desc *d, int respond_success);
  * @incomplete: indiates whether this is the last fragments using the same
  * sequeue number.
  */
+__rte_internal
 void qbman_eq_desc_set_orp(struct qbman_eq_desc *d, int respond_success,
 			   uint16_t opr_id, uint16_t seqnum, int incomplete);
 
@@ -915,6 +940,7 @@ void qbman_eq_desc_set_orp_nesn(struct qbman_eq_desc *d, uint16_t opr_id,
  * data structure.) 'stash' controls whether or not the write to main-memory
  * expresses a cache-warming attribute.
  */
+__rte_internal
 void qbman_eq_desc_set_response(struct qbman_eq_desc *d,
 				uint64_t storage_phys,
 				int stash);
@@ -929,6 +955,7 @@ void qbman_eq_desc_set_response(struct qbman_eq_desc *d,
  * result "storage" before issuing an enqueue, and use any non-zero 'token'
  * value.
  */
+__rte_internal
 void qbman_eq_desc_set_token(struct qbman_eq_desc *d, uint8_t token);
 
 /**
@@ -944,6 +971,7 @@ void qbman_eq_desc_set_token(struct qbman_eq_desc *d, uint8_t token);
  * @d: the enqueue descriptor
  * @fqid: the id of the frame queue to be enqueued.
  */
+__rte_internal
 void qbman_eq_desc_set_fq(struct qbman_eq_desc *d, uint32_t fqid);
 
 /**
@@ -953,6 +981,7 @@ void qbman_eq_desc_set_fq(struct qbman_eq_desc *d, uint32_t fqid);
  * @qd_bin: the queuing destination bin
  * @qd_prio: the queuing destination priority.
  */
+__rte_internal
 void qbman_eq_desc_set_qd(struct qbman_eq_desc *d, uint32_t qdid,
 			  uint16_t qd_bin, uint8_t qd_prio);
 
@@ -978,6 +1007,7 @@ void qbman_eq_desc_set_eqdi(struct qbman_eq_desc *d, int enable);
  * held-active (order-preserving) FQ, whether the FQ should be parked instead of
  * being rescheduled.)
  */
+__rte_internal
 void qbman_eq_desc_set_dca(struct qbman_eq_desc *d, int enable,
 			   uint8_t dqrr_idx, int park);
 
@@ -987,6 +1017,7 @@ void qbman_eq_desc_set_dca(struct qbman_eq_desc *d, int enable,
  *
  * Return the fd pointer.
  */
+__rte_internal
 struct qbman_fd *qbman_result_eqresp_fd(struct qbman_result *eqresp);
 
 /**
@@ -997,6 +1028,7 @@ struct qbman_fd *qbman_result_eqresp_fd(struct qbman_result *eqresp);
  * This value is set into the response id before the enqueue command, which,
  * get overwritten by qbman once the enqueue command is complete.
  */
+__rte_internal
 void qbman_result_eqresp_set_rspid(struct qbman_result *eqresp, uint8_t val);
 
 /**
@@ -1009,6 +1041,7 @@ void qbman_result_eqresp_set_rspid(struct qbman_result *eqresp, uint8_t val);
  * copied into the enqueue response to determine if the command has been
  * completed, and response has been updated.
  */
+__rte_internal
 uint8_t qbman_result_eqresp_rspid(struct qbman_result *eqresp);
 
 /**
@@ -1017,6 +1050,7 @@ uint8_t qbman_result_eqresp_rspid(struct qbman_result *eqresp);
  *
  * Return 0 when command is sucessful.
  */
+__rte_internal
 uint8_t qbman_result_eqresp_rc(struct qbman_result *eqresp);
 
 /**
@@ -1043,6 +1077,7 @@ int qbman_swp_enqueue(struct qbman_swp *s, const struct qbman_eq_desc *d,
  *
  * Return the number of enqueued frames, -EBUSY if the EQCR is not ready.
  */
+__rte_internal
 int qbman_swp_enqueue_multiple(struct qbman_swp *s,
 			       const struct qbman_eq_desc *d,
 			       const struct qbman_fd *fd,
@@ -1060,6 +1095,7 @@ int qbman_swp_enqueue_multiple(struct qbman_swp *s,
  *
  * Return the number of enqueued frames, -EBUSY if the EQCR is not ready.
  */
+__rte_internal
 int qbman_swp_enqueue_multiple_fd(struct qbman_swp *s,
 				  const struct qbman_eq_desc *d,
 				  struct qbman_fd **fd,
@@ -1076,6 +1112,7 @@ int qbman_swp_enqueue_multiple_fd(struct qbman_swp *s,
  *
  * Return the number of enqueued frames, -EBUSY if the EQCR is not ready.
  */
+__rte_internal
 int qbman_swp_enqueue_multiple_desc(struct qbman_swp *s,
 				    const struct qbman_eq_desc *d,
 				    const struct qbman_fd *fd,
@@ -1117,12 +1154,14 @@ struct qbman_release_desc {
  * default/starting state.
  * @d: the qbman release descriptor.
  */
+__rte_internal
 void qbman_release_desc_clear(struct qbman_release_desc *d);
 
 /**
  * qbman_release_desc_set_bpid() - Set the ID of the buffer pool to release to
  * @d: the qbman release descriptor.
  */
+__rte_internal
 void qbman_release_desc_set_bpid(struct qbman_release_desc *d, uint16_t bpid);
 
 /**
@@ -1141,6 +1180,7 @@ void qbman_release_desc_set_rcdi(struct qbman_release_desc *d, int enable);
  *
  * Return 0 for success, -EBUSY if the release command ring is not ready.
  */
+__rte_internal
 int qbman_swp_release(struct qbman_swp *s, const struct qbman_release_desc *d,
 		      const uint64_t *buffers, unsigned int num_buffers);
 
@@ -1166,6 +1206,7 @@ int qbman_swp_release_thresh(struct qbman_swp *s, unsigned int thresh);
  * Return 0 for success, or negative error code if the acquire command
  * fails.
  */
+__rte_internal
 int qbman_swp_acquire(struct qbman_swp *s, uint16_t bpid, uint64_t *buffers,
 		      unsigned int num_buffers);
 
diff --git a/drivers/bus/fslmc/rte_bus_fslmc_version.map b/drivers/bus/fslmc/rte_bus_fslmc_version.map
index fe45575046..04e61156c3 100644
--- a/drivers/bus/fslmc/rte_bus_fslmc_version.map
+++ b/drivers/bus/fslmc/rte_bus_fslmc_version.map
@@ -1,4 +1,4 @@
-DPDK_20.0 {
+INTERNAL {
 	global:
 
 	dpaa2_affine_qbman_ethrx_swp;
@@ -11,7 +11,6 @@ DPDK_20.0 {
 	dpaa2_free_dpbp_dev;
 	dpaa2_free_dq_storage;
 	dpaa2_free_eq_descriptors;
-	dpaa2_get_qbman_swp;
 	dpaa2_io_portal;
 	dpaa2_svr_family;
 	dpaa2_virt_mode;
@@ -101,7 +100,6 @@ DPDK_20.0 {
 	rte_fslmc_driver_unregister;
 	rte_fslmc_get_device_count;
 	rte_fslmc_object_register;
-	rte_fslmc_vfio_dmamap;
 	rte_global_active_dqs_list;
 	rte_mcp_ptr_list;
 
diff --git a/drivers/bus/fslmc/rte_fslmc.h b/drivers/bus/fslmc/rte_fslmc.h
index 96ba8dc259..5078b48ee1 100644
--- a/drivers/bus/fslmc/rte_fslmc.h
+++ b/drivers/bus/fslmc/rte_fslmc.h
@@ -162,6 +162,7 @@ RTE_DECLARE_PER_LCORE(struct dpaa2_portal_dqrr, dpaa2_held_bufs);
  *   A pointer to a rte_dpaa2_driver structure describing the driver
  *   to be registered.
  */
+__rte_internal
 void rte_fslmc_driver_register(struct rte_dpaa2_driver *driver);
 
 /**
@@ -171,6 +172,7 @@ void rte_fslmc_driver_register(struct rte_dpaa2_driver *driver);
  *   A pointer to a rte_dpaa2_driver structure describing the driver
  *   to be unregistered.
  */
+__rte_internal
 void rte_fslmc_driver_unregister(struct rte_dpaa2_driver *driver);
 
 /** Helper for DPAA2 device registration from driver (eth, crypto) instance */
@@ -189,6 +191,7 @@ RTE_PMD_EXPORT_NAME(nm, __COUNTER__)
  *   A pointer to a rte_dpaa_object structure describing the mc object
  *   to be registered.
  */
+__rte_internal
 void rte_fslmc_object_register(struct rte_dpaa2_object *object);
 
 /**
@@ -200,6 +203,7 @@ void rte_fslmc_object_register(struct rte_dpaa2_object *object);
  *   >=0 for count; 0 indicates either no device of the said type scanned or
  *   invalid device type.
  */
+__rte_internal
 uint32_t rte_fslmc_get_device_count(enum rte_dpaa2_dev_type device_type);
 
 /** Helper for DPAA2 object registration */
-- 
2.17.1


^ permalink raw reply	[relevance 1%]

* [dpdk-dev] [PATCH v5 01/13] common/dpaax: move internal symbols into INTERNAL section
  @ 2020-05-14 14:24  3%         ` Hemant Agrawal
  2020-05-14 14:24  1%         ` [dpdk-dev] [PATCH v5 02/13] bus/fslmc: " Hemant Agrawal
  2020-05-14 14:24  3%         ` [dpdk-dev] [PATCH v5 04/13] crypto: " Hemant Agrawal
  2 siblings, 0 replies; 200+ results
From: Hemant Agrawal @ 2020-05-14 14:24 UTC (permalink / raw)
  To: dev, david.marchand, mdr; +Cc: Hemant Agrawal

This patch moves the internal symbols to INTERNAL sections
so that any change in them is not reported as ABI breakage.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 devtools/libabigail.abignore                      |  3 +++
 drivers/common/dpaax/dpaa_of.h                    | 15 +++++++++++++++
 drivers/common/dpaax/dpaax_iova_table.h           |  4 ++++
 drivers/common/dpaax/rte_common_dpaax_version.map |  2 +-
 4 files changed, 23 insertions(+), 1 deletion(-)

diff --git a/devtools/libabigail.abignore b/devtools/libabigail.abignore
index c9ee73cb3c..b1488d5549 100644
--- a/devtools/libabigail.abignore
+++ b/devtools/libabigail.abignore
@@ -48,3 +48,6 @@
         changed_enumerators = RTE_CRYPTO_AEAD_LIST_END
 [suppress_variable]
         name = rte_crypto_aead_algorithm_strings
+; Ignore moving DPAAx stable functions to INTERNAL tag
+[suppress_file]
+	file_name_regexp = ^librte_common_dpaax\.
diff --git a/drivers/common/dpaax/dpaa_of.h b/drivers/common/dpaax/dpaa_of.h
index 960b421766..38d91a1afe 100644
--- a/drivers/common/dpaax/dpaa_of.h
+++ b/drivers/common/dpaax/dpaa_of.h
@@ -24,6 +24,7 @@
 #include <limits.h>
 #include <rte_common.h>
 #include <dpaa_list.h>
+#include <rte_compat.h>
 
 #ifndef OF_INIT_DEFAULT_PATH
 #define OF_INIT_DEFAULT_PATH "/proc/device-tree"
@@ -102,6 +103,7 @@ struct dt_file {
 	uint64_t buf[OF_FILE_BUF_MAX >> 3];
 };
 
+__rte_internal
 const struct device_node *of_find_compatible_node(
 					const struct device_node *from,
 					const char *type __rte_unused,
@@ -113,32 +115,44 @@ const struct device_node *of_find_compatible_node(
 		dev_node != NULL; \
 		dev_node = of_find_compatible_node(dev_node, type, compatible))
 
+__rte_internal
 const void *of_get_property(const struct device_node *from, const char *name,
 			    size_t *lenp) __attribute__((nonnull(2)));
+__rte_internal
 bool of_device_is_available(const struct device_node *dev_node);
 
+
+__rte_internal
 const struct device_node *of_find_node_by_phandle(uint64_t ph);
 
+__rte_internal
 const struct device_node *of_get_parent(const struct device_node *dev_node);
 
+__rte_internal
 const struct device_node *of_get_next_child(const struct device_node *dev_node,
 					    const struct device_node *prev);
 
+__rte_internal
 const void *of_get_mac_address(const struct device_node *np);
 
 #define for_each_child_node(parent, child) \
 	for (child = of_get_next_child(parent, NULL); child != NULL; \
 			child = of_get_next_child(parent, child))
 
+
+__rte_internal
 uint32_t of_n_addr_cells(const struct device_node *dev_node);
 uint32_t of_n_size_cells(const struct device_node *dev_node);
 
+__rte_internal
 const uint32_t *of_get_address(const struct device_node *dev_node, size_t idx,
 			       uint64_t *size, uint32_t *flags);
 
+__rte_internal
 uint64_t of_translate_address(const struct device_node *dev_node,
 			      const uint32_t *addr) __attribute__((nonnull));
 
+__rte_internal
 bool of_device_is_compatible(const struct device_node *dev_node,
 			     const char *compatible);
 
@@ -146,6 +160,7 @@ bool of_device_is_compatible(const struct device_node *dev_node,
  * subsystem that is device-tree-dependent. Eg. Qman/Bman, config layers, etc.
  * The path should usually be "/proc/device-tree".
  */
+__rte_internal
 int of_init_path(const char *dt_path);
 
 /* of_finish() allows a controlled tear-down of the device-tree layer, eg. if a
diff --git a/drivers/common/dpaax/dpaax_iova_table.h b/drivers/common/dpaax/dpaax_iova_table.h
index fc3b9e7a8f..230fba8ba0 100644
--- a/drivers/common/dpaax/dpaax_iova_table.h
+++ b/drivers/common/dpaax/dpaax_iova_table.h
@@ -61,9 +61,13 @@ extern struct dpaax_iova_table *dpaax_iova_table_p;
 #define DPAAX_MEM_SPLIT_MASK_OFF (DPAAX_MEM_SPLIT - 1) /**< Offset */
 
 /* APIs exposed */
+__rte_internal
 int dpaax_iova_table_populate(void);
+__rte_internal
 void dpaax_iova_table_depopulate(void);
+__rte_internal
 int dpaax_iova_table_update(phys_addr_t paddr, void *vaddr, size_t length);
+__rte_internal
 void dpaax_iova_table_dump(void);
 
 static inline void *dpaax_iova_table_get_va(phys_addr_t paddr) __rte_hot;
diff --git a/drivers/common/dpaax/rte_common_dpaax_version.map b/drivers/common/dpaax/rte_common_dpaax_version.map
index f72eba761d..ad2b2b3fec 100644
--- a/drivers/common/dpaax/rte_common_dpaax_version.map
+++ b/drivers/common/dpaax/rte_common_dpaax_version.map
@@ -1,4 +1,4 @@
-DPDK_20.0 {
+INTERNAL {
 	global:
 
 	dpaax_iova_table_depopulate;
-- 
2.17.1


^ permalink raw reply	[relevance 3%]

* [dpdk-dev] [PATCH v5] doc: alias to experimental tag for stable apis
  @ 2020-05-14 13:38  9% ` Ray Kinsella
  0 siblings, 0 replies; 200+ results
From: Ray Kinsella @ 2020-05-14 13:38 UTC (permalink / raw)
  To: dev
  Cc: Ray Kinsella, Ferruh Yigit, Kevin Traynor, David Marchand,
	Neil Horman, John McNamara, Marko Kovacevic

When a maintainer is promoting an API to become part of the next major ABI
version by removing the experimental tag, possibly a few releases in
advance of the declaration of the next ABI version. The maintainer may
choose to offer an alias to the experimental tag, as removing the tag
before the declaration of the next major ABI version, would cause an ABI
breakage for applications using the API.

Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Kevin Traynor <ktraynor@redhat.com>
---
This patch depends on "doc: fix references to bind_default_symbol".
https://patches.dpdk.org/patch/69850/

v5:
 * Added section on aliasing to experimental. requested by
   Neil Horman <nhorman@tuxdriver.com>

CC: Ferruh Yigit <ferruh.yigit@intel.com>
CC: Kevin Traynor <ktraynor@redhat.com>
CC: David Marchand <david.marchand@redhat.com>

 doc/guides/contributing/abi_policy.rst     |  10 ++
 doc/guides/contributing/abi_versioning.rst | 158 ++++++++++++++++++++++++++++-
 2 files changed, 167 insertions(+), 1 deletion(-)

diff --git a/doc/guides/contributing/abi_policy.rst b/doc/guides/contributing/abi_policy.rst
index 86e7dd9..c33bff1 100644
--- a/doc/guides/contributing/abi_policy.rst
+++ b/doc/guides/contributing/abi_policy.rst
@@ -160,6 +160,11 @@ The requirements for changing the ABI are:
      ``experimental``, as described in the section on :ref:`Experimental APIs
      and Libraries <experimental_apis>`.

+   - In situations in which an ``experimental`` symbol has been stable for some
+     time. When promoting the symbol to become part of the next ABI version, the
+     maintainer may choose to provide an alias to the ``experimental`` tag, so
+     as not to break consuming applications.
+
 #. If a newly proposed API functionally replaces an existing one, when the new
    API becomes non-experimental, then the old one is marked with
    ``__rte_deprecated``.
@@ -318,6 +323,11 @@ not required. Though, an API should remain in experimental state for at least
 one release. Thereafter, the normal process of posting patch for review to
 mailing list can be followed.

+After the experimental tag has been formally removed, a tree/sub-tree maintainer
+may choose to offer an alias to the experimental tag so as not to break
+applications using the symbol. The alias is then dropped at the declaration of
+next major ABI version.
+
 Libraries
 ~~~~~~~~~

diff --git a/doc/guides/contributing/abi_versioning.rst b/doc/guides/contributing/abi_versioning.rst
index 7065979..4832e8f 100644
--- a/doc/guides/contributing/abi_versioning.rst
+++ b/doc/guides/contributing/abi_versioning.rst
@@ -156,6 +156,11 @@ The macros exported are:
   ``be`` to signal that it is being used as an implementation of a particular
   version of symbol ``b``.

+* ``VERSION_SYMBOL_EXPERIMENTAL(b, e)``: Creates a symbol version table entry
+  binding versioned symbol ``b@EXPERIMENTAL`` to the internal function ``be``.
+  The macro is used when a symbol matures to become part of the stable ABI, to
+  provide an alias to experimental for some time.
+
 .. _example_abi_macro_usage:

 Examples of ABI Macro use
@@ -361,7 +366,7 @@ and a new DPDK_21 version, used by future built applications.
 .. note::

    **Before you leave**, please take care to the review the sections on
-   :ref:`Mapping static symbols <mapping_static_symbols>`, :ref:`Enabling
+   :ref:`mapping static symbols <mapping_static_symbols>`, :ref:`enabling
    versioning macros <enabling_versioning_macros>` and :ref:`ABI deprecation
    <abi_decprecation>`.

@@ -415,6 +420,157 @@ at the start of the head of the file. This will indicate to the tool-chain to
 enable the function version macros when building. There is no corresponding
 directive required for the ``make`` build system.

+.. _aliasing_experimental_symbols:
+
+Aliasing experimental symbols
+_____________________________
+
+In situations in which an ``experimental`` symbol has been stable for some time,
+and it becomes a candidate for promotion to the stable ABI. At this time, when
+promoting the symbol, maintainer may choose to provide an alias to the
+``experimental`` symbol version, so as not to break consuming applications.
+
+The process to provide an alias to ``experimental`` is similar to that, of
+:ref:`symbol visioning <example_abi_macro_usage>` described above. Assume we
+have an experimental function ``rte_acl_create`` as follows
+
+.. code-block:: c
+
+ #include <rte_compat.h>;
+
+ /*
+  * Create an acl context object for apps to
+  * manipulate
+  */
+ __rte_experimental
+ struct rte_acl_ctx *
+ rte_acl_create(const struct rte_acl_param *param)
+ {
+ ...
+ }
+
+In the map file, experimental symbols are listed as part of the ``experimental``
+version node.
+
+.. code-block:: none
+
+   DPDK_20 {
+        global:
+        ...
+
+        local: *;
+   };
+
+   EXPERIMENTAL {
+        global:
+
+        rte_acl_create
+   };
+
+When we promote the symbol to the stable ABI, we simply strip the
+``rte_experimental`` annotation from the function and move the symbol from the
+``experimental`` node, to the node of the next major ABI version as follow.
+
+.. code-block:: c
+
+ /*
+  * Create an acl context object for apps to
+  * manipulate
+  */
+ struct rte_acl_ctx *
+ rte_acl_create(const struct rte_acl_param *param)
+ {
+        ...
+ }
+
+We then update the map file, adding the symbol ``rte_acl_create`` to the ``v21``
+version node.
+
+.. code-block:: none
+
+   DPDK_20 {
+        global:
+        ...
+
+        local: *;
+   };
+
+   DPDK_21 {
+        global:
+
+        rte_acl_create
+   } DPDK_20;
+
+
+Although there are strictly no guarantees or commitments associated with
+:ref:`experimental symbols <experimental_apis>`, a maintainer may wish to offer
+an alias to experimental. The process to add an alias to experimental, is
+similar to the symbol versioning process. Assuming we have an experimental
+symbol as before, we now add the symbol to both the ``experimental`` and ``v21``
+version nodes.
+
+.. code-block:: c
+
+ #include <rte_compat.h>;
+ #include <rte_function_versioning.h>;
+
+ /*
+  * Create an acl context object for apps to
+  * manipulate
+  */
+ struct rte_acl_ctx *
+ rte_acl_create(const struct rte_acl_param *param)
+ {
+ ...
+ }
+
+ __rte_experimental
+ struct rte_acl_ctx *
+ rte_acl_create_e(const struct rte_acl_param *param)
+ {
+    return rte_acl_create(param);
+ }
+ VERSION_SYMBOL_EXPERIMENTAL(rte_acl_create, _e);
+
+ struct rte_acl_ctx *
+ rte_acl_create_v21(const struct rte_acl_param *param)
+ {
+    return rte_acl_create(param);
+ }
+ BIND_DEFAULT_SYMBOL(rte_acl_create, _v21, 21);
+
+
+In the map file, we map the symbol to both the experimental and ``v21`` version
+nodes.
+
+.. code-block:: none
+
+   DPDK_20 {
+        global:
+        ...
+
+        local: *;
+   };
+
+   DPDK_21 {
+        global:
+
+        rte_acl_create
+   } DPDK_20;
+
+   EXPERIMENTAL {
+        global:
+
+        rte_acl_create
+   };
+
+.. note::
+
+   Please note, similar to :ref:`symbol visioning <example_abi_macro_usage>`
+   when aliasing to experimental you will also need to take care of
+   :ref:`mapping static symbols <mapping_static_symbols>`.
+
+
 .. _abi_decprecation:

 Deprecating part of a public API
--
2.7.4

^ permalink raw reply	[relevance 9%]

* [dpdk-dev] [PATCH v4 07/13] net/dpaa2: move internal symbols into INTERNAL section
                           ` (5 preceding siblings ...)
  2020-05-14 13:25  3%       ` [dpdk-dev] [PATCH v4 06/13] net/dpaa: " Hemant Agrawal
@ 2020-05-14 13:25  3%       ` Hemant Agrawal
    7 siblings, 0 replies; 200+ results
From: Hemant Agrawal @ 2020-05-14 13:25 UTC (permalink / raw)
  To: dev, david.marchand, mdr; +Cc: Hemant Agrawal

This patch moves the internal symbols to INTERNAL sections
so that any change in them is not reported as ABI breakage.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 devtools/libabigail.abignore                | 4 +++-
 drivers/net/dpaa2/dpaa2_ethdev.h            | 2 ++
 drivers/net/dpaa2/rte_pmd_dpaa2_version.map | 2 +-
 3 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/devtools/libabigail.abignore b/devtools/libabigail.abignore
index 54ac181204..d54b9675e1 100644
--- a/devtools/libabigail.abignore
+++ b/devtools/libabigail.abignore
@@ -66,4 +66,6 @@
 [suppress_function]
 	name_regexp = ^rte_dpaa2_bpid_info
 [suppress_function]
-        name_regexp = ^dpaa
\ No newline at end of file
+        name_regexp = ^dpaa
+[suppress_file]
+	file_name_regexp = ^librte_pmd_dpaa2\.
diff --git a/drivers/net/dpaa2/dpaa2_ethdev.h b/drivers/net/dpaa2/dpaa2_ethdev.h
index 2c49a7f01f..c7fb6539ff 100644
--- a/drivers/net/dpaa2/dpaa2_ethdev.h
+++ b/drivers/net/dpaa2/dpaa2_ethdev.h
@@ -164,11 +164,13 @@ int dpaa2_remove_flow_dist(struct rte_eth_dev *eth_dev,
 
 int dpaa2_attach_bp_list(struct dpaa2_dev_priv *priv, void *blist);
 
+__rte_internal
 int dpaa2_eth_eventq_attach(const struct rte_eth_dev *dev,
 		int eth_rx_queue_id,
 		struct dpaa2_dpcon_dev *dpcon,
 		const struct rte_event_eth_rx_adapter_queue_conf *queue_conf);
 
+__rte_internal
 int dpaa2_eth_eventq_detach(const struct rte_eth_dev *dev,
 		int eth_rx_queue_id);
 
diff --git a/drivers/net/dpaa2/rte_pmd_dpaa2_version.map b/drivers/net/dpaa2/rte_pmd_dpaa2_version.map
index f2bb793319..78ea74e058 100644
--- a/drivers/net/dpaa2/rte_pmd_dpaa2_version.map
+++ b/drivers/net/dpaa2/rte_pmd_dpaa2_version.map
@@ -1,4 +1,4 @@
-DPDK_20.0 {
+INTERNAL {
 	global:
 
 	dpaa2_eth_eventq_attach;
-- 
2.17.1


^ permalink raw reply	[relevance 3%]

* [dpdk-dev] [PATCH v4 06/13] net/dpaa: move internal symbols into INTERNAL section
                           ` (4 preceding siblings ...)
  2020-05-14 13:25  3%       ` [dpdk-dev] [PATCH v4 05/13] mempool/dpaa2: " Hemant Agrawal
@ 2020-05-14 13:25  3%       ` Hemant Agrawal
  2020-05-14 13:25  3%       ` [dpdk-dev] [PATCH v4 07/13] net/dpaa2: " Hemant Agrawal
    7 siblings, 0 replies; 200+ results
From: Hemant Agrawal @ 2020-05-14 13:25 UTC (permalink / raw)
  To: dev, david.marchand, mdr; +Cc: Hemant Agrawal

This patch moves the internal symbols to INTERNAL sections
so that any change in them is not reported as ABI breakage.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 devtools/libabigail.abignore              | 4 +++-
 drivers/net/dpaa/dpaa_ethdev.h            | 2 ++
 drivers/net/dpaa/rte_pmd_dpaa_version.map | 9 +++++++--
 3 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/devtools/libabigail.abignore b/devtools/libabigail.abignore
index 02b7a973cb..54ac181204 100644
--- a/devtools/libabigail.abignore
+++ b/devtools/libabigail.abignore
@@ -64,4 +64,6 @@
 [suppress_function]
 	name = rte_dpaa2_mbuf_alloc_bulk
 [suppress_function]
-	name = rte_dpaa2_bpid_info
+	name_regexp = ^rte_dpaa2_bpid_info
+[suppress_function]
+        name_regexp = ^dpaa
\ No newline at end of file
diff --git a/drivers/net/dpaa/dpaa_ethdev.h b/drivers/net/dpaa/dpaa_ethdev.h
index af9fc2105d..7393a9df05 100644
--- a/drivers/net/dpaa/dpaa_ethdev.h
+++ b/drivers/net/dpaa/dpaa_ethdev.h
@@ -160,12 +160,14 @@ struct dpaa_if_stats {
 	uint64_t tund;		/**<Tx Undersized */
 };
 
+__rte_internal
 int
 dpaa_eth_eventq_attach(const struct rte_eth_dev *dev,
 		int eth_rx_queue_id,
 		u16 ch_id,
 		const struct rte_event_eth_rx_adapter_queue_conf *queue_conf);
 
+__rte_internal
 int
 dpaa_eth_eventq_detach(const struct rte_eth_dev *dev,
 			   int eth_rx_queue_id);
diff --git a/drivers/net/dpaa/rte_pmd_dpaa_version.map b/drivers/net/dpaa/rte_pmd_dpaa_version.map
index f403a1526d..774aa0de45 100644
--- a/drivers/net/dpaa/rte_pmd_dpaa_version.map
+++ b/drivers/net/dpaa/rte_pmd_dpaa_version.map
@@ -1,9 +1,14 @@
 DPDK_20.0 {
 	global:
 
-	dpaa_eth_eventq_attach;
-	dpaa_eth_eventq_detach;
 	rte_pmd_dpaa_set_tx_loopback;
 
 	local: *;
 };
+
+INTERNAL {
+	global:
+
+	dpaa_eth_eventq_attach;
+	dpaa_eth_eventq_detach;
+};
-- 
2.17.1


^ permalink raw reply	[relevance 3%]

* [dpdk-dev] [PATCH v4 05/13] mempool/dpaa2: move internal symbols into INTERNAL section
                           ` (3 preceding siblings ...)
  2020-05-14 13:25  3%       ` [dpdk-dev] [PATCH v4 04/13] crypto: " Hemant Agrawal
@ 2020-05-14 13:25  3%       ` Hemant Agrawal
  2020-05-14 13:25  3%       ` [dpdk-dev] [PATCH v4 06/13] net/dpaa: " Hemant Agrawal
                         ` (2 subsequent siblings)
  7 siblings, 0 replies; 200+ results
From: Hemant Agrawal @ 2020-05-14 13:25 UTC (permalink / raw)
  To: dev, david.marchand, mdr; +Cc: Hemant Agrawal

This patch moves the internal symbols to INTERNAL sections
so that any change in them is not reported as ABI breakage.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 devtools/libabigail.abignore                        | 6 ++++++
 drivers/mempool/dpaa/rte_mempool_dpaa_version.map   | 2 +-
 drivers/mempool/dpaa2/dpaa2_hw_mempool.h            | 1 +
 drivers/mempool/dpaa2/rte_mempool_dpaa2_version.map | 9 +++++++--
 4 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/devtools/libabigail.abignore b/devtools/libabigail.abignore
index 8db64f267d..02b7a973cb 100644
--- a/devtools/libabigail.abignore
+++ b/devtools/libabigail.abignore
@@ -59,3 +59,9 @@
 	file_name_regexp = ^librte_pmd_dpaa2_sec\.
 [suppress_file]
 	file_name_regexp = ^librte_pmd_dpaa_sec\.
+[suppress_file]
+	file_name_regexp = ^librte_mempool_dpaa\.
+[suppress_function]
+	name = rte_dpaa2_mbuf_alloc_bulk
+[suppress_function]
+	name = rte_dpaa2_bpid_info
diff --git a/drivers/mempool/dpaa/rte_mempool_dpaa_version.map b/drivers/mempool/dpaa/rte_mempool_dpaa_version.map
index 9eebaf7ffd..142547ee38 100644
--- a/drivers/mempool/dpaa/rte_mempool_dpaa_version.map
+++ b/drivers/mempool/dpaa/rte_mempool_dpaa_version.map
@@ -1,4 +1,4 @@
-DPDK_20.0 {
+INTERNAL {
 	global:
 
 	rte_dpaa_bpid_info;
diff --git a/drivers/mempool/dpaa2/dpaa2_hw_mempool.h b/drivers/mempool/dpaa2/dpaa2_hw_mempool.h
index fa0f2280d5..53fa1552d1 100644
--- a/drivers/mempool/dpaa2/dpaa2_hw_mempool.h
+++ b/drivers/mempool/dpaa2/dpaa2_hw_mempool.h
@@ -61,6 +61,7 @@ struct dpaa2_bp_info {
 
 extern struct dpaa2_bp_info *rte_dpaa2_bpid_info;
 
+__rte_internal
 int rte_dpaa2_mbuf_alloc_bulk(struct rte_mempool *pool,
 		       void **obj_table, unsigned int count);
 
diff --git a/drivers/mempool/dpaa2/rte_mempool_dpaa2_version.map b/drivers/mempool/dpaa2/rte_mempool_dpaa2_version.map
index cd4bc88273..686b024624 100644
--- a/drivers/mempool/dpaa2/rte_mempool_dpaa2_version.map
+++ b/drivers/mempool/dpaa2/rte_mempool_dpaa2_version.map
@@ -1,10 +1,15 @@
 DPDK_20.0 {
 	global:
 
-	rte_dpaa2_bpid_info;
-	rte_dpaa2_mbuf_alloc_bulk;
 	rte_dpaa2_mbuf_from_buf_addr;
 	rte_dpaa2_mbuf_pool_bpid;
 
 	local: *;
 };
+
+INTERNAL {
+	global:
+
+	rte_dpaa2_bpid_info;
+	rte_dpaa2_mbuf_alloc_bulk;
+};
-- 
2.17.1


^ permalink raw reply	[relevance 3%]

* [dpdk-dev] [PATCH v4 04/13] crypto: move internal symbols into INTERNAL section
                           ` (2 preceding siblings ...)
  2020-05-14 13:25  1%       ` [dpdk-dev] [PATCH v4 03/13] bus/dpaa: " Hemant Agrawal
@ 2020-05-14 13:25  3%       ` Hemant Agrawal
  2020-05-14 13:25  3%       ` [dpdk-dev] [PATCH v4 05/13] mempool/dpaa2: " Hemant Agrawal
                         ` (3 subsequent siblings)
  7 siblings, 0 replies; 200+ results
From: Hemant Agrawal @ 2020-05-14 13:25 UTC (permalink / raw)
  To: dev, david.marchand, mdr; +Cc: Hemant Agrawal

This patch moves the internal symbols to INTERNAL sections
so that any change in them is not reported as ABI breakage.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 devtools/libabigail.abignore                           | 4 ++++
 drivers/crypto/dpaa2_sec/dpaa2_sec_event.h             | 5 +++--
 drivers/crypto/dpaa2_sec/rte_pmd_dpaa2_sec_version.map | 2 +-
 drivers/crypto/dpaa_sec/dpaa_sec_event.h               | 8 ++++----
 drivers/crypto/dpaa_sec/rte_pmd_dpaa_sec_version.map   | 4 +---
 5 files changed, 13 insertions(+), 10 deletions(-)

diff --git a/devtools/libabigail.abignore b/devtools/libabigail.abignore
index ab34302d0c..8db64f267d 100644
--- a/devtools/libabigail.abignore
+++ b/devtools/libabigail.abignore
@@ -55,3 +55,7 @@
 	file_name_regexp = ^librte_bus_fslmc\.
 [suppress_file]
 	file_name_regexp = ^librte_bus_dpaa\.
+[suppress_file]
+	file_name_regexp = ^librte_pmd_dpaa2_sec\.
+[suppress_file]
+	file_name_regexp = ^librte_pmd_dpaa_sec\.
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_event.h b/drivers/crypto/dpaa2_sec/dpaa2_sec_event.h
index c779d5d837..675cbbb81d 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_event.h
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_event.h
@@ -6,12 +6,13 @@
 #ifndef _DPAA2_SEC_EVENT_H_
 #define _DPAA2_SEC_EVENT_H_
 
-int
-dpaa2_sec_eventq_attach(const struct rte_cryptodev *dev,
+__rte_internal
+int dpaa2_sec_eventq_attach(const struct rte_cryptodev *dev,
 		int qp_id,
 		struct dpaa2_dpcon_dev *dpcon,
 		const struct rte_event *event);
 
+__rte_internal
 int dpaa2_sec_eventq_detach(const struct rte_cryptodev *dev,
 		int qp_id);
 
diff --git a/drivers/crypto/dpaa2_sec/rte_pmd_dpaa2_sec_version.map b/drivers/crypto/dpaa2_sec/rte_pmd_dpaa2_sec_version.map
index 5952d645fd..1352f576e5 100644
--- a/drivers/crypto/dpaa2_sec/rte_pmd_dpaa2_sec_version.map
+++ b/drivers/crypto/dpaa2_sec/rte_pmd_dpaa2_sec_version.map
@@ -1,4 +1,4 @@
-DPDK_20.0 {
+INTERNAL {
 	global:
 
 	dpaa2_sec_eventq_attach;
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec_event.h b/drivers/crypto/dpaa_sec/dpaa_sec_event.h
index 8d1a018096..0b09fa8f75 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec_event.h
+++ b/drivers/crypto/dpaa_sec/dpaa_sec_event.h
@@ -6,14 +6,14 @@
 #ifndef _DPAA_SEC_EVENT_H_
 #define _DPAA_SEC_EVENT_H_
 
-int
-dpaa_sec_eventq_attach(const struct rte_cryptodev *dev,
+__rte_internal
+int dpaa_sec_eventq_attach(const struct rte_cryptodev *dev,
 		int qp_id,
 		uint16_t ch_id,
 		const struct rte_event *event);
 
-int
-dpaa_sec_eventq_detach(const struct rte_cryptodev *dev,
+__rte_internal
+int dpaa_sec_eventq_detach(const struct rte_cryptodev *dev,
 		int qp_id);
 
 #endif /* _DPAA_SEC_EVENT_H_ */
diff --git a/drivers/crypto/dpaa_sec/rte_pmd_dpaa_sec_version.map b/drivers/crypto/dpaa_sec/rte_pmd_dpaa_sec_version.map
index 8580fa13db..aed07fb371 100644
--- a/drivers/crypto/dpaa_sec/rte_pmd_dpaa_sec_version.map
+++ b/drivers/crypto/dpaa_sec/rte_pmd_dpaa_sec_version.map
@@ -1,8 +1,6 @@
-DPDK_20.0 {
+INTERNAL {
 	global:
 
 	dpaa_sec_eventq_attach;
 	dpaa_sec_eventq_detach;
-
-	local: *;
 };
-- 
2.17.1


^ permalink raw reply	[relevance 3%]

* [dpdk-dev] [PATCH v4 03/13] bus/dpaa: move internal symbols into INTERNAL section
    2020-05-14 13:25  3%       ` [dpdk-dev] [PATCH v4 01/13] common/dpaax: move internal symbols into INTERNAL section Hemant Agrawal
  2020-05-14 13:25  1%       ` [dpdk-dev] [PATCH v4 02/13] bus/fslmc: " Hemant Agrawal
@ 2020-05-14 13:25  1%       ` Hemant Agrawal
  2020-05-14 13:25  3%       ` [dpdk-dev] [PATCH v4 04/13] crypto: " Hemant Agrawal
                         ` (4 subsequent siblings)
  7 siblings, 0 replies; 200+ results
From: Hemant Agrawal @ 2020-05-14 13:25 UTC (permalink / raw)
  To: dev, david.marchand, mdr; +Cc: Hemant Agrawal

This patch moves the internal symbols to INTERNAL sections
so that any change in them is not reported as ABI breakage.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 devtools/libabigail.abignore              |  2 ++
 drivers/bus/dpaa/include/fsl_bman.h       |  6 +++++
 drivers/bus/dpaa/include/fsl_fman.h       | 27 +++++++++++++++++++
 drivers/bus/dpaa/include/fsl_qman.h       | 32 +++++++++++++++++++++++
 drivers/bus/dpaa/include/fsl_usd.h        |  6 +++++
 drivers/bus/dpaa/include/netcfg.h         |  2 ++
 drivers/bus/dpaa/rte_bus_dpaa_version.map |  7 +----
 drivers/bus/dpaa/rte_dpaa_bus.h           |  5 ++++
 8 files changed, 81 insertions(+), 6 deletions(-)

diff --git a/devtools/libabigail.abignore b/devtools/libabigail.abignore
index 877c6d5be8..ab34302d0c 100644
--- a/devtools/libabigail.abignore
+++ b/devtools/libabigail.abignore
@@ -53,3 +53,5 @@
 	file_name_regexp = ^librte_common_dpaax\.
 [suppress_file]
 	file_name_regexp = ^librte_bus_fslmc\.
+[suppress_file]
+	file_name_regexp = ^librte_bus_dpaa\.
diff --git a/drivers/bus/dpaa/include/fsl_bman.h b/drivers/bus/dpaa/include/fsl_bman.h
index f9cd972153..82da2fcfe0 100644
--- a/drivers/bus/dpaa/include/fsl_bman.h
+++ b/drivers/bus/dpaa/include/fsl_bman.h
@@ -264,12 +264,14 @@ int bman_shutdown_pool(u32 bpid);
  * the structure provided by the caller can be released or reused after the
  * function returns.
  */
+__rte_internal
 struct bman_pool *bman_new_pool(const struct bman_pool_params *params);
 
 /**
  * bman_free_pool - Deallocates a Buffer Pool object
  * @pool: the pool object to release
  */
+__rte_internal
 void bman_free_pool(struct bman_pool *pool);
 
 /**
@@ -279,6 +281,7 @@ void bman_free_pool(struct bman_pool *pool);
  * The returned pointer refers to state within the pool object so must not be
  * modified and can no longer be read once the pool object is destroyed.
  */
+__rte_internal
 const struct bman_pool_params *bman_get_params(const struct bman_pool *pool);
 
 /**
@@ -289,6 +292,7 @@ const struct bman_pool_params *bman_get_params(const struct bman_pool *pool);
  * @flags: bit-mask of BMAN_RELEASE_FLAG_*** options
  *
  */
+__rte_internal
 int bman_release(struct bman_pool *pool, const struct bm_buffer *bufs, u8 num,
 		 u32 flags);
 
@@ -302,6 +306,7 @@ int bman_release(struct bman_pool *pool, const struct bm_buffer *bufs, u8 num,
  * The return value will be the number of buffers obtained from the pool, or a
  * negative error code if a h/w error or pool starvation was encountered.
  */
+__rte_internal
 int bman_acquire(struct bman_pool *pool, struct bm_buffer *bufs, u8 num,
 		 u32 flags);
 
@@ -317,6 +322,7 @@ int bman_query_pools(struct bm_pool_state *state);
  *
  * Return the number of the free buffers
  */
+__rte_internal
 u32 bman_query_free_buffers(struct bman_pool *pool);
 
 /**
diff --git a/drivers/bus/dpaa/include/fsl_fman.h b/drivers/bus/dpaa/include/fsl_fman.h
index 5705ebfdce..6c87c8db0d 100644
--- a/drivers/bus/dpaa/include/fsl_fman.h
+++ b/drivers/bus/dpaa/include/fsl_fman.h
@@ -7,6 +7,8 @@
 #ifndef __FSL_FMAN_H
 #define __FSL_FMAN_H
 
+#include <rte_compat.h>
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -43,18 +45,23 @@ struct fm_status_t {
 } __rte_packed;
 
 /* Set MAC address for a particular interface */
+__rte_internal
 int fman_if_add_mac_addr(struct fman_if *p, uint8_t *eth, uint8_t addr_num);
 
 /* Remove a MAC address for a particular interface */
+__rte_internal
 void fman_if_clear_mac_addr(struct fman_if *p, uint8_t addr_num);
 
 /* Get the FMAN statistics */
+__rte_internal
 void fman_if_stats_get(struct fman_if *p, struct rte_eth_stats *stats);
 
 /* Reset the FMAN statistics */
+__rte_internal
 void fman_if_stats_reset(struct fman_if *p);
 
 /* Get all of the FMAN statistics */
+__rte_internal
 void fman_if_stats_get_all(struct fman_if *p, uint64_t *value, int n);
 
 /* Set ignore pause option for a specific interface */
@@ -64,32 +71,43 @@ void fman_if_set_rx_ignore_pause_frames(struct fman_if *p, bool enable);
 void fman_if_conf_max_frame_len(struct fman_if *p, unsigned int max_frame_len);
 
 /* Enable/disable Rx promiscuous mode on specified interface */
+__rte_internal
 void fman_if_promiscuous_enable(struct fman_if *p);
+__rte_internal
 void fman_if_promiscuous_disable(struct fman_if *p);
 
 /* Enable/disable Rx on specific interfaces */
+__rte_internal
 void fman_if_enable_rx(struct fman_if *p);
+__rte_internal
 void fman_if_disable_rx(struct fman_if *p);
 
 /* Enable/disable loopback on specific interfaces */
+__rte_internal
 void fman_if_loopback_enable(struct fman_if *p);
+__rte_internal
 void fman_if_loopback_disable(struct fman_if *p);
 
 /* Set buffer pool on specific interface */
+__rte_internal
 void fman_if_set_bp(struct fman_if *fm_if, unsigned int num, int bpid,
 		    size_t bufsize);
 
 /* Get Flow Control threshold parameters on specific interface */
+__rte_internal
 int fman_if_get_fc_threshold(struct fman_if *fm_if);
 
 /* Enable and Set Flow Control threshold parameters on specific interface */
+__rte_internal
 int fman_if_set_fc_threshold(struct fman_if *fm_if,
 			u32 high_water, u32 low_water, u32 bpid);
 
 /* Get Flow Control pause quanta on specific interface */
+__rte_internal
 int fman_if_get_fc_quanta(struct fman_if *fm_if);
 
 /* Set Flow Control pause quanta on specific interface */
+__rte_internal
 int fman_if_set_fc_quanta(struct fman_if *fm_if, u16 pause_quanta);
 
 /* Set default error fqid on specific interface */
@@ -99,35 +117,44 @@ void fman_if_set_err_fqid(struct fman_if *fm_if, uint32_t err_fqid);
 int fman_if_get_ic_params(struct fman_if *fm_if, struct fman_if_ic_params *icp);
 
 /* Set IC transfer params */
+__rte_internal
 int fman_if_set_ic_params(struct fman_if *fm_if,
 			  const struct fman_if_ic_params *icp);
 
 /* Get interface fd->offset value */
+__rte_internal
 int fman_if_get_fdoff(struct fman_if *fm_if);
 
 /* Set interface fd->offset value */
+__rte_internal
 void fman_if_set_fdoff(struct fman_if *fm_if, uint32_t fd_offset);
 
 /* Get interface SG enable status value */
+__rte_internal
 int fman_if_get_sg_enable(struct fman_if *fm_if);
 
 /* Set interface SG support mode */
+__rte_internal
 void fman_if_set_sg(struct fman_if *fm_if, int enable);
 
 /* Get interface Max Frame length (MTU) */
 uint16_t fman_if_get_maxfrm(struct fman_if *fm_if);
 
 /* Set interface  Max Frame length (MTU) */
+__rte_internal
 void fman_if_set_maxfrm(struct fman_if *fm_if, uint16_t max_frm);
 
 /* Set interface next invoked action for dequeue operation */
 void fman_if_set_dnia(struct fman_if *fm_if, uint32_t nia);
 
 /* discard error packets on rx */
+__rte_internal
 void fman_if_discard_rx_errors(struct fman_if *fm_if);
 
+__rte_internal
 void fman_if_set_mcast_filter_table(struct fman_if *p);
 
+__rte_internal
 void fman_if_reset_mcast_filter_table(struct fman_if *p);
 
 int fman_if_add_hash_mac_addr(struct fman_if *p, uint8_t *eth);
diff --git a/drivers/bus/dpaa/include/fsl_qman.h b/drivers/bus/dpaa/include/fsl_qman.h
index 1b3342e7e6..4411bb0a79 100644
--- a/drivers/bus/dpaa/include/fsl_qman.h
+++ b/drivers/bus/dpaa/include/fsl_qman.h
@@ -1314,6 +1314,7 @@ struct qman_cgr {
 #define QMAN_CGR_MODE_FRAME          0x00000001
 
 #ifdef CONFIG_FSL_QMAN_FQ_LOOKUP
+__rte_internal
 void qman_set_fq_lookup_table(void **table);
 #endif
 
@@ -1322,6 +1323,7 @@ void qman_set_fq_lookup_table(void **table);
  */
 int qman_get_portal_index(void);
 
+__rte_internal
 u32 qman_portal_dequeue(struct rte_event ev[], unsigned int poll_limit,
 			void **bufs);
 
@@ -1333,6 +1335,7 @@ u32 qman_portal_dequeue(struct rte_event ev[], unsigned int poll_limit,
  * processed via qman_poll_***() functions). Returns zero for success, or
  * -EINVAL if the current CPU is sharing a portal hosted on another CPU.
  */
+__rte_internal
 int qman_irqsource_add(u32 bits);
 
 /**
@@ -1340,6 +1343,7 @@ int qman_irqsource_add(u32 bits);
  * takes portal (fq specific) as input rather than using the thread affined
  * portal.
  */
+__rte_internal
 int qman_fq_portal_irqsource_add(struct qman_portal *p, u32 bits);
 
 /**
@@ -1350,6 +1354,7 @@ int qman_fq_portal_irqsource_add(struct qman_portal *p, u32 bits);
  * instead be processed via qman_poll_***() functions. Returns zero for success,
  * or -EINVAL if the current CPU is sharing a portal hosted on another CPU.
  */
+__rte_internal
 int qman_irqsource_remove(u32 bits);
 
 /**
@@ -1357,6 +1362,7 @@ int qman_irqsource_remove(u32 bits);
  * takes portal (fq specific) as input rather than using the thread affined
  * portal.
  */
+__rte_internal
 int qman_fq_portal_irqsource_remove(struct qman_portal *p, u32 bits);
 
 /**
@@ -1369,6 +1375,7 @@ int qman_fq_portal_irqsource_remove(struct qman_portal *p, u32 bits);
  */
 u16 qman_affine_channel(int cpu);
 
+__rte_internal
 unsigned int qman_portal_poll_rx(unsigned int poll_limit,
 				 void **bufs, struct qman_portal *q);
 
@@ -1380,6 +1387,7 @@ unsigned int qman_portal_poll_rx(unsigned int poll_limit,
  *
  * This function will issue a volatile dequeue command to the QMAN.
  */
+__rte_internal
 int qman_set_vdq(struct qman_fq *fq, u16 num, uint32_t vdqcr_flags);
 
 /**
@@ -1390,6 +1398,7 @@ int qman_set_vdq(struct qman_fq *fq, u16 num, uint32_t vdqcr_flags);
  * is issued. It will keep returning NULL until there is no packet available on
  * the DQRR.
  */
+__rte_internal
 struct qm_dqrr_entry *qman_dequeue(struct qman_fq *fq);
 
 /**
@@ -1401,6 +1410,7 @@ struct qm_dqrr_entry *qman_dequeue(struct qman_fq *fq);
  * This will consume the DQRR enrey and make it available for next volatile
  * dequeue.
  */
+__rte_internal
 void qman_dqrr_consume(struct qman_fq *fq,
 		       struct qm_dqrr_entry *dq);
 
@@ -1414,6 +1424,7 @@ void qman_dqrr_consume(struct qman_fq *fq,
  * this function will return -EINVAL, otherwise the return value is >=0 and
  * represents the number of DQRR entries processed.
  */
+__rte_internal
 int qman_poll_dqrr(unsigned int limit);
 
 /**
@@ -1460,6 +1471,7 @@ void qman_start_dequeues(void);
  * (SDQCR). The requested pools are limited to those the portal has dequeue
  * access to.
  */
+__rte_internal
 void qman_static_dequeue_add(u32 pools, struct qman_portal *qm);
 
 /**
@@ -1507,6 +1519,7 @@ void qman_dca(const struct qm_dqrr_entry *dq, int park_request);
  * function must be called from the same CPU as that which processed the DQRR
  * entry in the first place.
  */
+__rte_internal
 void qman_dca_index(u8 index, int park_request);
 
 /**
@@ -1564,6 +1577,7 @@ void qman_set_dc_ern(qman_cb_dc_ern handler, int affine);
  * a frame queue object based on that, rather than assuming/requiring that it be
  * Out of Service.
  */
+__rte_internal
 int qman_create_fq(u32 fqid, u32 flags, struct qman_fq *fq);
 
 /**
@@ -1582,6 +1596,7 @@ void qman_destroy_fq(struct qman_fq *fq, u32 flags);
  * qman_fq_fqid - Queries the frame queue ID of a FQ object
  * @fq: the frame queue object to query
  */
+__rte_internal
 u32 qman_fq_fqid(struct qman_fq *fq);
 
 /**
@@ -1594,6 +1609,7 @@ u32 qman_fq_fqid(struct qman_fq *fq);
  * This captures the state, as seen by the driver, at the time the function
  * executes.
  */
+__rte_internal
 void qman_fq_state(struct qman_fq *fq, enum qman_fq_state *state, u32 *flags);
 
 /**
@@ -1630,6 +1646,7 @@ void qman_fq_state(struct qman_fq *fq, enum qman_fq_state *state, u32 *flags);
  * context_a.address fields and will leave the stashing fields provided by the
  * user alone, otherwise it will zero out the context_a.stashing fields.
  */
+__rte_internal
 int qman_init_fq(struct qman_fq *fq, u32 flags, struct qm_mcc_initfq *opts);
 
 /**
@@ -1659,6 +1676,7 @@ int qman_schedule_fq(struct qman_fq *fq);
  * caller should be prepared to accept the callback as the function is called,
  * not only once it has returned.
  */
+__rte_internal
 int qman_retire_fq(struct qman_fq *fq, u32 *flags);
 
 /**
@@ -1668,6 +1686,7 @@ int qman_retire_fq(struct qman_fq *fq, u32 *flags);
  * The frame queue must be retired and empty, and if any order restoration list
  * was released as ERNs at the time of retirement, they must all be consumed.
  */
+__rte_internal
 int qman_oos_fq(struct qman_fq *fq);
 
 /**
@@ -1701,6 +1720,7 @@ int qman_query_fq_has_pkts(struct qman_fq *fq);
  * @fq: the frame queue object to be queried
  * @np: storage for the queried FQD fields
  */
+__rte_internal
 int qman_query_fq_np(struct qman_fq *fq, struct qm_mcr_queryfq_np *np);
 
 /**
@@ -1708,6 +1728,7 @@ int qman_query_fq_np(struct qman_fq *fq, struct qm_mcr_queryfq_np *np);
  * @fq: the frame queue object to be queried
  * @frm_cnt: number of frames in the queue
  */
+__rte_internal
 int qman_query_fq_frm_cnt(struct qman_fq *fq, u32 *frm_cnt);
 
 /**
@@ -1738,6 +1759,7 @@ int qman_query_wq(u8 query_dedicated, struct qm_mcr_querywq *wq);
  * callback, or by waiting for the QMAN_FQ_STATE_VDQCR bit to disappear from the
  * "flags" retrieved from qman_fq_state().
  */
+__rte_internal
 int qman_volatile_dequeue(struct qman_fq *fq, u32 flags, u32 vdqcr);
 
 /**
@@ -1773,8 +1795,10 @@ int qman_volatile_dequeue(struct qman_fq *fq, u32 flags, u32 vdqcr);
  * of an already busy hardware resource by throttling many of the to-be-dropped
  * enqueues "at the source".
  */
+__rte_internal
 int qman_enqueue(struct qman_fq *fq, const struct qm_fd *fd, u32 flags);
 
+__rte_internal
 int qman_enqueue_multi(struct qman_fq *fq, const struct qm_fd *fd, u32 *flags,
 		       int frames_to_send);
 
@@ -1788,6 +1812,7 @@ int qman_enqueue_multi(struct qman_fq *fq, const struct qm_fd *fd, u32 *flags,
  * This API is similar to qman_enqueue_multi(), but it takes fd which needs
  * to be processed by different frame queues.
  */
+__rte_internal
 int
 qman_enqueue_multi_fq(struct qman_fq *fq[], const struct qm_fd *fd,
 		      u32 *flags, int frames_to_send);
@@ -1876,6 +1901,7 @@ int qman_shutdown_fq(u32 fqid);
  * @fqid: the base FQID of the range to deallocate
  * @count: the number of FQIDs in the range
  */
+__rte_internal
 int qman_reserve_fqid_range(u32 fqid, unsigned int count);
 static inline int qman_reserve_fqid(u32 fqid)
 {
@@ -1895,6 +1921,7 @@ static inline int qman_reserve_fqid(u32 fqid)
  * than requested (though alignment will be as requested). If @partial is zero,
  * the return value will either be 'count' or negative.
  */
+__rte_internal
 int qman_alloc_pool_range(u32 *result, u32 count, u32 align, int partial);
 static inline int qman_alloc_pool(u32 *result)
 {
@@ -1942,6 +1969,7 @@ void qman_seed_pool_range(u32 id, unsigned int count);
  * any unspecified parameters) will be used rather than a modify hw hardware
  * (which only modifies the specified parameters).
  */
+__rte_internal
 int qman_create_cgr(struct qman_cgr *cgr, u32 flags,
 		    struct qm_mcc_initcgr *opts);
 
@@ -1964,6 +1992,7 @@ int qman_create_cgr_to_dcp(struct qman_cgr *cgr, u32 flags, u16 dcp_portal,
  * is executed. This must be excuted on the same affine portal on which it was
  * created.
  */
+__rte_internal
 int qman_delete_cgr(struct qman_cgr *cgr);
 
 /**
@@ -1980,6 +2009,7 @@ int qman_delete_cgr(struct qman_cgr *cgr);
  * unspecified parameters) will be used rather than a modify hw hardware (which
  * only modifies the specified parameters).
  */
+__rte_internal
 int qman_modify_cgr(struct qman_cgr *cgr, u32 flags,
 		    struct qm_mcc_initcgr *opts);
 
@@ -2008,6 +2038,7 @@ int qman_query_congestion(struct qm_mcr_querycongestion *congestion);
  * than requested (though alignment will be as requested). If @partial is zero,
  * the return value will either be 'count' or negative.
  */
+__rte_internal
 int qman_alloc_cgrid_range(u32 *result, u32 count, u32 align, int partial);
 static inline int qman_alloc_cgrid(u32 *result)
 {
@@ -2021,6 +2052,7 @@ static inline int qman_alloc_cgrid(u32 *result)
  * @id: the base CGR ID of the range to deallocate
  * @count: the number of CGR IDs in the range
  */
+__rte_internal
 void qman_release_cgrid_range(u32 id, unsigned int count);
 static inline void qman_release_cgrid(u32 id)
 {
diff --git a/drivers/bus/dpaa/include/fsl_usd.h b/drivers/bus/dpaa/include/fsl_usd.h
index 263d9bb976..30ec63a09d 100644
--- a/drivers/bus/dpaa/include/fsl_usd.h
+++ b/drivers/bus/dpaa/include/fsl_usd.h
@@ -58,6 +58,7 @@ int bman_allocate_raw_portal(struct dpaa_raw_portal *portal);
 int bman_free_raw_portal(struct dpaa_raw_portal *portal);
 
 /* Obtain thread-local UIO file-descriptors */
+__rte_internal
 int qman_thread_fd(void);
 int bman_thread_fd(void);
 
@@ -66,8 +67,12 @@ int bman_thread_fd(void);
  * processing is complete. As such, it is essential to call this before going
  * into another blocking read/select/poll.
  */
+__rte_internal
 void qman_thread_irq(void);
+
+__rte_internal
 void bman_thread_irq(void);
+__rte_internal
 void qman_fq_portal_thread_irq(struct qman_portal *qp);
 
 void qman_clear_irq(void);
@@ -77,6 +82,7 @@ int qman_global_init(void);
 int bman_global_init(void);
 
 /* Direct portal create and destroy */
+__rte_internal
 struct qman_portal *fsl_qman_fq_portal_create(int *fd);
 int fsl_qman_fq_portal_destroy(struct qman_portal *qp);
 int fsl_qman_fq_portal_init(struct qman_portal *qp);
diff --git a/drivers/bus/dpaa/include/netcfg.h b/drivers/bus/dpaa/include/netcfg.h
index bf7bfae8cb..d7d1befd24 100644
--- a/drivers/bus/dpaa/include/netcfg.h
+++ b/drivers/bus/dpaa/include/netcfg.h
@@ -46,11 +46,13 @@ struct netcfg_interface {
  * cfg_file: FMC config XML file
  * Returns the configuration information in newly allocated memory.
  */
+__rte_internal
 struct netcfg_info *netcfg_acquire(void);
 
 /* cfg_ptr: configuration information pointer.
  * Frees the resources allocated by the configuration layer.
  */
+__rte_internal
 void netcfg_release(struct netcfg_info *cfg_ptr);
 
 #ifdef RTE_LIBRTE_DPAA_DEBUG_DRIVER
diff --git a/drivers/bus/dpaa/rte_bus_dpaa_version.map b/drivers/bus/dpaa/rte_bus_dpaa_version.map
index e6ca4361e0..f4947fac41 100644
--- a/drivers/bus/dpaa/rte_bus_dpaa_version.map
+++ b/drivers/bus/dpaa/rte_bus_dpaa_version.map
@@ -1,4 +1,4 @@
-DPDK_20.0 {
+INTERNAL {
 	global:
 
 	bman_acquire;
@@ -13,7 +13,6 @@ DPDK_20.0 {
 	dpaa_logtype_pmd;
 	dpaa_netcfg;
 	dpaa_svr_family;
-	fman_ccsr_map_fd;
 	fman_dealloc_bufs_mask_hi;
 	fman_dealloc_bufs_mask_lo;
 	fman_if_add_mac_addr;
@@ -51,7 +50,6 @@ DPDK_20.0 {
 	qm_channel_pool1;
 	qman_alloc_cgrid_range;
 	qman_alloc_pool_range;
-	qman_clear_irq;
 	qman_create_cgr;
 	qman_create_fq;
 	qman_dca_index;
@@ -87,10 +85,7 @@ DPDK_20.0 {
 	qman_volatile_dequeue;
 	rte_dpaa_driver_register;
 	rte_dpaa_driver_unregister;
-	rte_dpaa_mem_ptov;
 	rte_dpaa_portal_fq_close;
 	rte_dpaa_portal_fq_init;
 	rte_dpaa_portal_init;
-
-	local: *;
 };
diff --git a/drivers/bus/dpaa/rte_dpaa_bus.h b/drivers/bus/dpaa/rte_dpaa_bus.h
index 373aca9785..d4aee132ef 100644
--- a/drivers/bus/dpaa/rte_dpaa_bus.h
+++ b/drivers/bus/dpaa/rte_dpaa_bus.h
@@ -158,6 +158,7 @@ rte_dpaa_mem_vtop(void *vaddr)
  *   A pointer to a rte_dpaa_driver structure describing the driver
  *   to be registered.
  */
+__rte_internal
 void rte_dpaa_driver_register(struct rte_dpaa_driver *driver);
 
 /**
@@ -167,6 +168,7 @@ void rte_dpaa_driver_register(struct rte_dpaa_driver *driver);
  *	A pointer to a rte_dpaa_driver structure describing the driver
  *	to be unregistered.
  */
+__rte_internal
 void rte_dpaa_driver_unregister(struct rte_dpaa_driver *driver);
 
 /**
@@ -178,10 +180,13 @@ void rte_dpaa_driver_unregister(struct rte_dpaa_driver *driver);
  * @return
  *	0 in case of success, error otherwise
  */
+__rte_internal
 int rte_dpaa_portal_init(void *arg);
 
+__rte_internal
 int rte_dpaa_portal_fq_init(void *arg, struct qman_fq *fq);
 
+__rte_internal
 int rte_dpaa_portal_fq_close(struct qman_fq *fq);
 
 /**
-- 
2.17.1


^ permalink raw reply	[relevance 1%]

* [dpdk-dev] [PATCH v4 02/13] bus/fslmc: move internal symbols into INTERNAL section
    2020-05-14 13:25  3%       ` [dpdk-dev] [PATCH v4 01/13] common/dpaax: move internal symbols into INTERNAL section Hemant Agrawal
@ 2020-05-14 13:25  1%       ` Hemant Agrawal
  2020-05-14 13:25  1%       ` [dpdk-dev] [PATCH v4 03/13] bus/dpaa: " Hemant Agrawal
                         ` (5 subsequent siblings)
  7 siblings, 0 replies; 200+ results
From: Hemant Agrawal @ 2020-05-14 13:25 UTC (permalink / raw)
  To: dev, david.marchand, mdr; +Cc: Hemant Agrawal

This patch moves the internal symbols to INTERNAL sections
so that any change in them is not reported as ABI breakage.

This patch also removes two symbols, which were not used
anywhere else i.e. rte_fslmc_vfio_dmamap & dpaa2_get_qbman_swp

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 devtools/libabigail.abignore                  |  2 +
 drivers/bus/fslmc/fslmc_vfio.h                |  4 ++
 drivers/bus/fslmc/mc/fsl_dpbp.h               |  6 +++
 drivers/bus/fslmc/mc/fsl_dpci.h               |  3 ++
 drivers/bus/fslmc/mc/fsl_dpcon.h              |  2 +
 drivers/bus/fslmc/mc/fsl_dpdmai.h             |  8 ++++
 drivers/bus/fslmc/mc/fsl_dpio.h               |  9 ++++
 drivers/bus/fslmc/mc/fsl_dpmng.h              |  2 +
 drivers/bus/fslmc/mc/fsl_mc_cmd.h             |  1 +
 drivers/bus/fslmc/portal/dpaa2_hw_dpio.h      |  5 +++
 drivers/bus/fslmc/portal/dpaa2_hw_pvt.h       |  8 ++++
 .../bus/fslmc/qbman/include/fsl_qbman_debug.h |  3 ++
 .../fslmc/qbman/include/fsl_qbman_portal.h    | 41 +++++++++++++++++++
 drivers/bus/fslmc/rte_bus_fslmc_version.map   |  4 +-
 drivers/bus/fslmc/rte_fslmc.h                 |  4 ++
 15 files changed, 99 insertions(+), 3 deletions(-)

diff --git a/devtools/libabigail.abignore b/devtools/libabigail.abignore
index b1488d5549..877c6d5be8 100644
--- a/devtools/libabigail.abignore
+++ b/devtools/libabigail.abignore
@@ -51,3 +51,5 @@
 ; Ignore moving DPAAx stable functions to INTERNAL tag
 [suppress_file]
 	file_name_regexp = ^librte_common_dpaax\.
+[suppress_file]
+	file_name_regexp = ^librte_bus_fslmc\.
diff --git a/drivers/bus/fslmc/fslmc_vfio.h b/drivers/bus/fslmc/fslmc_vfio.h
index c988121294..609e48aea3 100644
--- a/drivers/bus/fslmc/fslmc_vfio.h
+++ b/drivers/bus/fslmc/fslmc_vfio.h
@@ -41,7 +41,11 @@ typedef struct fslmc_vfio_container {
 } fslmc_vfio_container;
 
 extern char *fslmc_container;
+
+__rte_internal
 int rte_dpaa2_intr_enable(struct rte_intr_handle *intr_handle, int index);
+
+__rte_internal
 int rte_dpaa2_intr_disable(struct rte_intr_handle *intr_handle, int index);
 
 int rte_dpaa2_vfio_setup_intr(struct rte_intr_handle *intr_handle,
diff --git a/drivers/bus/fslmc/mc/fsl_dpbp.h b/drivers/bus/fslmc/mc/fsl_dpbp.h
index 9d405b42c4..7b537a21be 100644
--- a/drivers/bus/fslmc/mc/fsl_dpbp.h
+++ b/drivers/bus/fslmc/mc/fsl_dpbp.h
@@ -14,6 +14,7 @@
 
 struct fsl_mc_io;
 
+__rte_internal
 int dpbp_open(struct fsl_mc_io *mc_io,
 	      uint32_t cmd_flags,
 	      int dpbp_id,
@@ -42,10 +43,12 @@ int dpbp_destroy(struct fsl_mc_io *mc_io,
 		 uint32_t cmd_flags,
 		 uint32_t obj_id);
 
+__rte_internal
 int dpbp_enable(struct fsl_mc_io *mc_io,
 		uint32_t cmd_flags,
 		uint16_t token);
 
+__rte_internal
 int dpbp_disable(struct fsl_mc_io *mc_io,
 		 uint32_t cmd_flags,
 		 uint16_t token);
@@ -55,6 +58,7 @@ int dpbp_is_enabled(struct fsl_mc_io *mc_io,
 		    uint16_t token,
 		    int *en);
 
+__rte_internal
 int dpbp_reset(struct fsl_mc_io *mc_io,
 	       uint32_t cmd_flags,
 	       uint16_t token);
@@ -70,6 +74,7 @@ struct dpbp_attr {
 	uint16_t bpid;
 };
 
+__rte_internal
 int dpbp_get_attributes(struct fsl_mc_io *mc_io,
 			uint32_t cmd_flags,
 			uint16_t token,
@@ -88,6 +93,7 @@ int dpbp_get_api_version(struct fsl_mc_io *mc_io,
 			 uint16_t *major_ver,
 			 uint16_t *minor_ver);
 
+__rte_internal
 int dpbp_get_num_free_bufs(struct fsl_mc_io *mc_io,
 			   uint32_t cmd_flags,
 			   uint16_t token,
diff --git a/drivers/bus/fslmc/mc/fsl_dpci.h b/drivers/bus/fslmc/mc/fsl_dpci.h
index a0ee5bfe69..81fd3438aa 100644
--- a/drivers/bus/fslmc/mc/fsl_dpci.h
+++ b/drivers/bus/fslmc/mc/fsl_dpci.h
@@ -181,6 +181,7 @@ struct dpci_rx_queue_cfg {
 	int order_preservation_en;
 };
 
+__rte_internal
 int dpci_set_rx_queue(struct fsl_mc_io *mc_io,
 		      uint32_t cmd_flags,
 		      uint16_t token,
@@ -228,6 +229,7 @@ int dpci_get_api_version(struct fsl_mc_io *mc_io,
 			 uint16_t *major_ver,
 			 uint16_t *minor_ver);
 
+__rte_internal
 int dpci_set_opr(struct fsl_mc_io *mc_io,
 		 uint32_t cmd_flags,
 		 uint16_t token,
@@ -235,6 +237,7 @@ int dpci_set_opr(struct fsl_mc_io *mc_io,
 		 uint8_t options,
 		 struct opr_cfg *cfg);
 
+__rte_internal
 int dpci_get_opr(struct fsl_mc_io *mc_io,
 		 uint32_t cmd_flags,
 		 uint16_t token,
diff --git a/drivers/bus/fslmc/mc/fsl_dpcon.h b/drivers/bus/fslmc/mc/fsl_dpcon.h
index af81d51195..7caa6c68a1 100644
--- a/drivers/bus/fslmc/mc/fsl_dpcon.h
+++ b/drivers/bus/fslmc/mc/fsl_dpcon.h
@@ -20,6 +20,7 @@ struct fsl_mc_io;
  */
 #define DPCON_INVALID_DPIO_ID		(int)(-1)
 
+__rte_internal
 int dpcon_open(struct fsl_mc_io *mc_io,
 	       uint32_t cmd_flags,
 	       int dpcon_id,
@@ -77,6 +78,7 @@ struct dpcon_attr {
 	uint8_t num_priorities;
 };
 
+__rte_internal
 int dpcon_get_attributes(struct fsl_mc_io *mc_io,
 			 uint32_t cmd_flags,
 			 uint16_t token,
diff --git a/drivers/bus/fslmc/mc/fsl_dpdmai.h b/drivers/bus/fslmc/mc/fsl_dpdmai.h
index 40469cc139..e7e8a5dda9 100644
--- a/drivers/bus/fslmc/mc/fsl_dpdmai.h
+++ b/drivers/bus/fslmc/mc/fsl_dpdmai.h
@@ -23,11 +23,13 @@ struct fsl_mc_io;
  */
 #define DPDMAI_ALL_QUEUES	(uint8_t)(-1)
 
+__rte_internal
 int dpdmai_open(struct fsl_mc_io *mc_io,
 		uint32_t cmd_flags,
 		int dpdmai_id,
 		uint16_t *token);
 
+__rte_internal
 int dpdmai_close(struct fsl_mc_io *mc_io,
 		 uint32_t cmd_flags,
 		 uint16_t token);
@@ -54,10 +56,12 @@ int dpdmai_destroy(struct fsl_mc_io *mc_io,
 		   uint32_t cmd_flags,
 		   uint32_t object_id);
 
+__rte_internal
 int dpdmai_enable(struct fsl_mc_io *mc_io,
 		  uint32_t cmd_flags,
 		  uint16_t token);
 
+__rte_internal
 int dpdmai_disable(struct fsl_mc_io *mc_io,
 		   uint32_t cmd_flags,
 		   uint16_t token);
@@ -82,6 +86,7 @@ struct dpdmai_attr {
 	uint8_t num_of_queues;
 };
 
+__rte_internal
 int dpdmai_get_attributes(struct fsl_mc_io *mc_io,
 			  uint32_t cmd_flags,
 			  uint16_t token,
@@ -148,6 +153,7 @@ struct dpdmai_rx_queue_cfg {
 
 };
 
+__rte_internal
 int dpdmai_set_rx_queue(struct fsl_mc_io *mc_io,
 			uint32_t cmd_flags,
 			uint16_t token,
@@ -168,6 +174,7 @@ struct dpdmai_rx_queue_attr {
 	uint32_t fqid;
 };
 
+__rte_internal
 int dpdmai_get_rx_queue(struct fsl_mc_io *mc_io,
 			uint32_t cmd_flags,
 			uint16_t token,
@@ -184,6 +191,7 @@ struct dpdmai_tx_queue_attr {
 	uint32_t fqid;
 };
 
+__rte_internal
 int dpdmai_get_tx_queue(struct fsl_mc_io *mc_io,
 			uint32_t cmd_flags,
 			uint16_t token,
diff --git a/drivers/bus/fslmc/mc/fsl_dpio.h b/drivers/bus/fslmc/mc/fsl_dpio.h
index 3158f53191..92e97db94b 100644
--- a/drivers/bus/fslmc/mc/fsl_dpio.h
+++ b/drivers/bus/fslmc/mc/fsl_dpio.h
@@ -13,11 +13,13 @@
 
 struct fsl_mc_io;
 
+__rte_internal
 int dpio_open(struct fsl_mc_io *mc_io,
 	      uint32_t cmd_flags,
 	      int dpio_id,
 	      uint16_t *token);
 
+__rte_internal
 int dpio_close(struct fsl_mc_io *mc_io,
 	       uint32_t cmd_flags,
 	       uint16_t token);
@@ -57,10 +59,12 @@ int dpio_destroy(struct fsl_mc_io *mc_io,
 		 uint32_t cmd_flags,
 		 uint32_t object_id);
 
+__rte_internal
 int dpio_enable(struct fsl_mc_io *mc_io,
 		uint32_t cmd_flags,
 		uint16_t token);
 
+__rte_internal
 int dpio_disable(struct fsl_mc_io *mc_io,
 		 uint32_t cmd_flags,
 		 uint16_t token);
@@ -70,10 +74,12 @@ int dpio_is_enabled(struct fsl_mc_io *mc_io,
 		    uint16_t token,
 		    int *en);
 
+__rte_internal
 int dpio_reset(struct fsl_mc_io *mc_io,
 	       uint32_t cmd_flags,
 	       uint16_t token);
 
+__rte_internal
 int dpio_set_stashing_destination(struct fsl_mc_io *mc_io,
 				  uint32_t cmd_flags,
 				  uint16_t token,
@@ -84,12 +90,14 @@ int dpio_get_stashing_destination(struct fsl_mc_io *mc_io,
 				  uint16_t token,
 				  uint8_t *sdest);
 
+__rte_internal
 int dpio_add_static_dequeue_channel(struct fsl_mc_io *mc_io,
 				    uint32_t cmd_flags,
 				    uint16_t token,
 				    int dpcon_id,
 				    uint8_t *channel_index);
 
+__rte_internal
 int dpio_remove_static_dequeue_channel(struct fsl_mc_io *mc_io,
 				       uint32_t cmd_flags,
 				       uint16_t token,
@@ -119,6 +127,7 @@ struct dpio_attr {
 	uint32_t clk;
 };
 
+__rte_internal
 int dpio_get_attributes(struct fsl_mc_io *mc_io,
 			uint32_t cmd_flags,
 			uint16_t token,
diff --git a/drivers/bus/fslmc/mc/fsl_dpmng.h b/drivers/bus/fslmc/mc/fsl_dpmng.h
index 36c387af27..cdd8506625 100644
--- a/drivers/bus/fslmc/mc/fsl_dpmng.h
+++ b/drivers/bus/fslmc/mc/fsl_dpmng.h
@@ -34,6 +34,7 @@ struct mc_version {
 	uint32_t revision;
 };
 
+__rte_internal
 int mc_get_version(struct fsl_mc_io *mc_io,
 		   uint32_t cmd_flags,
 		   struct mc_version *mc_ver_info);
@@ -48,6 +49,7 @@ struct mc_soc_version {
 	uint32_t pvr;
 };
 
+__rte_internal
 int mc_get_soc_version(struct fsl_mc_io *mc_io,
 		       uint32_t cmd_flags,
 		       struct mc_soc_version *mc_platform_info);
diff --git a/drivers/bus/fslmc/mc/fsl_mc_cmd.h b/drivers/bus/fslmc/mc/fsl_mc_cmd.h
index ac919610cf..06ea41a3b2 100644
--- a/drivers/bus/fslmc/mc/fsl_mc_cmd.h
+++ b/drivers/bus/fslmc/mc/fsl_mc_cmd.h
@@ -80,6 +80,7 @@ enum mc_cmd_status {
 
 #define MC_CMD_HDR_FLAGS_MASK	0xFF00FF00
 
+__rte_internal
 int mc_send_command(struct fsl_mc_io *mc_io, struct mc_command *cmd);
 
 static inline uint64_t mc_encode_cmd_header(uint16_t cmd_id,
diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.h b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.h
index 2829c93806..7c5966241a 100644
--- a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.h
+++ b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.h
@@ -36,20 +36,25 @@ extern uint8_t dpaa2_eqcr_size;
 extern struct dpaa2_io_portal_t dpaa2_io_portal[RTE_MAX_LCORE];
 
 /* Affine a DPIO portal to current processing thread */
+__rte_internal
 int dpaa2_affine_qbman_swp(void);
 
 /* Affine additional DPIO portal to current crypto processing thread */
+__rte_internal
 int dpaa2_affine_qbman_ethrx_swp(void);
 
 /* allocate memory for FQ - dq storage */
+__rte_internal
 int
 dpaa2_alloc_dq_storage(struct queue_storage_info_t *q_storage);
 
 /* free memory for FQ- dq storage */
+__rte_internal
 void
 dpaa2_free_dq_storage(struct queue_storage_info_t *q_storage);
 
 /* free the enqueue response descriptors */
+__rte_internal
 uint32_t
 dpaa2_free_eq_descriptors(void);
 
diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h
index 368fe7c688..33b191f823 100644
--- a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h
+++ b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h
@@ -426,11 +426,19 @@ void set_swp_active_dqs(uint16_t dpio_index, struct qbman_result *dqs)
 {
 	rte_global_active_dqs_list[dpio_index].global_active_dqs = dqs;
 }
+__rte_internal
 struct dpaa2_dpbp_dev *dpaa2_alloc_dpbp_dev(void);
+
+__rte_internal
 void dpaa2_free_dpbp_dev(struct dpaa2_dpbp_dev *dpbp);
+
+__rte_internal
 int dpaa2_dpbp_supported(void);
 
+__rte_internal
 struct dpaa2_dpci_dev *rte_dpaa2_alloc_dpci_dev(void);
+
+__rte_internal
 void rte_dpaa2_free_dpci_dev(struct dpaa2_dpci_dev *dpci);
 
 #endif
diff --git a/drivers/bus/fslmc/qbman/include/fsl_qbman_debug.h b/drivers/bus/fslmc/qbman/include/fsl_qbman_debug.h
index e010b1b6ae..328f2022fc 100644
--- a/drivers/bus/fslmc/qbman/include/fsl_qbman_debug.h
+++ b/drivers/bus/fslmc/qbman/include/fsl_qbman_debug.h
@@ -24,7 +24,10 @@ uint8_t verb;
 	uint8_t reserved2[29];
 };
 
+__rte_internal
 int qbman_fq_query_state(struct qbman_swp *s, uint32_t fqid,
 			 struct qbman_fq_query_np_rslt *r);
+
+__rte_internal
 uint32_t qbman_fq_state_frame_count(const struct qbman_fq_query_np_rslt *r);
 uint32_t qbman_fq_state_byte_count(const struct qbman_fq_query_np_rslt *r);
diff --git a/drivers/bus/fslmc/qbman/include/fsl_qbman_portal.h b/drivers/bus/fslmc/qbman/include/fsl_qbman_portal.h
index 88f0a99686..7ac0f82106 100644
--- a/drivers/bus/fslmc/qbman/include/fsl_qbman_portal.h
+++ b/drivers/bus/fslmc/qbman/include/fsl_qbman_portal.h
@@ -117,6 +117,7 @@ uint32_t qbman_swp_interrupt_read_status(struct qbman_swp *p);
  * @p: the given software portal object.
  * @mask: The value to set in SWP_ISR register.
  */
+__rte_internal
 void qbman_swp_interrupt_clear_status(struct qbman_swp *p, uint32_t mask);
 
 /**
@@ -286,6 +287,7 @@ void qbman_swp_push_get(struct qbman_swp *s, uint8_t channel_idx, int *enabled);
  * rather by specifying the index (from 0 to 15) that has been mapped to the
  * desired channel.
  */
+__rte_internal
 void qbman_swp_push_set(struct qbman_swp *s, uint8_t channel_idx, int enable);
 
 /* ------------------- */
@@ -325,6 +327,7 @@ enum qbman_pull_type_e {
  * default/starting state.
  * @d: the pull dequeue descriptor to be cleared.
  */
+__rte_internal
 void qbman_pull_desc_clear(struct qbman_pull_desc *d);
 
 /**
@@ -340,6 +343,7 @@ void qbman_pull_desc_clear(struct qbman_pull_desc *d);
  * the caller provides in 'storage_phys'), and 'stash' controls whether or not
  * those writes to main-memory express a cache-warming attribute.
  */
+__rte_internal
 void qbman_pull_desc_set_storage(struct qbman_pull_desc *d,
 				 struct qbman_result *storage,
 				 uint64_t storage_phys,
@@ -349,6 +353,7 @@ void qbman_pull_desc_set_storage(struct qbman_pull_desc *d,
  * @d: the pull dequeue descriptor to be set.
  * @numframes: number of frames to be set, must be between 1 and 16, inclusive.
  */
+__rte_internal
 void qbman_pull_desc_set_numframes(struct qbman_pull_desc *d,
 				   uint8_t numframes);
 /**
@@ -372,6 +377,7 @@ void qbman_pull_desc_set_token(struct qbman_pull_desc *d, uint8_t token);
  * qbman_pull_desc_set_fq() - Set fqid from which the dequeue command dequeues.
  * @fqid: the frame queue index of the given FQ.
  */
+__rte_internal
 void qbman_pull_desc_set_fq(struct qbman_pull_desc *d, uint32_t fqid);
 
 /**
@@ -407,6 +413,7 @@ void qbman_pull_desc_set_rad(struct qbman_pull_desc *d, int rad);
  * Return 0 for success, and -EBUSY if the software portal is not ready
  * to do pull dequeue.
  */
+__rte_internal
 int qbman_swp_pull(struct qbman_swp *s, struct qbman_pull_desc *d);
 
 /* -------------------------------- */
@@ -421,12 +428,14 @@ int qbman_swp_pull(struct qbman_swp *s, struct qbman_pull_desc *d);
  * only once, so repeated calls can return a sequence of DQRR entries, without
  * requiring they be consumed immediately or in any particular order.
  */
+__rte_internal
 const struct qbman_result *qbman_swp_dqrr_next(struct qbman_swp *p);
 
 /**
  * qbman_swp_prefetch_dqrr_next() - prefetch the next DQRR entry.
  * @s: the software portal object.
  */
+__rte_internal
 void qbman_swp_prefetch_dqrr_next(struct qbman_swp *s);
 
 /**
@@ -435,6 +444,7 @@ void qbman_swp_prefetch_dqrr_next(struct qbman_swp *s);
  * @s: the software portal object.
  * @dq: the DQRR entry to be consumed.
  */
+__rte_internal
 void qbman_swp_dqrr_consume(struct qbman_swp *s, const struct qbman_result *dq);
 
 /**
@@ -442,6 +452,7 @@ void qbman_swp_dqrr_consume(struct qbman_swp *s, const struct qbman_result *dq);
  * @s: the software portal object.
  * @dqrr_index: the DQRR index entry to be consumed.
  */
+__rte_internal
 void qbman_swp_dqrr_idx_consume(struct qbman_swp *s, uint8_t dqrr_index);
 
 /**
@@ -450,6 +461,7 @@ void qbman_swp_dqrr_idx_consume(struct qbman_swp *s, uint8_t dqrr_index);
  *
  * Return dqrr index.
  */
+__rte_internal
 uint8_t qbman_get_dqrr_idx(const struct qbman_result *dqrr);
 
 /**
@@ -460,6 +472,7 @@ uint8_t qbman_get_dqrr_idx(const struct qbman_result *dqrr);
  *
  * Return dqrr entry object.
  */
+__rte_internal
 struct qbman_result *qbman_get_dqrr_from_idx(struct qbman_swp *s, uint8_t idx);
 
 /* ------------------------------------------------- */
@@ -485,6 +498,7 @@ struct qbman_result *qbman_get_dqrr_from_idx(struct qbman_swp *s, uint8_t idx);
  * Return 1 for getting a valid dequeue result, or 0 for not getting a valid
  * dequeue result.
  */
+__rte_internal
 int qbman_result_has_new_result(struct qbman_swp *s,
 				struct qbman_result *dq);
 
@@ -497,8 +511,10 @@ int qbman_result_has_new_result(struct qbman_swp *s,
  * Return 1 for getting a valid dequeue result, or 0 for not getting a valid
  * dequeue result.
  */
+__rte_internal
 int qbman_check_command_complete(struct qbman_result *dq);
 
+__rte_internal
 int qbman_check_new_result(struct qbman_result *dq);
 
 /* -------------------------------------------------------- */
@@ -624,6 +640,7 @@ int qbman_result_is_FQPN(const struct qbman_result *dq);
  *
  * Return the state field.
  */
+__rte_internal
 uint8_t qbman_result_DQ_flags(const struct qbman_result *dq);
 
 /**
@@ -658,6 +675,7 @@ static inline int qbman_result_DQ_is_pull_complete(
  *
  * Return seqnum.
  */
+__rte_internal
 uint16_t qbman_result_DQ_seqnum(const struct qbman_result *dq);
 
 /**
@@ -667,6 +685,7 @@ uint16_t qbman_result_DQ_seqnum(const struct qbman_result *dq);
  *
  * Return odpid.
  */
+__rte_internal
 uint16_t qbman_result_DQ_odpid(const struct qbman_result *dq);
 
 /**
@@ -699,6 +718,7 @@ uint32_t qbman_result_DQ_frame_count(const struct qbman_result *dq);
  *
  * Return the frame queue context.
  */
+__rte_internal
 uint64_t qbman_result_DQ_fqd_ctx(const struct qbman_result *dq);
 
 /**
@@ -707,6 +727,7 @@ uint64_t qbman_result_DQ_fqd_ctx(const struct qbman_result *dq);
  *
  * Return the frame descriptor.
  */
+__rte_internal
 const struct qbman_fd *qbman_result_DQ_fd(const struct qbman_result *dq);
 
 /* State-change notifications (FQDAN/CDAN/CSCN/...). */
@@ -717,6 +738,7 @@ const struct qbman_fd *qbman_result_DQ_fd(const struct qbman_result *dq);
  *
  * Return the state in the notifiation.
  */
+__rte_internal
 uint8_t qbman_result_SCN_state(const struct qbman_result *scn);
 
 /**
@@ -850,6 +872,7 @@ struct qbman_eq_response {
  * default/starting state.
  * @d: the given enqueue descriptor.
  */
+__rte_internal
 void qbman_eq_desc_clear(struct qbman_eq_desc *d);
 
 /* Exactly one of the following descriptor "actions" should be set. (Calling
@@ -870,6 +893,7 @@ void qbman_eq_desc_clear(struct qbman_eq_desc *d);
  * @response_success: 1 = enqueue with response always; 0 = enqueue with
  * rejections returned on a FQ.
  */
+__rte_internal
 void qbman_eq_desc_set_no_orp(struct qbman_eq_desc *d, int respond_success);
 /**
  * qbman_eq_desc_set_orp() - Set order-resotration in the enqueue descriptor
@@ -881,6 +905,7 @@ void qbman_eq_desc_set_no_orp(struct qbman_eq_desc *d, int respond_success);
  * @incomplete: indiates whether this is the last fragments using the same
  * sequeue number.
  */
+__rte_internal
 void qbman_eq_desc_set_orp(struct qbman_eq_desc *d, int respond_success,
 			   uint16_t opr_id, uint16_t seqnum, int incomplete);
 
@@ -915,6 +940,7 @@ void qbman_eq_desc_set_orp_nesn(struct qbman_eq_desc *d, uint16_t opr_id,
  * data structure.) 'stash' controls whether or not the write to main-memory
  * expresses a cache-warming attribute.
  */
+__rte_internal
 void qbman_eq_desc_set_response(struct qbman_eq_desc *d,
 				uint64_t storage_phys,
 				int stash);
@@ -929,6 +955,7 @@ void qbman_eq_desc_set_response(struct qbman_eq_desc *d,
  * result "storage" before issuing an enqueue, and use any non-zero 'token'
  * value.
  */
+__rte_internal
 void qbman_eq_desc_set_token(struct qbman_eq_desc *d, uint8_t token);
 
 /**
@@ -944,6 +971,7 @@ void qbman_eq_desc_set_token(struct qbman_eq_desc *d, uint8_t token);
  * @d: the enqueue descriptor
  * @fqid: the id of the frame queue to be enqueued.
  */
+__rte_internal
 void qbman_eq_desc_set_fq(struct qbman_eq_desc *d, uint32_t fqid);
 
 /**
@@ -953,6 +981,7 @@ void qbman_eq_desc_set_fq(struct qbman_eq_desc *d, uint32_t fqid);
  * @qd_bin: the queuing destination bin
  * @qd_prio: the queuing destination priority.
  */
+__rte_internal
 void qbman_eq_desc_set_qd(struct qbman_eq_desc *d, uint32_t qdid,
 			  uint16_t qd_bin, uint8_t qd_prio);
 
@@ -978,6 +1007,7 @@ void qbman_eq_desc_set_eqdi(struct qbman_eq_desc *d, int enable);
  * held-active (order-preserving) FQ, whether the FQ should be parked instead of
  * being rescheduled.)
  */
+__rte_internal
 void qbman_eq_desc_set_dca(struct qbman_eq_desc *d, int enable,
 			   uint8_t dqrr_idx, int park);
 
@@ -987,6 +1017,7 @@ void qbman_eq_desc_set_dca(struct qbman_eq_desc *d, int enable,
  *
  * Return the fd pointer.
  */
+__rte_internal
 struct qbman_fd *qbman_result_eqresp_fd(struct qbman_result *eqresp);
 
 /**
@@ -997,6 +1028,7 @@ struct qbman_fd *qbman_result_eqresp_fd(struct qbman_result *eqresp);
  * This value is set into the response id before the enqueue command, which,
  * get overwritten by qbman once the enqueue command is complete.
  */
+__rte_internal
 void qbman_result_eqresp_set_rspid(struct qbman_result *eqresp, uint8_t val);
 
 /**
@@ -1009,6 +1041,7 @@ void qbman_result_eqresp_set_rspid(struct qbman_result *eqresp, uint8_t val);
  * copied into the enqueue response to determine if the command has been
  * completed, and response has been updated.
  */
+__rte_internal
 uint8_t qbman_result_eqresp_rspid(struct qbman_result *eqresp);
 
 /**
@@ -1017,6 +1050,7 @@ uint8_t qbman_result_eqresp_rspid(struct qbman_result *eqresp);
  *
  * Return 0 when command is sucessful.
  */
+__rte_internal
 uint8_t qbman_result_eqresp_rc(struct qbman_result *eqresp);
 
 /**
@@ -1043,6 +1077,7 @@ int qbman_swp_enqueue(struct qbman_swp *s, const struct qbman_eq_desc *d,
  *
  * Return the number of enqueued frames, -EBUSY if the EQCR is not ready.
  */
+__rte_internal
 int qbman_swp_enqueue_multiple(struct qbman_swp *s,
 			       const struct qbman_eq_desc *d,
 			       const struct qbman_fd *fd,
@@ -1060,6 +1095,7 @@ int qbman_swp_enqueue_multiple(struct qbman_swp *s,
  *
  * Return the number of enqueued frames, -EBUSY if the EQCR is not ready.
  */
+__rte_internal
 int qbman_swp_enqueue_multiple_fd(struct qbman_swp *s,
 				  const struct qbman_eq_desc *d,
 				  struct qbman_fd **fd,
@@ -1076,6 +1112,7 @@ int qbman_swp_enqueue_multiple_fd(struct qbman_swp *s,
  *
  * Return the number of enqueued frames, -EBUSY if the EQCR is not ready.
  */
+__rte_internal
 int qbman_swp_enqueue_multiple_desc(struct qbman_swp *s,
 				    const struct qbman_eq_desc *d,
 				    const struct qbman_fd *fd,
@@ -1117,12 +1154,14 @@ struct qbman_release_desc {
  * default/starting state.
  * @d: the qbman release descriptor.
  */
+__rte_internal
 void qbman_release_desc_clear(struct qbman_release_desc *d);
 
 /**
  * qbman_release_desc_set_bpid() - Set the ID of the buffer pool to release to
  * @d: the qbman release descriptor.
  */
+__rte_internal
 void qbman_release_desc_set_bpid(struct qbman_release_desc *d, uint16_t bpid);
 
 /**
@@ -1141,6 +1180,7 @@ void qbman_release_desc_set_rcdi(struct qbman_release_desc *d, int enable);
  *
  * Return 0 for success, -EBUSY if the release command ring is not ready.
  */
+__rte_internal
 int qbman_swp_release(struct qbman_swp *s, const struct qbman_release_desc *d,
 		      const uint64_t *buffers, unsigned int num_buffers);
 
@@ -1166,6 +1206,7 @@ int qbman_swp_release_thresh(struct qbman_swp *s, unsigned int thresh);
  * Return 0 for success, or negative error code if the acquire command
  * fails.
  */
+__rte_internal
 int qbman_swp_acquire(struct qbman_swp *s, uint16_t bpid, uint64_t *buffers,
 		      unsigned int num_buffers);
 
diff --git a/drivers/bus/fslmc/rte_bus_fslmc_version.map b/drivers/bus/fslmc/rte_bus_fslmc_version.map
index fe45575046..04e61156c3 100644
--- a/drivers/bus/fslmc/rte_bus_fslmc_version.map
+++ b/drivers/bus/fslmc/rte_bus_fslmc_version.map
@@ -1,4 +1,4 @@
-DPDK_20.0 {
+INTERNAL {
 	global:
 
 	dpaa2_affine_qbman_ethrx_swp;
@@ -11,7 +11,6 @@ DPDK_20.0 {
 	dpaa2_free_dpbp_dev;
 	dpaa2_free_dq_storage;
 	dpaa2_free_eq_descriptors;
-	dpaa2_get_qbman_swp;
 	dpaa2_io_portal;
 	dpaa2_svr_family;
 	dpaa2_virt_mode;
@@ -101,7 +100,6 @@ DPDK_20.0 {
 	rte_fslmc_driver_unregister;
 	rte_fslmc_get_device_count;
 	rte_fslmc_object_register;
-	rte_fslmc_vfio_dmamap;
 	rte_global_active_dqs_list;
 	rte_mcp_ptr_list;
 
diff --git a/drivers/bus/fslmc/rte_fslmc.h b/drivers/bus/fslmc/rte_fslmc.h
index 96ba8dc259..5078b48ee1 100644
--- a/drivers/bus/fslmc/rte_fslmc.h
+++ b/drivers/bus/fslmc/rte_fslmc.h
@@ -162,6 +162,7 @@ RTE_DECLARE_PER_LCORE(struct dpaa2_portal_dqrr, dpaa2_held_bufs);
  *   A pointer to a rte_dpaa2_driver structure describing the driver
  *   to be registered.
  */
+__rte_internal
 void rte_fslmc_driver_register(struct rte_dpaa2_driver *driver);
 
 /**
@@ -171,6 +172,7 @@ void rte_fslmc_driver_register(struct rte_dpaa2_driver *driver);
  *   A pointer to a rte_dpaa2_driver structure describing the driver
  *   to be unregistered.
  */
+__rte_internal
 void rte_fslmc_driver_unregister(struct rte_dpaa2_driver *driver);
 
 /** Helper for DPAA2 device registration from driver (eth, crypto) instance */
@@ -189,6 +191,7 @@ RTE_PMD_EXPORT_NAME(nm, __COUNTER__)
  *   A pointer to a rte_dpaa_object structure describing the mc object
  *   to be registered.
  */
+__rte_internal
 void rte_fslmc_object_register(struct rte_dpaa2_object *object);
 
 /**
@@ -200,6 +203,7 @@ void rte_fslmc_object_register(struct rte_dpaa2_object *object);
  *   >=0 for count; 0 indicates either no device of the said type scanned or
  *   invalid device type.
  */
+__rte_internal
 uint32_t rte_fslmc_get_device_count(enum rte_dpaa2_dev_type device_type);
 
 /** Helper for DPAA2 object registration */
-- 
2.17.1


^ permalink raw reply	[relevance 1%]

* [dpdk-dev] [PATCH v4 01/13] common/dpaax: move internal symbols into INTERNAL section
  @ 2020-05-14 13:25  3%       ` Hemant Agrawal
  2020-05-14 13:25  1%       ` [dpdk-dev] [PATCH v4 02/13] bus/fslmc: " Hemant Agrawal
                         ` (6 subsequent siblings)
  7 siblings, 0 replies; 200+ results
From: Hemant Agrawal @ 2020-05-14 13:25 UTC (permalink / raw)
  To: dev, david.marchand, mdr; +Cc: Hemant Agrawal

This patch moves the internal symbols to INTERNAL sections
so that any change in them is not reported as ABI breakage.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 devtools/libabigail.abignore                      |  3 +++
 drivers/common/dpaax/dpaa_of.h                    | 15 +++++++++++++++
 drivers/common/dpaax/dpaax_iova_table.h           |  4 ++++
 drivers/common/dpaax/rte_common_dpaax_version.map |  2 +-
 4 files changed, 23 insertions(+), 1 deletion(-)

diff --git a/devtools/libabigail.abignore b/devtools/libabigail.abignore
index c9ee73cb3c..b1488d5549 100644
--- a/devtools/libabigail.abignore
+++ b/devtools/libabigail.abignore
@@ -48,3 +48,6 @@
         changed_enumerators = RTE_CRYPTO_AEAD_LIST_END
 [suppress_variable]
         name = rte_crypto_aead_algorithm_strings
+; Ignore moving DPAAx stable functions to INTERNAL tag
+[suppress_file]
+	file_name_regexp = ^librte_common_dpaax\.
diff --git a/drivers/common/dpaax/dpaa_of.h b/drivers/common/dpaax/dpaa_of.h
index 960b421766..38d91a1afe 100644
--- a/drivers/common/dpaax/dpaa_of.h
+++ b/drivers/common/dpaax/dpaa_of.h
@@ -24,6 +24,7 @@
 #include <limits.h>
 #include <rte_common.h>
 #include <dpaa_list.h>
+#include <rte_compat.h>
 
 #ifndef OF_INIT_DEFAULT_PATH
 #define OF_INIT_DEFAULT_PATH "/proc/device-tree"
@@ -102,6 +103,7 @@ struct dt_file {
 	uint64_t buf[OF_FILE_BUF_MAX >> 3];
 };
 
+__rte_internal
 const struct device_node *of_find_compatible_node(
 					const struct device_node *from,
 					const char *type __rte_unused,
@@ -113,32 +115,44 @@ const struct device_node *of_find_compatible_node(
 		dev_node != NULL; \
 		dev_node = of_find_compatible_node(dev_node, type, compatible))
 
+__rte_internal
 const void *of_get_property(const struct device_node *from, const char *name,
 			    size_t *lenp) __attribute__((nonnull(2)));
+__rte_internal
 bool of_device_is_available(const struct device_node *dev_node);
 
+
+__rte_internal
 const struct device_node *of_find_node_by_phandle(uint64_t ph);
 
+__rte_internal
 const struct device_node *of_get_parent(const struct device_node *dev_node);
 
+__rte_internal
 const struct device_node *of_get_next_child(const struct device_node *dev_node,
 					    const struct device_node *prev);
 
+__rte_internal
 const void *of_get_mac_address(const struct device_node *np);
 
 #define for_each_child_node(parent, child) \
 	for (child = of_get_next_child(parent, NULL); child != NULL; \
 			child = of_get_next_child(parent, child))
 
+
+__rte_internal
 uint32_t of_n_addr_cells(const struct device_node *dev_node);
 uint32_t of_n_size_cells(const struct device_node *dev_node);
 
+__rte_internal
 const uint32_t *of_get_address(const struct device_node *dev_node, size_t idx,
 			       uint64_t *size, uint32_t *flags);
 
+__rte_internal
 uint64_t of_translate_address(const struct device_node *dev_node,
 			      const uint32_t *addr) __attribute__((nonnull));
 
+__rte_internal
 bool of_device_is_compatible(const struct device_node *dev_node,
 			     const char *compatible);
 
@@ -146,6 +160,7 @@ bool of_device_is_compatible(const struct device_node *dev_node,
  * subsystem that is device-tree-dependent. Eg. Qman/Bman, config layers, etc.
  * The path should usually be "/proc/device-tree".
  */
+__rte_internal
 int of_init_path(const char *dt_path);
 
 /* of_finish() allows a controlled tear-down of the device-tree layer, eg. if a
diff --git a/drivers/common/dpaax/dpaax_iova_table.h b/drivers/common/dpaax/dpaax_iova_table.h
index fc3b9e7a8f..230fba8ba0 100644
--- a/drivers/common/dpaax/dpaax_iova_table.h
+++ b/drivers/common/dpaax/dpaax_iova_table.h
@@ -61,9 +61,13 @@ extern struct dpaax_iova_table *dpaax_iova_table_p;
 #define DPAAX_MEM_SPLIT_MASK_OFF (DPAAX_MEM_SPLIT - 1) /**< Offset */
 
 /* APIs exposed */
+__rte_internal
 int dpaax_iova_table_populate(void);
+__rte_internal
 void dpaax_iova_table_depopulate(void);
+__rte_internal
 int dpaax_iova_table_update(phys_addr_t paddr, void *vaddr, size_t length);
+__rte_internal
 void dpaax_iova_table_dump(void);
 
 static inline void *dpaax_iova_table_get_va(phys_addr_t paddr) __rte_hot;
diff --git a/drivers/common/dpaax/rte_common_dpaax_version.map b/drivers/common/dpaax/rte_common_dpaax_version.map
index f72eba761d..ad2b2b3fec 100644
--- a/drivers/common/dpaax/rte_common_dpaax_version.map
+++ b/drivers/common/dpaax/rte_common_dpaax_version.map
@@ -1,4 +1,4 @@
-DPDK_20.0 {
+INTERNAL {
 	global:
 
 	dpaax_iova_table_depopulate;
-- 
2.17.1


^ permalink raw reply	[relevance 3%]

* Re: [dpdk-dev] [dpdk-stable] [PATCH v2] mbuf: replace zero-length marker with unnamed union
  @ 2020-05-14 13:24  0%                         ` Kevin Traynor
  0 siblings, 0 replies; 200+ results
From: Kevin Traynor @ 2020-05-14 13:24 UTC (permalink / raw)
  To: David Marchand, Gavin Hu
  Cc: Bruce Richardson, Morten Brørup, Ferruh Yigit, dev, nd,
	thomas, jerinj, Honnappa Nagarahalli, Ruifeng Wang, Phil Yang,
	Joyce Kong, stable, Olivier MATZ, Konstantin Ananyev,
	Andrew Rybchenko

On 08/04/2020 16:22, David Marchand wrote:
> On Wed, Apr 8, 2020 at 5:05 PM Gavin Hu <Gavin.Hu@arm.com> wrote:
>>> -----Original Message-----
>>> From: Kevin Traynor <ktraynor@redhat.com>
>>> Hi Gavin, I lost track if v2 is still a candidate for merge. fwiw, it
>>> compiles without giving the zero-length-bounds warning on my system.
>>>
>>> Kevin.
>>
>> Yes,  this path alone is a candidate for merge.
> 
> This patch is not mergeable, it would trigger failures in the ABI checks.
> 

Sent
http://inbox.dpdk.org/dev/20200514131857.11966-1-ktraynor@redhat.com as
this patch was not reworked/merged.

Kevin.

> You can see in patchwork that the robot reported a warning in Travis.
> http://mails.dpdk.org/archives/test-report/2020-March/119919.html
> https://travis-ci.com/github/ovsrobot/dpdk/jobs/295652710#L4476
> 
> 
> I opened a bz to libabigail.
> https://sourceware.org/bugzilla/show_bug.cgi?id=25661
> 
> 
> Either a different solution is found, or your patch will have to deal
> with this issue (libabigail fix won't be ready soon afaik) and waive
> this.
> 
> 


^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [dpdk-stable] [PATCH v2] meter: provide experimental alias of API for old apps
  2020-05-14  8:44  4%     ` Ray Kinsella
@ 2020-05-14 11:53  0%       ` Ferruh Yigit
  0 siblings, 0 replies; 200+ results
From: Ferruh Yigit @ 2020-05-14 11:53 UTC (permalink / raw)
  To: Ray Kinsella, Neil Horman, Cristian Dumitrescu, Eelco Chaudron
  Cc: dev, Thomas Monjalon, David Marchand, stable, Luca Boccassi,
	Bruce Richardson, Ian Stokes, Andrzej Ostruszka

On 5/14/2020 9:44 AM, Ray Kinsella wrote:
> 
> 
> On 13/05/2020 19:05, Ferruh Yigit wrote:
>> On v20.02 some meter APIs have been matured and symbols moved from
>> EXPERIMENTAL to DPDK_20.0.1 block.
>>
>> This can break the applications that were using these mentioned APIs on
>> v19.11. Although there is no modification on the APIs and the action is
>> positive and matures the APIs, the affect can be negative to
>> applications.
>>
>> Since experimental APIs can change or go away without notice as part of
>> contract, to prevent this negative affect that may occur by maturing
>> experimental API, a process update already suggested, which enables
>> aliasing without forcing it:
>> https://patches.dpdk.org/patch/65863/
>>
>> This patch provides aliasing by duplicating the existing and versioned
>> symbols as experimental.
>>
>> Since symbols moved from DPDK_20.0.1 to DPDK_21 block in the v20.05, the
>> aliasing done between EXPERIMENTAL and DPDK_21.
>>
>> Also following changes done to enabling aliasing:
>>
>> Created VERSION_SYMBOL_EXPERIMENTAL helper macro.
>>
>> Updated the 'check-experimental-syms.sh' buildtool, which was
>> complaining that the symbol is in EXPERIMENTAL tag in .map file but it
>> is not in the .experimental section (__rte_experimental tag is missing).
>> Updated tool in a way it won't complain if the symbol in the
>> EXPERIMENTAL tag duplicated in some other block in .map file (versioned)
>>
>> Enabled function versioning for meson build for the library.
>>
>> Fixes: 30512af820fe ("meter: remove experimental flag from RFC4115 trTCM API")
>> Cc: stable@dpdk.org
>>
>> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>

<...>

>> @@ -46,6 +46,9 @@
>>   */
>>  #define VERSION_SYMBOL(b, e, n) __asm__(".symver " RTE_STR(b) RTE_STR(e) ", " RTE_STR(b) "@DPDK_" RTE_STR(n))
> 
> Please add
> 
> /*
>  * VERSION_SYMBOL_EXPERIMENTAL
>  * Creates a symbol version table entry binding the symbol <b>@EXPERIMENTAL to the internal
>  * function name <b><e>. The macro is used when a symbol matures to become part of the stable ABI,
>  * to provide an alias to experimental for some time.
>  */

done

^ permalink raw reply	[relevance 0%]

* [dpdk-dev] [PATCH v3] meter: provide experimental alias of API for old apps
    2020-05-13 16:30  4%   ` Thomas Monjalon
  @ 2020-05-14 11:52  4%   ` Ferruh Yigit
  2 siblings, 0 replies; 200+ results
From: Ferruh Yigit @ 2020-05-14 11:52 UTC (permalink / raw)
  To: Ray Kinsella, Neil Horman, Cristian Dumitrescu, Eelco Chaudron
  Cc: dev, Ferruh Yigit, Thomas Monjalon, David Marchand, stable,
	Luca Boccassi, Bruce Richardson, Ian Stokes, Andrzej Ostruszka

On v20.02 some meter APIs have been matured and symbols moved from
EXPERIMENTAL to DPDK_20.0.1 block.

This can break the applications that were using these mentioned APIs on
v19.11. Although there is no modification on the APIs and the action is
positive and matures the APIs, the affect can be negative to
applications.

Since experimental APIs can change or go away without notice as part of
contract, to prevent this negative affect that may occur by maturing
experimental API, a process update already suggested, which enables
aliasing without forcing it:
https://patches.dpdk.org/patch/65863/

This patch provides aliasing by duplicating the existing and versioned
symbols as experimental.

Since symbols moved from DPDK_20.0.1 to DPDK_21 block in the v20.05, the
aliasing done between EXPERIMENTAL and DPDK_21.

Also following changes done to enabling aliasing:

Created VERSION_SYMBOL_EXPERIMENTAL helper macro.

Updated the 'check-experimental-syms.sh' buildtool, which was
complaining that the symbol is in EXPERIMENTAL tag in .map file but it
is not in the .experimental section (__rte_experimental tag is missing).
Updated tool in a way it won't complain if the symbol in the
EXPERIMENTAL tag duplicated in some other block in .map file (versioned)

Enabled function versioning for meson build for the library.

Fixes: 30512af820fe ("meter: remove experimental flag from RFC4115 trTCM API")
Cc: stable@dpdk.org

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
Cc: Neil Horman <nhorman@tuxdriver.com>
Cc: Thomas Monjalon <thomas@monjalon.net>
Cc: Luca Boccassi <bluca@debian.org>
Cc: David Marchand <david.marchand@redhat.com>
Cc: Bruce Richardson <bruce.richardson@intel.com>
Cc: Ian Stokes <ian.stokes@intel.com>
Cc: Eelco Chaudron <echaudro@redhat.com>
Cc: Andrzej Ostruszka <amo@semihalf.com>
Cc: Ray Kinsella <mdr@ashroe.eu>

v2:
* Commit log updated

v3:
* added suggested comment to VERSION_SYMBOL_EXPERIMENTAL macro
---
 buildtools/check-symbols.sh                   |  3 +-
 .../include/rte_function_versioning.h         | 10 ++++
 lib/librte_meter/meson.build                  |  1 +
 lib/librte_meter/rte_meter.c                  | 59 ++++++++++++++++++-
 lib/librte_meter/rte_meter_version.map        |  8 +++
 5 files changed, 77 insertions(+), 4 deletions(-)

diff --git a/buildtools/check-symbols.sh b/buildtools/check-symbols.sh
index 3df57c322c..e407553a34 100755
--- a/buildtools/check-symbols.sh
+++ b/buildtools/check-symbols.sh
@@ -26,7 +26,8 @@ ret=0
 for SYM in `$LIST_SYMBOL -S EXPERIMENTAL $MAPFILE |cut -d ' ' -f 3`
 do
 	if grep -q "\.text.*[[:space:]]$SYM$" $DUMPFILE &&
-		! grep -q "\.text\.experimental.*[[:space:]]$SYM$" $DUMPFILE
+		! grep -q "\.text\.experimental.*[[:space:]]$SYM$" $DUMPFILE &&
+		$LIST_SYMBOL -s $SYM $MAPFILE | grep -q EXPERIMENTAL
 	then
 		cat >&2 <<- END_OF_MESSAGE
 		$SYM is not flagged as experimental
diff --git a/lib/librte_eal/include/rte_function_versioning.h b/lib/librte_eal/include/rte_function_versioning.h
index b9f862d295..534a8bff95 100644
--- a/lib/librte_eal/include/rte_function_versioning.h
+++ b/lib/librte_eal/include/rte_function_versioning.h
@@ -46,6 +46,15 @@
  */
 #define VERSION_SYMBOL(b, e, n) __asm__(".symver " RTE_STR(b) RTE_STR(e) ", " RTE_STR(b) "@DPDK_" RTE_STR(n))
 
+
+/*
+ * VERSION_SYMBOL_EXPERIMENTAL
+ * Creates a symbol version table entry binding the symbol <b>@EXPERIMENTAL to the internal
+ * function name <b><e>. The macro is used when a symbol matures to become part of the stable ABI,
+ * to provide an alias to experimental for some time.
+ */
+#define VERSION_SYMBOL_EXPERIMENTAL(b, e) __asm__(".symver " RTE_STR(b) RTE_STR(e) ", " RTE_STR(b) "@EXPERIMENTAL")
+
 /*
  * BIND_DEFAULT_SYMBOL
  * Creates a symbol version entry instructing the linker to bind references to
@@ -79,6 +88,7 @@
  * No symbol versioning in use
  */
 #define VERSION_SYMBOL(b, e, n)
+#define VERSION_SYMBOL_EXPERIMENTAL(b, e)
 #define __vsym
 #define BIND_DEFAULT_SYMBOL(b, e, n)
 #define MAP_STATIC_SYMBOL(f, p) f __attribute__((alias(RTE_STR(p))))
diff --git a/lib/librte_meter/meson.build b/lib/librte_meter/meson.build
index 646fd4d43f..fce0368437 100644
--- a/lib/librte_meter/meson.build
+++ b/lib/librte_meter/meson.build
@@ -3,3 +3,4 @@
 
 sources = files('rte_meter.c')
 headers = files('rte_meter.h')
+use_function_versioning = true
diff --git a/lib/librte_meter/rte_meter.c b/lib/librte_meter/rte_meter.c
index da01429a8b..c600b05064 100644
--- a/lib/librte_meter/rte_meter.c
+++ b/lib/librte_meter/rte_meter.c
@@ -9,6 +9,7 @@
 #include <rte_common.h>
 #include <rte_log.h>
 #include <rte_cycles.h>
+#include <rte_function_versioning.h>
 
 #include "rte_meter.h"
 
@@ -119,8 +120,8 @@ rte_meter_trtcm_config(struct rte_meter_trtcm *m,
 	return 0;
 }
 
-int
-rte_meter_trtcm_rfc4115_profile_config(
+static int
+rte_meter_trtcm_rfc4115_profile_config_(
 	struct rte_meter_trtcm_rfc4115_profile *p,
 	struct rte_meter_trtcm_rfc4115_params *params)
 {
@@ -145,7 +146,35 @@ rte_meter_trtcm_rfc4115_profile_config(
 }
 
 int
-rte_meter_trtcm_rfc4115_config(
+rte_meter_trtcm_rfc4115_profile_config_s(
+	struct rte_meter_trtcm_rfc4115_profile *p,
+	struct rte_meter_trtcm_rfc4115_params *params);
+int
+rte_meter_trtcm_rfc4115_profile_config_s(
+	struct rte_meter_trtcm_rfc4115_profile *p,
+	struct rte_meter_trtcm_rfc4115_params *params)
+{
+	return rte_meter_trtcm_rfc4115_profile_config_(p, params);
+}
+BIND_DEFAULT_SYMBOL(rte_meter_trtcm_rfc4115_profile_config, _s, 21);
+MAP_STATIC_SYMBOL(int rte_meter_trtcm_rfc4115_profile_config(struct rte_meter_trtcm_rfc4115_profile *p,
+		struct rte_meter_trtcm_rfc4115_params *params), rte_meter_trtcm_rfc4115_profile_config_s);
+
+int
+rte_meter_trtcm_rfc4115_profile_config_e(
+	struct rte_meter_trtcm_rfc4115_profile *p,
+	struct rte_meter_trtcm_rfc4115_params *params);
+int
+rte_meter_trtcm_rfc4115_profile_config_e(
+	struct rte_meter_trtcm_rfc4115_profile *p,
+	struct rte_meter_trtcm_rfc4115_params *params)
+{
+	return rte_meter_trtcm_rfc4115_profile_config_(p, params);
+}
+VERSION_SYMBOL_EXPERIMENTAL(rte_meter_trtcm_rfc4115_profile_config, _e);
+
+static int
+rte_meter_trtcm_rfc4115_config_(
 	struct rte_meter_trtcm_rfc4115 *m,
 	struct rte_meter_trtcm_rfc4115_profile *p)
 {
@@ -160,3 +189,27 @@ rte_meter_trtcm_rfc4115_config(
 
 	return 0;
 }
+
+int
+rte_meter_trtcm_rfc4115_config_s(struct rte_meter_trtcm_rfc4115 *m,
+	struct rte_meter_trtcm_rfc4115_profile *p);
+int
+rte_meter_trtcm_rfc4115_config_s(struct rte_meter_trtcm_rfc4115 *m,
+	struct rte_meter_trtcm_rfc4115_profile *p)
+{
+	return rte_meter_trtcm_rfc4115_config_(m, p);
+}
+BIND_DEFAULT_SYMBOL(rte_meter_trtcm_rfc4115_config, _s, 21);
+MAP_STATIC_SYMBOL(int rte_meter_trtcm_rfc4115_config(struct rte_meter_trtcm_rfc4115 *m,
+		 struct rte_meter_trtcm_rfc4115_profile *p), rte_meter_trtcm_rfc4115_config_s);
+
+int
+rte_meter_trtcm_rfc4115_config_e(struct rte_meter_trtcm_rfc4115 *m,
+	struct rte_meter_trtcm_rfc4115_profile *p);
+int
+rte_meter_trtcm_rfc4115_config_e(struct rte_meter_trtcm_rfc4115 *m,
+	struct rte_meter_trtcm_rfc4115_profile *p)
+{
+	return rte_meter_trtcm_rfc4115_config_(m, p);
+}
+VERSION_SYMBOL_EXPERIMENTAL(rte_meter_trtcm_rfc4115_config, _e);
diff --git a/lib/librte_meter/rte_meter_version.map b/lib/librte_meter/rte_meter_version.map
index 2c7dadbcac..b493bcebe9 100644
--- a/lib/librte_meter/rte_meter_version.map
+++ b/lib/librte_meter/rte_meter_version.map
@@ -20,4 +20,12 @@ DPDK_21 {
 	rte_meter_trtcm_rfc4115_color_blind_check;
 	rte_meter_trtcm_rfc4115_config;
 	rte_meter_trtcm_rfc4115_profile_config;
+
 } DPDK_20.0;
+
+EXPERIMENTAL {
+       global:
+
+	rte_meter_trtcm_rfc4115_config;
+	rte_meter_trtcm_rfc4115_profile_config;
+};
-- 
2.25.4


^ permalink raw reply	[relevance 4%]

* [dpdk-dev] DPDK Release Status Meeting 14/05/2020
@ 2020-05-14 11:13  4% Ferruh Yigit
  0 siblings, 0 replies; 200+ results
From: Ferruh Yigit @ 2020-05-14 11:13 UTC (permalink / raw)
  To: dpdk-dev; +Cc: Thomas Monjalon

Minutes 14 May 2020
-------------------

Agenda:
* Release Dates
* -rc2 status
* Subtrees
* Opens

Participants:
* Arm
* Debian/Microsoft
* Intel
* Mellanox
* Red Hat


Release Dates
-------------

* v20.05 dates:
  * -rc2  is released on Tuesday, 12 May
    * https://mails.dpdk.org/archives/dev/2020-May/167394.html
  * -rc3			Friday 18 May 2020
  * -rc4			Thursday 21 May 2020
  * Release pushed to		*Monday 25 May 2020*

* v20.08 proposal dates, please comment:
  * Proposal/V1:		Tuesday, 16 June 2020
  * Integration/Merge/RC1:	Tuesday, 14 July 2020
  * Release:			Friday, 7 August 2020

  * Please send roadmap for the release


-rc2 status
-----------

* Intel sent a -rc2 test report, majority of testing completed, no critical
  issue
  * https://mails.dpdk.org/archives/dev/2020-May/167715.html


Subtrees
--------

* main
  * Looking patchsets adding __rte_internal to common folder
    * This is good to prevent false positives in ABI and document intention
  * ABI fix for matured API not merged, discussion going on in the mail list
    * OvS is using it but not critical for OvS
    * Blocking some test cases
  * There are couple of coverity fixes
  * Some documentation
    * Good time for deprecation notices
  * Thomas is looking compilation patches and Makefile deprecation
  * gcc10
    * Akhil's fix for crypto looks good, can replace temporary solution
    * Gavin has patch for mbuf, but this stage can be late/risky for complex fix
      * At this stage we can go with disabling warning as temporary solution
    * Ferruh is getting a warning on hash too, will share it
  * We should consider python2 deprecation
    * A deprecation notice already merged
      * https://patches.dpdk.org/patch/65828/

* next-net
  * Some patches merged and sub-trees pulled for -rc3
  * HW rings allocation patch is in backlog, ethdev patch is internal and can go
    in -rc3 but there a few things to clarify, not sure if it will make -rc3

* next-crypto
  * No update

* next-eventdev
  * No update

* next-virtio
  * 4 fixes in the queue, pull request can be ready today
  * Mellanox vdpa patchset postponed, it introduces new APIs
  * More reviews would help
  * Maxime will have less time next month,  will sync with Xiaolong

* next-net-intel
  * 10 fixes in backlog
  * fm10k patchset postponed to next release

* next-net-mlx
  * 10-15 fixes are expected


Opens
-----

* Bugzilla is not discussed for a while
  * After issues assigned, there is not much to do for management
  * It can be good to get list of critical issues offline

* Patchwork hit 70K patches, Hemant/Nipun is the winner :)
  * https://mails.dpdk.org/archives/dev/2020-May/167125.html



DPDK Release Status Meetings
============================

The DPDK Release Status Meeting is intended for DPDK Committers to discuss
the status of the master tree and sub-trees, and for project managers to
track progress or milestone dates.

The meeting occurs on Thursdays at 8:30 UTC. If you wish to attend just
send an email to "John McNamara <john.mcnamara@intel.com>" for the invite.

^ permalink raw reply	[relevance 4%]

* Re: [dpdk-dev] [PATCH v3 01/12] common/dpaax: move internal symbols into INTERNAL section
  2020-05-14  7:13  3%         ` Ray Kinsella
@ 2020-05-14  9:53  0%           ` Hemant Agrawal (OSS)
  0 siblings, 0 replies; 200+ results
From: Hemant Agrawal (OSS) @ 2020-05-14  9:53 UTC (permalink / raw)
  To: Ray Kinsella, Hemant Agrawal (OSS); +Cc: dev

> Hi Hemant,
> 
> So validate_abi.sh has been somewhat deprecated - it may be removed in
> future.
> To run the libabigail abi checks, you need to run the magic command.
> 
> DPDK_ABI_REF_DIR=/build/dpdk/reference/ DPDK_ABI_REF_VERSION=v20.02
> ./devtools/test-meson-builds.sh
> 
> DPDK_ABI_REF_DIR - needs an absolute path, for reasons that are still unclear
> to me.
> DPDK_ABI_REF_VERSION - you need to use the last DPDK release.

[Hemant] Thanks it worked  for me. It is not showing any error for the changes in this patchset.

Regards,
Hemant

> 
> Thanks,
> 
> Ray K
> 
> On 13/05/2020 15:06, Hemant Agrawal (OSS) wrote:
> > Hi Ray,
> > 	I could not find validate_abi using libabigail.abignore.  Am I missing
> something.
> > Though check_abi.sh uses it.
> >
> > When I am checking with validate_abi.sh, I still see warnings.
> >
> > Regards,
> > Hemant
> >
> >> -----Original Message-----
> >> From: Hemant Agrawal <hemant.agrawal@nxp.com>
> >> Sent: Wednesday, May 13, 2020 6:58 PM
> >> To: dev@dpdk.org; david.marchand@redhat.com; mdr@ashroe.eu
> >> Cc: Hemant Agrawal <hemant.agrawal@nxp.com>
> >> Subject: [PATCH v3 01/12] common/dpaax: move internal symbols into
> >> INTERNAL section
> >>
> >> This patch moves the internal symbols to INTERNAL sections so that
> >> any change in them is not reported as ABI breakage.
> >>
> >> Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
> >> ---
> >>  devtools/libabigail.abignore                      |  3 +++
> >>  drivers/common/dpaax/dpaa_of.h                    | 15 +++++++++++++++
> >>  drivers/common/dpaax/dpaax_iova_table.h           |  4 ++++
> >>  drivers/common/dpaax/rte_common_dpaax_version.map |  2 +-
> >>  4 files changed, 23 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/devtools/libabigail.abignore
> >> b/devtools/libabigail.abignore index
> >> c9ee73cb3c..b1488d5549 100644
> >> --- a/devtools/libabigail.abignore
> >> +++ b/devtools/libabigail.abignore
> >> @@ -48,3 +48,6 @@
> >>          changed_enumerators = RTE_CRYPTO_AEAD_LIST_END
> >> [suppress_variable]
> >>          name = rte_crypto_aead_algorithm_strings
> >> +; Ignore moving DPAAx stable functions to INTERNAL tag [suppress_file]
> >> +	file_name_regexp = ^librte_common_dpaax\.
> >> diff --git a/drivers/common/dpaax/dpaa_of.h
> >> b/drivers/common/dpaax/dpaa_of.h index 960b421766..38d91a1afe
> 100644
> >> --- a/drivers/common/dpaax/dpaa_of.h
> >> +++ b/drivers/common/dpaax/dpaa_of.h
> >> @@ -24,6 +24,7 @@
> >>  #include <limits.h>
> >>  #include <rte_common.h>
> >>  #include <dpaa_list.h>
> >> +#include <rte_compat.h>
> >>
> >>  #ifndef OF_INIT_DEFAULT_PATH
> >>  #define OF_INIT_DEFAULT_PATH "/proc/device-tree"
> >> @@ -102,6 +103,7 @@ struct dt_file {
> >>  	uint64_t buf[OF_FILE_BUF_MAX >> 3];  };
> >>
> >> +__rte_internal
> >>  const struct device_node *of_find_compatible_node(
> >>  					const struct device_node *from,
> >>  					const char *type __rte_unused,
> >> @@ -113,32 +115,44 @@ const struct device_node
> >> *of_find_compatible_node(
> >>  		dev_node != NULL; \
> >>  		dev_node = of_find_compatible_node(dev_node, type,
> >> compatible))
> >>
> >> +__rte_internal
> >>  const void *of_get_property(const struct device_node *from, const
> >> char *name,
> >>  			    size_t *lenp) __attribute__((nonnull(2)));
> >> +__rte_internal
> >>  bool of_device_is_available(const struct device_node *dev_node);
> >>
> >> +
> >> +__rte_internal
> >>  const struct device_node *of_find_node_by_phandle(uint64_t ph);
> >>
> >> +__rte_internal
> >>  const struct device_node *of_get_parent(const struct device_node
> >> *dev_node);
> >>
> >> +__rte_internal
> >>  const struct device_node *of_get_next_child(const struct device_node
> >> *dev_node,
> >>  					    const struct device_node *prev);
> >>
> >> +__rte_internal
> >>  const void *of_get_mac_address(const struct device_node *np);
> >>
> >>  #define for_each_child_node(parent, child) \
> >>  	for (child = of_get_next_child(parent, NULL); child != NULL; \
> >>  			child = of_get_next_child(parent, child))
> >>
> >> +
> >> +__rte_internal
> >>  uint32_t of_n_addr_cells(const struct device_node *dev_node);
> >> uint32_t of_n_size_cells(const struct device_node *dev_node);
> >>
> >> +__rte_internal
> >>  const uint32_t *of_get_address(const struct device_node *dev_node,
> >> size_t idx,
> >>  			       uint64_t *size, uint32_t *flags);
> >>
> >> +__rte_internal
> >>  uint64_t of_translate_address(const struct device_node *dev_node,
> >>  			      const uint32_t *addr) __attribute__((nonnull));
> >>
> >> +__rte_internal
> >>  bool of_device_is_compatible(const struct device_node *dev_node,
> >>  			     const char *compatible);
> >>
> >> @@ -146,6 +160,7 @@ bool of_device_is_compatible(const struct
> >> device_node *dev_node,
> >>   * subsystem that is device-tree-dependent. Eg. Qman/Bman, config
> >> layers, etc.
> >>   * The path should usually be "/proc/device-tree".
> >>   */
> >> +__rte_internal
> >>  int of_init_path(const char *dt_path);
> >>
> >>  /* of_finish() allows a controlled tear-down of the device-tree
> >> layer, eg. if a diff --git a/drivers/common/dpaax/dpaax_iova_table.h
> >> b/drivers/common/dpaax/dpaax_iova_table.h
> >> index fc3b9e7a8f..230fba8ba0 100644
> >> --- a/drivers/common/dpaax/dpaax_iova_table.h
> >> +++ b/drivers/common/dpaax/dpaax_iova_table.h
> >> @@ -61,9 +61,13 @@ extern struct dpaax_iova_table
> >> *dpaax_iova_table_p; #define DPAAX_MEM_SPLIT_MASK_OFF
> >> (DPAAX_MEM_SPLIT - 1) /**< Offset */
> >>
> >>  /* APIs exposed */
> >> +__rte_internal
> >>  int dpaax_iova_table_populate(void);
> >> +__rte_internal
> >>  void dpaax_iova_table_depopulate(void);
> >> +__rte_internal
> >>  int dpaax_iova_table_update(phys_addr_t paddr, void *vaddr, size_t
> >> length);
> >> +__rte_internal
> >>  void dpaax_iova_table_dump(void);
> >>
> >>  static inline void *dpaax_iova_table_get_va(phys_addr_t paddr)
> >> __rte_hot; diff --git
> >> a/drivers/common/dpaax/rte_common_dpaax_version.map
> >> b/drivers/common/dpaax/rte_common_dpaax_version.map
> >> index f72eba761d..ad2b2b3fec 100644
> >> --- a/drivers/common/dpaax/rte_common_dpaax_version.map
> >> +++ b/drivers/common/dpaax/rte_common_dpaax_version.map
> >> @@ -1,4 +1,4 @@
> >> -DPDK_20.0 {
> >> +INTERNAL {
> >>  	global:
> >>
> >>  	dpaax_iova_table_depopulate;
> >> --
> >> 2.17.1
> >

^ permalink raw reply	[relevance 0%]

* [dpdk-dev] DPDK-20.05 RC2 day3 quick report
@ 2020-05-14  9:00  3% Peng, Yuan
  0 siblings, 0 replies; 200+ results
From: Peng, Yuan @ 2020-05-14  9:00 UTC (permalink / raw)
  To: dev

DPDK-20.05 RC2 day3 quick report

  *   Totally create ~400+ new test cases for DPDK20.05 new features.
  *   Totally 10207 cases, execution percentage is about 97%, pass rate is about 92%, 2 new issues are found till now, no critical issue new found.
  *   Checked daily build, all pass.
  *   Checked Basic NIC PMD(i40e, ixgbe, ice) PF & VF regression, new found 1 PF issue.
  *   Checked virtio regression test, 1 bug is found.
  *   Checked cryptodev and compressdev regression, no new issus found so far.
  *   Checked NIC performance, no new issue found so far.
  *   Checked ABI test, no new issue found so far.
  *   Checked 20.05 new features: no new issue found so far.

Thank you.
Yuan.


^ permalink raw reply	[relevance 3%]

* Re: [dpdk-dev] [PATCH v2] meter: provide experimental alias of API for old apps
  @ 2020-05-14  8:44  4%     ` Ray Kinsella
  2020-05-14 11:53  0%       ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
  0 siblings, 1 reply; 200+ results
From: Ray Kinsella @ 2020-05-14  8:44 UTC (permalink / raw)
  To: Ferruh Yigit, Neil Horman, Cristian Dumitrescu, Eelco Chaudron
  Cc: dev, Thomas Monjalon, David Marchand, stable, Luca Boccassi,
	Bruce Richardson, Ian Stokes, Andrzej Ostruszka



On 13/05/2020 19:05, Ferruh Yigit wrote:
> On v20.02 some meter APIs have been matured and symbols moved from
> EXPERIMENTAL to DPDK_20.0.1 block.
> 
> This can break the applications that were using these mentioned APIs on
> v19.11. Although there is no modification on the APIs and the action is
> positive and matures the APIs, the affect can be negative to
> applications.
> 
> Since experimental APIs can change or go away without notice as part of
> contract, to prevent this negative affect that may occur by maturing
> experimental API, a process update already suggested, which enables
> aliasing without forcing it:
> https://patches.dpdk.org/patch/65863/
> 
> This patch provides aliasing by duplicating the existing and versioned
> symbols as experimental.
> 
> Since symbols moved from DPDK_20.0.1 to DPDK_21 block in the v20.05, the
> aliasing done between EXPERIMENTAL and DPDK_21.
> 
> Also following changes done to enabling aliasing:
> 
> Created VERSION_SYMBOL_EXPERIMENTAL helper macro.
> 
> Updated the 'check-experimental-syms.sh' buildtool, which was
> complaining that the symbol is in EXPERIMENTAL tag in .map file but it
> is not in the .experimental section (__rte_experimental tag is missing).
> Updated tool in a way it won't complain if the symbol in the
> EXPERIMENTAL tag duplicated in some other block in .map file (versioned)
> 
> Enabled function versioning for meson build for the library.
> 
> Fixes: 30512af820fe ("meter: remove experimental flag from RFC4115 trTCM API")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> ---
> Cc: Neil Horman <nhorman@tuxdriver.com>
> Cc: Thomas Monjalon <thomas@monjalon.net>
> Cc: Luca Boccassi <bluca@debian.org>
> Cc: David Marchand <david.marchand@redhat.com>
> Cc: Bruce Richardson <bruce.richardson@intel.com>
> Cc: Ian Stokes <ian.stokes@intel.com>
> Cc: Eelco Chaudron <echaudro@redhat.com>
> Cc: Andrzej Ostruszka <amo@semihalf.com>
> Cc: Ray Kinsella <mdr@ashroe.eu>
> 
> v2:
> * Commit log updated
> ---
>  buildtools/check-symbols.sh                   |  3 +-
>  .../include/rte_function_versioning.h         |  4 ++
>  lib/librte_meter/meson.build                  |  1 +
>  lib/librte_meter/rte_meter.c                  | 59 ++++++++++++++++++-
>  lib/librte_meter/rte_meter_version.map        |  8 +++
>  5 files changed, 71 insertions(+), 4 deletions(-)
> 
> diff --git a/buildtools/check-symbols.sh b/buildtools/check-symbols.sh
> index 3df57c322c..e407553a34 100755
> --- a/buildtools/check-symbols.sh
> +++ b/buildtools/check-symbols.sh
> @@ -26,7 +26,8 @@ ret=0
>  for SYM in `$LIST_SYMBOL -S EXPERIMENTAL $MAPFILE |cut -d ' ' -f 3`
>  do
>  	if grep -q "\.text.*[[:space:]]$SYM$" $DUMPFILE &&
> -		! grep -q "\.text\.experimental.*[[:space:]]$SYM$" $DUMPFILE
> +		! grep -q "\.text\.experimental.*[[:space:]]$SYM$" $DUMPFILE &&
> +		$LIST_SYMBOL -s $SYM $MAPFILE | grep -q EXPERIMENTAL
>  	then
>  		cat >&2 <<- END_OF_MESSAGE
>  		$SYM is not flagged as experimental
> diff --git a/lib/librte_eal/include/rte_function_versioning.h b/lib/librte_eal/include/rte_function_versioning.h
> index b9f862d295..22ec5f9424 100644
> --- a/lib/librte_eal/include/rte_function_versioning.h
> +++ b/lib/librte_eal/include/rte_function_versioning.h
> @@ -46,6 +46,9 @@
>   */
>  #define VERSION_SYMBOL(b, e, n) __asm__(".symver " RTE_STR(b) RTE_STR(e) ", " RTE_STR(b) "@DPDK_" RTE_STR(n))

Please add

/*
 * VERSION_SYMBOL_EXPERIMENTAL
 * Creates a symbol version table entry binding the symbol <b>@EXPERIMENTAL to the internal
 * function name <b><e>. The macro is used when a symbol matures to become part of the stable ABI,
 * to provide an alias to experimental for some time.
 */

I will take care of the updates to doc/guides/contributing/abi*.rst

> +
> +#define VERSION_SYMBOL_EXPERIMENTAL(b, e) __asm__(".symver " RTE_STR(b) RTE_STR(e) ", " RTE_STR(b) "@EXPERIMENTAL")
> +
>  /*
>   * BIND_DEFAULT_SYMBOL
>   * Creates a symbol version entry instructing the linker to bind references to
> @@ -79,6 +82,7 @@
>   * No symbol versioning in use
>   */
>  #define VERSION_SYMBOL(b, e, n)
> +#define VERSION_SYMBOL_EXPERIMENTAL(b, e)
>  #define __vsym
>  #define BIND_DEFAULT_SYMBOL(b, e, n)
>  #define MAP_STATIC_SYMBOL(f, p) f __attribute__((alias(RTE_STR(p))))
> diff --git a/lib/librte_meter/meson.build b/lib/librte_meter/meson.build
> index 646fd4d43f..fce0368437 100644
> --- a/lib/librte_meter/meson.build
> +++ b/lib/librte_meter/meson.build
> @@ -3,3 +3,4 @@
>  
>  sources = files('rte_meter.c')
>  headers = files('rte_meter.h')
> +use_function_versioning = true
> diff --git a/lib/librte_meter/rte_meter.c b/lib/librte_meter/rte_meter.c
> index da01429a8b..c600b05064 100644
> --- a/lib/librte_meter/rte_meter.c
> +++ b/lib/librte_meter/rte_meter.c
> @@ -9,6 +9,7 @@
>  #include <rte_common.h>
>  #include <rte_log.h>
>  #include <rte_cycles.h>
> +#include <rte_function_versioning.h>
>  
>  #include "rte_meter.h"
>  
> @@ -119,8 +120,8 @@ rte_meter_trtcm_config(struct rte_meter_trtcm *m,
>  	return 0;
>  }
>  
> -int
> -rte_meter_trtcm_rfc4115_profile_config(
> +static int
> +rte_meter_trtcm_rfc4115_profile_config_(
>  	struct rte_meter_trtcm_rfc4115_profile *p,
>  	struct rte_meter_trtcm_rfc4115_params *params)
>  {
> @@ -145,7 +146,35 @@ rte_meter_trtcm_rfc4115_profile_config(
>  }
>  
>  int
> -rte_meter_trtcm_rfc4115_config(
> +rte_meter_trtcm_rfc4115_profile_config_s(
> +	struct rte_meter_trtcm_rfc4115_profile *p,
> +	struct rte_meter_trtcm_rfc4115_params *params);
> +int
> +rte_meter_trtcm_rfc4115_profile_config_s(
> +	struct rte_meter_trtcm_rfc4115_profile *p,
> +	struct rte_meter_trtcm_rfc4115_params *params)
> +{
> +	return rte_meter_trtcm_rfc4115_profile_config_(p, params);
> +}
> +BIND_DEFAULT_SYMBOL(rte_meter_trtcm_rfc4115_profile_config, _s, 21);
> +MAP_STATIC_SYMBOL(int rte_meter_trtcm_rfc4115_profile_config(struct rte_meter_trtcm_rfc4115_profile *p,
> +		struct rte_meter_trtcm_rfc4115_params *params), rte_meter_trtcm_rfc4115_profile_config_s);
> +
> +int
> +rte_meter_trtcm_rfc4115_profile_config_e(
> +	struct rte_meter_trtcm_rfc4115_profile *p,
> +	struct rte_meter_trtcm_rfc4115_params *params);
> +int
> +rte_meter_trtcm_rfc4115_profile_config_e(
> +	struct rte_meter_trtcm_rfc4115_profile *p,
> +	struct rte_meter_trtcm_rfc4115_params *params)
> +{
> +	return rte_meter_trtcm_rfc4115_profile_config_(p, params);
> +}
> +VERSION_SYMBOL_EXPERIMENTAL(rte_meter_trtcm_rfc4115_profile_config, _e);
> +
> +static int
> +rte_meter_trtcm_rfc4115_config_(
>  	struct rte_meter_trtcm_rfc4115 *m,
>  	struct rte_meter_trtcm_rfc4115_profile *p)
>  {
> @@ -160,3 +189,27 @@ rte_meter_trtcm_rfc4115_config(
>  
>  	return 0;
>  }
> +
> +int
> +rte_meter_trtcm_rfc4115_config_s(struct rte_meter_trtcm_rfc4115 *m,
> +	struct rte_meter_trtcm_rfc4115_profile *p);
> +int
> +rte_meter_trtcm_rfc4115_config_s(struct rte_meter_trtcm_rfc4115 *m,
> +	struct rte_meter_trtcm_rfc4115_profile *p)
> +{
> +	return rte_meter_trtcm_rfc4115_config_(m, p);
> +}
> +BIND_DEFAULT_SYMBOL(rte_meter_trtcm_rfc4115_config, _s, 21);
> +MAP_STATIC_SYMBOL(int rte_meter_trtcm_rfc4115_config(struct rte_meter_trtcm_rfc4115 *m,
> +		 struct rte_meter_trtcm_rfc4115_profile *p), rte_meter_trtcm_rfc4115_config_s);
> +
> +int
> +rte_meter_trtcm_rfc4115_config_e(struct rte_meter_trtcm_rfc4115 *m,
> +	struct rte_meter_trtcm_rfc4115_profile *p);
> +int
> +rte_meter_trtcm_rfc4115_config_e(struct rte_meter_trtcm_rfc4115 *m,
> +	struct rte_meter_trtcm_rfc4115_profile *p)
> +{
> +	return rte_meter_trtcm_rfc4115_config_(m, p);
> +}
> +VERSION_SYMBOL_EXPERIMENTAL(rte_meter_trtcm_rfc4115_config, _e);
> diff --git a/lib/librte_meter/rte_meter_version.map b/lib/librte_meter/rte_meter_version.map
> index 2c7dadbcac..b493bcebe9 100644
> --- a/lib/librte_meter/rte_meter_version.map
> +++ b/lib/librte_meter/rte_meter_version.map
> @@ -20,4 +20,12 @@ DPDK_21 {
>  	rte_meter_trtcm_rfc4115_color_blind_check;
>  	rte_meter_trtcm_rfc4115_config;
>  	rte_meter_trtcm_rfc4115_profile_config;
> +
>  } DPDK_20.0;
> +
> +EXPERIMENTAL {
> +       global:
> +
> +	rte_meter_trtcm_rfc4115_config;
> +	rte_meter_trtcm_rfc4115_profile_config;
> +};
> 

^ permalink raw reply	[relevance 4%]

* Re: [dpdk-dev] [PATCH v4 4/4] eal/atomic: add wrapper for c11 atomics
  2020-05-13 20:17  0%               ` Mattias Rönnblom
@ 2020-05-14  8:34  0%                 ` Morten Brørup
  0 siblings, 0 replies; 200+ results
From: Morten Brørup @ 2020-05-14  8:34 UTC (permalink / raw)
  To: Mattias Rönnblom, Honnappa Nagarahalli, Stephen Hemminger,
	Phil Yang
  Cc: thomas, dev, bruce.richardson, ferruh.yigit, hemant.agrawal,
	jerinj, ktraynor, konstantin.ananyev, maxime.coquelin,
	olivier.matz, harry.van.haaren, erik.g.carrillo, nd,
	David Christensen, david.marchand, Song Zhu, Gavin Hu,
	Jeff Brownlee, Philippe Robin, Pravin Kantak, Chen, Zhaoyan

+ Added people from the related discussion regarding the ARM roadmap [https://mails.dpdk.org/archives/dev/2020-April/162580.html].

> From: Mattias Rönnblom [mailto:mattias.ronnblom@ericsson.com]
> Sent: Wednesday, May 13, 2020 10:17 PM
> 
> On 2020-05-13 21:40, Honnappa Nagarahalli wrote:
> > <snip>
> >
> >>>> Subject: Re: [PATCH v4 4/4] eal/atomic: add wrapper for c11
> atomics
> >>>>
> >>>> On Tue, May 12, 2020 at 4:03 pm, Phil Yang
> <mailto:phil.yang@arm.com>
> >>>> wrote:
> >>>>
> >>>> parameter. Signed-off-by: Phil Yang <mailto:phil.yang@arm.com>
> >>>>
> >>>>
> >>>> What is the purpose of having rte_atomic at all?
> >>>> Is this level of indirection really helping?
> >>>> [HONNAPPA] (not sure why this email has html format, converted to
> >>>> text
> >>>> format)
> >>>> I believe you meant, why not use the __atomic_xxx built-ins
> directly?
> >>>> The only reason for now is handling of
> >>>> __atomic_thread_fence(__ATOMIC_SEQ_CST) for x86. This is
> equivalent
> >>>> to rte_smp_mb which has an optimized implementation for x86.
> >>>> According to Konstantin, the compiler does not generate optimal
> code.
> >>>> Wrapping that built-in alone is going to be confusing.
> >>>>
> >>>> The wrappers also allow us to have our own implementation using
> >>>> inline assembly for compilers versions that do not support C11
> atomic
> >>>> built- ins. But, I do not know if there is a need to support those
> versions.
> >>> If I recall correctly, someone mentioned that one (or more) of the
> aging
> >> enterprise Linux distributions don't include a compiler with C11
> atomics.
> >>> I think Stephen is onto something here...
> >>>
> >>> It is silly to add wrappers like this, if the only purpose is to
> support
> >> compilers and distributions that don't properly support an official
> C standard
> >> which is nearly a decade old. The quality and quantity of the DPDK
> >> documentation for these functions (including examples, discussions
> on Stack
> >> Overflow, etc.) will be inferior to the documentation of the
> standard C11
> >> atomics, which increases the probability of incorrect use.
> >>
> >>
> >> What's being used in DPDK today, and what's being wrapped here, is
> not
> >> standard C11 atomics - it's a bunch of GCC built-ins. Nothing in the
> __
> >> namespace is in the standard. It's reserved for the implementation
> (e.g.
> >> compiler).
> > I have tried to understand what it mean by 'built-ins', but I have
> not got a good answer. So, does it mean that the built-in function
> (same symbol and API interface) may not be available in another C
> compiler? IMO, this is what matters for DPDK.
> > Currently, the same built-in functions are available in GCC and
> Clang.
> 
> 
>  From what I understand, "built-ins" is GCC terminology for
> non-standard, implementation-specific intrinsic functions, built into
> the compiler. They all reside in the __* namespace.
> 
> 
> Since GCC is the industry standard, other compilers are likely to
> follow, including built-in functions.
> 

Timeline:

December 2011: The C11 standard was published [http://www.open-std.org/jtc1/sc22/wg14/www/standards.html].

March 2012: GCC 4.7 was released, introducing the __atomic built-ins [https://gcc.gnu.org/gcc-4.7/changes.html, https://www.gnu.org/software/gcc/gcc-4.7/].

March 2013: GCC 4.8 was released [https://www.gnu.org/software/gcc/gcc-4.8/].

April 2014: GCC 4.9 was released, introducing C11 atomics (incl. <stdatomic.h>) [https://gcc.gnu.org/gcc-4.9/changes.html, https://www.gnu.org/software/gcc/gcc-4.9/].

June 2014: RHEL7 was released [https://access.redhat.com/articles/3078]. (RHEL7 Beta was released in December 2013, which probably explains why the GA release doesn’t include GCC 4.9.)

May 2019 (i.e. one year ago): RHEL8 was released [https://access.redhat.com/articles/3078].


RHEL7 includes GCC 4.8 only [https://access.redhat.com/solutions/19458], and apparently RHEL7 has not been updated to GCC 4.9 with any of its minor releases.

Should the DPDK project be stuck on "industry standard" GCC atomics, unable to use the decade old "official standard" C11 atomics, only because we want to support a six year old enterprise Linux distribution? Red Hat released a new enterprise version a year ago... perhaps it's time for their customers to upgrade, if they want to use the latest and greatest version of DPDK.

Are all the other tools required for building DPDK (in the required versions) included in RHEL7, or do we require developers to install/upgrade any other tools anyway? If so, why not also GCC? DPDK can be used in a cross compilation environment, so we are not requiring RHEL7 users to replace their GCC 4.7 default compiler.


Furthermore, the DPDK Documentation specifies GCC 4.9+ as a system requirement [https://doc.dpdk.org/guides/linux_gsg/sys_reqs.html#compilation-of-the-dpdk]. If we are stuck on GCC 4.8, the documentation should be updated.


> >>
> >>> And if some compiler generates code that is suboptimal for a user,
> then it
> >> should be the choice of the user to either accept it or use a better
> compiler.
> >> Using a suboptimal compiler will not only affect the user's DPDK
> applications,
> >> but all applications developed by the user. And if he accepts it for
> his other
> >> applications, he will also accept it for his DPDK applications.
> >>> We could introduce some sort of marker or standardized comment to
> >> indicate when functions only exist for backwards compatibility with
> ancient
> >> compilers and similar, with a reference to documentation describing
> why. And
> >> when the documented preconditions are no longer relevant, e.g. when
> those
> >> particular enterprise Linux distributions become obsolete, these
> functions
> >> become obsolete too, and should be removed. However, getting rid of
> >> obsolete cruft will break the ABI. In other words: Added cruft will
> never be
> >> removed again, so think twice before adding.

^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [PATCH v3 01/12] common/dpaax: move internal symbols into INTERNAL section
  2020-05-13 14:06  0%       ` Hemant Agrawal (OSS)
@ 2020-05-14  7:13  3%         ` Ray Kinsella
  2020-05-14  9:53  0%           ` Hemant Agrawal (OSS)
  0 siblings, 1 reply; 200+ results
From: Ray Kinsella @ 2020-05-14  7:13 UTC (permalink / raw)
  To: Hemant Agrawal (OSS); +Cc: dev

Hi Hemant,

So validate_abi.sh has been somewhat deprecated - it may be removed in future.
To run the libabigail abi checks, you need to run the magic command.

DPDK_ABI_REF_DIR=/build/dpdk/reference/ DPDK_ABI_REF_VERSION=v20.02 ./devtools/test-meson-builds.sh

DPDK_ABI_REF_DIR - needs an absolute path, for reasons that are still unclear to me. 
DPDK_ABI_REF_VERSION - you need to use the last DPDK release.

Thanks, 

Ray K

On 13/05/2020 15:06, Hemant Agrawal (OSS) wrote:
> Hi Ray,
> 	I could not find validate_abi using libabigail.abignore.  Am I missing something. 
> Though check_abi.sh uses it. 
> 
> When I am checking with validate_abi.sh, I still see warnings.
> 
> Regards,
> Hemant
> 
>> -----Original Message-----
>> From: Hemant Agrawal <hemant.agrawal@nxp.com>
>> Sent: Wednesday, May 13, 2020 6:58 PM
>> To: dev@dpdk.org; david.marchand@redhat.com; mdr@ashroe.eu
>> Cc: Hemant Agrawal <hemant.agrawal@nxp.com>
>> Subject: [PATCH v3 01/12] common/dpaax: move internal symbols into
>> INTERNAL section
>>
>> This patch moves the internal symbols to INTERNAL sections so that any
>> change in them is not reported as ABI breakage.
>>
>> Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
>> ---
>>  devtools/libabigail.abignore                      |  3 +++
>>  drivers/common/dpaax/dpaa_of.h                    | 15 +++++++++++++++
>>  drivers/common/dpaax/dpaax_iova_table.h           |  4 ++++
>>  drivers/common/dpaax/rte_common_dpaax_version.map |  2 +-
>>  4 files changed, 23 insertions(+), 1 deletion(-)
>>
>> diff --git a/devtools/libabigail.abignore b/devtools/libabigail.abignore index
>> c9ee73cb3c..b1488d5549 100644
>> --- a/devtools/libabigail.abignore
>> +++ b/devtools/libabigail.abignore
>> @@ -48,3 +48,6 @@
>>          changed_enumerators = RTE_CRYPTO_AEAD_LIST_END
>> [suppress_variable]
>>          name = rte_crypto_aead_algorithm_strings
>> +; Ignore moving DPAAx stable functions to INTERNAL tag [suppress_file]
>> +	file_name_regexp = ^librte_common_dpaax\.
>> diff --git a/drivers/common/dpaax/dpaa_of.h
>> b/drivers/common/dpaax/dpaa_of.h index 960b421766..38d91a1afe 100644
>> --- a/drivers/common/dpaax/dpaa_of.h
>> +++ b/drivers/common/dpaax/dpaa_of.h
>> @@ -24,6 +24,7 @@
>>  #include <limits.h>
>>  #include <rte_common.h>
>>  #include <dpaa_list.h>
>> +#include <rte_compat.h>
>>
>>  #ifndef OF_INIT_DEFAULT_PATH
>>  #define OF_INIT_DEFAULT_PATH "/proc/device-tree"
>> @@ -102,6 +103,7 @@ struct dt_file {
>>  	uint64_t buf[OF_FILE_BUF_MAX >> 3];
>>  };
>>
>> +__rte_internal
>>  const struct device_node *of_find_compatible_node(
>>  					const struct device_node *from,
>>  					const char *type __rte_unused,
>> @@ -113,32 +115,44 @@ const struct device_node
>> *of_find_compatible_node(
>>  		dev_node != NULL; \
>>  		dev_node = of_find_compatible_node(dev_node, type,
>> compatible))
>>
>> +__rte_internal
>>  const void *of_get_property(const struct device_node *from, const char
>> *name,
>>  			    size_t *lenp) __attribute__((nonnull(2)));
>> +__rte_internal
>>  bool of_device_is_available(const struct device_node *dev_node);
>>
>> +
>> +__rte_internal
>>  const struct device_node *of_find_node_by_phandle(uint64_t ph);
>>
>> +__rte_internal
>>  const struct device_node *of_get_parent(const struct device_node
>> *dev_node);
>>
>> +__rte_internal
>>  const struct device_node *of_get_next_child(const struct device_node
>> *dev_node,
>>  					    const struct device_node *prev);
>>
>> +__rte_internal
>>  const void *of_get_mac_address(const struct device_node *np);
>>
>>  #define for_each_child_node(parent, child) \
>>  	for (child = of_get_next_child(parent, NULL); child != NULL; \
>>  			child = of_get_next_child(parent, child))
>>
>> +
>> +__rte_internal
>>  uint32_t of_n_addr_cells(const struct device_node *dev_node);  uint32_t
>> of_n_size_cells(const struct device_node *dev_node);
>>
>> +__rte_internal
>>  const uint32_t *of_get_address(const struct device_node *dev_node, size_t
>> idx,
>>  			       uint64_t *size, uint32_t *flags);
>>
>> +__rte_internal
>>  uint64_t of_translate_address(const struct device_node *dev_node,
>>  			      const uint32_t *addr) __attribute__((nonnull));
>>
>> +__rte_internal
>>  bool of_device_is_compatible(const struct device_node *dev_node,
>>  			     const char *compatible);
>>
>> @@ -146,6 +160,7 @@ bool of_device_is_compatible(const struct
>> device_node *dev_node,
>>   * subsystem that is device-tree-dependent. Eg. Qman/Bman, config layers,
>> etc.
>>   * The path should usually be "/proc/device-tree".
>>   */
>> +__rte_internal
>>  int of_init_path(const char *dt_path);
>>
>>  /* of_finish() allows a controlled tear-down of the device-tree layer, eg. if a
>> diff --git a/drivers/common/dpaax/dpaax_iova_table.h
>> b/drivers/common/dpaax/dpaax_iova_table.h
>> index fc3b9e7a8f..230fba8ba0 100644
>> --- a/drivers/common/dpaax/dpaax_iova_table.h
>> +++ b/drivers/common/dpaax/dpaax_iova_table.h
>> @@ -61,9 +61,13 @@ extern struct dpaax_iova_table *dpaax_iova_table_p;
>> #define DPAAX_MEM_SPLIT_MASK_OFF (DPAAX_MEM_SPLIT - 1) /**< Offset */
>>
>>  /* APIs exposed */
>> +__rte_internal
>>  int dpaax_iova_table_populate(void);
>> +__rte_internal
>>  void dpaax_iova_table_depopulate(void);
>> +__rte_internal
>>  int dpaax_iova_table_update(phys_addr_t paddr, void *vaddr, size_t length);
>> +__rte_internal
>>  void dpaax_iova_table_dump(void);
>>
>>  static inline void *dpaax_iova_table_get_va(phys_addr_t paddr) __rte_hot;
>> diff --git a/drivers/common/dpaax/rte_common_dpaax_version.map
>> b/drivers/common/dpaax/rte_common_dpaax_version.map
>> index f72eba761d..ad2b2b3fec 100644
>> --- a/drivers/common/dpaax/rte_common_dpaax_version.map
>> +++ b/drivers/common/dpaax/rte_common_dpaax_version.map
>> @@ -1,4 +1,4 @@
>> -DPDK_20.0 {
>> +INTERNAL {
>>  	global:
>>
>>  	dpaax_iova_table_depopulate;
>> --
>> 2.17.1
> 

^ permalink raw reply	[relevance 3%]

* Re: [dpdk-dev] [PATCH v2 1/2] common/octeontx2: move internal symbols to INTERNAL section
  2020-05-13  1:04  3% ` [dpdk-dev] [PATCH v2 " pbhagavatula
  2020-05-13  1:04  3%   ` [dpdk-dev] [PATCH v2 2/2] mempool/octeontx2: " pbhagavatula
  2020-05-13  9:55  3%   ` [dpdk-dev] [PATCH v3 1/2] common/octeontx2: " pbhagavatula
@ 2020-05-14  7:02  0%   ` Ray Kinsella
  2 siblings, 0 replies; 200+ results
From: Ray Kinsella @ 2020-05-14  7:02 UTC (permalink / raw)
  To: pbhagavatula, jerinj, aostruszka, Neil Horman, Nithin Dabilpuram,
	Anoob Joseph
  Cc: thomas, dev



On 13/05/2020 02:04, pbhagavatula@marvell.com wrote:
> From: Pavan Nikhilesh <pbhagavatula@marvell.com>
> 
> Move the internal symbols to INTERNAL sections so that any
> change in them is not reported as ABI breakage.
> 
> Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
> ---
>  v2 Changes:
>  - Sort version map alphabetically
>  - Add libabigail ignore tag for OCTEONTX2
> 
>  devtools/libabigail.abignore                  |  4 +++
>  drivers/common/octeontx2/otx2_common.h        |  8 ++++++
>  drivers/common/octeontx2/otx2_dev.h           |  3 +++
>  drivers/common/octeontx2/otx2_irq.h           |  3 +++
>  drivers/common/octeontx2/otx2_mbox.h          |  6 +++++
>  drivers/common/octeontx2/otx2_sec_idev.h      |  6 +++++
>  .../rte_common_octeontx2_version.map          | 26 ++++++-------------
>  7 files changed, 38 insertions(+), 18 deletions(-)
> 
> diff --git a/devtools/libabigail.abignore b/devtools/libabigail.abignore
> index c9ee73cb3..dfe346db4 100644
> --- a/devtools/libabigail.abignore
> +++ b/devtools/libabigail.abignore
> @@ -48,3 +48,7 @@
>          changed_enumerators = RTE_CRYPTO_AEAD_LIST_END
>  [suppress_variable]
>          name = rte_crypto_aead_algorithm_strings
> +
> +; Ignore moving internal OCTEONTX2 stable functions to INTERNAL tag
> +[suppress_file]
> +	soname_regexp = librte_common_octeontx2.*
> diff --git a/drivers/common/octeontx2/otx2_common.h b/drivers/common/octeontx2/otx2_common.h
> index e62cdea07..174702687 100644
> --- a/drivers/common/octeontx2/otx2_common.h
> +++ b/drivers/common/octeontx2/otx2_common.h
> @@ -62,13 +62,21 @@ struct otx2_idev_cfg {
>  	};
>  };
> 
> +__rte_internal
>  struct otx2_idev_cfg *otx2_intra_dev_get_cfg(void);
> +__rte_internal
>  void otx2_sso_pf_func_set(uint16_t sso_pf_func);
> +__rte_internal
>  uint16_t otx2_sso_pf_func_get(void);
> +__rte_internal
>  uint16_t otx2_npa_pf_func_get(void);
> +__rte_internal
>  struct otx2_npa_lf *otx2_npa_lf_obj_get(void);
> +__rte_internal
>  void otx2_npa_set_defaults(struct otx2_idev_cfg *idev);
> +__rte_internal
>  int otx2_npa_lf_active(void *dev);
> +__rte_internal
>  int otx2_npa_lf_obj_ref(void);
> 
>  /* Log */
> diff --git a/drivers/common/octeontx2/otx2_dev.h b/drivers/common/octeontx2/otx2_dev.h
> index 13b75e118..cd4fe517d 100644
> --- a/drivers/common/octeontx2/otx2_dev.h
> +++ b/drivers/common/octeontx2/otx2_dev.h
> @@ -94,6 +94,7 @@ struct otx2_dev {
>  	OTX2_DEV;
>  };
> 
> +__rte_internal
>  int otx2_dev_priv_init(struct rte_pci_device *pci_dev, void *otx2_dev);
> 
>  /* Common dev init and fini routines */
> @@ -116,7 +117,9 @@ otx2_dev_init(struct rte_pci_device *pci_dev, void *otx2_dev)
>  	return otx2_dev_priv_init(pci_dev, otx2_dev);
>  }
> 
> +__rte_internal
>  void otx2_dev_fini(struct rte_pci_device *pci_dev, void *otx2_dev);
> +__rte_internal
>  int otx2_dev_active_vfs(void *otx2_dev);
> 
>  #define RVU_PFVF_PF_SHIFT	10
> diff --git a/drivers/common/octeontx2/otx2_irq.h b/drivers/common/octeontx2/otx2_irq.h
> index 9d326276e..0683cf554 100644
> --- a/drivers/common/octeontx2/otx2_irq.h
> +++ b/drivers/common/octeontx2/otx2_irq.h
> @@ -16,10 +16,13 @@ typedef struct {
>  	uint64_t bits[MAX_VFPF_DWORD_BITS];
>  } otx2_intr_t;
> 
> +__rte_internal
>  int otx2_register_irq(struct rte_intr_handle *intr_handle,
>  		      rte_intr_callback_fn cb, void *data, unsigned int vec);
> +__rte_internal
>  void otx2_unregister_irq(struct rte_intr_handle *intr_handle,
>  			 rte_intr_callback_fn cb, void *data, unsigned int vec);
> +__rte_internal
>  int otx2_disable_irqs(struct rte_intr_handle *intr_handle);
> 
>  #endif /* _OTX2_IRQ_H_ */
> diff --git a/drivers/common/octeontx2/otx2_mbox.h b/drivers/common/octeontx2/otx2_mbox.h
> index 80778a0be..7fa4276e9 100644
> --- a/drivers/common/octeontx2/otx2_mbox.h
> +++ b/drivers/common/octeontx2/otx2_mbox.h
> @@ -1617,19 +1617,25 @@ struct tim_enable_rsp {
>  	uint32_t __otx2_io currentbucket;
>  };
> 
> +__rte_internal
>  const char *otx2_mbox_id2name(uint16_t id);
>  int otx2_mbox_id2size(uint16_t id);
>  void otx2_mbox_reset(struct otx2_mbox *mbox, int devid);
>  int otx2_mbox_init(struct otx2_mbox *mbox, uintptr_t hwbase, uintptr_t reg_base,
>  		   int direction, int ndevsi, uint64_t intr_offset);
>  void otx2_mbox_fini(struct otx2_mbox *mbox);
> +__rte_internal
>  void otx2_mbox_msg_send(struct otx2_mbox *mbox, int devid);
> +__rte_internal
>  int otx2_mbox_wait_for_rsp(struct otx2_mbox *mbox, int devid);
>  int otx2_mbox_wait_for_rsp_tmo(struct otx2_mbox *mbox, int devid, uint32_t tmo);
> +__rte_internal
>  int otx2_mbox_get_rsp(struct otx2_mbox *mbox, int devid, void **msg);
> +__rte_internal
>  int otx2_mbox_get_rsp_tmo(struct otx2_mbox *mbox, int devid, void **msg,
>  			  uint32_t tmo);
>  int otx2_mbox_get_availmem(struct otx2_mbox *mbox, int devid);
> +__rte_internal
>  struct mbox_msghdr *otx2_mbox_alloc_msg_rsp(struct otx2_mbox *mbox, int devid,
>  					    int size, int size_rsp);
> 
> diff --git a/drivers/common/octeontx2/otx2_sec_idev.h b/drivers/common/octeontx2/otx2_sec_idev.h
> index c681f5094..89cdaf66a 100644
> --- a/drivers/common/octeontx2/otx2_sec_idev.h
> +++ b/drivers/common/octeontx2/otx2_sec_idev.h
> @@ -22,16 +22,22 @@ struct otx2_sec_idev_cfg {
>  	rte_spinlock_t tx_cpt_lock;
>  };
> 
> +__rte_internal
>  uint8_t otx2_eth_dev_is_sec_capable(struct rte_eth_dev *eth_dev);
> 
> +__rte_internal
>  int otx2_sec_idev_cfg_init(int port_id);
> 
> +__rte_internal
>  int otx2_sec_idev_tx_cpt_qp_add(uint16_t port_id, struct otx2_cpt_qp *qp);
> 
> +__rte_internal
>  int otx2_sec_idev_tx_cpt_qp_remove(struct otx2_cpt_qp *qp);
> 
> +__rte_internal
>  int otx2_sec_idev_tx_cpt_qp_put(struct otx2_cpt_qp *qp);
> 
> +__rte_internal
>  int otx2_sec_idev_tx_cpt_qp_get(uint16_t port_id, struct otx2_cpt_qp **qp);
> 
>  #endif /* _OTX2_SEC_IDEV_H_ */
> diff --git a/drivers/common/octeontx2/rte_common_octeontx2_version.map b/drivers/common/octeontx2/rte_common_octeontx2_version.map
> index 01279c339..7621a59ad 100644
> --- a/drivers/common/octeontx2/rte_common_octeontx2_version.map
> +++ b/drivers/common/octeontx2/rte_common_octeontx2_version.map
> @@ -1,13 +1,15 @@
> -DPDK_20.0 {
> +INTERNAL {
>  	global:
> 
>  	otx2_dev_active_vfs;
>  	otx2_dev_fini;
>  	otx2_dev_priv_init;
>  	otx2_disable_irqs;
> +	otx2_eth_dev_is_sec_capable;
>  	otx2_intra_dev_get_cfg;
>  	otx2_logtype_base;
>  	otx2_logtype_dpi;
> +	otx2_logtype_ep;
>  	otx2_logtype_mbox;
>  	otx2_logtype_nix;
>  	otx2_logtype_npa;
> @@ -27,26 +29,14 @@ DPDK_20.0 {
>  	otx2_npa_pf_func_get;
>  	otx2_npa_set_defaults;
>  	otx2_register_irq;
> -	otx2_sso_pf_func_get;
> -	otx2_sso_pf_func_set;
> -	otx2_unregister_irq;
> -
> -	local: *;
> -};
> -
> -DPDK_21 {
> -	global:
> -
> -	otx2_eth_dev_is_sec_capable;
>  	otx2_sec_idev_cfg_init;
>  	otx2_sec_idev_tx_cpt_qp_add;
> -	otx2_sec_idev_tx_cpt_qp_remove;
>  	otx2_sec_idev_tx_cpt_qp_get;
>  	otx2_sec_idev_tx_cpt_qp_put;
> -} DPDK_20.0;
> -
> -EXPERIMENTAL {
> -	global:
> +	otx2_sec_idev_tx_cpt_qp_remove;
> +	otx2_sso_pf_func_get;
> +	otx2_sso_pf_func_set;
> +	otx2_unregister_irq;
> 
> -	otx2_logtype_ep;
> +	local: *;
>  };
> --
> 2.17.1
> 

Acked-by: Ray Kinsella <mdr@ashroe.eu>

^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [PATCH v1] doc: fix typos and errors in abi policy doc
  2020-05-13 10:43 36% [dpdk-dev] [PATCH v1] doc: fix typos and errors in abi policy doc Gaetan Rivet
@ 2020-05-14  6:40  4% ` Ray Kinsella
  0 siblings, 0 replies; 200+ results
From: Ray Kinsella @ 2020-05-14  6:40 UTC (permalink / raw)
  To: Gaetan Rivet, dev; +Cc: Neil Horman, Mcnamara, John, Marko Kovacevic

CC: John + Marko

Gaetan,

Looks good, thank you for the tidy up.

On 13/05/2020 11:43, Gaetan Rivet wrote:
> Some errors in the document:
> 
>   * API instead of ABI once.
> 
> Some typos:
> 
>   * __rte_depreciated instead of __rte_deprecated.
>   * missing ```` around value.
>   * inconsistent reference to major ABI version, most
>     of the time described without the minor appended, except once.
> 
> Verbosity and grammar:
> 
>   * Long sentences that would be better cut short.
>   * Comma abuse.
>   * 'May' used where 'can' seems more fitting.
> 
> I'm not a native speaker though, so grain of salt applies.
> 
> Fixes: fdf7471cccb8 ("doc: introduce major ABI versions")
> Cc: Ray Kinsella <mdr@ashroe.eu>
> cc: Neil Horman <nhorman@tuxdriver.com>
> Signed-off-by: Gaetan Rivet <grive@u256.net>
> ---
>  doc/guides/contributing/abi_policy.rst | 21 ++++++++++-----------
>  1 file changed, 10 insertions(+), 11 deletions(-)
> 
> diff --git a/doc/guides/contributing/abi_policy.rst b/doc/guides/contributing/abi_policy.rst
> index 05ca95980..2198519d9 100644
> --- a/doc/guides/contributing/abi_policy.rst
> +++ b/doc/guides/contributing/abi_policy.rst
> @@ -220,19 +220,18 @@ Examples of ABI Changes
>  The following are examples of allowable ABI changes occurring between
>  declarations of major ABI versions.
>  
> -* DPDK 19.11 release, defines the function ``rte_foo()``, and ``rte_foo()``
> -  as part of the major ABI version ``20``.
> +* DPDK 19.11 release defines the function ``rte_foo()`` ; ``rte_foo()``
> +  is part of the major ABI version ``20``.
>  
> -* DPDK 20.02 release defines a new function ``rte_foo(uint8_t bar)``, and
> -  this is not a problem as long as the symbol ``rte_foo@DPDK20`` is
> +* DPDK 20.02 release defines a new function ``rte_foo(uint8_t bar)``.
> +  This is not a problem as long as the symbol ``rte_foo@DPDK20`` is
>    preserved through :ref:`abi_versioning`.
>  
>    - The new function may be marked with the ``__rte_experimental`` tag for a
>      number of releases, as described in the section :ref:`experimental_apis`.
>  
> -  - Once ``rte_foo(uint8_t bar)`` becomes non-experimental ``rte_foo()`` is then
> -    declared as ``__rte_depreciated``, with an associated deprecation notice
> -    provided.
> +  - Once ``rte_foo(uint8_t bar)`` becomes non-experimental, ``rte_foo()`` is
> +    declared as ``__rte_deprecated`` and an deprecation notice is provided.
>  
>  * DPDK 19.11 is not re-released to include ``rte_foo(uint8_t bar)``, the new
>    version of ``rte_foo`` only exists from DPDK 20.02 onwards as described in the
> @@ -242,13 +241,13 @@ declarations of major ABI versions.
>    rte_baz()``. This function may or may not exist in the DPDK 20.05 release.
>  
>  * An application ``dPacket`` wishes to use ``rte_foo(uint8_t bar)``, before the
> -  declaration of the DPDK ``21`` major API version. The application can only
> +  declaration of the DPDK ``21`` major ABI version. The application can only
>    ensure its runtime dependencies are met by specifying ``DPDK (>= 20.2)`` as
> -  an explicit package dependency, as the soname only may only indicate the
> +  an explicit package dependency, as the soname can only indicate the
>    supported major ABI version.
>  
>  * At the release of DPDK 20.11, the function ``rte_foo(uint8_t bar)`` becomes
> -  formally part of then new major ABI version DPDK 21.0 and ``rte_foo()`` may be
> +  formally part of then new major ABI version DPDK ``21`` and ``rte_foo()`` may be
>    removed.
>  
>  .. _deprecation_notices:
> @@ -322,6 +321,6 @@ Libraries
>  
>  Libraries marked as ``experimental`` are entirely not considered part of an ABI
>  version, and may change without warning at any time. Experimental libraries
> -always have a major version of ``0`` to indicate they exist outside of
> +always have a major ABI version of ``0`` to indicate they exist outside of
>  :ref:`abi_versioning` , with the minor version incremented with each ABI change
>  to library.
> 

Acked-by: Ray Kinsella <mdr@ashroe.eu>

^ permalink raw reply	[relevance 4%]

* Re: [dpdk-dev] [PATCH v4 4/4] eal/atomic: add wrapper for c11 atomics
  2020-05-13 19:40  0%             ` Honnappa Nagarahalli
@ 2020-05-13 20:17  0%               ` Mattias Rönnblom
  2020-05-14  8:34  0%                 ` Morten Brørup
  0 siblings, 1 reply; 200+ results
From: Mattias Rönnblom @ 2020-05-13 20:17 UTC (permalink / raw)
  To: Honnappa Nagarahalli, Morten Brørup, Stephen Hemminger, Phil Yang
  Cc: thomas, dev, bruce.richardson, ferruh.yigit, hemant.agrawal,
	jerinj, ktraynor, konstantin.ananyev, maxime.coquelin,
	olivier.matz, harry.van.haaren, erik.g.carrillo, nd,
	David Christensen

On 2020-05-13 21:40, Honnappa Nagarahalli wrote:
> <snip>
>
>>>> Subject: Re: [PATCH v4 4/4] eal/atomic: add wrapper for c11 atomics
>>>>
>>>> On Tue, May 12, 2020 at 4:03 pm, Phil Yang <mailto:phil.yang@arm.com>
>>>> wrote:
>>>>
>>>> parameter. Signed-off-by: Phil Yang <mailto:phil.yang@arm.com>
>>>>
>>>>
>>>> What is the purpose of having rte_atomic at all?
>>>> Is this level of indirection really helping?
>>>> [HONNAPPA] (not sure why this email has html format, converted to
>>>> text
>>>> format)
>>>> I believe you meant, why not use the __atomic_xxx built-ins directly?
>>>> The only reason for now is handling of
>>>> __atomic_thread_fence(__ATOMIC_SEQ_CST) for x86. This is equivalent
>>>> to rte_smp_mb which has an optimized implementation for x86.
>>>> According to Konstantin, the compiler does not generate optimal code.
>>>> Wrapping that built-in alone is going to be confusing.
>>>>
>>>> The wrappers also allow us to have our own implementation using
>>>> inline assembly for compilers versions that do not support C11 atomic
>>>> built- ins. But, I do not know if there is a need to support those versions.
>>> If I recall correctly, someone mentioned that one (or more) of the aging
>> enterprise Linux distributions don't include a compiler with C11 atomics.
>>> I think Stephen is onto something here...
>>>
>>> It is silly to add wrappers like this, if the only purpose is to support
>> compilers and distributions that don't properly support an official C standard
>> which is nearly a decade old. The quality and quantity of the DPDK
>> documentation for these functions (including examples, discussions on Stack
>> Overflow, etc.) will be inferior to the documentation of the standard C11
>> atomics, which increases the probability of incorrect use.
>>
>>
>> What's being used in DPDK today, and what's being wrapped here, is not
>> standard C11 atomics - it's a bunch of GCC built-ins. Nothing in the __
>> namespace is in the standard. It's reserved for the implementation (e.g.
>> compiler).
> I have tried to understand what it mean by 'built-ins', but I have not got a good answer. So, does it mean that the built-in function (same symbol and API interface) may not be available in another C compiler? IMO, this is what matters for DPDK.
> Currently, the same built-in functions are available in GCC and Clang.


 From what I understand, "built-ins" is GCC terminology for 
non-standard, implementation-specific intrinsic functions, built into 
the compiler. They all reside in the __* namespace.


Since GCC is the industry standard, other compilers are likely to 
follow, including built-in functions.

>>
>>> And if some compiler generates code that is suboptimal for a user, then it
>> should be the choice of the user to either accept it or use a better compiler.
>> Using a suboptimal compiler will not only affect the user's DPDK applications,
>> but all applications developed by the user. And if he accepts it for his other
>> applications, he will also accept it for his DPDK applications.
>>> We could introduce some sort of marker or standardized comment to
>> indicate when functions only exist for backwards compatibility with ancient
>> compilers and similar, with a reference to documentation describing why. And
>> when the documented preconditions are no longer relevant, e.g. when those
>> particular enterprise Linux distributions become obsolete, these functions
>> become obsolete too, and should be removed. However, getting rid of
>> obsolete cruft will break the ABI. In other words: Added cruft will never be
>> removed again, so think twice before adding.
>>>
>>> Med venlig hilsen / kind regards
>>> - Morten Brørup
>>>
>>>
>>>


^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [PATCH v4 4/4] eal/atomic: add wrapper for c11 atomics
  2020-05-13 19:04  0%           ` Mattias Rönnblom
@ 2020-05-13 19:40  0%             ` Honnappa Nagarahalli
  2020-05-13 20:17  0%               ` Mattias Rönnblom
  0 siblings, 1 reply; 200+ results
From: Honnappa Nagarahalli @ 2020-05-13 19:40 UTC (permalink / raw)
  To: Mattias Rönnblom, Morten Brørup, Stephen Hemminger, Phil Yang
  Cc: thomas, dev, bruce.richardson, ferruh.yigit, hemant.agrawal,
	jerinj, ktraynor, konstantin.ananyev, maxime.coquelin,
	olivier.matz, harry.van.haaren, erik.g.carrillo, nd,
	David Christensen, Honnappa Nagarahalli, nd

<snip>

> >>
> >> Subject: Re: [PATCH v4 4/4] eal/atomic: add wrapper for c11 atomics
> >>
> >> On Tue, May 12, 2020 at 4:03 pm, Phil Yang <mailto:phil.yang@arm.com>
> >> wrote:
> >>
> >> parameter. Signed-off-by: Phil Yang <mailto:phil.yang@arm.com>
> >>
> >>
> >> What is the purpose of having rte_atomic at all?
> >> Is this level of indirection really helping?
> >> [HONNAPPA] (not sure why this email has html format, converted to
> >> text
> >> format)
> >> I believe you meant, why not use the __atomic_xxx built-ins directly?
> >> The only reason for now is handling of
> >> __atomic_thread_fence(__ATOMIC_SEQ_CST) for x86. This is equivalent
> >> to rte_smp_mb which has an optimized implementation for x86.
> >> According to Konstantin, the compiler does not generate optimal code.
> >> Wrapping that built-in alone is going to be confusing.
> >>
> >> The wrappers also allow us to have our own implementation using
> >> inline assembly for compilers versions that do not support C11 atomic
> >> built- ins. But, I do not know if there is a need to support those versions.
> > If I recall correctly, someone mentioned that one (or more) of the aging
> enterprise Linux distributions don't include a compiler with C11 atomics.
> >
> > I think Stephen is onto something here...
> >
> > It is silly to add wrappers like this, if the only purpose is to support
> compilers and distributions that don't properly support an official C standard
> which is nearly a decade old. The quality and quantity of the DPDK
> documentation for these functions (including examples, discussions on Stack
> Overflow, etc.) will be inferior to the documentation of the standard C11
> atomics, which increases the probability of incorrect use.
> 
> 
> What's being used in DPDK today, and what's being wrapped here, is not
> standard C11 atomics - it's a bunch of GCC built-ins. Nothing in the __
> namespace is in the standard. It's reserved for the implementation (e.g.
> compiler).
I have tried to understand what it mean by 'built-ins', but I have not got a good answer. So, does it mean that the built-in function (same symbol and API interface) may not be available in another C compiler? IMO, this is what matters for DPDK.
Currently, the same built-in functions are available in GCC and Clang.

> 
> 
> > And if some compiler generates code that is suboptimal for a user, then it
> should be the choice of the user to either accept it or use a better compiler.
> Using a suboptimal compiler will not only affect the user's DPDK applications,
> but all applications developed by the user. And if he accepts it for his other
> applications, he will also accept it for his DPDK applications.
> >
> > We could introduce some sort of marker or standardized comment to
> indicate when functions only exist for backwards compatibility with ancient
> compilers and similar, with a reference to documentation describing why. And
> when the documented preconditions are no longer relevant, e.g. when those
> particular enterprise Linux distributions become obsolete, these functions
> become obsolete too, and should be removed. However, getting rid of
> obsolete cruft will break the ABI. In other words: Added cruft will never be
> removed again, so think twice before adding.
> >
> >
> > Med venlig hilsen / kind regards
> > - Morten Brørup
> >
> >
> >


^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [PATCH v4 4/4] eal/atomic: add wrapper for c11 atomics
  2020-05-13  8:57  3%         ` Morten Brørup
  2020-05-13 15:30  0%           ` Honnappa Nagarahalli
@ 2020-05-13 19:04  0%           ` Mattias Rönnblom
  2020-05-13 19:40  0%             ` Honnappa Nagarahalli
  1 sibling, 1 reply; 200+ results
From: Mattias Rönnblom @ 2020-05-13 19:04 UTC (permalink / raw)
  To: Morten Brørup, Honnappa Nagarahalli, Stephen Hemminger, Phil Yang
  Cc: thomas, dev, bruce.richardson, ferruh.yigit, hemant.agrawal,
	jerinj, ktraynor, konstantin.ananyev, maxime.coquelin,
	olivier.matz, harry.van.haaren, erik.g.carrillo, nd,
	David Christensen

On 2020-05-13 10:57, Morten Brørup wrote:
>> From: Honnappa Nagarahalli [mailto:Honnappa.Nagarahalli@arm.com]
>> Sent: Tuesday, May 12, 2020 9:24 PM
>>
>> <snip>
>>
>> Subject: Re: [PATCH v4 4/4] eal/atomic: add wrapper for c11 atomics
>>
>> On Tue, May 12, 2020 at 4:03 pm, Phil Yang <mailto:phil.yang@arm.com>
>> wrote:
>>
>> parameter. Signed-off-by: Phil Yang <mailto:phil.yang@arm.com>
>>
>>
>> What is the purpose of having rte_atomic at all?
>> Is this level of indirection really helping?
>> [HONNAPPA] (not sure why this email has html format, converted to text
>> format)
>> I believe you meant, why not use the __atomic_xxx built-ins directly?
>> The only reason for now is handling of
>> __atomic_thread_fence(__ATOMIC_SEQ_CST) for x86. This is equivalent to
>> rte_smp_mb which has an optimized implementation for x86. According to
>> Konstantin, the compiler does not generate optimal code. Wrapping that
>> built-in alone is going to be confusing.
>>
>> The wrappers also allow us to have our own implementation using inline
>> assembly for compilers versions that do not support C11 atomic built-
>> ins. But, I do not know if there is a need to support those versions.
> If I recall correctly, someone mentioned that one (or more) of the aging enterprise Linux distributions don't include a compiler with C11 atomics.
>
> I think Stephen is onto something here...
>
> It is silly to add wrappers like this, if the only purpose is to support compilers and distributions that don't properly support an official C standard which is nearly a decade old. The quality and quantity of the DPDK documentation for these functions (including examples, discussions on Stack Overflow, etc.) will be inferior to the documentation of the standard C11 atomics, which increases the probability of incorrect use.


What's being used in DPDK today, and what's being wrapped here, is not 
standard C11 atomics - it's a bunch of GCC built-ins. Nothing in the __ 
namespace is in the standard. It's reserved for the implementation (e.g. 
compiler).


> And if some compiler generates code that is suboptimal for a user, then it should be the choice of the user to either accept it or use a better compiler. Using a suboptimal compiler will not only affect the user's DPDK applications, but all applications developed by the user. And if he accepts it for his other applications, he will also accept it for his DPDK applications.
>
> We could introduce some sort of marker or standardized comment to indicate when functions only exist for backwards compatibility with ancient compilers and similar, with a reference to documentation describing why. And when the documented preconditions are no longer relevant, e.g. when those particular enterprise Linux distributions become obsolete, these functions become obsolete too, and should be removed. However, getting rid of obsolete cruft will break the ABI. In other words: Added cruft will never be removed again, so think twice before adding.
>
>
> Med venlig hilsen / kind regards
> - Morten Brørup
>
>
>


^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [PATCH] meter: provide experimental alias of API for old apps
  2020-05-13 16:30  4%   ` Thomas Monjalon
@ 2020-05-13 17:37  0%     ` Ferruh Yigit
  0 siblings, 0 replies; 200+ results
From: Ferruh Yigit @ 2020-05-13 17:37 UTC (permalink / raw)
  To: Thomas Monjalon
  Cc: Ray Kinsella, Neil Horman, Cristian Dumitrescu, Eelco Chaudron,
	dev, David Marchand, Luca Boccassi, Bruce Richardson, Ian Stokes,
	Andrzej Ostruszka

On 5/13/2020 5:30 PM, Thomas Monjalon wrote:
> I think the title should be about ABI, not API.
> 
> 13/05/2020 14:11, Ferruh Yigit:
>> Duplicate the existing and versioned symbol as experimental.
> 
> Would be good to explain the case of the meter lib you are addressing.
> If I understand well, you consider we "broke" the experimental ABI
> during 20.02 when moving symbols from EXPERIMENTAL to DPDK_20.0.1
> (and to DPDK_21 during 20.05).
> That's why you want to add back the EXPERIMENTAL symbol as an alias
> of the symbol in the next ABI (21).

Yes, this is the case, I can try again to clarify.

Btw, I wasn't following that bit, how we are mitigating the affect of the
DPDK_20.0.1 -> DPDK_21 change to applications?


> 
> 
>> This is to prevent DPDK maturing experimental API breaking old
>> applications using that experimental API.
>> The relevant process update is captured in:
>> https://patches.dpdk.org/patch/65863/
>>
>> Created VERSION_SYMBOL_EXPERIMENTAL helper macro.
>>
>> Updated the 'check-experimental-syms.sh' buildtool, which was
>> complaining that the symbol is in EXPERIMENTAL tag in .map file but it
>> is not in the .experimental section (__rte_experimental tag is missing).
>> Updated tool in a way it won't complain if the symbol in the
>> EXPERIMENTAL tag duplicated in some other block in .map file (versioned)
>>
>> Enabled function versioning for meson build for the library.
>>
>> Fixes: 30512af820fe ("meter: remove experimental flag from RFC4115 trTCM API")
> 
> Even if it's never backported, it would be more correct to add Cc: stable
> to indicate it is fixing previous release (20.02 here).

As you said original patch is after LTS, but yes I can add the tag.
(Although not having stable tag implies the fix is not in this release, it also
may mean backport is not requested as been in this case.)

> 
> 
>> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> [...]
>> --- a/lib/librte_meter/rte_meter_version.map
>> +++ b/lib/librte_meter/rte_meter_version.map
>> @@ -20,4 +20,12 @@ DPDK_21 {
>>  	rte_meter_trtcm_rfc4115_color_blind_check;
>>  	rte_meter_trtcm_rfc4115_config;
>>  	rte_meter_trtcm_rfc4115_profile_config;
>> +
>>  } DPDK_20.0;
>> +
>> +EXPERIMENTAL {
>> +       global:
>> +
>> +	rte_meter_trtcm_rfc4115_config;
>> +	rte_meter_trtcm_rfc4115_profile_config;
>> +};
>>
> 
> 
> 
> 
> 


^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [PATCH] meter: provide experimental alias of API for old apps
  @ 2020-05-13 16:30  4%   ` Thomas Monjalon
  2020-05-13 17:37  0%     ` Ferruh Yigit
    2020-05-14 11:52  4%   ` [dpdk-dev] [PATCH v3] " Ferruh Yigit
  2 siblings, 1 reply; 200+ results
From: Thomas Monjalon @ 2020-05-13 16:30 UTC (permalink / raw)
  To: Ferruh Yigit
  Cc: Ray Kinsella, Neil Horman, Cristian Dumitrescu, Eelco Chaudron,
	dev, David Marchand, Luca Boccassi, Bruce Richardson, Ian Stokes,
	Andrzej Ostruszka

I think the title should be about ABI, not API.

13/05/2020 14:11, Ferruh Yigit:
> Duplicate the existing and versioned symbol as experimental.

Would be good to explain the case of the meter lib you are addressing.
If I understand well, you consider we "broke" the experimental ABI
during 20.02 when moving symbols from EXPERIMENTAL to DPDK_20.0.1
(and to DPDK_21 during 20.05).
That's why you want to add back the EXPERIMENTAL symbol as an alias
of the symbol in the next ABI (21).


> This is to prevent DPDK maturing experimental API breaking old
> applications using that experimental API.
> The relevant process update is captured in:
> https://patches.dpdk.org/patch/65863/
> 
> Created VERSION_SYMBOL_EXPERIMENTAL helper macro.
> 
> Updated the 'check-experimental-syms.sh' buildtool, which was
> complaining that the symbol is in EXPERIMENTAL tag in .map file but it
> is not in the .experimental section (__rte_experimental tag is missing).
> Updated tool in a way it won't complain if the symbol in the
> EXPERIMENTAL tag duplicated in some other block in .map file (versioned)
> 
> Enabled function versioning for meson build for the library.
> 
> Fixes: 30512af820fe ("meter: remove experimental flag from RFC4115 trTCM API")

Even if it's never backported, it would be more correct to add Cc: stable
to indicate it is fixing previous release (20.02 here).


> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
[...]
> --- a/lib/librte_meter/rte_meter_version.map
> +++ b/lib/librte_meter/rte_meter_version.map
> @@ -20,4 +20,12 @@ DPDK_21 {
>  	rte_meter_trtcm_rfc4115_color_blind_check;
>  	rte_meter_trtcm_rfc4115_config;
>  	rte_meter_trtcm_rfc4115_profile_config;
> +
>  } DPDK_20.0;
> +
> +EXPERIMENTAL {
> +       global:
> +
> +	rte_meter_trtcm_rfc4115_config;
> +	rte_meter_trtcm_rfc4115_profile_config;
> +};
> 






^ permalink raw reply	[relevance 4%]

* Re: [dpdk-dev] [PATCH v4 4/4] eal/atomic: add wrapper for c11 atomics
  2020-05-13  8:57  3%         ` Morten Brørup
@ 2020-05-13 15:30  0%           ` Honnappa Nagarahalli
  2020-05-13 19:04  0%           ` Mattias Rönnblom
  1 sibling, 0 replies; 200+ results
From: Honnappa Nagarahalli @ 2020-05-13 15:30 UTC (permalink / raw)
  To: Morten Brørup, Stephen Hemminger, Phil Yang
  Cc: thomas, dev, bruce.richardson, ferruh.yigit, hemant.agrawal,
	jerinj, ktraynor, konstantin.ananyev, maxime.coquelin,
	olivier.matz, mattias.ronnblom, harry.van.haaren,
	erik.g.carrillo, nd, David Christensen, Honnappa Nagarahalli, nd

<snip>
> > Subject: Re: [PATCH v4 4/4] eal/atomic: add wrapper for c11 atomics
> >
> > On Tue, May 12, 2020 at 4:03 pm, Phil Yang <mailto:phil.yang@arm.com>
> > wrote:
> >
> > parameter. Signed-off-by: Phil Yang <mailto:phil.yang@arm.com>
> >
> >
> > What is the purpose of having rte_atomic at all?
> > Is this level of indirection really helping?
> > [HONNAPPA] (not sure why this email has html format, converted to text
> > format)
> > I believe you meant, why not use the __atomic_xxx built-ins directly?
> > The only reason for now is handling of
> > __atomic_thread_fence(__ATOMIC_SEQ_CST) for x86. This is equivalent to
> > rte_smp_mb which has an optimized implementation for x86. According to
> > Konstantin, the compiler does not generate optimal code. Wrapping that
> > built-in alone is going to be confusing.
> >
> > The wrappers also allow us to have our own implementation using inline
> > assembly for compilers versions that do not support C11 atomic built-
> > ins. But, I do not know if there is a need to support those versions.
> 
> If I recall correctly, someone mentioned that one (or more) of the aging
> enterprise Linux distributions don't include a compiler with C11 atomics.
I searched through the mailing list yesterday and I could not find anyone mentioning about compilers not supporting C11 built-ins. However, the C11 atomic APIs (as defined in stdatomic.h) are supported in later versions of the compilers. So, using C11 built-ins gives us better coverage with older compilers (including the ones being used in Intel CI which were the oldest versions mentioned on the mailing list).
IMO, we should not be worried about compilers that do not support C11.

> 
> I think Stephen is onto something here...
> 
> It is silly to add wrappers like this, if the only purpose is to support compilers
> and distributions that don't properly support an official C standard which is
> nearly a decade old. The quality and quantity of the DPDK documentation for
> these functions (including examples, discussions on Stack Overflow, etc.) will
> be inferior to the documentation of the standard C11 atomics, which
> increases the probability of incorrect use.
I agree. I do not want to add them for the sake of adding them. But, I do think that we need to solve the issues in DPDK (if they affect performance) which could be due to tools. As Konstantin suggested, we could do the wrappers only for the __atomic_thread_fence built-in. This will make life lot easier.

> 
> And if some compiler generates code that is suboptimal for a user, then it
> should be the choice of the user to either accept it or use a better compiler.
> Using a suboptimal compiler will not only affect the user's DPDK applications,
> but all applications developed by the user. And if he accepts it for his other
> applications, he will also accept it for his DPDK applications.
> 
> We could introduce some sort of marker or standardized comment to indicate
> when functions only exist for backwards compatibility with ancient compilers
> and similar, with a reference to documentation describing why. And when the
> documented preconditions are no longer relevant, e.g. when those particular
> enterprise Linux distributions become obsolete, these functions become
> obsolete too, and should be removed. However, getting rid of obsolete cruft
> will break the ABI. In other words: Added cruft will never be removed again,
> so think twice before adding.
> 
> 
> Med venlig hilsen / kind regards
> - Morten Brørup
> 
> 


^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [PATCH v3 01/12] common/dpaax: move internal symbols into INTERNAL section
  2020-05-13 13:27  3%     ` [dpdk-dev] [PATCH v3 01/12] common/dpaax: move internal symbols into INTERNAL section Hemant Agrawal
@ 2020-05-13 14:06  0%       ` Hemant Agrawal (OSS)
  2020-05-14  7:13  3%         ` Ray Kinsella
  0 siblings, 1 reply; 200+ results
From: Hemant Agrawal (OSS) @ 2020-05-13 14:06 UTC (permalink / raw)
  To: mdr; +Cc: dev

Hi Ray,
	I could not find validate_abi using libabigail.abignore.  Am I missing something. 
Though check_abi.sh uses it. 

When I am checking with validate_abi.sh, I still see warnings.

Regards,
Hemant

> -----Original Message-----
> From: Hemant Agrawal <hemant.agrawal@nxp.com>
> Sent: Wednesday, May 13, 2020 6:58 PM
> To: dev@dpdk.org; david.marchand@redhat.com; mdr@ashroe.eu
> Cc: Hemant Agrawal <hemant.agrawal@nxp.com>
> Subject: [PATCH v3 01/12] common/dpaax: move internal symbols into
> INTERNAL section
> 
> This patch moves the internal symbols to INTERNAL sections so that any
> change in them is not reported as ABI breakage.
> 
> Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
> ---
>  devtools/libabigail.abignore                      |  3 +++
>  drivers/common/dpaax/dpaa_of.h                    | 15 +++++++++++++++
>  drivers/common/dpaax/dpaax_iova_table.h           |  4 ++++
>  drivers/common/dpaax/rte_common_dpaax_version.map |  2 +-
>  4 files changed, 23 insertions(+), 1 deletion(-)
> 
> diff --git a/devtools/libabigail.abignore b/devtools/libabigail.abignore index
> c9ee73cb3c..b1488d5549 100644
> --- a/devtools/libabigail.abignore
> +++ b/devtools/libabigail.abignore
> @@ -48,3 +48,6 @@
>          changed_enumerators = RTE_CRYPTO_AEAD_LIST_END
> [suppress_variable]
>          name = rte_crypto_aead_algorithm_strings
> +; Ignore moving DPAAx stable functions to INTERNAL tag [suppress_file]
> +	file_name_regexp = ^librte_common_dpaax\.
> diff --git a/drivers/common/dpaax/dpaa_of.h
> b/drivers/common/dpaax/dpaa_of.h index 960b421766..38d91a1afe 100644
> --- a/drivers/common/dpaax/dpaa_of.h
> +++ b/drivers/common/dpaax/dpaa_of.h
> @@ -24,6 +24,7 @@
>  #include <limits.h>
>  #include <rte_common.h>
>  #include <dpaa_list.h>
> +#include <rte_compat.h>
> 
>  #ifndef OF_INIT_DEFAULT_PATH
>  #define OF_INIT_DEFAULT_PATH "/proc/device-tree"
> @@ -102,6 +103,7 @@ struct dt_file {
>  	uint64_t buf[OF_FILE_BUF_MAX >> 3];
>  };
> 
> +__rte_internal
>  const struct device_node *of_find_compatible_node(
>  					const struct device_node *from,
>  					const char *type __rte_unused,
> @@ -113,32 +115,44 @@ const struct device_node
> *of_find_compatible_node(
>  		dev_node != NULL; \
>  		dev_node = of_find_compatible_node(dev_node, type,
> compatible))
> 
> +__rte_internal
>  const void *of_get_property(const struct device_node *from, const char
> *name,
>  			    size_t *lenp) __attribute__((nonnull(2)));
> +__rte_internal
>  bool of_device_is_available(const struct device_node *dev_node);
> 
> +
> +__rte_internal
>  const struct device_node *of_find_node_by_phandle(uint64_t ph);
> 
> +__rte_internal
>  const struct device_node *of_get_parent(const struct device_node
> *dev_node);
> 
> +__rte_internal
>  const struct device_node *of_get_next_child(const struct device_node
> *dev_node,
>  					    const struct device_node *prev);
> 
> +__rte_internal
>  const void *of_get_mac_address(const struct device_node *np);
> 
>  #define for_each_child_node(parent, child) \
>  	for (child = of_get_next_child(parent, NULL); child != NULL; \
>  			child = of_get_next_child(parent, child))
> 
> +
> +__rte_internal
>  uint32_t of_n_addr_cells(const struct device_node *dev_node);  uint32_t
> of_n_size_cells(const struct device_node *dev_node);
> 
> +__rte_internal
>  const uint32_t *of_get_address(const struct device_node *dev_node, size_t
> idx,
>  			       uint64_t *size, uint32_t *flags);
> 
> +__rte_internal
>  uint64_t of_translate_address(const struct device_node *dev_node,
>  			      const uint32_t *addr) __attribute__((nonnull));
> 
> +__rte_internal
>  bool of_device_is_compatible(const struct device_node *dev_node,
>  			     const char *compatible);
> 
> @@ -146,6 +160,7 @@ bool of_device_is_compatible(const struct
> device_node *dev_node,
>   * subsystem that is device-tree-dependent. Eg. Qman/Bman, config layers,
> etc.
>   * The path should usually be "/proc/device-tree".
>   */
> +__rte_internal
>  int of_init_path(const char *dt_path);
> 
>  /* of_finish() allows a controlled tear-down of the device-tree layer, eg. if a
> diff --git a/drivers/common/dpaax/dpaax_iova_table.h
> b/drivers/common/dpaax/dpaax_iova_table.h
> index fc3b9e7a8f..230fba8ba0 100644
> --- a/drivers/common/dpaax/dpaax_iova_table.h
> +++ b/drivers/common/dpaax/dpaax_iova_table.h
> @@ -61,9 +61,13 @@ extern struct dpaax_iova_table *dpaax_iova_table_p;
> #define DPAAX_MEM_SPLIT_MASK_OFF (DPAAX_MEM_SPLIT - 1) /**< Offset */
> 
>  /* APIs exposed */
> +__rte_internal
>  int dpaax_iova_table_populate(void);
> +__rte_internal
>  void dpaax_iova_table_depopulate(void);
> +__rte_internal
>  int dpaax_iova_table_update(phys_addr_t paddr, void *vaddr, size_t length);
> +__rte_internal
>  void dpaax_iova_table_dump(void);
> 
>  static inline void *dpaax_iova_table_get_va(phys_addr_t paddr) __rte_hot;
> diff --git a/drivers/common/dpaax/rte_common_dpaax_version.map
> b/drivers/common/dpaax/rte_common_dpaax_version.map
> index f72eba761d..ad2b2b3fec 100644
> --- a/drivers/common/dpaax/rte_common_dpaax_version.map
> +++ b/drivers/common/dpaax/rte_common_dpaax_version.map
> @@ -1,4 +1,4 @@
> -DPDK_20.0 {
> +INTERNAL {
>  	global:
> 
>  	dpaax_iova_table_depopulate;
> --
> 2.17.1


^ permalink raw reply	[relevance 0%]

* [dpdk-dev] [PATCH v3 07/12] net/dpaa: move internal symbols into INTERNAL section
                         ` (5 preceding siblings ...)
  2020-05-13 13:27  3%     ` [dpdk-dev] [PATCH v3 06/12] net/dpaa2: " Hemant Agrawal
@ 2020-05-13 13:27  3%     ` Hemant Agrawal
    7 siblings, 0 replies; 200+ results
From: Hemant Agrawal @ 2020-05-13 13:27 UTC (permalink / raw)
  To: dev, david.marchand, mdr; +Cc: Hemant Agrawal

This patch moves the internal symbols to INTERNAL sections
so that any change in them is not reported as ABI breakage.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/net/dpaa/dpaa_ethdev.h            | 2 ++
 drivers/net/dpaa/rte_pmd_dpaa_version.map | 9 ++++++++-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/drivers/net/dpaa/dpaa_ethdev.h b/drivers/net/dpaa/dpaa_ethdev.h
index af9fc2105d..7393a9df05 100644
--- a/drivers/net/dpaa/dpaa_ethdev.h
+++ b/drivers/net/dpaa/dpaa_ethdev.h
@@ -160,12 +160,14 @@ struct dpaa_if_stats {
 	uint64_t tund;		/**<Tx Undersized */
 };
 
+__rte_internal
 int
 dpaa_eth_eventq_attach(const struct rte_eth_dev *dev,
 		int eth_rx_queue_id,
 		u16 ch_id,
 		const struct rte_event_eth_rx_adapter_queue_conf *queue_conf);
 
+__rte_internal
 int
 dpaa_eth_eventq_detach(const struct rte_eth_dev *dev,
 			   int eth_rx_queue_id);
diff --git a/drivers/net/dpaa/rte_pmd_dpaa_version.map b/drivers/net/dpaa/rte_pmd_dpaa_version.map
index f403a1526d..3df144dc8d 100644
--- a/drivers/net/dpaa/rte_pmd_dpaa_version.map
+++ b/drivers/net/dpaa/rte_pmd_dpaa_version.map
@@ -1,9 +1,16 @@
 DPDK_20.0 {
 	global:
 
+	rte_pmd_dpaa_set_tx_loopback;
+
+	local: *;
+};
+
+INTERNAL {
+	global:
+
 	dpaa_eth_eventq_attach;
 	dpaa_eth_eventq_detach;
-	rte_pmd_dpaa_set_tx_loopback;
 
 	local: *;
 };
-- 
2.17.1


^ permalink raw reply	[relevance 3%]

* [dpdk-dev] [PATCH v3 06/12] net/dpaa2: move internal symbols into INTERNAL section
                         ` (4 preceding siblings ...)
  2020-05-13 13:27  3%     ` [dpdk-dev] [PATCH v3 05/12] crypto: " Hemant Agrawal
@ 2020-05-13 13:27  3%     ` Hemant Agrawal
  2020-05-13 13:27  3%     ` [dpdk-dev] [PATCH v3 07/12] net/dpaa: " Hemant Agrawal
    7 siblings, 0 replies; 200+ results
From: Hemant Agrawal @ 2020-05-13 13:27 UTC (permalink / raw)
  To: dev, david.marchand, mdr; +Cc: Hemant Agrawal

This patch moves the internal symbols to INTERNAL sections
so that any change in them is not reported as ABI breakage.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/net/dpaa2/dpaa2_ethdev.h            | 2 ++
 drivers/net/dpaa2/rte_pmd_dpaa2_version.map | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/dpaa2/dpaa2_ethdev.h b/drivers/net/dpaa2/dpaa2_ethdev.h
index 2c49a7f01f..c7fb6539ff 100644
--- a/drivers/net/dpaa2/dpaa2_ethdev.h
+++ b/drivers/net/dpaa2/dpaa2_ethdev.h
@@ -164,11 +164,13 @@ int dpaa2_remove_flow_dist(struct rte_eth_dev *eth_dev,
 
 int dpaa2_attach_bp_list(struct dpaa2_dev_priv *priv, void *blist);
 
+__rte_internal
 int dpaa2_eth_eventq_attach(const struct rte_eth_dev *dev,
 		int eth_rx_queue_id,
 		struct dpaa2_dpcon_dev *dpcon,
 		const struct rte_event_eth_rx_adapter_queue_conf *queue_conf);
 
+__rte_internal
 int dpaa2_eth_eventq_detach(const struct rte_eth_dev *dev,
 		int eth_rx_queue_id);
 
diff --git a/drivers/net/dpaa2/rte_pmd_dpaa2_version.map b/drivers/net/dpaa2/rte_pmd_dpaa2_version.map
index f2bb793319..78ea74e058 100644
--- a/drivers/net/dpaa2/rte_pmd_dpaa2_version.map
+++ b/drivers/net/dpaa2/rte_pmd_dpaa2_version.map
@@ -1,4 +1,4 @@
-DPDK_20.0 {
+INTERNAL {
 	global:
 
 	dpaa2_eth_eventq_attach;
-- 
2.17.1


^ permalink raw reply	[relevance 3%]

* [dpdk-dev] [PATCH v3 05/12] crypto: move internal symbols into INTERNAL section
                         ` (3 preceding siblings ...)
  2020-05-13 13:27  1%     ` [dpdk-dev] [PATCH v3 04/12] bus/dpaa: " Hemant Agrawal
@ 2020-05-13 13:27  3%     ` Hemant Agrawal
  2020-05-13 13:27  3%     ` [dpdk-dev] [PATCH v3 06/12] net/dpaa2: " Hemant Agrawal
                       ` (2 subsequent siblings)
  7 siblings, 0 replies; 200+ results
From: Hemant Agrawal @ 2020-05-13 13:27 UTC (permalink / raw)
  To: dev, david.marchand, mdr; +Cc: Hemant Agrawal

This patch moves the internal symbols to INTERNAL sections
so that any change in them is not reported as ABI breakage.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 devtools/libabigail.abignore                           | 2 ++
 drivers/crypto/dpaa2_sec/dpaa2_sec_event.h             | 5 +++--
 drivers/crypto/dpaa2_sec/rte_pmd_dpaa2_sec_version.map | 2 +-
 drivers/crypto/dpaa_sec/dpaa_sec_event.h               | 8 ++++----
 drivers/crypto/dpaa_sec/rte_pmd_dpaa_sec_version.map   | 4 +---
 5 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/devtools/libabigail.abignore b/devtools/libabigail.abignore
index 5c69a72a82..ebdfe87040 100644
--- a/devtools/libabigail.abignore
+++ b/devtools/libabigail.abignore
@@ -57,3 +57,5 @@
 	file_name_regexp = ^librte_bus_fslmc\.
 [suppress_file]
 	file_name_regexp = ^librte_bus_dpaa\.
+[suppress_file]
+	file_name_regexp = ^librte_pmd_dpaa\.
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_event.h b/drivers/crypto/dpaa2_sec/dpaa2_sec_event.h
index c779d5d837..675cbbb81d 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_event.h
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_event.h
@@ -6,12 +6,13 @@
 #ifndef _DPAA2_SEC_EVENT_H_
 #define _DPAA2_SEC_EVENT_H_
 
-int
-dpaa2_sec_eventq_attach(const struct rte_cryptodev *dev,
+__rte_internal
+int dpaa2_sec_eventq_attach(const struct rte_cryptodev *dev,
 		int qp_id,
 		struct dpaa2_dpcon_dev *dpcon,
 		const struct rte_event *event);
 
+__rte_internal
 int dpaa2_sec_eventq_detach(const struct rte_cryptodev *dev,
 		int qp_id);
 
diff --git a/drivers/crypto/dpaa2_sec/rte_pmd_dpaa2_sec_version.map b/drivers/crypto/dpaa2_sec/rte_pmd_dpaa2_sec_version.map
index 5952d645fd..1352f576e5 100644
--- a/drivers/crypto/dpaa2_sec/rte_pmd_dpaa2_sec_version.map
+++ b/drivers/crypto/dpaa2_sec/rte_pmd_dpaa2_sec_version.map
@@ -1,4 +1,4 @@
-DPDK_20.0 {
+INTERNAL {
 	global:
 
 	dpaa2_sec_eventq_attach;
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec_event.h b/drivers/crypto/dpaa_sec/dpaa_sec_event.h
index 8d1a018096..0b09fa8f75 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec_event.h
+++ b/drivers/crypto/dpaa_sec/dpaa_sec_event.h
@@ -6,14 +6,14 @@
 #ifndef _DPAA_SEC_EVENT_H_
 #define _DPAA_SEC_EVENT_H_
 
-int
-dpaa_sec_eventq_attach(const struct rte_cryptodev *dev,
+__rte_internal
+int dpaa_sec_eventq_attach(const struct rte_cryptodev *dev,
 		int qp_id,
 		uint16_t ch_id,
 		const struct rte_event *event);
 
-int
-dpaa_sec_eventq_detach(const struct rte_cryptodev *dev,
+__rte_internal
+int dpaa_sec_eventq_detach(const struct rte_cryptodev *dev,
 		int qp_id);
 
 #endif /* _DPAA_SEC_EVENT_H_ */
diff --git a/drivers/crypto/dpaa_sec/rte_pmd_dpaa_sec_version.map b/drivers/crypto/dpaa_sec/rte_pmd_dpaa_sec_version.map
index 8580fa13db..aed07fb371 100644
--- a/drivers/crypto/dpaa_sec/rte_pmd_dpaa_sec_version.map
+++ b/drivers/crypto/dpaa_sec/rte_pmd_dpaa_sec_version.map
@@ -1,8 +1,6 @@
-DPDK_20.0 {
+INTERNAL {
 	global:
 
 	dpaa_sec_eventq_attach;
 	dpaa_sec_eventq_detach;
-
-	local: *;
 };
-- 
2.17.1


^ permalink raw reply	[relevance 3%]

* [dpdk-dev] [PATCH v3 04/12] bus/dpaa: move internal symbols into INTERNAL section
                         ` (2 preceding siblings ...)
  2020-05-13 13:27  1%     ` [dpdk-dev] [PATCH v3 03/12] bus/fslmc: " Hemant Agrawal
@ 2020-05-13 13:27  1%     ` Hemant Agrawal
  2020-05-13 13:27  3%     ` [dpdk-dev] [PATCH v3 05/12] crypto: " Hemant Agrawal
                       ` (3 subsequent siblings)
  7 siblings, 0 replies; 200+ results
From: Hemant Agrawal @ 2020-05-13 13:27 UTC (permalink / raw)
  To: dev, david.marchand, mdr; +Cc: Hemant Agrawal

This patch moves the internal symbols to INTERNAL sections
so that any change in them is not reported as ABI breakage.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 devtools/libabigail.abignore              |  2 ++
 drivers/bus/dpaa/include/fsl_bman.h       |  6 +++++
 drivers/bus/dpaa/include/fsl_fman.h       | 27 +++++++++++++++++++
 drivers/bus/dpaa/include/fsl_qman.h       | 32 +++++++++++++++++++++++
 drivers/bus/dpaa/include/fsl_usd.h        |  6 +++++
 drivers/bus/dpaa/include/netcfg.h         |  2 ++
 drivers/bus/dpaa/rte_bus_dpaa_version.map |  7 +----
 drivers/bus/dpaa/rte_dpaa_bus.h           |  5 ++++
 8 files changed, 81 insertions(+), 6 deletions(-)

diff --git a/devtools/libabigail.abignore b/devtools/libabigail.abignore
index 6b4579f45d..5c69a72a82 100644
--- a/devtools/libabigail.abignore
+++ b/devtools/libabigail.abignore
@@ -55,3 +55,5 @@
 	file_name_regexp = ^librte_mempool_dpaa\.
 [suppress_file]
 	file_name_regexp = ^librte_bus_fslmc\.
+[suppress_file]
+	file_name_regexp = ^librte_bus_dpaa\.
diff --git a/drivers/bus/dpaa/include/fsl_bman.h b/drivers/bus/dpaa/include/fsl_bman.h
index f9cd972153..82da2fcfe0 100644
--- a/drivers/bus/dpaa/include/fsl_bman.h
+++ b/drivers/bus/dpaa/include/fsl_bman.h
@@ -264,12 +264,14 @@ int bman_shutdown_pool(u32 bpid);
  * the structure provided by the caller can be released or reused after the
  * function returns.
  */
+__rte_internal
 struct bman_pool *bman_new_pool(const struct bman_pool_params *params);
 
 /**
  * bman_free_pool - Deallocates a Buffer Pool object
  * @pool: the pool object to release
  */
+__rte_internal
 void bman_free_pool(struct bman_pool *pool);
 
 /**
@@ -279,6 +281,7 @@ void bman_free_pool(struct bman_pool *pool);
  * The returned pointer refers to state within the pool object so must not be
  * modified and can no longer be read once the pool object is destroyed.
  */
+__rte_internal
 const struct bman_pool_params *bman_get_params(const struct bman_pool *pool);
 
 /**
@@ -289,6 +292,7 @@ const struct bman_pool_params *bman_get_params(const struct bman_pool *pool);
  * @flags: bit-mask of BMAN_RELEASE_FLAG_*** options
  *
  */
+__rte_internal
 int bman_release(struct bman_pool *pool, const struct bm_buffer *bufs, u8 num,
 		 u32 flags);
 
@@ -302,6 +306,7 @@ int bman_release(struct bman_pool *pool, const struct bm_buffer *bufs, u8 num,
  * The return value will be the number of buffers obtained from the pool, or a
  * negative error code if a h/w error or pool starvation was encountered.
  */
+__rte_internal
 int bman_acquire(struct bman_pool *pool, struct bm_buffer *bufs, u8 num,
 		 u32 flags);
 
@@ -317,6 +322,7 @@ int bman_query_pools(struct bm_pool_state *state);
  *
  * Return the number of the free buffers
  */
+__rte_internal
 u32 bman_query_free_buffers(struct bman_pool *pool);
 
 /**
diff --git a/drivers/bus/dpaa/include/fsl_fman.h b/drivers/bus/dpaa/include/fsl_fman.h
index 5705ebfdce..6c87c8db0d 100644
--- a/drivers/bus/dpaa/include/fsl_fman.h
+++ b/drivers/bus/dpaa/include/fsl_fman.h
@@ -7,6 +7,8 @@
 #ifndef __FSL_FMAN_H
 #define __FSL_FMAN_H
 
+#include <rte_compat.h>
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -43,18 +45,23 @@ struct fm_status_t {
 } __rte_packed;
 
 /* Set MAC address for a particular interface */
+__rte_internal
 int fman_if_add_mac_addr(struct fman_if *p, uint8_t *eth, uint8_t addr_num);
 
 /* Remove a MAC address for a particular interface */
+__rte_internal
 void fman_if_clear_mac_addr(struct fman_if *p, uint8_t addr_num);
 
 /* Get the FMAN statistics */
+__rte_internal
 void fman_if_stats_get(struct fman_if *p, struct rte_eth_stats *stats);
 
 /* Reset the FMAN statistics */
+__rte_internal
 void fman_if_stats_reset(struct fman_if *p);
 
 /* Get all of the FMAN statistics */
+__rte_internal
 void fman_if_stats_get_all(struct fman_if *p, uint64_t *value, int n);
 
 /* Set ignore pause option for a specific interface */
@@ -64,32 +71,43 @@ void fman_if_set_rx_ignore_pause_frames(struct fman_if *p, bool enable);
 void fman_if_conf_max_frame_len(struct fman_if *p, unsigned int max_frame_len);
 
 /* Enable/disable Rx promiscuous mode on specified interface */
+__rte_internal
 void fman_if_promiscuous_enable(struct fman_if *p);
+__rte_internal
 void fman_if_promiscuous_disable(struct fman_if *p);
 
 /* Enable/disable Rx on specific interfaces */
+__rte_internal
 void fman_if_enable_rx(struct fman_if *p);
+__rte_internal
 void fman_if_disable_rx(struct fman_if *p);
 
 /* Enable/disable loopback on specific interfaces */
+__rte_internal
 void fman_if_loopback_enable(struct fman_if *p);
+__rte_internal
 void fman_if_loopback_disable(struct fman_if *p);
 
 /* Set buffer pool on specific interface */
+__rte_internal
 void fman_if_set_bp(struct fman_if *fm_if, unsigned int num, int bpid,
 		    size_t bufsize);
 
 /* Get Flow Control threshold parameters on specific interface */
+__rte_internal
 int fman_if_get_fc_threshold(struct fman_if *fm_if);
 
 /* Enable and Set Flow Control threshold parameters on specific interface */
+__rte_internal
 int fman_if_set_fc_threshold(struct fman_if *fm_if,
 			u32 high_water, u32 low_water, u32 bpid);
 
 /* Get Flow Control pause quanta on specific interface */
+__rte_internal
 int fman_if_get_fc_quanta(struct fman_if *fm_if);
 
 /* Set Flow Control pause quanta on specific interface */
+__rte_internal
 int fman_if_set_fc_quanta(struct fman_if *fm_if, u16 pause_quanta);
 
 /* Set default error fqid on specific interface */
@@ -99,35 +117,44 @@ void fman_if_set_err_fqid(struct fman_if *fm_if, uint32_t err_fqid);
 int fman_if_get_ic_params(struct fman_if *fm_if, struct fman_if_ic_params *icp);
 
 /* Set IC transfer params */
+__rte_internal
 int fman_if_set_ic_params(struct fman_if *fm_if,
 			  const struct fman_if_ic_params *icp);
 
 /* Get interface fd->offset value */
+__rte_internal
 int fman_if_get_fdoff(struct fman_if *fm_if);
 
 /* Set interface fd->offset value */
+__rte_internal
 void fman_if_set_fdoff(struct fman_if *fm_if, uint32_t fd_offset);
 
 /* Get interface SG enable status value */
+__rte_internal
 int fman_if_get_sg_enable(struct fman_if *fm_if);
 
 /* Set interface SG support mode */
+__rte_internal
 void fman_if_set_sg(struct fman_if *fm_if, int enable);
 
 /* Get interface Max Frame length (MTU) */
 uint16_t fman_if_get_maxfrm(struct fman_if *fm_if);
 
 /* Set interface  Max Frame length (MTU) */
+__rte_internal
 void fman_if_set_maxfrm(struct fman_if *fm_if, uint16_t max_frm);
 
 /* Set interface next invoked action for dequeue operation */
 void fman_if_set_dnia(struct fman_if *fm_if, uint32_t nia);
 
 /* discard error packets on rx */
+__rte_internal
 void fman_if_discard_rx_errors(struct fman_if *fm_if);
 
+__rte_internal
 void fman_if_set_mcast_filter_table(struct fman_if *p);
 
+__rte_internal
 void fman_if_reset_mcast_filter_table(struct fman_if *p);
 
 int fman_if_add_hash_mac_addr(struct fman_if *p, uint8_t *eth);
diff --git a/drivers/bus/dpaa/include/fsl_qman.h b/drivers/bus/dpaa/include/fsl_qman.h
index 1b3342e7e6..4411bb0a79 100644
--- a/drivers/bus/dpaa/include/fsl_qman.h
+++ b/drivers/bus/dpaa/include/fsl_qman.h
@@ -1314,6 +1314,7 @@ struct qman_cgr {
 #define QMAN_CGR_MODE_FRAME          0x00000001
 
 #ifdef CONFIG_FSL_QMAN_FQ_LOOKUP
+__rte_internal
 void qman_set_fq_lookup_table(void **table);
 #endif
 
@@ -1322,6 +1323,7 @@ void qman_set_fq_lookup_table(void **table);
  */
 int qman_get_portal_index(void);
 
+__rte_internal
 u32 qman_portal_dequeue(struct rte_event ev[], unsigned int poll_limit,
 			void **bufs);
 
@@ -1333,6 +1335,7 @@ u32 qman_portal_dequeue(struct rte_event ev[], unsigned int poll_limit,
  * processed via qman_poll_***() functions). Returns zero for success, or
  * -EINVAL if the current CPU is sharing a portal hosted on another CPU.
  */
+__rte_internal
 int qman_irqsource_add(u32 bits);
 
 /**
@@ -1340,6 +1343,7 @@ int qman_irqsource_add(u32 bits);
  * takes portal (fq specific) as input rather than using the thread affined
  * portal.
  */
+__rte_internal
 int qman_fq_portal_irqsource_add(struct qman_portal *p, u32 bits);
 
 /**
@@ -1350,6 +1354,7 @@ int qman_fq_portal_irqsource_add(struct qman_portal *p, u32 bits);
  * instead be processed via qman_poll_***() functions. Returns zero for success,
  * or -EINVAL if the current CPU is sharing a portal hosted on another CPU.
  */
+__rte_internal
 int qman_irqsource_remove(u32 bits);
 
 /**
@@ -1357,6 +1362,7 @@ int qman_irqsource_remove(u32 bits);
  * takes portal (fq specific) as input rather than using the thread affined
  * portal.
  */
+__rte_internal
 int qman_fq_portal_irqsource_remove(struct qman_portal *p, u32 bits);
 
 /**
@@ -1369,6 +1375,7 @@ int qman_fq_portal_irqsource_remove(struct qman_portal *p, u32 bits);
  */
 u16 qman_affine_channel(int cpu);
 
+__rte_internal
 unsigned int qman_portal_poll_rx(unsigned int poll_limit,
 				 void **bufs, struct qman_portal *q);
 
@@ -1380,6 +1387,7 @@ unsigned int qman_portal_poll_rx(unsigned int poll_limit,
  *
  * This function will issue a volatile dequeue command to the QMAN.
  */
+__rte_internal
 int qman_set_vdq(struct qman_fq *fq, u16 num, uint32_t vdqcr_flags);
 
 /**
@@ -1390,6 +1398,7 @@ int qman_set_vdq(struct qman_fq *fq, u16 num, uint32_t vdqcr_flags);
  * is issued. It will keep returning NULL until there is no packet available on
  * the DQRR.
  */
+__rte_internal
 struct qm_dqrr_entry *qman_dequeue(struct qman_fq *fq);
 
 /**
@@ -1401,6 +1410,7 @@ struct qm_dqrr_entry *qman_dequeue(struct qman_fq *fq);
  * This will consume the DQRR enrey and make it available for next volatile
  * dequeue.
  */
+__rte_internal
 void qman_dqrr_consume(struct qman_fq *fq,
 		       struct qm_dqrr_entry *dq);
 
@@ -1414,6 +1424,7 @@ void qman_dqrr_consume(struct qman_fq *fq,
  * this function will return -EINVAL, otherwise the return value is >=0 and
  * represents the number of DQRR entries processed.
  */
+__rte_internal
 int qman_poll_dqrr(unsigned int limit);
 
 /**
@@ -1460,6 +1471,7 @@ void qman_start_dequeues(void);
  * (SDQCR). The requested pools are limited to those the portal has dequeue
  * access to.
  */
+__rte_internal
 void qman_static_dequeue_add(u32 pools, struct qman_portal *qm);
 
 /**
@@ -1507,6 +1519,7 @@ void qman_dca(const struct qm_dqrr_entry *dq, int park_request);
  * function must be called from the same CPU as that which processed the DQRR
  * entry in the first place.
  */
+__rte_internal
 void qman_dca_index(u8 index, int park_request);
 
 /**
@@ -1564,6 +1577,7 @@ void qman_set_dc_ern(qman_cb_dc_ern handler, int affine);
  * a frame queue object based on that, rather than assuming/requiring that it be
  * Out of Service.
  */
+__rte_internal
 int qman_create_fq(u32 fqid, u32 flags, struct qman_fq *fq);
 
 /**
@@ -1582,6 +1596,7 @@ void qman_destroy_fq(struct qman_fq *fq, u32 flags);
  * qman_fq_fqid - Queries the frame queue ID of a FQ object
  * @fq: the frame queue object to query
  */
+__rte_internal
 u32 qman_fq_fqid(struct qman_fq *fq);
 
 /**
@@ -1594,6 +1609,7 @@ u32 qman_fq_fqid(struct qman_fq *fq);
  * This captures the state, as seen by the driver, at the time the function
  * executes.
  */
+__rte_internal
 void qman_fq_state(struct qman_fq *fq, enum qman_fq_state *state, u32 *flags);
 
 /**
@@ -1630,6 +1646,7 @@ void qman_fq_state(struct qman_fq *fq, enum qman_fq_state *state, u32 *flags);
  * context_a.address fields and will leave the stashing fields provided by the
  * user alone, otherwise it will zero out the context_a.stashing fields.
  */
+__rte_internal
 int qman_init_fq(struct qman_fq *fq, u32 flags, struct qm_mcc_initfq *opts);
 
 /**
@@ -1659,6 +1676,7 @@ int qman_schedule_fq(struct qman_fq *fq);
  * caller should be prepared to accept the callback as the function is called,
  * not only once it has returned.
  */
+__rte_internal
 int qman_retire_fq(struct qman_fq *fq, u32 *flags);
 
 /**
@@ -1668,6 +1686,7 @@ int qman_retire_fq(struct qman_fq *fq, u32 *flags);
  * The frame queue must be retired and empty, and if any order restoration list
  * was released as ERNs at the time of retirement, they must all be consumed.
  */
+__rte_internal
 int qman_oos_fq(struct qman_fq *fq);
 
 /**
@@ -1701,6 +1720,7 @@ int qman_query_fq_has_pkts(struct qman_fq *fq);
  * @fq: the frame queue object to be queried
  * @np: storage for the queried FQD fields
  */
+__rte_internal
 int qman_query_fq_np(struct qman_fq *fq, struct qm_mcr_queryfq_np *np);
 
 /**
@@ -1708,6 +1728,7 @@ int qman_query_fq_np(struct qman_fq *fq, struct qm_mcr_queryfq_np *np);
  * @fq: the frame queue object to be queried
  * @frm_cnt: number of frames in the queue
  */
+__rte_internal
 int qman_query_fq_frm_cnt(struct qman_fq *fq, u32 *frm_cnt);
 
 /**
@@ -1738,6 +1759,7 @@ int qman_query_wq(u8 query_dedicated, struct qm_mcr_querywq *wq);
  * callback, or by waiting for the QMAN_FQ_STATE_VDQCR bit to disappear from the
  * "flags" retrieved from qman_fq_state().
  */
+__rte_internal
 int qman_volatile_dequeue(struct qman_fq *fq, u32 flags, u32 vdqcr);
 
 /**
@@ -1773,8 +1795,10 @@ int qman_volatile_dequeue(struct qman_fq *fq, u32 flags, u32 vdqcr);
  * of an already busy hardware resource by throttling many of the to-be-dropped
  * enqueues "at the source".
  */
+__rte_internal
 int qman_enqueue(struct qman_fq *fq, const struct qm_fd *fd, u32 flags);
 
+__rte_internal
 int qman_enqueue_multi(struct qman_fq *fq, const struct qm_fd *fd, u32 *flags,
 		       int frames_to_send);
 
@@ -1788,6 +1812,7 @@ int qman_enqueue_multi(struct qman_fq *fq, const struct qm_fd *fd, u32 *flags,
  * This API is similar to qman_enqueue_multi(), but it takes fd which needs
  * to be processed by different frame queues.
  */
+__rte_internal
 int
 qman_enqueue_multi_fq(struct qman_fq *fq[], const struct qm_fd *fd,
 		      u32 *flags, int frames_to_send);
@@ -1876,6 +1901,7 @@ int qman_shutdown_fq(u32 fqid);
  * @fqid: the base FQID of the range to deallocate
  * @count: the number of FQIDs in the range
  */
+__rte_internal
 int qman_reserve_fqid_range(u32 fqid, unsigned int count);
 static inline int qman_reserve_fqid(u32 fqid)
 {
@@ -1895,6 +1921,7 @@ static inline int qman_reserve_fqid(u32 fqid)
  * than requested (though alignment will be as requested). If @partial is zero,
  * the return value will either be 'count' or negative.
  */
+__rte_internal
 int qman_alloc_pool_range(u32 *result, u32 count, u32 align, int partial);
 static inline int qman_alloc_pool(u32 *result)
 {
@@ -1942,6 +1969,7 @@ void qman_seed_pool_range(u32 id, unsigned int count);
  * any unspecified parameters) will be used rather than a modify hw hardware
  * (which only modifies the specified parameters).
  */
+__rte_internal
 int qman_create_cgr(struct qman_cgr *cgr, u32 flags,
 		    struct qm_mcc_initcgr *opts);
 
@@ -1964,6 +1992,7 @@ int qman_create_cgr_to_dcp(struct qman_cgr *cgr, u32 flags, u16 dcp_portal,
  * is executed. This must be excuted on the same affine portal on which it was
  * created.
  */
+__rte_internal
 int qman_delete_cgr(struct qman_cgr *cgr);
 
 /**
@@ -1980,6 +2009,7 @@ int qman_delete_cgr(struct qman_cgr *cgr);
  * unspecified parameters) will be used rather than a modify hw hardware (which
  * only modifies the specified parameters).
  */
+__rte_internal
 int qman_modify_cgr(struct qman_cgr *cgr, u32 flags,
 		    struct qm_mcc_initcgr *opts);
 
@@ -2008,6 +2038,7 @@ int qman_query_congestion(struct qm_mcr_querycongestion *congestion);
  * than requested (though alignment will be as requested). If @partial is zero,
  * the return value will either be 'count' or negative.
  */
+__rte_internal
 int qman_alloc_cgrid_range(u32 *result, u32 count, u32 align, int partial);
 static inline int qman_alloc_cgrid(u32 *result)
 {
@@ -2021,6 +2052,7 @@ static inline int qman_alloc_cgrid(u32 *result)
  * @id: the base CGR ID of the range to deallocate
  * @count: the number of CGR IDs in the range
  */
+__rte_internal
 void qman_release_cgrid_range(u32 id, unsigned int count);
 static inline void qman_release_cgrid(u32 id)
 {
diff --git a/drivers/bus/dpaa/include/fsl_usd.h b/drivers/bus/dpaa/include/fsl_usd.h
index 263d9bb976..30ec63a09d 100644
--- a/drivers/bus/dpaa/include/fsl_usd.h
+++ b/drivers/bus/dpaa/include/fsl_usd.h
@@ -58,6 +58,7 @@ int bman_allocate_raw_portal(struct dpaa_raw_portal *portal);
 int bman_free_raw_portal(struct dpaa_raw_portal *portal);
 
 /* Obtain thread-local UIO file-descriptors */
+__rte_internal
 int qman_thread_fd(void);
 int bman_thread_fd(void);
 
@@ -66,8 +67,12 @@ int bman_thread_fd(void);
  * processing is complete. As such, it is essential to call this before going
  * into another blocking read/select/poll.
  */
+__rte_internal
 void qman_thread_irq(void);
+
+__rte_internal
 void bman_thread_irq(void);
+__rte_internal
 void qman_fq_portal_thread_irq(struct qman_portal *qp);
 
 void qman_clear_irq(void);
@@ -77,6 +82,7 @@ int qman_global_init(void);
 int bman_global_init(void);
 
 /* Direct portal create and destroy */
+__rte_internal
 struct qman_portal *fsl_qman_fq_portal_create(int *fd);
 int fsl_qman_fq_portal_destroy(struct qman_portal *qp);
 int fsl_qman_fq_portal_init(struct qman_portal *qp);
diff --git a/drivers/bus/dpaa/include/netcfg.h b/drivers/bus/dpaa/include/netcfg.h
index bf7bfae8cb..d7d1befd24 100644
--- a/drivers/bus/dpaa/include/netcfg.h
+++ b/drivers/bus/dpaa/include/netcfg.h
@@ -46,11 +46,13 @@ struct netcfg_interface {
  * cfg_file: FMC config XML file
  * Returns the configuration information in newly allocated memory.
  */
+__rte_internal
 struct netcfg_info *netcfg_acquire(void);
 
 /* cfg_ptr: configuration information pointer.
  * Frees the resources allocated by the configuration layer.
  */
+__rte_internal
 void netcfg_release(struct netcfg_info *cfg_ptr);
 
 #ifdef RTE_LIBRTE_DPAA_DEBUG_DRIVER
diff --git a/drivers/bus/dpaa/rte_bus_dpaa_version.map b/drivers/bus/dpaa/rte_bus_dpaa_version.map
index e6ca4361e0..f4947fac41 100644
--- a/drivers/bus/dpaa/rte_bus_dpaa_version.map
+++ b/drivers/bus/dpaa/rte_bus_dpaa_version.map
@@ -1,4 +1,4 @@
-DPDK_20.0 {
+INTERNAL {
 	global:
 
 	bman_acquire;
@@ -13,7 +13,6 @@ DPDK_20.0 {
 	dpaa_logtype_pmd;
 	dpaa_netcfg;
 	dpaa_svr_family;
-	fman_ccsr_map_fd;
 	fman_dealloc_bufs_mask_hi;
 	fman_dealloc_bufs_mask_lo;
 	fman_if_add_mac_addr;
@@ -51,7 +50,6 @@ DPDK_20.0 {
 	qm_channel_pool1;
 	qman_alloc_cgrid_range;
 	qman_alloc_pool_range;
-	qman_clear_irq;
 	qman_create_cgr;
 	qman_create_fq;
 	qman_dca_index;
@@ -87,10 +85,7 @@ DPDK_20.0 {
 	qman_volatile_dequeue;
 	rte_dpaa_driver_register;
 	rte_dpaa_driver_unregister;
-	rte_dpaa_mem_ptov;
 	rte_dpaa_portal_fq_close;
 	rte_dpaa_portal_fq_init;
 	rte_dpaa_portal_init;
-
-	local: *;
 };
diff --git a/drivers/bus/dpaa/rte_dpaa_bus.h b/drivers/bus/dpaa/rte_dpaa_bus.h
index 373aca9785..d4aee132ef 100644
--- a/drivers/bus/dpaa/rte_dpaa_bus.h
+++ b/drivers/bus/dpaa/rte_dpaa_bus.h
@@ -158,6 +158,7 @@ rte_dpaa_mem_vtop(void *vaddr)
  *   A pointer to a rte_dpaa_driver structure describing the driver
  *   to be registered.
  */
+__rte_internal
 void rte_dpaa_driver_register(struct rte_dpaa_driver *driver);
 
 /**
@@ -167,6 +168,7 @@ void rte_dpaa_driver_register(struct rte_dpaa_driver *driver);
  *	A pointer to a rte_dpaa_driver structure describing the driver
  *	to be unregistered.
  */
+__rte_internal
 void rte_dpaa_driver_unregister(struct rte_dpaa_driver *driver);
 
 /**
@@ -178,10 +180,13 @@ void rte_dpaa_driver_unregister(struct rte_dpaa_driver *driver);
  * @return
  *	0 in case of success, error otherwise
  */
+__rte_internal
 int rte_dpaa_portal_init(void *arg);
 
+__rte_internal
 int rte_dpaa_portal_fq_init(void *arg, struct qman_fq *fq);
 
+__rte_internal
 int rte_dpaa_portal_fq_close(struct qman_fq *fq);
 
 /**
-- 
2.17.1


^ permalink raw reply	[relevance 1%]

* [dpdk-dev] [PATCH v3 03/12] bus/fslmc: move internal symbols into INTERNAL section
    2020-05-13 13:27  3%     ` [dpdk-dev] [PATCH v3 01/12] common/dpaax: move internal symbols into INTERNAL section Hemant Agrawal
  2020-05-13 13:27  3%     ` [dpdk-dev] [PATCH v3 02/12] mempool/dpaa2: " Hemant Agrawal
@ 2020-05-13 13:27  1%     ` Hemant Agrawal
  2020-05-13 13:27  1%     ` [dpdk-dev] [PATCH v3 04/12] bus/dpaa: " Hemant Agrawal
                       ` (4 subsequent siblings)
  7 siblings, 0 replies; 200+ results
From: Hemant Agrawal @ 2020-05-13 13:27 UTC (permalink / raw)
  To: dev, david.marchand, mdr; +Cc: Hemant Agrawal

This patch moves the internal symbols to INTERNAL sections
so that any change in them is not reported as ABI breakage.

This patch also removes two symbols, which were not used
anywhere else i.e. rte_fslmc_vfio_dmamap & dpaa2_get_qbman_swp

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 devtools/libabigail.abignore                  |  2 +
 drivers/bus/fslmc/fslmc_vfio.h                |  4 ++
 drivers/bus/fslmc/mc/fsl_dpbp.h               |  6 +++
 drivers/bus/fslmc/mc/fsl_dpci.h               |  3 ++
 drivers/bus/fslmc/mc/fsl_dpcon.h              |  2 +
 drivers/bus/fslmc/mc/fsl_dpdmai.h             |  8 ++++
 drivers/bus/fslmc/mc/fsl_dpio.h               |  9 ++++
 drivers/bus/fslmc/mc/fsl_dpmng.h              |  2 +
 drivers/bus/fslmc/mc/fsl_mc_cmd.h             |  1 +
 drivers/bus/fslmc/portal/dpaa2_hw_dpio.h      |  5 +++
 drivers/bus/fslmc/portal/dpaa2_hw_pvt.h       |  8 ++++
 .../bus/fslmc/qbman/include/fsl_qbman_debug.h |  3 ++
 .../fslmc/qbman/include/fsl_qbman_portal.h    | 41 +++++++++++++++++++
 drivers/bus/fslmc/rte_bus_fslmc_version.map   |  4 +-
 drivers/bus/fslmc/rte_fslmc.h                 |  4 ++
 15 files changed, 99 insertions(+), 3 deletions(-)

diff --git a/devtools/libabigail.abignore b/devtools/libabigail.abignore
index 4a5241073e..6b4579f45d 100644
--- a/devtools/libabigail.abignore
+++ b/devtools/libabigail.abignore
@@ -53,3 +53,5 @@
 	file_name_regexp = ^librte_common_dpaax\.
 [suppress_file]
 	file_name_regexp = ^librte_mempool_dpaa\.
+[suppress_file]
+	file_name_regexp = ^librte_bus_fslmc\.
diff --git a/drivers/bus/fslmc/fslmc_vfio.h b/drivers/bus/fslmc/fslmc_vfio.h
index c988121294..609e48aea3 100644
--- a/drivers/bus/fslmc/fslmc_vfio.h
+++ b/drivers/bus/fslmc/fslmc_vfio.h
@@ -41,7 +41,11 @@ typedef struct fslmc_vfio_container {
 } fslmc_vfio_container;
 
 extern char *fslmc_container;
+
+__rte_internal
 int rte_dpaa2_intr_enable(struct rte_intr_handle *intr_handle, int index);
+
+__rte_internal
 int rte_dpaa2_intr_disable(struct rte_intr_handle *intr_handle, int index);
 
 int rte_dpaa2_vfio_setup_intr(struct rte_intr_handle *intr_handle,
diff --git a/drivers/bus/fslmc/mc/fsl_dpbp.h b/drivers/bus/fslmc/mc/fsl_dpbp.h
index 9d405b42c4..7b537a21be 100644
--- a/drivers/bus/fslmc/mc/fsl_dpbp.h
+++ b/drivers/bus/fslmc/mc/fsl_dpbp.h
@@ -14,6 +14,7 @@
 
 struct fsl_mc_io;
 
+__rte_internal
 int dpbp_open(struct fsl_mc_io *mc_io,
 	      uint32_t cmd_flags,
 	      int dpbp_id,
@@ -42,10 +43,12 @@ int dpbp_destroy(struct fsl_mc_io *mc_io,
 		 uint32_t cmd_flags,
 		 uint32_t obj_id);
 
+__rte_internal
 int dpbp_enable(struct fsl_mc_io *mc_io,
 		uint32_t cmd_flags,
 		uint16_t token);
 
+__rte_internal
 int dpbp_disable(struct fsl_mc_io *mc_io,
 		 uint32_t cmd_flags,
 		 uint16_t token);
@@ -55,6 +58,7 @@ int dpbp_is_enabled(struct fsl_mc_io *mc_io,
 		    uint16_t token,
 		    int *en);
 
+__rte_internal
 int dpbp_reset(struct fsl_mc_io *mc_io,
 	       uint32_t cmd_flags,
 	       uint16_t token);
@@ -70,6 +74,7 @@ struct dpbp_attr {
 	uint16_t bpid;
 };
 
+__rte_internal
 int dpbp_get_attributes(struct fsl_mc_io *mc_io,
 			uint32_t cmd_flags,
 			uint16_t token,
@@ -88,6 +93,7 @@ int dpbp_get_api_version(struct fsl_mc_io *mc_io,
 			 uint16_t *major_ver,
 			 uint16_t *minor_ver);
 
+__rte_internal
 int dpbp_get_num_free_bufs(struct fsl_mc_io *mc_io,
 			   uint32_t cmd_flags,
 			   uint16_t token,
diff --git a/drivers/bus/fslmc/mc/fsl_dpci.h b/drivers/bus/fslmc/mc/fsl_dpci.h
index a0ee5bfe69..81fd3438aa 100644
--- a/drivers/bus/fslmc/mc/fsl_dpci.h
+++ b/drivers/bus/fslmc/mc/fsl_dpci.h
@@ -181,6 +181,7 @@ struct dpci_rx_queue_cfg {
 	int order_preservation_en;
 };
 
+__rte_internal
 int dpci_set_rx_queue(struct fsl_mc_io *mc_io,
 		      uint32_t cmd_flags,
 		      uint16_t token,
@@ -228,6 +229,7 @@ int dpci_get_api_version(struct fsl_mc_io *mc_io,
 			 uint16_t *major_ver,
 			 uint16_t *minor_ver);
 
+__rte_internal
 int dpci_set_opr(struct fsl_mc_io *mc_io,
 		 uint32_t cmd_flags,
 		 uint16_t token,
@@ -235,6 +237,7 @@ int dpci_set_opr(struct fsl_mc_io *mc_io,
 		 uint8_t options,
 		 struct opr_cfg *cfg);
 
+__rte_internal
 int dpci_get_opr(struct fsl_mc_io *mc_io,
 		 uint32_t cmd_flags,
 		 uint16_t token,
diff --git a/drivers/bus/fslmc/mc/fsl_dpcon.h b/drivers/bus/fslmc/mc/fsl_dpcon.h
index af81d51195..7caa6c68a1 100644
--- a/drivers/bus/fslmc/mc/fsl_dpcon.h
+++ b/drivers/bus/fslmc/mc/fsl_dpcon.h
@@ -20,6 +20,7 @@ struct fsl_mc_io;
  */
 #define DPCON_INVALID_DPIO_ID		(int)(-1)
 
+__rte_internal
 int dpcon_open(struct fsl_mc_io *mc_io,
 	       uint32_t cmd_flags,
 	       int dpcon_id,
@@ -77,6 +78,7 @@ struct dpcon_attr {
 	uint8_t num_priorities;
 };
 
+__rte_internal
 int dpcon_get_attributes(struct fsl_mc_io *mc_io,
 			 uint32_t cmd_flags,
 			 uint16_t token,
diff --git a/drivers/bus/fslmc/mc/fsl_dpdmai.h b/drivers/bus/fslmc/mc/fsl_dpdmai.h
index 40469cc139..e7e8a5dda9 100644
--- a/drivers/bus/fslmc/mc/fsl_dpdmai.h
+++ b/drivers/bus/fslmc/mc/fsl_dpdmai.h
@@ -23,11 +23,13 @@ struct fsl_mc_io;
  */
 #define DPDMAI_ALL_QUEUES	(uint8_t)(-1)
 
+__rte_internal
 int dpdmai_open(struct fsl_mc_io *mc_io,
 		uint32_t cmd_flags,
 		int dpdmai_id,
 		uint16_t *token);
 
+__rte_internal
 int dpdmai_close(struct fsl_mc_io *mc_io,
 		 uint32_t cmd_flags,
 		 uint16_t token);
@@ -54,10 +56,12 @@ int dpdmai_destroy(struct fsl_mc_io *mc_io,
 		   uint32_t cmd_flags,
 		   uint32_t object_id);
 
+__rte_internal
 int dpdmai_enable(struct fsl_mc_io *mc_io,
 		  uint32_t cmd_flags,
 		  uint16_t token);
 
+__rte_internal
 int dpdmai_disable(struct fsl_mc_io *mc_io,
 		   uint32_t cmd_flags,
 		   uint16_t token);
@@ -82,6 +86,7 @@ struct dpdmai_attr {
 	uint8_t num_of_queues;
 };
 
+__rte_internal
 int dpdmai_get_attributes(struct fsl_mc_io *mc_io,
 			  uint32_t cmd_flags,
 			  uint16_t token,
@@ -148,6 +153,7 @@ struct dpdmai_rx_queue_cfg {
 
 };
 
+__rte_internal
 int dpdmai_set_rx_queue(struct fsl_mc_io *mc_io,
 			uint32_t cmd_flags,
 			uint16_t token,
@@ -168,6 +174,7 @@ struct dpdmai_rx_queue_attr {
 	uint32_t fqid;
 };
 
+__rte_internal
 int dpdmai_get_rx_queue(struct fsl_mc_io *mc_io,
 			uint32_t cmd_flags,
 			uint16_t token,
@@ -184,6 +191,7 @@ struct dpdmai_tx_queue_attr {
 	uint32_t fqid;
 };
 
+__rte_internal
 int dpdmai_get_tx_queue(struct fsl_mc_io *mc_io,
 			uint32_t cmd_flags,
 			uint16_t token,
diff --git a/drivers/bus/fslmc/mc/fsl_dpio.h b/drivers/bus/fslmc/mc/fsl_dpio.h
index 3158f53191..92e97db94b 100644
--- a/drivers/bus/fslmc/mc/fsl_dpio.h
+++ b/drivers/bus/fslmc/mc/fsl_dpio.h
@@ -13,11 +13,13 @@
 
 struct fsl_mc_io;
 
+__rte_internal
 int dpio_open(struct fsl_mc_io *mc_io,
 	      uint32_t cmd_flags,
 	      int dpio_id,
 	      uint16_t *token);
 
+__rte_internal
 int dpio_close(struct fsl_mc_io *mc_io,
 	       uint32_t cmd_flags,
 	       uint16_t token);
@@ -57,10 +59,12 @@ int dpio_destroy(struct fsl_mc_io *mc_io,
 		 uint32_t cmd_flags,
 		 uint32_t object_id);
 
+__rte_internal
 int dpio_enable(struct fsl_mc_io *mc_io,
 		uint32_t cmd_flags,
 		uint16_t token);
 
+__rte_internal
 int dpio_disable(struct fsl_mc_io *mc_io,
 		 uint32_t cmd_flags,
 		 uint16_t token);
@@ -70,10 +74,12 @@ int dpio_is_enabled(struct fsl_mc_io *mc_io,
 		    uint16_t token,
 		    int *en);
 
+__rte_internal
 int dpio_reset(struct fsl_mc_io *mc_io,
 	       uint32_t cmd_flags,
 	       uint16_t token);
 
+__rte_internal
 int dpio_set_stashing_destination(struct fsl_mc_io *mc_io,
 				  uint32_t cmd_flags,
 				  uint16_t token,
@@ -84,12 +90,14 @@ int dpio_get_stashing_destination(struct fsl_mc_io *mc_io,
 				  uint16_t token,
 				  uint8_t *sdest);
 
+__rte_internal
 int dpio_add_static_dequeue_channel(struct fsl_mc_io *mc_io,
 				    uint32_t cmd_flags,
 				    uint16_t token,
 				    int dpcon_id,
 				    uint8_t *channel_index);
 
+__rte_internal
 int dpio_remove_static_dequeue_channel(struct fsl_mc_io *mc_io,
 				       uint32_t cmd_flags,
 				       uint16_t token,
@@ -119,6 +127,7 @@ struct dpio_attr {
 	uint32_t clk;
 };
 
+__rte_internal
 int dpio_get_attributes(struct fsl_mc_io *mc_io,
 			uint32_t cmd_flags,
 			uint16_t token,
diff --git a/drivers/bus/fslmc/mc/fsl_dpmng.h b/drivers/bus/fslmc/mc/fsl_dpmng.h
index 36c387af27..cdd8506625 100644
--- a/drivers/bus/fslmc/mc/fsl_dpmng.h
+++ b/drivers/bus/fslmc/mc/fsl_dpmng.h
@@ -34,6 +34,7 @@ struct mc_version {
 	uint32_t revision;
 };
 
+__rte_internal
 int mc_get_version(struct fsl_mc_io *mc_io,
 		   uint32_t cmd_flags,
 		   struct mc_version *mc_ver_info);
@@ -48,6 +49,7 @@ struct mc_soc_version {
 	uint32_t pvr;
 };
 
+__rte_internal
 int mc_get_soc_version(struct fsl_mc_io *mc_io,
 		       uint32_t cmd_flags,
 		       struct mc_soc_version *mc_platform_info);
diff --git a/drivers/bus/fslmc/mc/fsl_mc_cmd.h b/drivers/bus/fslmc/mc/fsl_mc_cmd.h
index ac919610cf..06ea41a3b2 100644
--- a/drivers/bus/fslmc/mc/fsl_mc_cmd.h
+++ b/drivers/bus/fslmc/mc/fsl_mc_cmd.h
@@ -80,6 +80,7 @@ enum mc_cmd_status {
 
 #define MC_CMD_HDR_FLAGS_MASK	0xFF00FF00
 
+__rte_internal
 int mc_send_command(struct fsl_mc_io *mc_io, struct mc_command *cmd);
 
 static inline uint64_t mc_encode_cmd_header(uint16_t cmd_id,
diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.h b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.h
index 2829c93806..7c5966241a 100644
--- a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.h
+++ b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.h
@@ -36,20 +36,25 @@ extern uint8_t dpaa2_eqcr_size;
 extern struct dpaa2_io_portal_t dpaa2_io_portal[RTE_MAX_LCORE];
 
 /* Affine a DPIO portal to current processing thread */
+__rte_internal
 int dpaa2_affine_qbman_swp(void);
 
 /* Affine additional DPIO portal to current crypto processing thread */
+__rte_internal
 int dpaa2_affine_qbman_ethrx_swp(void);
 
 /* allocate memory for FQ - dq storage */
+__rte_internal
 int
 dpaa2_alloc_dq_storage(struct queue_storage_info_t *q_storage);
 
 /* free memory for FQ- dq storage */
+__rte_internal
 void
 dpaa2_free_dq_storage(struct queue_storage_info_t *q_storage);
 
 /* free the enqueue response descriptors */
+__rte_internal
 uint32_t
 dpaa2_free_eq_descriptors(void);
 
diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h
index 368fe7c688..33b191f823 100644
--- a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h
+++ b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h
@@ -426,11 +426,19 @@ void set_swp_active_dqs(uint16_t dpio_index, struct qbman_result *dqs)
 {
 	rte_global_active_dqs_list[dpio_index].global_active_dqs = dqs;
 }
+__rte_internal
 struct dpaa2_dpbp_dev *dpaa2_alloc_dpbp_dev(void);
+
+__rte_internal
 void dpaa2_free_dpbp_dev(struct dpaa2_dpbp_dev *dpbp);
+
+__rte_internal
 int dpaa2_dpbp_supported(void);
 
+__rte_internal
 struct dpaa2_dpci_dev *rte_dpaa2_alloc_dpci_dev(void);
+
+__rte_internal
 void rte_dpaa2_free_dpci_dev(struct dpaa2_dpci_dev *dpci);
 
 #endif
diff --git a/drivers/bus/fslmc/qbman/include/fsl_qbman_debug.h b/drivers/bus/fslmc/qbman/include/fsl_qbman_debug.h
index e010b1b6ae..328f2022fc 100644
--- a/drivers/bus/fslmc/qbman/include/fsl_qbman_debug.h
+++ b/drivers/bus/fslmc/qbman/include/fsl_qbman_debug.h
@@ -24,7 +24,10 @@ uint8_t verb;
 	uint8_t reserved2[29];
 };
 
+__rte_internal
 int qbman_fq_query_state(struct qbman_swp *s, uint32_t fqid,
 			 struct qbman_fq_query_np_rslt *r);
+
+__rte_internal
 uint32_t qbman_fq_state_frame_count(const struct qbman_fq_query_np_rslt *r);
 uint32_t qbman_fq_state_byte_count(const struct qbman_fq_query_np_rslt *r);
diff --git a/drivers/bus/fslmc/qbman/include/fsl_qbman_portal.h b/drivers/bus/fslmc/qbman/include/fsl_qbman_portal.h
index 88f0a99686..7ac0f82106 100644
--- a/drivers/bus/fslmc/qbman/include/fsl_qbman_portal.h
+++ b/drivers/bus/fslmc/qbman/include/fsl_qbman_portal.h
@@ -117,6 +117,7 @@ uint32_t qbman_swp_interrupt_read_status(struct qbman_swp *p);
  * @p: the given software portal object.
  * @mask: The value to set in SWP_ISR register.
  */
+__rte_internal
 void qbman_swp_interrupt_clear_status(struct qbman_swp *p, uint32_t mask);
 
 /**
@@ -286,6 +287,7 @@ void qbman_swp_push_get(struct qbman_swp *s, uint8_t channel_idx, int *enabled);
  * rather by specifying the index (from 0 to 15) that has been mapped to the
  * desired channel.
  */
+__rte_internal
 void qbman_swp_push_set(struct qbman_swp *s, uint8_t channel_idx, int enable);
 
 /* ------------------- */
@@ -325,6 +327,7 @@ enum qbman_pull_type_e {
  * default/starting state.
  * @d: the pull dequeue descriptor to be cleared.
  */
+__rte_internal
 void qbman_pull_desc_clear(struct qbman_pull_desc *d);
 
 /**
@@ -340,6 +343,7 @@ void qbman_pull_desc_clear(struct qbman_pull_desc *d);
  * the caller provides in 'storage_phys'), and 'stash' controls whether or not
  * those writes to main-memory express a cache-warming attribute.
  */
+__rte_internal
 void qbman_pull_desc_set_storage(struct qbman_pull_desc *d,
 				 struct qbman_result *storage,
 				 uint64_t storage_phys,
@@ -349,6 +353,7 @@ void qbman_pull_desc_set_storage(struct qbman_pull_desc *d,
  * @d: the pull dequeue descriptor to be set.
  * @numframes: number of frames to be set, must be between 1 and 16, inclusive.
  */
+__rte_internal
 void qbman_pull_desc_set_numframes(struct qbman_pull_desc *d,
 				   uint8_t numframes);
 /**
@@ -372,6 +377,7 @@ void qbman_pull_desc_set_token(struct qbman_pull_desc *d, uint8_t token);
  * qbman_pull_desc_set_fq() - Set fqid from which the dequeue command dequeues.
  * @fqid: the frame queue index of the given FQ.
  */
+__rte_internal
 void qbman_pull_desc_set_fq(struct qbman_pull_desc *d, uint32_t fqid);
 
 /**
@@ -407,6 +413,7 @@ void qbman_pull_desc_set_rad(struct qbman_pull_desc *d, int rad);
  * Return 0 for success, and -EBUSY if the software portal is not ready
  * to do pull dequeue.
  */
+__rte_internal
 int qbman_swp_pull(struct qbman_swp *s, struct qbman_pull_desc *d);
 
 /* -------------------------------- */
@@ -421,12 +428,14 @@ int qbman_swp_pull(struct qbman_swp *s, struct qbman_pull_desc *d);
  * only once, so repeated calls can return a sequence of DQRR entries, without
  * requiring they be consumed immediately or in any particular order.
  */
+__rte_internal
 const struct qbman_result *qbman_swp_dqrr_next(struct qbman_swp *p);
 
 /**
  * qbman_swp_prefetch_dqrr_next() - prefetch the next DQRR entry.
  * @s: the software portal object.
  */
+__rte_internal
 void qbman_swp_prefetch_dqrr_next(struct qbman_swp *s);
 
 /**
@@ -435,6 +444,7 @@ void qbman_swp_prefetch_dqrr_next(struct qbman_swp *s);
  * @s: the software portal object.
  * @dq: the DQRR entry to be consumed.
  */
+__rte_internal
 void qbman_swp_dqrr_consume(struct qbman_swp *s, const struct qbman_result *dq);
 
 /**
@@ -442,6 +452,7 @@ void qbman_swp_dqrr_consume(struct qbman_swp *s, const struct qbman_result *dq);
  * @s: the software portal object.
  * @dqrr_index: the DQRR index entry to be consumed.
  */
+__rte_internal
 void qbman_swp_dqrr_idx_consume(struct qbman_swp *s, uint8_t dqrr_index);
 
 /**
@@ -450,6 +461,7 @@ void qbman_swp_dqrr_idx_consume(struct qbman_swp *s, uint8_t dqrr_index);
  *
  * Return dqrr index.
  */
+__rte_internal
 uint8_t qbman_get_dqrr_idx(const struct qbman_result *dqrr);
 
 /**
@@ -460,6 +472,7 @@ uint8_t qbman_get_dqrr_idx(const struct qbman_result *dqrr);
  *
  * Return dqrr entry object.
  */
+__rte_internal
 struct qbman_result *qbman_get_dqrr_from_idx(struct qbman_swp *s, uint8_t idx);
 
 /* ------------------------------------------------- */
@@ -485,6 +498,7 @@ struct qbman_result *qbman_get_dqrr_from_idx(struct qbman_swp *s, uint8_t idx);
  * Return 1 for getting a valid dequeue result, or 0 for not getting a valid
  * dequeue result.
  */
+__rte_internal
 int qbman_result_has_new_result(struct qbman_swp *s,
 				struct qbman_result *dq);
 
@@ -497,8 +511,10 @@ int qbman_result_has_new_result(struct qbman_swp *s,
  * Return 1 for getting a valid dequeue result, or 0 for not getting a valid
  * dequeue result.
  */
+__rte_internal
 int qbman_check_command_complete(struct qbman_result *dq);
 
+__rte_internal
 int qbman_check_new_result(struct qbman_result *dq);
 
 /* -------------------------------------------------------- */
@@ -624,6 +640,7 @@ int qbman_result_is_FQPN(const struct qbman_result *dq);
  *
  * Return the state field.
  */
+__rte_internal
 uint8_t qbman_result_DQ_flags(const struct qbman_result *dq);
 
 /**
@@ -658,6 +675,7 @@ static inline int qbman_result_DQ_is_pull_complete(
  *
  * Return seqnum.
  */
+__rte_internal
 uint16_t qbman_result_DQ_seqnum(const struct qbman_result *dq);
 
 /**
@@ -667,6 +685,7 @@ uint16_t qbman_result_DQ_seqnum(const struct qbman_result *dq);
  *
  * Return odpid.
  */
+__rte_internal
 uint16_t qbman_result_DQ_odpid(const struct qbman_result *dq);
 
 /**
@@ -699,6 +718,7 @@ uint32_t qbman_result_DQ_frame_count(const struct qbman_result *dq);
  *
  * Return the frame queue context.
  */
+__rte_internal
 uint64_t qbman_result_DQ_fqd_ctx(const struct qbman_result *dq);
 
 /**
@@ -707,6 +727,7 @@ uint64_t qbman_result_DQ_fqd_ctx(const struct qbman_result *dq);
  *
  * Return the frame descriptor.
  */
+__rte_internal
 const struct qbman_fd *qbman_result_DQ_fd(const struct qbman_result *dq);
 
 /* State-change notifications (FQDAN/CDAN/CSCN/...). */
@@ -717,6 +738,7 @@ const struct qbman_fd *qbman_result_DQ_fd(const struct qbman_result *dq);
  *
  * Return the state in the notifiation.
  */
+__rte_internal
 uint8_t qbman_result_SCN_state(const struct qbman_result *scn);
 
 /**
@@ -850,6 +872,7 @@ struct qbman_eq_response {
  * default/starting state.
  * @d: the given enqueue descriptor.
  */
+__rte_internal
 void qbman_eq_desc_clear(struct qbman_eq_desc *d);
 
 /* Exactly one of the following descriptor "actions" should be set. (Calling
@@ -870,6 +893,7 @@ void qbman_eq_desc_clear(struct qbman_eq_desc *d);
  * @response_success: 1 = enqueue with response always; 0 = enqueue with
  * rejections returned on a FQ.
  */
+__rte_internal
 void qbman_eq_desc_set_no_orp(struct qbman_eq_desc *d, int respond_success);
 /**
  * qbman_eq_desc_set_orp() - Set order-resotration in the enqueue descriptor
@@ -881,6 +905,7 @@ void qbman_eq_desc_set_no_orp(struct qbman_eq_desc *d, int respond_success);
  * @incomplete: indiates whether this is the last fragments using the same
  * sequeue number.
  */
+__rte_internal
 void qbman_eq_desc_set_orp(struct qbman_eq_desc *d, int respond_success,
 			   uint16_t opr_id, uint16_t seqnum, int incomplete);
 
@@ -915,6 +940,7 @@ void qbman_eq_desc_set_orp_nesn(struct qbman_eq_desc *d, uint16_t opr_id,
  * data structure.) 'stash' controls whether or not the write to main-memory
  * expresses a cache-warming attribute.
  */
+__rte_internal
 void qbman_eq_desc_set_response(struct qbman_eq_desc *d,
 				uint64_t storage_phys,
 				int stash);
@@ -929,6 +955,7 @@ void qbman_eq_desc_set_response(struct qbman_eq_desc *d,
  * result "storage" before issuing an enqueue, and use any non-zero 'token'
  * value.
  */
+__rte_internal
 void qbman_eq_desc_set_token(struct qbman_eq_desc *d, uint8_t token);
 
 /**
@@ -944,6 +971,7 @@ void qbman_eq_desc_set_token(struct qbman_eq_desc *d, uint8_t token);
  * @d: the enqueue descriptor
  * @fqid: the id of the frame queue to be enqueued.
  */
+__rte_internal
 void qbman_eq_desc_set_fq(struct qbman_eq_desc *d, uint32_t fqid);
 
 /**
@@ -953,6 +981,7 @@ void qbman_eq_desc_set_fq(struct qbman_eq_desc *d, uint32_t fqid);
  * @qd_bin: the queuing destination bin
  * @qd_prio: the queuing destination priority.
  */
+__rte_internal
 void qbman_eq_desc_set_qd(struct qbman_eq_desc *d, uint32_t qdid,
 			  uint16_t qd_bin, uint8_t qd_prio);
 
@@ -978,6 +1007,7 @@ void qbman_eq_desc_set_eqdi(struct qbman_eq_desc *d, int enable);
  * held-active (order-preserving) FQ, whether the FQ should be parked instead of
  * being rescheduled.)
  */
+__rte_internal
 void qbman_eq_desc_set_dca(struct qbman_eq_desc *d, int enable,
 			   uint8_t dqrr_idx, int park);
 
@@ -987,6 +1017,7 @@ void qbman_eq_desc_set_dca(struct qbman_eq_desc *d, int enable,
  *
  * Return the fd pointer.
  */
+__rte_internal
 struct qbman_fd *qbman_result_eqresp_fd(struct qbman_result *eqresp);
 
 /**
@@ -997,6 +1028,7 @@ struct qbman_fd *qbman_result_eqresp_fd(struct qbman_result *eqresp);
  * This value is set into the response id before the enqueue command, which,
  * get overwritten by qbman once the enqueue command is complete.
  */
+__rte_internal
 void qbman_result_eqresp_set_rspid(struct qbman_result *eqresp, uint8_t val);
 
 /**
@@ -1009,6 +1041,7 @@ void qbman_result_eqresp_set_rspid(struct qbman_result *eqresp, uint8_t val);
  * copied into the enqueue response to determine if the command has been
  * completed, and response has been updated.
  */
+__rte_internal
 uint8_t qbman_result_eqresp_rspid(struct qbman_result *eqresp);
 
 /**
@@ -1017,6 +1050,7 @@ uint8_t qbman_result_eqresp_rspid(struct qbman_result *eqresp);
  *
  * Return 0 when command is sucessful.
  */
+__rte_internal
 uint8_t qbman_result_eqresp_rc(struct qbman_result *eqresp);
 
 /**
@@ -1043,6 +1077,7 @@ int qbman_swp_enqueue(struct qbman_swp *s, const struct qbman_eq_desc *d,
  *
  * Return the number of enqueued frames, -EBUSY if the EQCR is not ready.
  */
+__rte_internal
 int qbman_swp_enqueue_multiple(struct qbman_swp *s,
 			       const struct qbman_eq_desc *d,
 			       const struct qbman_fd *fd,
@@ -1060,6 +1095,7 @@ int qbman_swp_enqueue_multiple(struct qbman_swp *s,
  *
  * Return the number of enqueued frames, -EBUSY if the EQCR is not ready.
  */
+__rte_internal
 int qbman_swp_enqueue_multiple_fd(struct qbman_swp *s,
 				  const struct qbman_eq_desc *d,
 				  struct qbman_fd **fd,
@@ -1076,6 +1112,7 @@ int qbman_swp_enqueue_multiple_fd(struct qbman_swp *s,
  *
  * Return the number of enqueued frames, -EBUSY if the EQCR is not ready.
  */
+__rte_internal
 int qbman_swp_enqueue_multiple_desc(struct qbman_swp *s,
 				    const struct qbman_eq_desc *d,
 				    const struct qbman_fd *fd,
@@ -1117,12 +1154,14 @@ struct qbman_release_desc {
  * default/starting state.
  * @d: the qbman release descriptor.
  */
+__rte_internal
 void qbman_release_desc_clear(struct qbman_release_desc *d);
 
 /**
  * qbman_release_desc_set_bpid() - Set the ID of the buffer pool to release to
  * @d: the qbman release descriptor.
  */
+__rte_internal
 void qbman_release_desc_set_bpid(struct qbman_release_desc *d, uint16_t bpid);
 
 /**
@@ -1141,6 +1180,7 @@ void qbman_release_desc_set_rcdi(struct qbman_release_desc *d, int enable);
  *
  * Return 0 for success, -EBUSY if the release command ring is not ready.
  */
+__rte_internal
 int qbman_swp_release(struct qbman_swp *s, const struct qbman_release_desc *d,
 		      const uint64_t *buffers, unsigned int num_buffers);
 
@@ -1166,6 +1206,7 @@ int qbman_swp_release_thresh(struct qbman_swp *s, unsigned int thresh);
  * Return 0 for success, or negative error code if the acquire command
  * fails.
  */
+__rte_internal
 int qbman_swp_acquire(struct qbman_swp *s, uint16_t bpid, uint64_t *buffers,
 		      unsigned int num_buffers);
 
diff --git a/drivers/bus/fslmc/rte_bus_fslmc_version.map b/drivers/bus/fslmc/rte_bus_fslmc_version.map
index fe45575046..04e61156c3 100644
--- a/drivers/bus/fslmc/rte_bus_fslmc_version.map
+++ b/drivers/bus/fslmc/rte_bus_fslmc_version.map
@@ -1,4 +1,4 @@
-DPDK_20.0 {
+INTERNAL {
 	global:
 
 	dpaa2_affine_qbman_ethrx_swp;
@@ -11,7 +11,6 @@ DPDK_20.0 {
 	dpaa2_free_dpbp_dev;
 	dpaa2_free_dq_storage;
 	dpaa2_free_eq_descriptors;
-	dpaa2_get_qbman_swp;
 	dpaa2_io_portal;
 	dpaa2_svr_family;
 	dpaa2_virt_mode;
@@ -101,7 +100,6 @@ DPDK_20.0 {
 	rte_fslmc_driver_unregister;
 	rte_fslmc_get_device_count;
 	rte_fslmc_object_register;
-	rte_fslmc_vfio_dmamap;
 	rte_global_active_dqs_list;
 	rte_mcp_ptr_list;
 
diff --git a/drivers/bus/fslmc/rte_fslmc.h b/drivers/bus/fslmc/rte_fslmc.h
index 96ba8dc259..5078b48ee1 100644
--- a/drivers/bus/fslmc/rte_fslmc.h
+++ b/drivers/bus/fslmc/rte_fslmc.h
@@ -162,6 +162,7 @@ RTE_DECLARE_PER_LCORE(struct dpaa2_portal_dqrr, dpaa2_held_bufs);
  *   A pointer to a rte_dpaa2_driver structure describing the driver
  *   to be registered.
  */
+__rte_internal
 void rte_fslmc_driver_register(struct rte_dpaa2_driver *driver);
 
 /**
@@ -171,6 +172,7 @@ void rte_fslmc_driver_register(struct rte_dpaa2_driver *driver);
  *   A pointer to a rte_dpaa2_driver structure describing the driver
  *   to be unregistered.
  */
+__rte_internal
 void rte_fslmc_driver_unregister(struct rte_dpaa2_driver *driver);
 
 /** Helper for DPAA2 device registration from driver (eth, crypto) instance */
@@ -189,6 +191,7 @@ RTE_PMD_EXPORT_NAME(nm, __COUNTER__)
  *   A pointer to a rte_dpaa_object structure describing the mc object
  *   to be registered.
  */
+__rte_internal
 void rte_fslmc_object_register(struct rte_dpaa2_object *object);
 
 /**
@@ -200,6 +203,7 @@ void rte_fslmc_object_register(struct rte_dpaa2_object *object);
  *   >=0 for count; 0 indicates either no device of the said type scanned or
  *   invalid device type.
  */
+__rte_internal
 uint32_t rte_fslmc_get_device_count(enum rte_dpaa2_dev_type device_type);
 
 /** Helper for DPAA2 object registration */
-- 
2.17.1


^ permalink raw reply	[relevance 1%]

* [dpdk-dev] [PATCH v3 02/12] mempool/dpaa2: move internal symbols into INTERNAL section
    2020-05-13 13:27  3%     ` [dpdk-dev] [PATCH v3 01/12] common/dpaax: move internal symbols into INTERNAL section Hemant Agrawal
@ 2020-05-13 13:27  3%     ` Hemant Agrawal
  2020-05-13 13:27  1%     ` [dpdk-dev] [PATCH v3 03/12] bus/fslmc: " Hemant Agrawal
                       ` (5 subsequent siblings)
  7 siblings, 0 replies; 200+ results
From: Hemant Agrawal @ 2020-05-13 13:27 UTC (permalink / raw)
  To: dev, david.marchand, mdr; +Cc: Hemant Agrawal

This patch moves the internal symbols to INTERNAL sections
so that any change in them is not reported as ABI breakage.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
--
v3: add entry in libabigail.abinore file
---
 devtools/libabigail.abignore                        | 2 ++
 drivers/mempool/dpaa/rte_mempool_dpaa_version.map   | 2 +-
 drivers/mempool/dpaa2/dpaa2_hw_mempool.h            | 1 +
 drivers/mempool/dpaa2/rte_mempool_dpaa2_version.map | 9 +++++++--
 4 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/devtools/libabigail.abignore b/devtools/libabigail.abignore
index b1488d5549..4a5241073e 100644
--- a/devtools/libabigail.abignore
+++ b/devtools/libabigail.abignore
@@ -51,3 +51,5 @@
 ; Ignore moving DPAAx stable functions to INTERNAL tag
 [suppress_file]
 	file_name_regexp = ^librte_common_dpaax\.
+[suppress_file]
+	file_name_regexp = ^librte_mempool_dpaa\.
diff --git a/drivers/mempool/dpaa/rte_mempool_dpaa_version.map b/drivers/mempool/dpaa/rte_mempool_dpaa_version.map
index 9eebaf7ffd..142547ee38 100644
--- a/drivers/mempool/dpaa/rte_mempool_dpaa_version.map
+++ b/drivers/mempool/dpaa/rte_mempool_dpaa_version.map
@@ -1,4 +1,4 @@
-DPDK_20.0 {
+INTERNAL {
 	global:
 
 	rte_dpaa_bpid_info;
diff --git a/drivers/mempool/dpaa2/dpaa2_hw_mempool.h b/drivers/mempool/dpaa2/dpaa2_hw_mempool.h
index fa0f2280d5..53fa1552d1 100644
--- a/drivers/mempool/dpaa2/dpaa2_hw_mempool.h
+++ b/drivers/mempool/dpaa2/dpaa2_hw_mempool.h
@@ -61,6 +61,7 @@ struct dpaa2_bp_info {
 
 extern struct dpaa2_bp_info *rte_dpaa2_bpid_info;
 
+__rte_internal
 int rte_dpaa2_mbuf_alloc_bulk(struct rte_mempool *pool,
 		       void **obj_table, unsigned int count);
 
diff --git a/drivers/mempool/dpaa2/rte_mempool_dpaa2_version.map b/drivers/mempool/dpaa2/rte_mempool_dpaa2_version.map
index cd4bc88273..686b024624 100644
--- a/drivers/mempool/dpaa2/rte_mempool_dpaa2_version.map
+++ b/drivers/mempool/dpaa2/rte_mempool_dpaa2_version.map
@@ -1,10 +1,15 @@
 DPDK_20.0 {
 	global:
 
-	rte_dpaa2_bpid_info;
-	rte_dpaa2_mbuf_alloc_bulk;
 	rte_dpaa2_mbuf_from_buf_addr;
 	rte_dpaa2_mbuf_pool_bpid;
 
 	local: *;
 };
+
+INTERNAL {
+	global:
+
+	rte_dpaa2_bpid_info;
+	rte_dpaa2_mbuf_alloc_bulk;
+};
-- 
2.17.1


^ permalink raw reply	[relevance 3%]

* [dpdk-dev] [PATCH v3 01/12] common/dpaax: move internal symbols into INTERNAL section
  @ 2020-05-13 13:27  3%     ` Hemant Agrawal
  2020-05-13 14:06  0%       ` Hemant Agrawal (OSS)
  2020-05-13 13:27  3%     ` [dpdk-dev] [PATCH v3 02/12] mempool/dpaa2: " Hemant Agrawal
                       ` (6 subsequent siblings)
  7 siblings, 1 reply; 200+ results
From: Hemant Agrawal @ 2020-05-13 13:27 UTC (permalink / raw)
  To: dev, david.marchand, mdr; +Cc: Hemant Agrawal

This patch moves the internal symbols to INTERNAL sections
so that any change in them is not reported as ABI breakage.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 devtools/libabigail.abignore                      |  3 +++
 drivers/common/dpaax/dpaa_of.h                    | 15 +++++++++++++++
 drivers/common/dpaax/dpaax_iova_table.h           |  4 ++++
 drivers/common/dpaax/rte_common_dpaax_version.map |  2 +-
 4 files changed, 23 insertions(+), 1 deletion(-)

diff --git a/devtools/libabigail.abignore b/devtools/libabigail.abignore
index c9ee73cb3c..b1488d5549 100644
--- a/devtools/libabigail.abignore
+++ b/devtools/libabigail.abignore
@@ -48,3 +48,6 @@
         changed_enumerators = RTE_CRYPTO_AEAD_LIST_END
 [suppress_variable]
         name = rte_crypto_aead_algorithm_strings
+; Ignore moving DPAAx stable functions to INTERNAL tag
+[suppress_file]
+	file_name_regexp = ^librte_common_dpaax\.
diff --git a/drivers/common/dpaax/dpaa_of.h b/drivers/common/dpaax/dpaa_of.h
index 960b421766..38d91a1afe 100644
--- a/drivers/common/dpaax/dpaa_of.h
+++ b/drivers/common/dpaax/dpaa_of.h
@@ -24,6 +24,7 @@
 #include <limits.h>
 #include <rte_common.h>
 #include <dpaa_list.h>
+#include <rte_compat.h>
 
 #ifndef OF_INIT_DEFAULT_PATH
 #define OF_INIT_DEFAULT_PATH "/proc/device-tree"
@@ -102,6 +103,7 @@ struct dt_file {
 	uint64_t buf[OF_FILE_BUF_MAX >> 3];
 };
 
+__rte_internal
 const struct device_node *of_find_compatible_node(
 					const struct device_node *from,
 					const char *type __rte_unused,
@@ -113,32 +115,44 @@ const struct device_node *of_find_compatible_node(
 		dev_node != NULL; \
 		dev_node = of_find_compatible_node(dev_node, type, compatible))
 
+__rte_internal
 const void *of_get_property(const struct device_node *from, const char *name,
 			    size_t *lenp) __attribute__((nonnull(2)));
+__rte_internal
 bool of_device_is_available(const struct device_node *dev_node);
 
+
+__rte_internal
 const struct device_node *of_find_node_by_phandle(uint64_t ph);
 
+__rte_internal
 const struct device_node *of_get_parent(const struct device_node *dev_node);
 
+__rte_internal
 const struct device_node *of_get_next_child(const struct device_node *dev_node,
 					    const struct device_node *prev);
 
+__rte_internal
 const void *of_get_mac_address(const struct device_node *np);
 
 #define for_each_child_node(parent, child) \
 	for (child = of_get_next_child(parent, NULL); child != NULL; \
 			child = of_get_next_child(parent, child))
 
+
+__rte_internal
 uint32_t of_n_addr_cells(const struct device_node *dev_node);
 uint32_t of_n_size_cells(const struct device_node *dev_node);
 
+__rte_internal
 const uint32_t *of_get_address(const struct device_node *dev_node, size_t idx,
 			       uint64_t *size, uint32_t *flags);
 
+__rte_internal
 uint64_t of_translate_address(const struct device_node *dev_node,
 			      const uint32_t *addr) __attribute__((nonnull));
 
+__rte_internal
 bool of_device_is_compatible(const struct device_node *dev_node,
 			     const char *compatible);
 
@@ -146,6 +160,7 @@ bool of_device_is_compatible(const struct device_node *dev_node,
  * subsystem that is device-tree-dependent. Eg. Qman/Bman, config layers, etc.
  * The path should usually be "/proc/device-tree".
  */
+__rte_internal
 int of_init_path(const char *dt_path);
 
 /* of_finish() allows a controlled tear-down of the device-tree layer, eg. if a
diff --git a/drivers/common/dpaax/dpaax_iova_table.h b/drivers/common/dpaax/dpaax_iova_table.h
index fc3b9e7a8f..230fba8ba0 100644
--- a/drivers/common/dpaax/dpaax_iova_table.h
+++ b/drivers/common/dpaax/dpaax_iova_table.h
@@ -61,9 +61,13 @@ extern struct dpaax_iova_table *dpaax_iova_table_p;
 #define DPAAX_MEM_SPLIT_MASK_OFF (DPAAX_MEM_SPLIT - 1) /**< Offset */
 
 /* APIs exposed */
+__rte_internal
 int dpaax_iova_table_populate(void);
+__rte_internal
 void dpaax_iova_table_depopulate(void);
+__rte_internal
 int dpaax_iova_table_update(phys_addr_t paddr, void *vaddr, size_t length);
+__rte_internal
 void dpaax_iova_table_dump(void);
 
 static inline void *dpaax_iova_table_get_va(phys_addr_t paddr) __rte_hot;
diff --git a/drivers/common/dpaax/rte_common_dpaax_version.map b/drivers/common/dpaax/rte_common_dpaax_version.map
index f72eba761d..ad2b2b3fec 100644
--- a/drivers/common/dpaax/rte_common_dpaax_version.map
+++ b/drivers/common/dpaax/rte_common_dpaax_version.map
@@ -1,4 +1,4 @@
-DPDK_20.0 {
+INTERNAL {
 	global:
 
 	dpaax_iova_table_depopulate;
-- 
2.17.1


^ permalink raw reply	[relevance 3%]

* Re: [dpdk-dev] [RFC v2] hash: unify crc32 API header for x86 and ARM
  2020-05-13  3:04  3%   ` Ruifeng Wang
@ 2020-05-13 13:22  0%     ` Ananyev, Konstantin
  0 siblings, 0 replies; 200+ results
From: Ananyev, Konstantin @ 2020-05-13 13:22 UTC (permalink / raw)
  To: Ruifeng Wang, pbhagavatula, jerinj, Van Haaren, Harry, Wang,
	Yipeng1, Gobriel, Sameh, Richardson, Bruce
  Cc: dev, nd

> 
> > -----Original Message-----
> > From: pbhagavatula@marvell.com <pbhagavatula@marvell.com>
> > Sent: Wednesday, May 13, 2020 4:40 AM
> > To: jerinj@marvell.com; konstantin.ananyev@intel.com;
> > harry.van.haaren@intel.com; Yipeng Wang <yipeng1.wang@intel.com>;
> > Sameh Gobriel <sameh.gobriel@intel.com>; Bruce Richardson
> > <bruce.richardson@intel.com>; Ruifeng Wang <Ruifeng.Wang@arm.com>
> > Cc: dev@dpdk.org; Pavan Nikhilesh <pbhagavatula@marvell.com>
> > Subject: [dpdk-dev] [RFC v2] hash: unify crc32 API header for x86 and ARM
> >
> > From: Pavan Nikhilesh <pbhagavatula@marvell.com>
> >
> > Merge crc32 hash calculation public API headers for x86 and ARM.
> > Select the best available CRC32 algorithm when unsupported algorithm on a
> > given CPU architecture is requested by an application.
> >
> > Previously, if an application directly includes `rte_crc_arm64.h` without
> > including `rte_hash_crc.h` it will fail to compile.
> > Although, `rte_crc_arm64.h` is no longer needed make it a dummy file for
> > ABI purposes.
> >
> > Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
> > ---
> >  v2 Changes:
> >  - Don't remove `rte_crc_arm64.h` for ABI purposes.
> >  - Revert function pointer approach for performance reasons.
> >  - Select the best available algorithm based on the arch when user passes an
> > unsupported crc32 algorithm.
> >
> Maybe split the patch? Changes to select the best available algorithm can be a separate one.
> 
> More ifdefs are added. Is it possible to have arch specific rte_hash_crc_xx implementations
> like what was done in rte_crc_arm64.h, and include specific headers according to arch in rte_hash.crc.h?

Same thought.

> For ABI purpose, rte_crc_arm64.h can be kept and it only includes the new arm64 specific header.
> 
> >  app/test/test_hash.c            |   6 ++
> >  lib/librte_hash/meson.build     |   6 +-
> >  lib/librte_hash/rte_crc_arm64.h | 175 +-------------------------------
> > lib/librte_hash/rte_hash_crc.h  | 153 ++++++++++++++++++++--------
> >  4 files changed, 122 insertions(+), 218 deletions(-)
> >
> > diff --git a/app/test/test_hash.c b/app/test/test_hash.c index
> > afa3a1a3c..7bd457dac 100644
> > --- a/app/test/test_hash.c
> > +++ b/app/test/test_hash.c
> > @@ -195,7 +195,13 @@ test_crc32_hash_alg_equiv(void)
> >  	}
> >
> >  	/* Resetting to best available algorithm */
> > +#if defined RTE_ARCH_X86
> >  	rte_hash_crc_set_alg(CRC32_SSE42_x64);
> > +#elif defined RTE_ARCH_ARM64
> > +	rte_hash_crc_set_alg(CRC32_ARM64);
> > +#else
> > +	rte_hash_crc_set_alg(CRC32_SW);
> > +#endif
> >
> >  	if (i == CRC32_ITERATIONS)
> >  		return 0;
> > diff --git a/lib/librte_hash/meson.build b/lib/librte_hash/meson.build index
> > 6ab46ae9d..8a3cf2f64 100644
> > --- a/lib/librte_hash/meson.build
> > +++ b/lib/librte_hash/meson.build
> > @@ -1,12 +1,14 @@
> >  # SPDX-License-Identifier: BSD-3-Clause  # Copyright(c) 2017 Intel
> > Corporation
> >
> > -headers = files('rte_crc_arm64.h',
> > -	'rte_fbk_hash.h',
> > +headers = files('rte_fbk_hash.h',
> >  	'rte_hash_crc.h',
> >  	'rte_hash.h',
> >  	'rte_jhash.h',
> >  	'rte_thash.h')
> > +if dpdk_conf.has('RTE_ARCH_ARM64')
> > +	headers += files('rte_crc_arm64.h')
> > +endif
> >
> >  sources = files('rte_cuckoo_hash.c', 'rte_fbk_hash.c')  deps += ['ring'] diff --
> > git a/lib/librte_hash/rte_crc_arm64.h b/lib/librte_hash/rte_crc_arm64.h
> > index b4628cfc0..adfcafc7d 100644
> > --- a/lib/librte_hash/rte_crc_arm64.h
> > +++ b/lib/librte_hash/rte_crc_arm64.h
> > @@ -5,179 +5,6 @@
> >  #ifndef _RTE_CRC_ARM64_H_
> >  #define _RTE_CRC_ARM64_H_
> >
> > -/**
> > - * @file
> > - *
> > - * RTE CRC arm64 Hash
> > - */
> > -
> > -#ifdef __cplusplus
> > -extern "C" {
> > -#endif
> > -
> > -#include <stdint.h>
> > -#include <rte_cpuflags.h>
> > -#include <rte_branch_prediction.h>
> > -#include <rte_common.h>
> > -
> > -static inline uint32_t
> > -crc32c_arm64_u8(uint8_t data, uint32_t init_val) -{
> > -	__asm__ volatile(
> > -			"crc32cb %w[crc], %w[crc], %w[value]"
> > -			: [crc] "+r" (init_val)
> > -			: [value] "r" (data));
> > -	return init_val;
> > -}
> > -
> > -static inline uint32_t
> > -crc32c_arm64_u16(uint16_t data, uint32_t init_val) -{
> > -	__asm__ volatile(
> > -			"crc32ch %w[crc], %w[crc], %w[value]"
> > -			: [crc] "+r" (init_val)
> > -			: [value] "r" (data));
> > -	return init_val;
> > -}
> > -
> > -static inline uint32_t
> > -crc32c_arm64_u32(uint32_t data, uint32_t init_val) -{
> > -	__asm__ volatile(
> > -			"crc32cw %w[crc], %w[crc], %w[value]"
> > -			: [crc] "+r" (init_val)
> > -			: [value] "r" (data));
> > -	return init_val;
> > -}
> > -
> > -static inline uint32_t
> > -crc32c_arm64_u64(uint64_t data, uint32_t init_val) -{
> > -	__asm__ volatile(
> > -			"crc32cx %w[crc], %w[crc], %x[value]"
> > -			: [crc] "+r" (init_val)
> > -			: [value] "r" (data));
> > -	return init_val;
> > -}
> > -
> > -/**
> > - * Allow or disallow use of arm64 SIMD instrinsics for CRC32 hash
> > - * calculation.
> > - *
> > - * @param alg
> > - *   An OR of following flags:
> > - *   - (CRC32_SW) Don't use arm64 crc intrinsics
> > - *   - (CRC32_ARM64) Use ARMv8 CRC intrinsic if available
> > - *
> > - */
> > -static inline void
> > -rte_hash_crc_set_alg(uint8_t alg)
> > -{
> > -	switch (alg) {
> > -	case CRC32_ARM64:
> > -		if (!rte_cpu_get_flag_enabled(RTE_CPUFLAG_CRC32))
> > -			alg = CRC32_SW;
> > -		/* fall-through */
> > -	case CRC32_SW:
> > -		crc32_alg = alg;
> > -		/* fall-through */
> > -	default:
> > -		break;
> > -	}
> > -}
> > -
> > -/* Setting the best available algorithm */
> > -RTE_INIT(rte_hash_crc_init_alg)
> > -{
> > -	rte_hash_crc_set_alg(CRC32_ARM64);
> > -}
> > -
> > -/**
> > - * Use single crc32 instruction to perform a hash on a 1 byte value.
> > - * Fall back to software crc32 implementation in case arm64 crc intrinsics is
> > - * not supported
> > - *
> > - * @param data
> > - *   Data to perform hash on.
> > - * @param init_val
> > - *   Value to initialise hash generator.
> > - * @return
> > - *   32bit calculated hash value.
> > - */
> > -static inline uint32_t
> > -rte_hash_crc_1byte(uint8_t data, uint32_t init_val) -{
> > -	if (likely(crc32_alg & CRC32_ARM64))
> > -		return crc32c_arm64_u8(data, init_val);
> > -
> > -	return crc32c_1byte(data, init_val);
> > -}
> > -
> > -/**
> > - * Use single crc32 instruction to perform a hash on a 2 bytes value.
> > - * Fall back to software crc32 implementation in case arm64 crc intrinsics is
> > - * not supported
> > - *
> > - * @param data
> > - *   Data to perform hash on.
> > - * @param init_val
> > - *   Value to initialise hash generator.
> > - * @return
> > - *   32bit calculated hash value.
> > - */
> > -static inline uint32_t
> > -rte_hash_crc_2byte(uint16_t data, uint32_t init_val) -{
> > -	if (likely(crc32_alg & CRC32_ARM64))
> > -		return crc32c_arm64_u16(data, init_val);
> > -
> > -	return crc32c_2bytes(data, init_val);
> > -}
> > -
> > -/**
> > - * Use single crc32 instruction to perform a hash on a 4 byte value.
> > - * Fall back to software crc32 implementation in case arm64 crc intrinsics is
> > - * not supported
> > - *
> > - * @param data
> > - *   Data to perform hash on.
> > - * @param init_val
> > - *   Value to initialise hash generator.
> > - * @return
> > - *   32bit calculated hash value.
> > - */
> > -static inline uint32_t
> > -rte_hash_crc_4byte(uint32_t data, uint32_t init_val) -{
> > -	if (likely(crc32_alg & CRC32_ARM64))
> > -		return crc32c_arm64_u32(data, init_val);
> > -
> > -	return crc32c_1word(data, init_val);
> > -}
> > -
> > -/**
> > - * Use single crc32 instruction to perform a hash on a 8 byte value.
> > - * Fall back to software crc32 implementation in case arm64 crc intrinsics is
> > - * not supported
> > - *
> > - * @param data
> > - *   Data to perform hash on.
> > - * @param init_val
> > - *   Value to initialise hash generator.
> > - * @return
> > - *   32bit calculated hash value.
> > - */
> > -static inline uint32_t
> > -rte_hash_crc_8byte(uint64_t data, uint32_t init_val) -{
> > -	if (likely(crc32_alg == CRC32_ARM64))
> > -		return crc32c_arm64_u64(data, init_val);
> > -
> > -	return crc32c_2words(data, init_val);
> > -}
> > -
> > -#ifdef __cplusplus
> > -}
> > -#endif
> > +#include "rte_hash_crc.h"
> >
> >  #endif /* _RTE_CRC_ARM64_H_ */
> > diff --git a/lib/librte_hash/rte_hash_crc.h b/lib/librte_hash/rte_hash_crc.h
> > index cf28031b3..eaba70c12 100644
> > --- a/lib/librte_hash/rte_hash_crc.h
> > +++ b/lib/librte_hash/rte_hash_crc.h
> > @@ -16,10 +16,12 @@ extern "C" {
> >  #endif
> >
> >  #include <stdint.h>
> > -#include <rte_config.h>
> > -#include <rte_cpuflags.h>
> > +
> >  #include <rte_branch_prediction.h>
> >  #include <rte_common.h>
> > +#include <rte_config.h>
> > +#include <rte_cpuflags.h>
> > +#include <rte_log.h>
> >
> >  /* Lookup tables for software implementation of CRC32C */  static const
> > uint32_t crc32c_tables[8][256] = {{ @@ -322,7 +324,7 @@
> > crc32c_2bytes(uint16_t data, uint32_t init_val)  }
> >
> >  static inline uint32_t
> > -crc32c_1word(uint32_t data, uint32_t init_val)
> > +crc32c_4bytes(uint32_t data, uint32_t init_val)
> >  {
> >  	uint32_t crc, term1, term2;
> >  	crc = init_val;
> > @@ -336,7 +338,7 @@ crc32c_1word(uint32_t data, uint32_t init_val)  }
> >
> >  static inline uint32_t
> > -crc32c_2words(uint64_t data, uint32_t init_val)
> > +crc32c_8bytes(uint64_t data, uint32_t init_val)
> >  {
> >  	uint32_t crc, term1, term2;
> >  	union {
> > @@ -358,6 +360,48 @@ crc32c_2words(uint64_t data, uint32_t init_val)
> >  	return crc;
> >  }
> >
> > +#if defined(RTE_ARCH_ARM64) &&
> > defined(RTE_MACHINE_CPUFLAG_CRC32)
> > +static inline uint32_t
> > +crc32c_arm64_u8(uint8_t data, uint32_t init_val) {
> > +	__asm__ volatile(
> > +			"crc32cb %w[crc], %w[crc], %w[value]"
> > +			: [crc] "+r" (init_val)
> > +			: [value] "r" (data));
> > +	return init_val;
> > +}
> > +
> > +static inline uint32_t
> > +crc32c_arm64_u16(uint16_t data, uint32_t init_val) {
> > +	__asm__ volatile(
> > +			"crc32ch %w[crc], %w[crc], %w[value]"
> > +			: [crc] "+r" (init_val)
> > +			: [value] "r" (data));
> > +	return init_val;
> > +}
> > +
> > +static inline uint32_t
> > +crc32c_arm64_u32(uint32_t data, uint32_t init_val) {
> > +	__asm__ volatile(
> > +			"crc32cw %w[crc], %w[crc], %w[value]"
> > +			: [crc] "+r" (init_val)
> > +			: [value] "r" (data));
> > +	return init_val;
> > +}
> > +
> > +static inline uint32_t
> > +crc32c_arm64_u64(uint64_t data, uint32_t init_val) {
> > +	__asm__ volatile(
> > +			"crc32cx %w[crc], %w[crc], %x[value]"
> > +			: [crc] "+r" (init_val)
> > +			: [value] "r" (data));
> > +	return init_val;
> > +}
> > +#endif
> > +
> >  #if defined(RTE_ARCH_X86)
> >  static inline uint32_t
> >  crc32c_sse42_u8(uint8_t data, uint32_t init_val) @@ -424,42 +468,69 @@
> > crc32c_sse42_u64(uint64_t data, uint64_t init_val)
> >
> >  static uint8_t crc32_alg = CRC32_SW;
> >
> > -#if defined(RTE_ARCH_ARM64) &&
> > defined(RTE_MACHINE_CPUFLAG_CRC32)
> > -#include "rte_crc_arm64.h"
> > -#else
> > -
> >  /**
> > - * Allow or disallow use of SSE4.2 instrinsics for CRC32 hash
> > + * Allow or disallow use of SSE4.2/ARMv8 instrinsics for CRC32 hash
> >   * calculation.
> >   *
> >   * @param alg
> >   *   An OR of following flags:
> > - *   - (CRC32_SW) Don't use SSE4.2 intrinsics
> > + *   - (CRC32_SW) Don't use SSE4.2 intrinsics (default non-[x86/ARMv8])
> >   *   - (CRC32_SSE42) Use SSE4.2 intrinsics if available
> > - *   - (CRC32_SSE42_x64) Use 64-bit SSE4.2 intrinsic if available (default)
> > - *
> > + *   - (CRC32_SSE42_x64) Use 64-bit SSE4.2 intrinsic if available (default x86)
> > + *   - (CRC32_ARM64) Use ARMv8 CRC intrinsic if available
> >   */
> >  static inline void
> >  rte_hash_crc_set_alg(uint8_t alg)
> >  {
> > -#if defined(RTE_ARCH_X86)
> > -	if (alg == CRC32_SSE42_x64 &&
> > -			!rte_cpu_get_flag_enabled(RTE_CPUFLAG_EM64T))
> > -		alg = CRC32_SSE42;
> > +	switch (alg) {
> > +	case CRC32_SSE42_x64:
> > +	case CRC32_SSE42:
> > +#if defined RTE_ARCH_X86
> > +		if (!rte_cpu_get_flag_enabled(RTE_CPUFLAG_EM64T))
> > +			crc32_alg = CRC32_SSE42;
> > +		else
> > +			crc32_alg = alg;
> > +#endif
> > +#if defined RTE_ARCH_ARM64
> > +		RTE_LOG(WARNING, HASH,
> > +			"Incorrect CRC32 algorithm requested setting best"
> > +			"available algorithm on the architecture\n");
> > +		rte_hash_crc_set_alg(CRC32_ARM64);
> > +#endif
> > +		break;
> > +	case CRC32_ARM64:
> > +#if defined RTE_ARCH_ARM64
> > +		if (rte_cpu_get_flag_enabled(RTE_CPUFLAG_CRC32))
> > +			crc32_alg = CRC32_ARM64;
> >  #endif
> > -	crc32_alg = alg;
> > +#if defined RTE_ARCH_X86
> > +		RTE_LOG(WARNING, HASH,
> > +			"Incorrect CRC32 algorithm requested setting best"
> > +			"available algorithm on the architecture\n");
> > +		rte_hash_crc_set_alg(CRC32_SSE42_x64);
> > +#endif
> > +		break;
> > +	case CRC32_SW:
> > +	default:
> > +		crc32_alg = CRC32_SW;
> > +	break;
> > +	}
> >  }
> >
> >  /* Setting the best available algorithm */
> >  RTE_INIT(rte_hash_crc_init_alg)
> >  {
> > +#if defined RTE_ARCH_X86
> >  	rte_hash_crc_set_alg(CRC32_SSE42_x64);
> > +#elif defined RTE_ARCH_ARM64
> > +	rte_hash_crc_set_alg(CRC32_ARM64);
> > +#else
> > +	rte_hash_crc_set_alg(CRC32_SW);
> > +#endif
> >  }
> >
> >  /**
> > - * Use single crc32 instruction to perform a hash on a byte value.
> > - * Fall back to software crc32 implementation in case SSE4.2 is
> > - * not supported
> > + * Calculate crc32 hash value of 1bytes.
> >   *
> >   * @param data
> >   *   Data to perform hash on.
> > @@ -474,15 +545,15 @@ rte_hash_crc_1byte(uint8_t data, uint32_t init_val)
> > #if defined RTE_ARCH_X86
> >  	if (likely(crc32_alg & CRC32_SSE42))
> >  		return crc32c_sse42_u8(data, init_val);
> > +#elif defined RTE_ARCH_ARM64
> > +	if (likely(crc32_alg & CRC32_ARM64))
> > +		return crc32c_arm64_u8(data, init_val);
> >  #endif
> > -
> >  	return crc32c_1byte(data, init_val);
> >  }
> >
> >  /**
> > - * Use single crc32 instruction to perform a hash on a 2 bytes value.
> > - * Fall back to software crc32 implementation in case SSE4.2 is
> > - * not supported
> > + * Calculate crc32 hash value of 2bytes.
> >   *
> >   * @param data
> >   *   Data to perform hash on.
> > @@ -497,15 +568,15 @@ rte_hash_crc_2byte(uint16_t data, uint32_t init_val)
> > #if defined RTE_ARCH_X86
> >  	if (likely(crc32_alg & CRC32_SSE42))
> >  		return crc32c_sse42_u16(data, init_val);
> > +#elif defined RTE_ARCH_ARM64
> > +	if (likely(crc32_alg & CRC32_ARM64))
> > +		return crc32c_arm64_u16(data, init_val);
> >  #endif
> > -
> >  	return crc32c_2bytes(data, init_val);
> >  }
> >
> >  /**
> > - * Use single crc32 instruction to perform a hash on a 4 byte value.
> > - * Fall back to software crc32 implementation in case SSE4.2 is
> > - * not supported
> > + * Calculate crc32 hash value of 4bytes.
> >   *
> >   * @param data
> >   *   Data to perform hash on.
> > @@ -520,15 +591,15 @@ rte_hash_crc_4byte(uint32_t data, uint32_t init_val)
> > #if defined RTE_ARCH_X86
> >  	if (likely(crc32_alg & CRC32_SSE42))
> >  		return crc32c_sse42_u32(data, init_val);
> > +#elif defined RTE_ARCH_ARM64
> > +	if (likely(crc32_alg & CRC32_ARM64))
> > +		return crc32c_arm64_u32(data, init_val);
> >  #endif
> > -
> > -	return crc32c_1word(data, init_val);
> > +	return crc32c_4bytes(data, init_val);
> >  }
> >
> >  /**
> > - * Use single crc32 instruction to perform a hash on a 8 byte value.
> > - * Fall back to software crc32 implementation in case SSE4.2 is
> > - * not supported
> > + * Calculate crc32 hash value of 8bytes.
> >   *
> >   * @param data
> >   *   Data to perform hash on.
> > @@ -540,21 +611,19 @@ rte_hash_crc_4byte(uint32_t data, uint32_t init_val)
> > static inline uint32_t  rte_hash_crc_8byte(uint64_t data, uint32_t init_val)  { -
> > #ifdef RTE_ARCH_X86_64
> > -	if (likely(crc32_alg == CRC32_SSE42_x64))
> > +#if defined RTE_ARCH_X86_64
> > +	if (likely(crc32_alg & CRC32_SSE42_x64))
> >  		return crc32c_sse42_u64(data, init_val); -#endif
> > -
> > -#if defined RTE_ARCH_X86
> > +#elif defined RTE_ARCH_X86
> >  	if (likely(crc32_alg & CRC32_SSE42))
> >  		return crc32c_sse42_u64_mimic(data, init_val);
> > +#elif defined RTE_ARCH_ARM64
> > +	if (likely(crc32_alg & CRC32_ARM64))
> > +		return crc32c_arm64_u64(data, init_val);
> >  #endif
> > -
> > -	return crc32c_2words(data, init_val);
> > +	return crc32c_8bytes(data, init_val);
> >  }
> >
> > -#endif
> > -
> >  /**
> >   * Calculate CRC32 hash on user-supplied byte array.
> >   *
> > --
> > 2.17.1


^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [PATCH v2 01/12] common/dpaax: move internal symbols into INTERNAL section
  2020-05-12 14:00  3% ` [dpdk-dev] [PATCH v2 01/12] " Hemant Agrawal
                     ` (5 preceding siblings ...)
  2020-05-12 14:00  3%   ` [dpdk-dev] [PATCH v2 09/12] net/dpaa: " Hemant Agrawal
@ 2020-05-13 12:44  4%   ` Thomas Monjalon
    7 siblings, 0 replies; 200+ results
From: Thomas Monjalon @ 2020-05-13 12:44 UTC (permalink / raw)
  To: Hemant Agrawal; +Cc: dev, david.marchand, mdr

12/05/2020 16:00, Hemant Agrawal:
> This patch moves the internal symbols to INTERNAL sections
> so that any change in them is not reported as ABI breakage.
> 
> Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
> ---
>  drivers/common/dpaax/dpaa_of.h                    | 15 +++++++++++++++
>  drivers/common/dpaax/dpaax_iova_table.h           |  4 ++++
>  drivers/common/dpaax/rte_common_dpaax_version.map |  2 +-
>  3 files changed, 20 insertions(+), 1 deletion(-)

It is missing an exception in devtools/libabigail.abignore.
Are you running ABI check on those patches?

+Cc Ray, maintainer of ABI stuff.



^ permalink raw reply	[relevance 4%]

* [dpdk-dev] [PATCH v1] doc: fix typos and errors in abi policy doc
@ 2020-05-13 10:43 36% Gaetan Rivet
  2020-05-14  6:40  4% ` Ray Kinsella
  0 siblings, 1 reply; 200+ results
From: Gaetan Rivet @ 2020-05-13 10:43 UTC (permalink / raw)
  To: dev; +Cc: Ray Kinsella, Neil Horman

Some errors in the document:

  * API instead of ABI once.

Some typos:

  * __rte_depreciated instead of __rte_deprecated.
  * missing ```` around value.
  * inconsistent reference to major ABI version, most
    of the time described without the minor appended, except once.

Verbosity and grammar:

  * Long sentences that would be better cut short.
  * Comma abuse.
  * 'May' used where 'can' seems more fitting.

I'm not a native speaker though, so grain of salt applies.

Fixes: fdf7471cccb8 ("doc: introduce major ABI versions")
Cc: Ray Kinsella <mdr@ashroe.eu>
cc: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: Gaetan Rivet <grive@u256.net>
---
 doc/guides/contributing/abi_policy.rst | 21 ++++++++++-----------
 1 file changed, 10 insertions(+), 11 deletions(-)

diff --git a/doc/guides/contributing/abi_policy.rst b/doc/guides/contributing/abi_policy.rst
index 05ca95980..2198519d9 100644
--- a/doc/guides/contributing/abi_policy.rst
+++ b/doc/guides/contributing/abi_policy.rst
@@ -220,19 +220,18 @@ Examples of ABI Changes
 The following are examples of allowable ABI changes occurring between
 declarations of major ABI versions.
 
-* DPDK 19.11 release, defines the function ``rte_foo()``, and ``rte_foo()``
-  as part of the major ABI version ``20``.
+* DPDK 19.11 release defines the function ``rte_foo()`` ; ``rte_foo()``
+  is part of the major ABI version ``20``.
 
-* DPDK 20.02 release defines a new function ``rte_foo(uint8_t bar)``, and
-  this is not a problem as long as the symbol ``rte_foo@DPDK20`` is
+* DPDK 20.02 release defines a new function ``rte_foo(uint8_t bar)``.
+  This is not a problem as long as the symbol ``rte_foo@DPDK20`` is
   preserved through :ref:`abi_versioning`.
 
   - The new function may be marked with the ``__rte_experimental`` tag for a
     number of releases, as described in the section :ref:`experimental_apis`.
 
-  - Once ``rte_foo(uint8_t bar)`` becomes non-experimental ``rte_foo()`` is then
-    declared as ``__rte_depreciated``, with an associated deprecation notice
-    provided.
+  - Once ``rte_foo(uint8_t bar)`` becomes non-experimental, ``rte_foo()`` is
+    declared as ``__rte_deprecated`` and an deprecation notice is provided.
 
 * DPDK 19.11 is not re-released to include ``rte_foo(uint8_t bar)``, the new
   version of ``rte_foo`` only exists from DPDK 20.02 onwards as described in the
@@ -242,13 +241,13 @@ declarations of major ABI versions.
   rte_baz()``. This function may or may not exist in the DPDK 20.05 release.
 
 * An application ``dPacket`` wishes to use ``rte_foo(uint8_t bar)``, before the
-  declaration of the DPDK ``21`` major API version. The application can only
+  declaration of the DPDK ``21`` major ABI version. The application can only
   ensure its runtime dependencies are met by specifying ``DPDK (>= 20.2)`` as
-  an explicit package dependency, as the soname only may only indicate the
+  an explicit package dependency, as the soname can only indicate the
   supported major ABI version.
 
 * At the release of DPDK 20.11, the function ``rte_foo(uint8_t bar)`` becomes
-  formally part of then new major ABI version DPDK 21.0 and ``rte_foo()`` may be
+  formally part of then new major ABI version DPDK ``21`` and ``rte_foo()`` may be
   removed.
 
 .. _deprecation_notices:
@@ -322,6 +321,6 @@ Libraries
 
 Libraries marked as ``experimental`` are entirely not considered part of an ABI
 version, and may change without warning at any time. Experimental libraries
-always have a major version of ``0`` to indicate they exist outside of
+always have a major ABI version of ``0`` to indicate they exist outside of
 :ref:`abi_versioning` , with the minor version incremented with each ABI change
 to library.
-- 
2.26.2


^ permalink raw reply	[relevance 36%]

* [dpdk-dev] [PATCH v1] doc: remove deprecation notice about old devargs changes
@ 2020-05-13 10:42  4% Gaetan Rivet
  0 siblings, 0 replies; 200+ results
From: Gaetan Rivet @ 2020-05-13 10:42 UTC (permalink / raw)
  To: dev

When modifying the rte_devargs implementation, a deprecation notice was
done for v18.11, regarding internal rte_devargs structure and exposed
functions.

Most of the changes were part of v18.11, but the notice was not removed.

Signed-off-by: Gaetan Rivet <grive@u256.net>
---
 doc/guides/rel_notes/deprecation.rst | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 20aa745b7..d49a329fa 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -23,17 +23,6 @@ Deprecation Notices
 * eal: The function ``rte_eal_remote_launch`` will return new error codes
   after read or write error on the pipe, instead of calling ``rte_panic``.
 
-* eal: both declaring and identifying devices will be streamlined in v18.11.
-  New functions will appear to query a specific port from buses, classes of
-  device and device drivers. Device declaration will be made coherent with the
-  new scheme of device identification.
-  As such, ``rte_devargs`` device representation will change.
-
-  - The enum ``rte_devtype`` was used to identify a bus and will disappear.
-  - Functions previously deprecated will change or disappear:
-
-    + ``rte_eal_devargs_type_count``
-
 * eal: The ``rte_logs`` struct and global symbol will be made private to
   remove it from the externally visible ABI and allow it to be updated in the
   future.
-- 
2.26.2


^ permalink raw reply	[relevance 4%]

* [dpdk-dev] [PATCH v3 2/2] mempool/octeontx2: move internal symbols to INTERNAL section
  2020-05-13  9:55  3%   ` [dpdk-dev] [PATCH v3 1/2] common/octeontx2: " pbhagavatula
@ 2020-05-13  9:55  3%     ` pbhagavatula
  0 siblings, 0 replies; 200+ results
From: pbhagavatula @ 2020-05-13  9:55 UTC (permalink / raw)
  To: jerinj, aostruszka, thomas, david.marchand, mdr, Neil Horman,
	Nithin Dabilpuram
  Cc: dev, Pavan Nikhilesh

From: Pavan Nikhilesh <pbhagavatula@marvell.com>

Move the internal symbols to INTERNAL sections so that any
change in them is not reported as ABI breakage.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
 devtools/libabigail.abignore                                | 4 +++-
 drivers/mempool/octeontx2/otx2_mempool.h                    | 2 ++
 drivers/mempool/octeontx2/rte_mempool_octeontx2_version.map | 2 +-
 3 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/devtools/libabigail.abignore b/devtools/libabigail.abignore
index 39a76fe9a..e2ca73db2 100644
--- a/devtools/libabigail.abignore
+++ b/devtools/libabigail.abignore
@@ -49,6 +49,8 @@
 [suppress_variable]
         name = rte_crypto_aead_algorithm_strings
 
-; Ignore moving internal OCTEONTX2 stable functions to INTERNAL tag
+; Ignore moving OCTEONTX2 stable functions to INTERNAL tag
 [suppress_file]
 	file_name_regexp = ^librte_common_octeontx2\.
+[suppress_file]
+	file_name_regexp = ^librte_mempool_octeontx2\.
diff --git a/drivers/mempool/octeontx2/otx2_mempool.h b/drivers/mempool/octeontx2/otx2_mempool.h
index adcc0db24..8aa548248 100644
--- a/drivers/mempool/octeontx2/otx2_mempool.h
+++ b/drivers/mempool/octeontx2/otx2_mempool.h
@@ -206,7 +206,9 @@ npa_lf_aura_op_range_set(uint64_t aura_handle, uint64_t start_iova,
 }
 
 /* NPA LF */
+__rte_internal
 int otx2_npa_lf_init(struct rte_pci_device *pci_dev, void *otx2_dev);
+__rte_internal
 int otx2_npa_lf_fini(void);
 
 /* IRQ */
diff --git a/drivers/mempool/octeontx2/rte_mempool_octeontx2_version.map b/drivers/mempool/octeontx2/rte_mempool_octeontx2_version.map
index d4f81aed8..e6887ceb8 100644
--- a/drivers/mempool/octeontx2/rte_mempool_octeontx2_version.map
+++ b/drivers/mempool/octeontx2/rte_mempool_octeontx2_version.map
@@ -1,4 +1,4 @@
-DPDK_20.0 {
+INTERNAL {
 	global:
 
 	otx2_npa_lf_fini;
-- 
2.17.1


^ permalink raw reply	[relevance 3%]

* [dpdk-dev] [PATCH v3 1/2] common/octeontx2: move internal symbols to INTERNAL section
  2020-05-13  1:04  3% ` [dpdk-dev] [PATCH v2 " pbhagavatula
  2020-05-13  1:04  3%   ` [dpdk-dev] [PATCH v2 2/2] mempool/octeontx2: " pbhagavatula
@ 2020-05-13  9:55  3%   ` pbhagavatula
  2020-05-13  9:55  3%     ` [dpdk-dev] [PATCH v3 2/2] mempool/octeontx2: " pbhagavatula
  2020-05-14  7:02  0%   ` [dpdk-dev] [PATCH v2 1/2] common/octeontx2: " Ray Kinsella
  2 siblings, 1 reply; 200+ results
From: pbhagavatula @ 2020-05-13  9:55 UTC (permalink / raw)
  To: jerinj, aostruszka, thomas, david.marchand, mdr, Neil Horman,
	Nithin Dabilpuram, Anoob Joseph
  Cc: dev, Pavan Nikhilesh

From: Pavan Nikhilesh <pbhagavatula@marvell.com>

Move the internal symbols to INTERNAL sections so that any
change in them is not reported as ABI breakage.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
 v3 Changes:
  - Use `file_name_regexp` insted of `soname_regexp` in supress list for
  backward compatibility of libabigail.

 v2 Changes:
  - Sort version map alphabetically
  - Add libabigail ignore tag for OCTEONTX2

 devtools/libabigail.abignore                  |  4 +++
 drivers/common/octeontx2/otx2_common.h        |  8 ++++++
 drivers/common/octeontx2/otx2_dev.h           |  3 +++
 drivers/common/octeontx2/otx2_irq.h           |  3 +++
 drivers/common/octeontx2/otx2_mbox.h          |  6 +++++
 drivers/common/octeontx2/otx2_sec_idev.h      |  6 +++++
 .../rte_common_octeontx2_version.map          | 26 ++++++-------------
 7 files changed, 38 insertions(+), 18 deletions(-)

diff --git a/devtools/libabigail.abignore b/devtools/libabigail.abignore
index c9ee73cb3..39a76fe9a 100644
--- a/devtools/libabigail.abignore
+++ b/devtools/libabigail.abignore
@@ -48,3 +48,7 @@
         changed_enumerators = RTE_CRYPTO_AEAD_LIST_END
 [suppress_variable]
         name = rte_crypto_aead_algorithm_strings
+
+; Ignore moving internal OCTEONTX2 stable functions to INTERNAL tag
+[suppress_file]
+	file_name_regexp = ^librte_common_octeontx2\.
diff --git a/drivers/common/octeontx2/otx2_common.h b/drivers/common/octeontx2/otx2_common.h
index e62cdea07..174702687 100644
--- a/drivers/common/octeontx2/otx2_common.h
+++ b/drivers/common/octeontx2/otx2_common.h
@@ -62,13 +62,21 @@ struct otx2_idev_cfg {
 	};
 };

+__rte_internal
 struct otx2_idev_cfg *otx2_intra_dev_get_cfg(void);
+__rte_internal
 void otx2_sso_pf_func_set(uint16_t sso_pf_func);
+__rte_internal
 uint16_t otx2_sso_pf_func_get(void);
+__rte_internal
 uint16_t otx2_npa_pf_func_get(void);
+__rte_internal
 struct otx2_npa_lf *otx2_npa_lf_obj_get(void);
+__rte_internal
 void otx2_npa_set_defaults(struct otx2_idev_cfg *idev);
+__rte_internal
 int otx2_npa_lf_active(void *dev);
+__rte_internal
 int otx2_npa_lf_obj_ref(void);

 /* Log */
diff --git a/drivers/common/octeontx2/otx2_dev.h b/drivers/common/octeontx2/otx2_dev.h
index 13b75e118..cd4fe517d 100644
--- a/drivers/common/octeontx2/otx2_dev.h
+++ b/drivers/common/octeontx2/otx2_dev.h
@@ -94,6 +94,7 @@ struct otx2_dev {
 	OTX2_DEV;
 };

+__rte_internal
 int otx2_dev_priv_init(struct rte_pci_device *pci_dev, void *otx2_dev);

 /* Common dev init and fini routines */
@@ -116,7 +117,9 @@ otx2_dev_init(struct rte_pci_device *pci_dev, void *otx2_dev)
 	return otx2_dev_priv_init(pci_dev, otx2_dev);
 }

+__rte_internal
 void otx2_dev_fini(struct rte_pci_device *pci_dev, void *otx2_dev);
+__rte_internal
 int otx2_dev_active_vfs(void *otx2_dev);

 #define RVU_PFVF_PF_SHIFT	10
diff --git a/drivers/common/octeontx2/otx2_irq.h b/drivers/common/octeontx2/otx2_irq.h
index 9d326276e..0683cf554 100644
--- a/drivers/common/octeontx2/otx2_irq.h
+++ b/drivers/common/octeontx2/otx2_irq.h
@@ -16,10 +16,13 @@ typedef struct {
 	uint64_t bits[MAX_VFPF_DWORD_BITS];
 } otx2_intr_t;

+__rte_internal
 int otx2_register_irq(struct rte_intr_handle *intr_handle,
 		      rte_intr_callback_fn cb, void *data, unsigned int vec);
+__rte_internal
 void otx2_unregister_irq(struct rte_intr_handle *intr_handle,
 			 rte_intr_callback_fn cb, void *data, unsigned int vec);
+__rte_internal
 int otx2_disable_irqs(struct rte_intr_handle *intr_handle);

 #endif /* _OTX2_IRQ_H_ */
diff --git a/drivers/common/octeontx2/otx2_mbox.h b/drivers/common/octeontx2/otx2_mbox.h
index 80778a0be..7fa4276e9 100644
--- a/drivers/common/octeontx2/otx2_mbox.h
+++ b/drivers/common/octeontx2/otx2_mbox.h
@@ -1617,19 +1617,25 @@ struct tim_enable_rsp {
 	uint32_t __otx2_io currentbucket;
 };

+__rte_internal
 const char *otx2_mbox_id2name(uint16_t id);
 int otx2_mbox_id2size(uint16_t id);
 void otx2_mbox_reset(struct otx2_mbox *mbox, int devid);
 int otx2_mbox_init(struct otx2_mbox *mbox, uintptr_t hwbase, uintptr_t reg_base,
 		   int direction, int ndevsi, uint64_t intr_offset);
 void otx2_mbox_fini(struct otx2_mbox *mbox);
+__rte_internal
 void otx2_mbox_msg_send(struct otx2_mbox *mbox, int devid);
+__rte_internal
 int otx2_mbox_wait_for_rsp(struct otx2_mbox *mbox, int devid);
 int otx2_mbox_wait_for_rsp_tmo(struct otx2_mbox *mbox, int devid, uint32_t tmo);
+__rte_internal
 int otx2_mbox_get_rsp(struct otx2_mbox *mbox, int devid, void **msg);
+__rte_internal
 int otx2_mbox_get_rsp_tmo(struct otx2_mbox *mbox, int devid, void **msg,
 			  uint32_t tmo);
 int otx2_mbox_get_availmem(struct otx2_mbox *mbox, int devid);
+__rte_internal
 struct mbox_msghdr *otx2_mbox_alloc_msg_rsp(struct otx2_mbox *mbox, int devid,
 					    int size, int size_rsp);

diff --git a/drivers/common/octeontx2/otx2_sec_idev.h b/drivers/common/octeontx2/otx2_sec_idev.h
index c681f5094..89cdaf66a 100644
--- a/drivers/common/octeontx2/otx2_sec_idev.h
+++ b/drivers/common/octeontx2/otx2_sec_idev.h
@@ -22,16 +22,22 @@ struct otx2_sec_idev_cfg {
 	rte_spinlock_t tx_cpt_lock;
 };

+__rte_internal
 uint8_t otx2_eth_dev_is_sec_capable(struct rte_eth_dev *eth_dev);

+__rte_internal
 int otx2_sec_idev_cfg_init(int port_id);

+__rte_internal
 int otx2_sec_idev_tx_cpt_qp_add(uint16_t port_id, struct otx2_cpt_qp *qp);

+__rte_internal
 int otx2_sec_idev_tx_cpt_qp_remove(struct otx2_cpt_qp *qp);

+__rte_internal
 int otx2_sec_idev_tx_cpt_qp_put(struct otx2_cpt_qp *qp);

+__rte_internal
 int otx2_sec_idev_tx_cpt_qp_get(uint16_t port_id, struct otx2_cpt_qp **qp);

 #endif /* _OTX2_SEC_IDEV_H_ */
diff --git a/drivers/common/octeontx2/rte_common_octeontx2_version.map b/drivers/common/octeontx2/rte_common_octeontx2_version.map
index 01279c339..7621a59ad 100644
--- a/drivers/common/octeontx2/rte_common_octeontx2_version.map
+++ b/drivers/common/octeontx2/rte_common_octeontx2_version.map
@@ -1,13 +1,15 @@
-DPDK_20.0 {
+INTERNAL {
 	global:

 	otx2_dev_active_vfs;
 	otx2_dev_fini;
 	otx2_dev_priv_init;
 	otx2_disable_irqs;
+	otx2_eth_dev_is_sec_capable;
 	otx2_intra_dev_get_cfg;
 	otx2_logtype_base;
 	otx2_logtype_dpi;
+	otx2_logtype_ep;
 	otx2_logtype_mbox;
 	otx2_logtype_nix;
 	otx2_logtype_npa;
@@ -27,26 +29,14 @@ DPDK_20.0 {
 	otx2_npa_pf_func_get;
 	otx2_npa_set_defaults;
 	otx2_register_irq;
-	otx2_sso_pf_func_get;
-	otx2_sso_pf_func_set;
-	otx2_unregister_irq;
-
-	local: *;
-};
-
-DPDK_21 {
-	global:
-
-	otx2_eth_dev_is_sec_capable;
 	otx2_sec_idev_cfg_init;
 	otx2_sec_idev_tx_cpt_qp_add;
-	otx2_sec_idev_tx_cpt_qp_remove;
 	otx2_sec_idev_tx_cpt_qp_get;
 	otx2_sec_idev_tx_cpt_qp_put;
-} DPDK_20.0;
-
-EXPERIMENTAL {
-	global:
+	otx2_sec_idev_tx_cpt_qp_remove;
+	otx2_sso_pf_func_get;
+	otx2_sso_pf_func_set;
+	otx2_unregister_irq;

-	otx2_logtype_ep;
+	local: *;
 };
--
2.17.1


^ permalink raw reply	[relevance 3%]

* Re: [dpdk-dev] [PATCH v4 4/4] eal/atomic: add wrapper for c11 atomics
  @ 2020-05-13  8:57  3%         ` Morten Brørup
  2020-05-13 15:30  0%           ` Honnappa Nagarahalli
  2020-05-13 19:04  0%           ` Mattias Rönnblom
  0 siblings, 2 replies; 200+ results
From: Morten Brørup @ 2020-05-13  8:57 UTC (permalink / raw)
  To: Honnappa Nagarahalli, Stephen Hemminger, Phil Yang
  Cc: thomas, dev, bruce.richardson, ferruh.yigit, hemant.agrawal,
	jerinj, ktraynor, konstantin.ananyev, maxime.coquelin,
	olivier.matz, mattias.ronnblom, harry.van.haaren,
	erik.g.carrillo, nd, David Christensen

> From: Honnappa Nagarahalli [mailto:Honnappa.Nagarahalli@arm.com]
> Sent: Tuesday, May 12, 2020 9:24 PM
> 
> <snip>
> 
> Subject: Re: [PATCH v4 4/4] eal/atomic: add wrapper for c11 atomics
> 
> On Tue, May 12, 2020 at 4:03 pm, Phil Yang <mailto:phil.yang@arm.com>
> wrote:
> 
> parameter. Signed-off-by: Phil Yang <mailto:phil.yang@arm.com>
> 
> 
> What is the purpose of having rte_atomic at all?
> Is this level of indirection really helping?
> [HONNAPPA] (not sure why this email has html format, converted to text
> format)
> I believe you meant, why not use the __atomic_xxx built-ins directly?
> The only reason for now is handling of
> __atomic_thread_fence(__ATOMIC_SEQ_CST) for x86. This is equivalent to
> rte_smp_mb which has an optimized implementation for x86. According to
> Konstantin, the compiler does not generate optimal code. Wrapping that
> built-in alone is going to be confusing.
> 
> The wrappers also allow us to have our own implementation using inline
> assembly for compilers versions that do not support C11 atomic built-
> ins. But, I do not know if there is a need to support those versions.

If I recall correctly, someone mentioned that one (or more) of the aging enterprise Linux distributions don't include a compiler with C11 atomics.

I think Stephen is onto something here...

It is silly to add wrappers like this, if the only purpose is to support compilers and distributions that don't properly support an official C standard which is nearly a decade old. The quality and quantity of the DPDK documentation for these functions (including examples, discussions on Stack Overflow, etc.) will be inferior to the documentation of the standard C11 atomics, which increases the probability of incorrect use.

And if some compiler generates code that is suboptimal for a user, then it should be the choice of the user to either accept it or use a better compiler. Using a suboptimal compiler will not only affect the user's DPDK applications, but all applications developed by the user. And if he accepts it for his other applications, he will also accept it for his DPDK applications.

We could introduce some sort of marker or standardized comment to indicate when functions only exist for backwards compatibility with ancient compilers and similar, with a reference to documentation describing why. And when the documented preconditions are no longer relevant, e.g. when those particular enterprise Linux distributions become obsolete, these functions become obsolete too, and should be removed. However, getting rid of obsolete cruft will break the ABI. In other words: Added cruft will never be removed again, so think twice before adding.


Med venlig hilsen / kind regards
- Morten Brørup




^ permalink raw reply	[relevance 3%]

* [dpdk-dev] [Bug 471] failing to build test from app/test
@ 2020-05-13  8:24  3% bugzilla
  0 siblings, 0 replies; 200+ results
From: bugzilla @ 2020-05-13  8:24 UTC (permalink / raw)
  To: dev

https://bugs.dpdk.org/show_bug.cgi?id=471

            Bug ID: 471
           Summary: failing to build test from app/test
           Product: DPDK
           Version: 20.05
          Hardware: x86
                OS: Linux
            Status: UNCONFIRMED
          Severity: critical
          Priority: Normal
         Component: other
          Assignee: dev@dpdk.org
          Reporter: vipin.varghese@intel.com
  Target Milestone: ---

DPDK:20.05-rc2
Linux:4.15.0-99-generic 
GCC: Ubuntu 7.5.0-3ubuntu1~18.04
Distribution: Ubuntu 18.04.4 LTS

Steps:
1. fetch from git the right version of DPDK.
2. default build for `x86_64-native-linuxapp-gcc`
3. move to the directory `$RTE_SDK/app/test`
4. execute make

Error Log:
```
t# make
  CC commands.o
commands.c: In function ‘cmd_dump_parsed’:
commands.c:137:3: error: ‘rte_malloc_dump_heaps’ is deprecated: Symbol is not
yet part of stable ABI [-Werror=deprecated-declarations]
   rte_malloc_dump_heaps(stdout);
   ^~~~~~~~~~~~~~~~~~~~~
In file included from commands.c:31:0:
/home/saesrv02/Downloads/dpdksrc/dpdk/x86_64-native-linuxapp-gcc/include/rte_malloc.h:524:1:
note: declared here
 rte_malloc_dump_heaps(FILE *f);
 ^~~~~~~~~~~~~~~~~~~~~
commands.c: At top level:
cc1: error: unrecognized command line option ‘-Wno-address-of-packed-member’
[-Werror]
cc1: all warnings being treated as errors
/home/saesrv02/Downloads/dpdksrc/dpdk/mk/internal/rte.compile-pre.mk:114:
recipe for target 'commands.o' failed
make: *** [commands.o] Error 1

```

-- 
You are receiving this mail because:
You are the assignee for the bug.

^ permalink raw reply	[relevance 3%]

* Re: [dpdk-dev] [RFC v2] hash: unify crc32 API header for x86 and ARM
  2020-05-12 20:40  3% ` [dpdk-dev] [RFC v2] " pbhagavatula
@ 2020-05-13  3:04  3%   ` Ruifeng Wang
  2020-05-13 13:22  0%     ` Ananyev, Konstantin
  0 siblings, 1 reply; 200+ results
From: Ruifeng Wang @ 2020-05-13  3:04 UTC (permalink / raw)
  To: pbhagavatula, jerinj, konstantin.ananyev, harry.van.haaren,
	Yipeng Wang, Sameh Gobriel, Bruce Richardson
  Cc: dev, nd


> -----Original Message-----
> From: pbhagavatula@marvell.com <pbhagavatula@marvell.com>
> Sent: Wednesday, May 13, 2020 4:40 AM
> To: jerinj@marvell.com; konstantin.ananyev@intel.com;
> harry.van.haaren@intel.com; Yipeng Wang <yipeng1.wang@intel.com>;
> Sameh Gobriel <sameh.gobriel@intel.com>; Bruce Richardson
> <bruce.richardson@intel.com>; Ruifeng Wang <Ruifeng.Wang@arm.com>
> Cc: dev@dpdk.org; Pavan Nikhilesh <pbhagavatula@marvell.com>
> Subject: [dpdk-dev] [RFC v2] hash: unify crc32 API header for x86 and ARM
> 
> From: Pavan Nikhilesh <pbhagavatula@marvell.com>
> 
> Merge crc32 hash calculation public API headers for x86 and ARM.
> Select the best available CRC32 algorithm when unsupported algorithm on a
> given CPU architecture is requested by an application.
> 
> Previously, if an application directly includes `rte_crc_arm64.h` without
> including `rte_hash_crc.h` it will fail to compile.
> Although, `rte_crc_arm64.h` is no longer needed make it a dummy file for
> ABI purposes.
> 
> Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
> ---
>  v2 Changes:
>  - Don't remove `rte_crc_arm64.h` for ABI purposes.
>  - Revert function pointer approach for performance reasons.
>  - Select the best available algorithm based on the arch when user passes an
> unsupported crc32 algorithm.
> 
Maybe split the patch? Changes to select the best available algorithm can be a separate one.

More ifdefs are added. Is it possible to have arch specific rte_hash_crc_xx implementations
like what was done in rte_crc_arm64.h, and include specific headers according to arch in rte_hash.crc.h?
For ABI purpose, rte_crc_arm64.h can be kept and it only includes the new arm64 specific header.

>  app/test/test_hash.c            |   6 ++
>  lib/librte_hash/meson.build     |   6 +-
>  lib/librte_hash/rte_crc_arm64.h | 175 +-------------------------------
> lib/librte_hash/rte_hash_crc.h  | 153 ++++++++++++++++++++--------
>  4 files changed, 122 insertions(+), 218 deletions(-)
> 
> diff --git a/app/test/test_hash.c b/app/test/test_hash.c index
> afa3a1a3c..7bd457dac 100644
> --- a/app/test/test_hash.c
> +++ b/app/test/test_hash.c
> @@ -195,7 +195,13 @@ test_crc32_hash_alg_equiv(void)
>  	}
> 
>  	/* Resetting to best available algorithm */
> +#if defined RTE_ARCH_X86
>  	rte_hash_crc_set_alg(CRC32_SSE42_x64);
> +#elif defined RTE_ARCH_ARM64
> +	rte_hash_crc_set_alg(CRC32_ARM64);
> +#else
> +	rte_hash_crc_set_alg(CRC32_SW);
> +#endif
> 
>  	if (i == CRC32_ITERATIONS)
>  		return 0;
> diff --git a/lib/librte_hash/meson.build b/lib/librte_hash/meson.build index
> 6ab46ae9d..8a3cf2f64 100644
> --- a/lib/librte_hash/meson.build
> +++ b/lib/librte_hash/meson.build
> @@ -1,12 +1,14 @@
>  # SPDX-License-Identifier: BSD-3-Clause  # Copyright(c) 2017 Intel
> Corporation
> 
> -headers = files('rte_crc_arm64.h',
> -	'rte_fbk_hash.h',
> +headers = files('rte_fbk_hash.h',
>  	'rte_hash_crc.h',
>  	'rte_hash.h',
>  	'rte_jhash.h',
>  	'rte_thash.h')
> +if dpdk_conf.has('RTE_ARCH_ARM64')
> +	headers += files('rte_crc_arm64.h')
> +endif
> 
>  sources = files('rte_cuckoo_hash.c', 'rte_fbk_hash.c')  deps += ['ring'] diff --
> git a/lib/librte_hash/rte_crc_arm64.h b/lib/librte_hash/rte_crc_arm64.h
> index b4628cfc0..adfcafc7d 100644
> --- a/lib/librte_hash/rte_crc_arm64.h
> +++ b/lib/librte_hash/rte_crc_arm64.h
> @@ -5,179 +5,6 @@
>  #ifndef _RTE_CRC_ARM64_H_
>  #define _RTE_CRC_ARM64_H_
> 
> -/**
> - * @file
> - *
> - * RTE CRC arm64 Hash
> - */
> -
> -#ifdef __cplusplus
> -extern "C" {
> -#endif
> -
> -#include <stdint.h>
> -#include <rte_cpuflags.h>
> -#include <rte_branch_prediction.h>
> -#include <rte_common.h>
> -
> -static inline uint32_t
> -crc32c_arm64_u8(uint8_t data, uint32_t init_val) -{
> -	__asm__ volatile(
> -			"crc32cb %w[crc], %w[crc], %w[value]"
> -			: [crc] "+r" (init_val)
> -			: [value] "r" (data));
> -	return init_val;
> -}
> -
> -static inline uint32_t
> -crc32c_arm64_u16(uint16_t data, uint32_t init_val) -{
> -	__asm__ volatile(
> -			"crc32ch %w[crc], %w[crc], %w[value]"
> -			: [crc] "+r" (init_val)
> -			: [value] "r" (data));
> -	return init_val;
> -}
> -
> -static inline uint32_t
> -crc32c_arm64_u32(uint32_t data, uint32_t init_val) -{
> -	__asm__ volatile(
> -			"crc32cw %w[crc], %w[crc], %w[value]"
> -			: [crc] "+r" (init_val)
> -			: [value] "r" (data));
> -	return init_val;
> -}
> -
> -static inline uint32_t
> -crc32c_arm64_u64(uint64_t data, uint32_t init_val) -{
> -	__asm__ volatile(
> -			"crc32cx %w[crc], %w[crc], %x[value]"
> -			: [crc] "+r" (init_val)
> -			: [value] "r" (data));
> -	return init_val;
> -}
> -
> -/**
> - * Allow or disallow use of arm64 SIMD instrinsics for CRC32 hash
> - * calculation.
> - *
> - * @param alg
> - *   An OR of following flags:
> - *   - (CRC32_SW) Don't use arm64 crc intrinsics
> - *   - (CRC32_ARM64) Use ARMv8 CRC intrinsic if available
> - *
> - */
> -static inline void
> -rte_hash_crc_set_alg(uint8_t alg)
> -{
> -	switch (alg) {
> -	case CRC32_ARM64:
> -		if (!rte_cpu_get_flag_enabled(RTE_CPUFLAG_CRC32))
> -			alg = CRC32_SW;
> -		/* fall-through */
> -	case CRC32_SW:
> -		crc32_alg = alg;
> -		/* fall-through */
> -	default:
> -		break;
> -	}
> -}
> -
> -/* Setting the best available algorithm */
> -RTE_INIT(rte_hash_crc_init_alg)
> -{
> -	rte_hash_crc_set_alg(CRC32_ARM64);
> -}
> -
> -/**
> - * Use single crc32 instruction to perform a hash on a 1 byte value.
> - * Fall back to software crc32 implementation in case arm64 crc intrinsics is
> - * not supported
> - *
> - * @param data
> - *   Data to perform hash on.
> - * @param init_val
> - *   Value to initialise hash generator.
> - * @return
> - *   32bit calculated hash value.
> - */
> -static inline uint32_t
> -rte_hash_crc_1byte(uint8_t data, uint32_t init_val) -{
> -	if (likely(crc32_alg & CRC32_ARM64))
> -		return crc32c_arm64_u8(data, init_val);
> -
> -	return crc32c_1byte(data, init_val);
> -}
> -
> -/**
> - * Use single crc32 instruction to perform a hash on a 2 bytes value.
> - * Fall back to software crc32 implementation in case arm64 crc intrinsics is
> - * not supported
> - *
> - * @param data
> - *   Data to perform hash on.
> - * @param init_val
> - *   Value to initialise hash generator.
> - * @return
> - *   32bit calculated hash value.
> - */
> -static inline uint32_t
> -rte_hash_crc_2byte(uint16_t data, uint32_t init_val) -{
> -	if (likely(crc32_alg & CRC32_ARM64))
> -		return crc32c_arm64_u16(data, init_val);
> -
> -	return crc32c_2bytes(data, init_val);
> -}
> -
> -/**
> - * Use single crc32 instruction to perform a hash on a 4 byte value.
> - * Fall back to software crc32 implementation in case arm64 crc intrinsics is
> - * not supported
> - *
> - * @param data
> - *   Data to perform hash on.
> - * @param init_val
> - *   Value to initialise hash generator.
> - * @return
> - *   32bit calculated hash value.
> - */
> -static inline uint32_t
> -rte_hash_crc_4byte(uint32_t data, uint32_t init_val) -{
> -	if (likely(crc32_alg & CRC32_ARM64))
> -		return crc32c_arm64_u32(data, init_val);
> -
> -	return crc32c_1word(data, init_val);
> -}
> -
> -/**
> - * Use single crc32 instruction to perform a hash on a 8 byte value.
> - * Fall back to software crc32 implementation in case arm64 crc intrinsics is
> - * not supported
> - *
> - * @param data
> - *   Data to perform hash on.
> - * @param init_val
> - *   Value to initialise hash generator.
> - * @return
> - *   32bit calculated hash value.
> - */
> -static inline uint32_t
> -rte_hash_crc_8byte(uint64_t data, uint32_t init_val) -{
> -	if (likely(crc32_alg == CRC32_ARM64))
> -		return crc32c_arm64_u64(data, init_val);
> -
> -	return crc32c_2words(data, init_val);
> -}
> -
> -#ifdef __cplusplus
> -}
> -#endif
> +#include "rte_hash_crc.h"
> 
>  #endif /* _RTE_CRC_ARM64_H_ */
> diff --git a/lib/librte_hash/rte_hash_crc.h b/lib/librte_hash/rte_hash_crc.h
> index cf28031b3..eaba70c12 100644
> --- a/lib/librte_hash/rte_hash_crc.h
> +++ b/lib/librte_hash/rte_hash_crc.h
> @@ -16,10 +16,12 @@ extern "C" {
>  #endif
> 
>  #include <stdint.h>
> -#include <rte_config.h>
> -#include <rte_cpuflags.h>
> +
>  #include <rte_branch_prediction.h>
>  #include <rte_common.h>
> +#include <rte_config.h>
> +#include <rte_cpuflags.h>
> +#include <rte_log.h>
> 
>  /* Lookup tables for software implementation of CRC32C */  static const
> uint32_t crc32c_tables[8][256] = {{ @@ -322,7 +324,7 @@
> crc32c_2bytes(uint16_t data, uint32_t init_val)  }
> 
>  static inline uint32_t
> -crc32c_1word(uint32_t data, uint32_t init_val)
> +crc32c_4bytes(uint32_t data, uint32_t init_val)
>  {
>  	uint32_t crc, term1, term2;
>  	crc = init_val;
> @@ -336,7 +338,7 @@ crc32c_1word(uint32_t data, uint32_t init_val)  }
> 
>  static inline uint32_t
> -crc32c_2words(uint64_t data, uint32_t init_val)
> +crc32c_8bytes(uint64_t data, uint32_t init_val)
>  {
>  	uint32_t crc, term1, term2;
>  	union {
> @@ -358,6 +360,48 @@ crc32c_2words(uint64_t data, uint32_t init_val)
>  	return crc;
>  }
> 
> +#if defined(RTE_ARCH_ARM64) &&
> defined(RTE_MACHINE_CPUFLAG_CRC32)
> +static inline uint32_t
> +crc32c_arm64_u8(uint8_t data, uint32_t init_val) {
> +	__asm__ volatile(
> +			"crc32cb %w[crc], %w[crc], %w[value]"
> +			: [crc] "+r" (init_val)
> +			: [value] "r" (data));
> +	return init_val;
> +}
> +
> +static inline uint32_t
> +crc32c_arm64_u16(uint16_t data, uint32_t init_val) {
> +	__asm__ volatile(
> +			"crc32ch %w[crc], %w[crc], %w[value]"
> +			: [crc] "+r" (init_val)
> +			: [value] "r" (data));
> +	return init_val;
> +}
> +
> +static inline uint32_t
> +crc32c_arm64_u32(uint32_t data, uint32_t init_val) {
> +	__asm__ volatile(
> +			"crc32cw %w[crc], %w[crc], %w[value]"
> +			: [crc] "+r" (init_val)
> +			: [value] "r" (data));
> +	return init_val;
> +}
> +
> +static inline uint32_t
> +crc32c_arm64_u64(uint64_t data, uint32_t init_val) {
> +	__asm__ volatile(
> +			"crc32cx %w[crc], %w[crc], %x[value]"
> +			: [crc] "+r" (init_val)
> +			: [value] "r" (data));
> +	return init_val;
> +}
> +#endif
> +
>  #if defined(RTE_ARCH_X86)
>  static inline uint32_t
>  crc32c_sse42_u8(uint8_t data, uint32_t init_val) @@ -424,42 +468,69 @@
> crc32c_sse42_u64(uint64_t data, uint64_t init_val)
> 
>  static uint8_t crc32_alg = CRC32_SW;
> 
> -#if defined(RTE_ARCH_ARM64) &&
> defined(RTE_MACHINE_CPUFLAG_CRC32)
> -#include "rte_crc_arm64.h"
> -#else
> -
>  /**
> - * Allow or disallow use of SSE4.2 instrinsics for CRC32 hash
> + * Allow or disallow use of SSE4.2/ARMv8 instrinsics for CRC32 hash
>   * calculation.
>   *
>   * @param alg
>   *   An OR of following flags:
> - *   - (CRC32_SW) Don't use SSE4.2 intrinsics
> + *   - (CRC32_SW) Don't use SSE4.2 intrinsics (default non-[x86/ARMv8])
>   *   - (CRC32_SSE42) Use SSE4.2 intrinsics if available
> - *   - (CRC32_SSE42_x64) Use 64-bit SSE4.2 intrinsic if available (default)
> - *
> + *   - (CRC32_SSE42_x64) Use 64-bit SSE4.2 intrinsic if available (default x86)
> + *   - (CRC32_ARM64) Use ARMv8 CRC intrinsic if available
>   */
>  static inline void
>  rte_hash_crc_set_alg(uint8_t alg)
>  {
> -#if defined(RTE_ARCH_X86)
> -	if (alg == CRC32_SSE42_x64 &&
> -			!rte_cpu_get_flag_enabled(RTE_CPUFLAG_EM64T))
> -		alg = CRC32_SSE42;
> +	switch (alg) {
> +	case CRC32_SSE42_x64:
> +	case CRC32_SSE42:
> +#if defined RTE_ARCH_X86
> +		if (!rte_cpu_get_flag_enabled(RTE_CPUFLAG_EM64T))
> +			crc32_alg = CRC32_SSE42;
> +		else
> +			crc32_alg = alg;
> +#endif
> +#if defined RTE_ARCH_ARM64
> +		RTE_LOG(WARNING, HASH,
> +			"Incorrect CRC32 algorithm requested setting best"
> +			"available algorithm on the architecture\n");
> +		rte_hash_crc_set_alg(CRC32_ARM64);
> +#endif
> +		break;
> +	case CRC32_ARM64:
> +#if defined RTE_ARCH_ARM64
> +		if (rte_cpu_get_flag_enabled(RTE_CPUFLAG_CRC32))
> +			crc32_alg = CRC32_ARM64;
>  #endif
> -	crc32_alg = alg;
> +#if defined RTE_ARCH_X86
> +		RTE_LOG(WARNING, HASH,
> +			"Incorrect CRC32 algorithm requested setting best"
> +			"available algorithm on the architecture\n");
> +		rte_hash_crc_set_alg(CRC32_SSE42_x64);
> +#endif
> +		break;
> +	case CRC32_SW:
> +	default:
> +		crc32_alg = CRC32_SW;
> +	break;
> +	}
>  }
> 
>  /* Setting the best available algorithm */
>  RTE_INIT(rte_hash_crc_init_alg)
>  {
> +#if defined RTE_ARCH_X86
>  	rte_hash_crc_set_alg(CRC32_SSE42_x64);
> +#elif defined RTE_ARCH_ARM64
> +	rte_hash_crc_set_alg(CRC32_ARM64);
> +#else
> +	rte_hash_crc_set_alg(CRC32_SW);
> +#endif
>  }
> 
>  /**
> - * Use single crc32 instruction to perform a hash on a byte value.
> - * Fall back to software crc32 implementation in case SSE4.2 is
> - * not supported
> + * Calculate crc32 hash value of 1bytes.
>   *
>   * @param data
>   *   Data to perform hash on.
> @@ -474,15 +545,15 @@ rte_hash_crc_1byte(uint8_t data, uint32_t init_val)
> #if defined RTE_ARCH_X86
>  	if (likely(crc32_alg & CRC32_SSE42))
>  		return crc32c_sse42_u8(data, init_val);
> +#elif defined RTE_ARCH_ARM64
> +	if (likely(crc32_alg & CRC32_ARM64))
> +		return crc32c_arm64_u8(data, init_val);
>  #endif
> -
>  	return crc32c_1byte(data, init_val);
>  }
> 
>  /**
> - * Use single crc32 instruction to perform a hash on a 2 bytes value.
> - * Fall back to software crc32 implementation in case SSE4.2 is
> - * not supported
> + * Calculate crc32 hash value of 2bytes.
>   *
>   * @param data
>   *   Data to perform hash on.
> @@ -497,15 +568,15 @@ rte_hash_crc_2byte(uint16_t data, uint32_t init_val)
> #if defined RTE_ARCH_X86
>  	if (likely(crc32_alg & CRC32_SSE42))
>  		return crc32c_sse42_u16(data, init_val);
> +#elif defined RTE_ARCH_ARM64
> +	if (likely(crc32_alg & CRC32_ARM64))
> +		return crc32c_arm64_u16(data, init_val);
>  #endif
> -
>  	return crc32c_2bytes(data, init_val);
>  }
> 
>  /**
> - * Use single crc32 instruction to perform a hash on a 4 byte value.
> - * Fall back to software crc32 implementation in case SSE4.2 is
> - * not supported
> + * Calculate crc32 hash value of 4bytes.
>   *
>   * @param data
>   *   Data to perform hash on.
> @@ -520,15 +591,15 @@ rte_hash_crc_4byte(uint32_t data, uint32_t init_val)
> #if defined RTE_ARCH_X86
>  	if (likely(crc32_alg & CRC32_SSE42))
>  		return crc32c_sse42_u32(data, init_val);
> +#elif defined RTE_ARCH_ARM64
> +	if (likely(crc32_alg & CRC32_ARM64))
> +		return crc32c_arm64_u32(data, init_val);
>  #endif
> -
> -	return crc32c_1word(data, init_val);
> +	return crc32c_4bytes(data, init_val);
>  }
> 
>  /**
> - * Use single crc32 instruction to perform a hash on a 8 byte value.
> - * Fall back to software crc32 implementation in case SSE4.2 is
> - * not supported
> + * Calculate crc32 hash value of 8bytes.
>   *
>   * @param data
>   *   Data to perform hash on.
> @@ -540,21 +611,19 @@ rte_hash_crc_4byte(uint32_t data, uint32_t init_val)
> static inline uint32_t  rte_hash_crc_8byte(uint64_t data, uint32_t init_val)  { -
> #ifdef RTE_ARCH_X86_64
> -	if (likely(crc32_alg == CRC32_SSE42_x64))
> +#if defined RTE_ARCH_X86_64
> +	if (likely(crc32_alg & CRC32_SSE42_x64))
>  		return crc32c_sse42_u64(data, init_val); -#endif
> -
> -#if defined RTE_ARCH_X86
> +#elif defined RTE_ARCH_X86
>  	if (likely(crc32_alg & CRC32_SSE42))
>  		return crc32c_sse42_u64_mimic(data, init_val);
> +#elif defined RTE_ARCH_ARM64
> +	if (likely(crc32_alg & CRC32_ARM64))
> +		return crc32c_arm64_u64(data, init_val);
>  #endif
> -
> -	return crc32c_2words(data, init_val);
> +	return crc32c_8bytes(data, init_val);
>  }
> 
> -#endif
> -
>  /**
>   * Calculate CRC32 hash on user-supplied byte array.
>   *
> --
> 2.17.1


^ permalink raw reply	[relevance 3%]

* [dpdk-dev] [PATCH v2 2/2] mempool/octeontx2: move internal symbols to INTERNAL section
  2020-05-13  1:04  3% ` [dpdk-dev] [PATCH v2 " pbhagavatula
@ 2020-05-13  1:04  3%   ` pbhagavatula
  2020-05-13  9:55  3%   ` [dpdk-dev] [PATCH v3 1/2] common/octeontx2: " pbhagavatula
  2020-05-14  7:02  0%   ` [dpdk-dev] [PATCH v2 1/2] common/octeontx2: " Ray Kinsella
  2 siblings, 0 replies; 200+ results
From: pbhagavatula @ 2020-05-13  1:04 UTC (permalink / raw)
  To: jerinj, aostruszka, Ray Kinsella, Neil Horman, Nithin Dabilpuram
  Cc: thomas, dev, Pavan Nikhilesh

From: Pavan Nikhilesh <pbhagavatula@marvell.com>

Move the internal symbols to INTERNAL sections so that any
change in them is not reported as ABI breakage.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
 devtools/libabigail.abignore                                | 4 +++-
 drivers/mempool/octeontx2/otx2_mempool.h                    | 2 ++
 drivers/mempool/octeontx2/rte_mempool_octeontx2_version.map | 2 +-
 3 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/devtools/libabigail.abignore b/devtools/libabigail.abignore
index dfe346db4..4a5e0cb01 100644
--- a/devtools/libabigail.abignore
+++ b/devtools/libabigail.abignore
@@ -49,6 +49,8 @@
 [suppress_variable]
         name = rte_crypto_aead_algorithm_strings
 
-; Ignore moving internal OCTEONTX2 stable functions to INTERNAL tag
+; Ignore moving OCTEONTX2 stable functions to INTERNAL tag
 [suppress_file]
 	soname_regexp = librte_common_octeontx2.*
+[suppress_file]
+	soname_regexp = librte_mempool_octeontx2.*
diff --git a/drivers/mempool/octeontx2/otx2_mempool.h b/drivers/mempool/octeontx2/otx2_mempool.h
index adcc0db24..8aa548248 100644
--- a/drivers/mempool/octeontx2/otx2_mempool.h
+++ b/drivers/mempool/octeontx2/otx2_mempool.h
@@ -206,7 +206,9 @@ npa_lf_aura_op_range_set(uint64_t aura_handle, uint64_t start_iova,
 }
 
 /* NPA LF */
+__rte_internal
 int otx2_npa_lf_init(struct rte_pci_device *pci_dev, void *otx2_dev);
+__rte_internal
 int otx2_npa_lf_fini(void);
 
 /* IRQ */
diff --git a/drivers/mempool/octeontx2/rte_mempool_octeontx2_version.map b/drivers/mempool/octeontx2/rte_mempool_octeontx2_version.map
index d4f81aed8..e6887ceb8 100644
--- a/drivers/mempool/octeontx2/rte_mempool_octeontx2_version.map
+++ b/drivers/mempool/octeontx2/rte_mempool_octeontx2_version.map
@@ -1,4 +1,4 @@
-DPDK_20.0 {
+INTERNAL {
 	global:
 
 	otx2_npa_lf_fini;
-- 
2.17.1


^ permalink raw reply	[relevance 3%]

* [dpdk-dev] [PATCH v2 1/2] common/octeontx2: move internal symbols to INTERNAL section
  2020-05-11 10:00  3% [dpdk-dev] [PATCH 1/2] common/octeontx2: move internal symbols to INTERNAL section pbhagavatula
  2020-05-11 10:00  3% ` [dpdk-dev] [PATCH 2/2] mempool/octeontx2: " pbhagavatula
  2020-05-11 14:45  0% ` [dpdk-dev] [PATCH 1/2] common/octeontx2: " Thomas Monjalon
@ 2020-05-13  1:04  3% ` pbhagavatula
  2020-05-13  1:04  3%   ` [dpdk-dev] [PATCH v2 2/2] mempool/octeontx2: " pbhagavatula
                     ` (2 more replies)
  2 siblings, 3 replies; 200+ results
From: pbhagavatula @ 2020-05-13  1:04 UTC (permalink / raw)
  To: jerinj, aostruszka, Ray Kinsella, Neil Horman, Nithin Dabilpuram,
	Anoob Joseph
  Cc: thomas, dev, Pavan Nikhilesh

From: Pavan Nikhilesh <pbhagavatula@marvell.com>

Move the internal symbols to INTERNAL sections so that any
change in them is not reported as ABI breakage.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
 v2 Changes:
 - Sort version map alphabetically
 - Add libabigail ignore tag for OCTEONTX2

 devtools/libabigail.abignore                  |  4 +++
 drivers/common/octeontx2/otx2_common.h        |  8 ++++++
 drivers/common/octeontx2/otx2_dev.h           |  3 +++
 drivers/common/octeontx2/otx2_irq.h           |  3 +++
 drivers/common/octeontx2/otx2_mbox.h          |  6 +++++
 drivers/common/octeontx2/otx2_sec_idev.h      |  6 +++++
 .../rte_common_octeontx2_version.map          | 26 ++++++-------------
 7 files changed, 38 insertions(+), 18 deletions(-)

diff --git a/devtools/libabigail.abignore b/devtools/libabigail.abignore
index c9ee73cb3..dfe346db4 100644
--- a/devtools/libabigail.abignore
+++ b/devtools/libabigail.abignore
@@ -48,3 +48,7 @@
         changed_enumerators = RTE_CRYPTO_AEAD_LIST_END
 [suppress_variable]
         name = rte_crypto_aead_algorithm_strings
+
+; Ignore moving internal OCTEONTX2 stable functions to INTERNAL tag
+[suppress_file]
+	soname_regexp = librte_common_octeontx2.*
diff --git a/drivers/common/octeontx2/otx2_common.h b/drivers/common/octeontx2/otx2_common.h
index e62cdea07..174702687 100644
--- a/drivers/common/octeontx2/otx2_common.h
+++ b/drivers/common/octeontx2/otx2_common.h
@@ -62,13 +62,21 @@ struct otx2_idev_cfg {
 	};
 };

+__rte_internal
 struct otx2_idev_cfg *otx2_intra_dev_get_cfg(void);
+__rte_internal
 void otx2_sso_pf_func_set(uint16_t sso_pf_func);
+__rte_internal
 uint16_t otx2_sso_pf_func_get(void);
+__rte_internal
 uint16_t otx2_npa_pf_func_get(void);
+__rte_internal
 struct otx2_npa_lf *otx2_npa_lf_obj_get(void);
+__rte_internal
 void otx2_npa_set_defaults(struct otx2_idev_cfg *idev);
+__rte_internal
 int otx2_npa_lf_active(void *dev);
+__rte_internal
 int otx2_npa_lf_obj_ref(void);

 /* Log */
diff --git a/drivers/common/octeontx2/otx2_dev.h b/drivers/common/octeontx2/otx2_dev.h
index 13b75e118..cd4fe517d 100644
--- a/drivers/common/octeontx2/otx2_dev.h
+++ b/drivers/common/octeontx2/otx2_dev.h
@@ -94,6 +94,7 @@ struct otx2_dev {
 	OTX2_DEV;
 };

+__rte_internal
 int otx2_dev_priv_init(struct rte_pci_device *pci_dev, void *otx2_dev);

 /* Common dev init and fini routines */
@@ -116,7 +117,9 @@ otx2_dev_init(struct rte_pci_device *pci_dev, void *otx2_dev)
 	return otx2_dev_priv_init(pci_dev, otx2_dev);
 }

+__rte_internal
 void otx2_dev_fini(struct rte_pci_device *pci_dev, void *otx2_dev);
+__rte_internal
 int otx2_dev_active_vfs(void *otx2_dev);

 #define RVU_PFVF_PF_SHIFT	10
diff --git a/drivers/common/octeontx2/otx2_irq.h b/drivers/common/octeontx2/otx2_irq.h
index 9d326276e..0683cf554 100644
--- a/drivers/common/octeontx2/otx2_irq.h
+++ b/drivers/common/octeontx2/otx2_irq.h
@@ -16,10 +16,13 @@ typedef struct {
 	uint64_t bits[MAX_VFPF_DWORD_BITS];
 } otx2_intr_t;

+__rte_internal
 int otx2_register_irq(struct rte_intr_handle *intr_handle,
 		      rte_intr_callback_fn cb, void *data, unsigned int vec);
+__rte_internal
 void otx2_unregister_irq(struct rte_intr_handle *intr_handle,
 			 rte_intr_callback_fn cb, void *data, unsigned int vec);
+__rte_internal
 int otx2_disable_irqs(struct rte_intr_handle *intr_handle);

 #endif /* _OTX2_IRQ_H_ */
diff --git a/drivers/common/octeontx2/otx2_mbox.h b/drivers/common/octeontx2/otx2_mbox.h
index 80778a0be..7fa4276e9 100644
--- a/drivers/common/octeontx2/otx2_mbox.h
+++ b/drivers/common/octeontx2/otx2_mbox.h
@@ -1617,19 +1617,25 @@ struct tim_enable_rsp {
 	uint32_t __otx2_io currentbucket;
 };

+__rte_internal
 const char *otx2_mbox_id2name(uint16_t id);
 int otx2_mbox_id2size(uint16_t id);
 void otx2_mbox_reset(struct otx2_mbox *mbox, int devid);
 int otx2_mbox_init(struct otx2_mbox *mbox, uintptr_t hwbase, uintptr_t reg_base,
 		   int direction, int ndevsi, uint64_t intr_offset);
 void otx2_mbox_fini(struct otx2_mbox *mbox);
+__rte_internal
 void otx2_mbox_msg_send(struct otx2_mbox *mbox, int devid);
+__rte_internal
 int otx2_mbox_wait_for_rsp(struct otx2_mbox *mbox, int devid);
 int otx2_mbox_wait_for_rsp_tmo(struct otx2_mbox *mbox, int devid, uint32_t tmo);
+__rte_internal
 int otx2_mbox_get_rsp(struct otx2_mbox *mbox, int devid, void **msg);
+__rte_internal
 int otx2_mbox_get_rsp_tmo(struct otx2_mbox *mbox, int devid, void **msg,
 			  uint32_t tmo);
 int otx2_mbox_get_availmem(struct otx2_mbox *mbox, int devid);
+__rte_internal
 struct mbox_msghdr *otx2_mbox_alloc_msg_rsp(struct otx2_mbox *mbox, int devid,
 					    int size, int size_rsp);

diff --git a/drivers/common/octeontx2/otx2_sec_idev.h b/drivers/common/octeontx2/otx2_sec_idev.h
index c681f5094..89cdaf66a 100644
--- a/drivers/common/octeontx2/otx2_sec_idev.h
+++ b/drivers/common/octeontx2/otx2_sec_idev.h
@@ -22,16 +22,22 @@ struct otx2_sec_idev_cfg {
 	rte_spinlock_t tx_cpt_lock;
 };

+__rte_internal
 uint8_t otx2_eth_dev_is_sec_capable(struct rte_eth_dev *eth_dev);

+__rte_internal
 int otx2_sec_idev_cfg_init(int port_id);

+__rte_internal
 int otx2_sec_idev_tx_cpt_qp_add(uint16_t port_id, struct otx2_cpt_qp *qp);

+__rte_internal
 int otx2_sec_idev_tx_cpt_qp_remove(struct otx2_cpt_qp *qp);

+__rte_internal
 int otx2_sec_idev_tx_cpt_qp_put(struct otx2_cpt_qp *qp);

+__rte_internal
 int otx2_sec_idev_tx_cpt_qp_get(uint16_t port_id, struct otx2_cpt_qp **qp);

 #endif /* _OTX2_SEC_IDEV_H_ */
diff --git a/drivers/common/octeontx2/rte_common_octeontx2_version.map b/drivers/common/octeontx2/rte_common_octeontx2_version.map
index 01279c339..7621a59ad 100644
--- a/drivers/common/octeontx2/rte_common_octeontx2_version.map
+++ b/drivers/common/octeontx2/rte_common_octeontx2_version.map
@@ -1,13 +1,15 @@
-DPDK_20.0 {
+INTERNAL {
 	global:

 	otx2_dev_active_vfs;
 	otx2_dev_fini;
 	otx2_dev_priv_init;
 	otx2_disable_irqs;
+	otx2_eth_dev_is_sec_capable;
 	otx2_intra_dev_get_cfg;
 	otx2_logtype_base;
 	otx2_logtype_dpi;
+	otx2_logtype_ep;
 	otx2_logtype_mbox;
 	otx2_logtype_nix;
 	otx2_logtype_npa;
@@ -27,26 +29,14 @@ DPDK_20.0 {
 	otx2_npa_pf_func_get;
 	otx2_npa_set_defaults;
 	otx2_register_irq;
-	otx2_sso_pf_func_get;
-	otx2_sso_pf_func_set;
-	otx2_unregister_irq;
-
-	local: *;
-};
-
-DPDK_21 {
-	global:
-
-	otx2_eth_dev_is_sec_capable;
 	otx2_sec_idev_cfg_init;
 	otx2_sec_idev_tx_cpt_qp_add;
-	otx2_sec_idev_tx_cpt_qp_remove;
 	otx2_sec_idev_tx_cpt_qp_get;
 	otx2_sec_idev_tx_cpt_qp_put;
-} DPDK_20.0;
-
-EXPERIMENTAL {
-	global:
+	otx2_sec_idev_tx_cpt_qp_remove;
+	otx2_sso_pf_func_get;
+	otx2_sso_pf_func_set;
+	otx2_unregister_irq;

-	otx2_logtype_ep;
+	local: *;
 };
--
2.17.1


^ permalink raw reply	[relevance 3%]

* Re: [dpdk-dev] Release candidate 20.05-rc2 ABI
  2020-05-12 16:41  7% ` [dpdk-dev] Release candidate 20.05-rc2 ABI Ray Kinsella
@ 2020-05-12 20:40  4%   ` Honnappa Nagarahalli
  0 siblings, 0 replies; 200+ results
From: Honnappa Nagarahalli @ 2020-05-12 20:40 UTC (permalink / raw)
  To: Ray Kinsella, thomas, dpdk-dev, Ananyev, Konstantin, Yipeng Wang,
	Richardson, Bruce, Declan Doherty, Nicolas Chautru, nd,
	Honnappa Nagarahalli
  Cc: nd

<snip>

> Subject: [dpdk-dev] Release candidate 20.05-rc2 ABI
> 
> Folks,
> 
> Few ABI observations based on the 20.05-rc2, (please correct me if I am
> wrong)
> 
> 1. rte_ring.h - struct rte_ring
> 
> Changes to the structure of rte_ring throws up a whole bunch of false
> positives that have been suppressed in libabigail.ignore. It is not used by end
> applications and should not be exposed in public headers.
> 
> Suggest that in the v20.11 timeframe we use the opportunity to use opaque
> pointers in librte_efd, librte_hash, librte_pmd_ring, librte_ring, librte_pdump
> to make this issue go away permanently.
lirte_hash already uses opaque pointer, though it is called rte_hash, the structure definition is not exposed to the application.
librte_ring, using opaque pointers does not help as it has inline APIs called from the application.

> 
> 2. rte_cryptodev_pmd.h - struct rte_cryptodev_ops
> 
> Similarly, changes to the structure of rte_cryptodev_ops are causing false
> positives, also suppressed in libabigail.ignore. It is not used by end
> applications and should not be exposed in public headers.
> 
> 3. rte_bbdev.h - struct rte_bbdev_driver_info
> 
> Similarly, changes to the structure rte_bbdev are causing false positives, also
> suppressed in libabigail.ignore. It is not used by end applications and should
> not be exposed in public headers.
> 
> Thanks,
> 
> Ray K
> 
> On 12/05/2020 03:22, Thomas Monjalon wrote:
> > A new DPDK release candidate is ready for testing:
> > 	https://git.dpdk.org/dpdk/tag/?id=v20.05-rc2
> >
> > There are 286 new patches in this snapshot.
> >
> > Release notes:
> > 	http://doc.dpdk.org/guides/rel_notes/release_20_05.html
> >
> > Highlights of 20.05-rc2:
> > 	- rte_graph
> > 	- telemetry rework
> > 	- ChaCha20-Poly1305 crypto algorithm
> >
> > The -rc3 should include only some bug fixes, simple cleanups, doc and
> > tooling. We have one week to complete this milestone.
> > Then one more week (allowing -rc4) should be needed before the release.
> >
> > Please test and report issues on bugs.dpdk.org.
> > As a community, we must close as many bugs as possible for -rc3.
> >
> > Thank you everyone
> >
> >

^ permalink raw reply	[relevance 4%]

* [dpdk-dev]  [RFC v2] hash: unify crc32 API header for x86 and ARM
  2020-04-29 18:05  2% [dpdk-dev] [RFC] hash: unify crc32 API header for x86 and ARM pbhagavatula
                   ` (2 preceding siblings ...)
  2020-05-08 12:55  0% ` Ananyev, Konstantin
@ 2020-05-12 20:40  3% ` pbhagavatula
  2020-05-13  3:04  3%   ` Ruifeng Wang
  3 siblings, 1 reply; 200+ results
From: pbhagavatula @ 2020-05-12 20:40 UTC (permalink / raw)
  To: jerinj, konstantin.ananyev, harry.van.haaren, Yipeng Wang,
	Sameh Gobriel, Bruce Richardson, Ruifeng Wang
  Cc: dev, Pavan Nikhilesh

From: Pavan Nikhilesh <pbhagavatula@marvell.com>

Merge crc32 hash calculation public API headers for x86 and ARM.
Select the best available CRC32 algorithm when unsupported algorithm
on a given CPU architecture is requested by an application.

Previously, if an application directly includes `rte_crc_arm64.h` without
including `rte_hash_crc.h` it will fail to compile.
Although, `rte_crc_arm64.h` is no longer needed make it a dummy file for
ABI purposes.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
 v2 Changes:
 - Don't remove `rte_crc_arm64.h` for ABI purposes.
 - Revert function pointer approach for performance reasons.
 - Select the best available algorithm based on the arch when user passes an
 unsupported crc32 algorithm.

 app/test/test_hash.c            |   6 ++
 lib/librte_hash/meson.build     |   6 +-
 lib/librte_hash/rte_crc_arm64.h | 175 +-------------------------------
 lib/librte_hash/rte_hash_crc.h  | 153 ++++++++++++++++++++--------
 4 files changed, 122 insertions(+), 218 deletions(-)

diff --git a/app/test/test_hash.c b/app/test/test_hash.c
index afa3a1a3c..7bd457dac 100644
--- a/app/test/test_hash.c
+++ b/app/test/test_hash.c
@@ -195,7 +195,13 @@ test_crc32_hash_alg_equiv(void)
 	}

 	/* Resetting to best available algorithm */
+#if defined RTE_ARCH_X86
 	rte_hash_crc_set_alg(CRC32_SSE42_x64);
+#elif defined RTE_ARCH_ARM64
+	rte_hash_crc_set_alg(CRC32_ARM64);
+#else
+	rte_hash_crc_set_alg(CRC32_SW);
+#endif

 	if (i == CRC32_ITERATIONS)
 		return 0;
diff --git a/lib/librte_hash/meson.build b/lib/librte_hash/meson.build
index 6ab46ae9d..8a3cf2f64 100644
--- a/lib/librte_hash/meson.build
+++ b/lib/librte_hash/meson.build
@@ -1,12 +1,14 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017 Intel Corporation

-headers = files('rte_crc_arm64.h',
-	'rte_fbk_hash.h',
+headers = files('rte_fbk_hash.h',
 	'rte_hash_crc.h',
 	'rte_hash.h',
 	'rte_jhash.h',
 	'rte_thash.h')
+if dpdk_conf.has('RTE_ARCH_ARM64')
+	headers += files('rte_crc_arm64.h')
+endif

 sources = files('rte_cuckoo_hash.c', 'rte_fbk_hash.c')
 deps += ['ring']
diff --git a/lib/librte_hash/rte_crc_arm64.h b/lib/librte_hash/rte_crc_arm64.h
index b4628cfc0..adfcafc7d 100644
--- a/lib/librte_hash/rte_crc_arm64.h
+++ b/lib/librte_hash/rte_crc_arm64.h
@@ -5,179 +5,6 @@
 #ifndef _RTE_CRC_ARM64_H_
 #define _RTE_CRC_ARM64_H_

-/**
- * @file
- *
- * RTE CRC arm64 Hash
- */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <stdint.h>
-#include <rte_cpuflags.h>
-#include <rte_branch_prediction.h>
-#include <rte_common.h>
-
-static inline uint32_t
-crc32c_arm64_u8(uint8_t data, uint32_t init_val)
-{
-	__asm__ volatile(
-			"crc32cb %w[crc], %w[crc], %w[value]"
-			: [crc] "+r" (init_val)
-			: [value] "r" (data));
-	return init_val;
-}
-
-static inline uint32_t
-crc32c_arm64_u16(uint16_t data, uint32_t init_val)
-{
-	__asm__ volatile(
-			"crc32ch %w[crc], %w[crc], %w[value]"
-			: [crc] "+r" (init_val)
-			: [value] "r" (data));
-	return init_val;
-}
-
-static inline uint32_t
-crc32c_arm64_u32(uint32_t data, uint32_t init_val)
-{
-	__asm__ volatile(
-			"crc32cw %w[crc], %w[crc], %w[value]"
-			: [crc] "+r" (init_val)
-			: [value] "r" (data));
-	return init_val;
-}
-
-static inline uint32_t
-crc32c_arm64_u64(uint64_t data, uint32_t init_val)
-{
-	__asm__ volatile(
-			"crc32cx %w[crc], %w[crc], %x[value]"
-			: [crc] "+r" (init_val)
-			: [value] "r" (data));
-	return init_val;
-}
-
-/**
- * Allow or disallow use of arm64 SIMD instrinsics for CRC32 hash
- * calculation.
- *
- * @param alg
- *   An OR of following flags:
- *   - (CRC32_SW) Don't use arm64 crc intrinsics
- *   - (CRC32_ARM64) Use ARMv8 CRC intrinsic if available
- *
- */
-static inline void
-rte_hash_crc_set_alg(uint8_t alg)
-{
-	switch (alg) {
-	case CRC32_ARM64:
-		if (!rte_cpu_get_flag_enabled(RTE_CPUFLAG_CRC32))
-			alg = CRC32_SW;
-		/* fall-through */
-	case CRC32_SW:
-		crc32_alg = alg;
-		/* fall-through */
-	default:
-		break;
-	}
-}
-
-/* Setting the best available algorithm */
-RTE_INIT(rte_hash_crc_init_alg)
-{
-	rte_hash_crc_set_alg(CRC32_ARM64);
-}
-
-/**
- * Use single crc32 instruction to perform a hash on a 1 byte value.
- * Fall back to software crc32 implementation in case arm64 crc intrinsics is
- * not supported
- *
- * @param data
- *   Data to perform hash on.
- * @param init_val
- *   Value to initialise hash generator.
- * @return
- *   32bit calculated hash value.
- */
-static inline uint32_t
-rte_hash_crc_1byte(uint8_t data, uint32_t init_val)
-{
-	if (likely(crc32_alg & CRC32_ARM64))
-		return crc32c_arm64_u8(data, init_val);
-
-	return crc32c_1byte(data, init_val);
-}
-
-/**
- * Use single crc32 instruction to perform a hash on a 2 bytes value.
- * Fall back to software crc32 implementation in case arm64 crc intrinsics is
- * not supported
- *
- * @param data
- *   Data to perform hash on.
- * @param init_val
- *   Value to initialise hash generator.
- * @return
- *   32bit calculated hash value.
- */
-static inline uint32_t
-rte_hash_crc_2byte(uint16_t data, uint32_t init_val)
-{
-	if (likely(crc32_alg & CRC32_ARM64))
-		return crc32c_arm64_u16(data, init_val);
-
-	return crc32c_2bytes(data, init_val);
-}
-
-/**
- * Use single crc32 instruction to perform a hash on a 4 byte value.
- * Fall back to software crc32 implementation in case arm64 crc intrinsics is
- * not supported
- *
- * @param data
- *   Data to perform hash on.
- * @param init_val
- *   Value to initialise hash generator.
- * @return
- *   32bit calculated hash value.
- */
-static inline uint32_t
-rte_hash_crc_4byte(uint32_t data, uint32_t init_val)
-{
-	if (likely(crc32_alg & CRC32_ARM64))
-		return crc32c_arm64_u32(data, init_val);
-
-	return crc32c_1word(data, init_val);
-}
-
-/**
- * Use single crc32 instruction to perform a hash on a 8 byte value.
- * Fall back to software crc32 implementation in case arm64 crc intrinsics is
- * not supported
- *
- * @param data
- *   Data to perform hash on.
- * @param init_val
- *   Value to initialise hash generator.
- * @return
- *   32bit calculated hash value.
- */
-static inline uint32_t
-rte_hash_crc_8byte(uint64_t data, uint32_t init_val)
-{
-	if (likely(crc32_alg == CRC32_ARM64))
-		return crc32c_arm64_u64(data, init_val);
-
-	return crc32c_2words(data, init_val);
-}
-
-#ifdef __cplusplus
-}
-#endif
+#include "rte_hash_crc.h"

 #endif /* _RTE_CRC_ARM64_H_ */
diff --git a/lib/librte_hash/rte_hash_crc.h b/lib/librte_hash/rte_hash_crc.h
index cf28031b3..eaba70c12 100644
--- a/lib/librte_hash/rte_hash_crc.h
+++ b/lib/librte_hash/rte_hash_crc.h
@@ -16,10 +16,12 @@ extern "C" {
 #endif

 #include <stdint.h>
-#include <rte_config.h>
-#include <rte_cpuflags.h>
+
 #include <rte_branch_prediction.h>
 #include <rte_common.h>
+#include <rte_config.h>
+#include <rte_cpuflags.h>
+#include <rte_log.h>

 /* Lookup tables for software implementation of CRC32C */
 static const uint32_t crc32c_tables[8][256] = {{
@@ -322,7 +324,7 @@ crc32c_2bytes(uint16_t data, uint32_t init_val)
 }

 static inline uint32_t
-crc32c_1word(uint32_t data, uint32_t init_val)
+crc32c_4bytes(uint32_t data, uint32_t init_val)
 {
 	uint32_t crc, term1, term2;
 	crc = init_val;
@@ -336,7 +338,7 @@ crc32c_1word(uint32_t data, uint32_t init_val)
 }

 static inline uint32_t
-crc32c_2words(uint64_t data, uint32_t init_val)
+crc32c_8bytes(uint64_t data, uint32_t init_val)
 {
 	uint32_t crc, term1, term2;
 	union {
@@ -358,6 +360,48 @@ crc32c_2words(uint64_t data, uint32_t init_val)
 	return crc;
 }

+#if defined(RTE_ARCH_ARM64) && defined(RTE_MACHINE_CPUFLAG_CRC32)
+static inline uint32_t
+crc32c_arm64_u8(uint8_t data, uint32_t init_val)
+{
+	__asm__ volatile(
+			"crc32cb %w[crc], %w[crc], %w[value]"
+			: [crc] "+r" (init_val)
+			: [value] "r" (data));
+	return init_val;
+}
+
+static inline uint32_t
+crc32c_arm64_u16(uint16_t data, uint32_t init_val)
+{
+	__asm__ volatile(
+			"crc32ch %w[crc], %w[crc], %w[value]"
+			: [crc] "+r" (init_val)
+			: [value] "r" (data));
+	return init_val;
+}
+
+static inline uint32_t
+crc32c_arm64_u32(uint32_t data, uint32_t init_val)
+{
+	__asm__ volatile(
+			"crc32cw %w[crc], %w[crc], %w[value]"
+			: [crc] "+r" (init_val)
+			: [value] "r" (data));
+	return init_val;
+}
+
+static inline uint32_t
+crc32c_arm64_u64(uint64_t data, uint32_t init_val)
+{
+	__asm__ volatile(
+			"crc32cx %w[crc], %w[crc], %x[value]"
+			: [crc] "+r" (init_val)
+			: [value] "r" (data));
+	return init_val;
+}
+#endif
+
 #if defined(RTE_ARCH_X86)
 static inline uint32_t
 crc32c_sse42_u8(uint8_t data, uint32_t init_val)
@@ -424,42 +468,69 @@ crc32c_sse42_u64(uint64_t data, uint64_t init_val)

 static uint8_t crc32_alg = CRC32_SW;

-#if defined(RTE_ARCH_ARM64) && defined(RTE_MACHINE_CPUFLAG_CRC32)
-#include "rte_crc_arm64.h"
-#else
-
 /**
- * Allow or disallow use of SSE4.2 instrinsics for CRC32 hash
+ * Allow or disallow use of SSE4.2/ARMv8 instrinsics for CRC32 hash
  * calculation.
  *
  * @param alg
  *   An OR of following flags:
- *   - (CRC32_SW) Don't use SSE4.2 intrinsics
+ *   - (CRC32_SW) Don't use SSE4.2 intrinsics (default non-[x86/ARMv8])
  *   - (CRC32_SSE42) Use SSE4.2 intrinsics if available
- *   - (CRC32_SSE42_x64) Use 64-bit SSE4.2 intrinsic if available (default)
- *
+ *   - (CRC32_SSE42_x64) Use 64-bit SSE4.2 intrinsic if available (default x86)
+ *   - (CRC32_ARM64) Use ARMv8 CRC intrinsic if available
  */
 static inline void
 rte_hash_crc_set_alg(uint8_t alg)
 {
-#if defined(RTE_ARCH_X86)
-	if (alg == CRC32_SSE42_x64 &&
-			!rte_cpu_get_flag_enabled(RTE_CPUFLAG_EM64T))
-		alg = CRC32_SSE42;
+	switch (alg) {
+	case CRC32_SSE42_x64:
+	case CRC32_SSE42:
+#if defined RTE_ARCH_X86
+		if (!rte_cpu_get_flag_enabled(RTE_CPUFLAG_EM64T))
+			crc32_alg = CRC32_SSE42;
+		else
+			crc32_alg = alg;
+#endif
+#if defined RTE_ARCH_ARM64
+		RTE_LOG(WARNING, HASH,
+			"Incorrect CRC32 algorithm requested setting best"
+			"available algorithm on the architecture\n");
+		rte_hash_crc_set_alg(CRC32_ARM64);
+#endif
+		break;
+	case CRC32_ARM64:
+#if defined RTE_ARCH_ARM64
+		if (rte_cpu_get_flag_enabled(RTE_CPUFLAG_CRC32))
+			crc32_alg = CRC32_ARM64;
 #endif
-	crc32_alg = alg;
+#if defined RTE_ARCH_X86
+		RTE_LOG(WARNING, HASH,
+			"Incorrect CRC32 algorithm requested setting best"
+			"available algorithm on the architecture\n");
+		rte_hash_crc_set_alg(CRC32_SSE42_x64);
+#endif
+		break;
+	case CRC32_SW:
+	default:
+		crc32_alg = CRC32_SW;
+	break;
+	}
 }

 /* Setting the best available algorithm */
 RTE_INIT(rte_hash_crc_init_alg)
 {
+#if defined RTE_ARCH_X86
 	rte_hash_crc_set_alg(CRC32_SSE42_x64);
+#elif defined RTE_ARCH_ARM64
+	rte_hash_crc_set_alg(CRC32_ARM64);
+#else
+	rte_hash_crc_set_alg(CRC32_SW);
+#endif
 }

 /**
- * Use single crc32 instruction to perform a hash on a byte value.
- * Fall back to software crc32 implementation in case SSE4.2 is
- * not supported
+ * Calculate crc32 hash value of 1bytes.
  *
  * @param data
  *   Data to perform hash on.
@@ -474,15 +545,15 @@ rte_hash_crc_1byte(uint8_t data, uint32_t init_val)
 #if defined RTE_ARCH_X86
 	if (likely(crc32_alg & CRC32_SSE42))
 		return crc32c_sse42_u8(data, init_val);
+#elif defined RTE_ARCH_ARM64
+	if (likely(crc32_alg & CRC32_ARM64))
+		return crc32c_arm64_u8(data, init_val);
 #endif
-
 	return crc32c_1byte(data, init_val);
 }

 /**
- * Use single crc32 instruction to perform a hash on a 2 bytes value.
- * Fall back to software crc32 implementation in case SSE4.2 is
- * not supported
+ * Calculate crc32 hash value of 2bytes.
  *
  * @param data
  *   Data to perform hash on.
@@ -497,15 +568,15 @@ rte_hash_crc_2byte(uint16_t data, uint32_t init_val)
 #if defined RTE_ARCH_X86
 	if (likely(crc32_alg & CRC32_SSE42))
 		return crc32c_sse42_u16(data, init_val);
+#elif defined RTE_ARCH_ARM64
+	if (likely(crc32_alg & CRC32_ARM64))
+		return crc32c_arm64_u16(data, init_val);
 #endif
-
 	return crc32c_2bytes(data, init_val);
 }

 /**
- * Use single crc32 instruction to perform a hash on a 4 byte value.
- * Fall back to software crc32 implementation in case SSE4.2 is
- * not supported
+ * Calculate crc32 hash value of 4bytes.
  *
  * @param data
  *   Data to perform hash on.
@@ -520,15 +591,15 @@ rte_hash_crc_4byte(uint32_t data, uint32_t init_val)
 #if defined RTE_ARCH_X86
 	if (likely(crc32_alg & CRC32_SSE42))
 		return crc32c_sse42_u32(data, init_val);
+#elif defined RTE_ARCH_ARM64
+	if (likely(crc32_alg & CRC32_ARM64))
+		return crc32c_arm64_u32(data, init_val);
 #endif
-
-	return crc32c_1word(data, init_val);
+	return crc32c_4bytes(data, init_val);
 }

 /**
- * Use single crc32 instruction to perform a hash on a 8 byte value.
- * Fall back to software crc32 implementation in case SSE4.2 is
- * not supported
+ * Calculate crc32 hash value of 8bytes.
  *
  * @param data
  *   Data to perform hash on.
@@ -540,21 +611,19 @@ rte_hash_crc_4byte(uint32_t data, uint32_t init_val)
 static inline uint32_t
 rte_hash_crc_8byte(uint64_t data, uint32_t init_val)
 {
-#ifdef RTE_ARCH_X86_64
-	if (likely(crc32_alg == CRC32_SSE42_x64))
+#if defined RTE_ARCH_X86_64
+	if (likely(crc32_alg & CRC32_SSE42_x64))
 		return crc32c_sse42_u64(data, init_val);
-#endif
-
-#if defined RTE_ARCH_X86
+#elif defined RTE_ARCH_X86
 	if (likely(crc32_alg & CRC32_SSE42))
 		return crc32c_sse42_u64_mimic(data, init_val);
+#elif defined RTE_ARCH_ARM64
+	if (likely(crc32_alg & CRC32_ARM64))
+		return crc32c_arm64_u64(data, init_val);
 #endif
-
-	return crc32c_2words(data, init_val);
+	return crc32c_8bytes(data, init_val);
 }

-#endif
-
 /**
  * Calculate CRC32 hash on user-supplied byte array.
  *
--
2.17.1


^ permalink raw reply	[relevance 3%]

* Re: [dpdk-dev] [PATCH v3 0/4] add AESNI-MB rawdev for multi-function processing
  2020-05-01 13:18  0%                 ` Zhang, Roy Fan
@ 2020-05-12 17:32  0%                   ` Coyle, David
  0 siblings, 0 replies; 200+ results
From: Coyle, David @ 2020-05-12 17:32 UTC (permalink / raw)
  To: Zhang, Roy Fan, Akhil Goyal, Doherty, Declan, Thomas Monjalon,
	Yigit, Ferruh, Trahe, Fiona
  Cc: techboard, dev, De Lara Guarch, Pablo, Ryan, Brendan,
	Hemant Agrawal, Anoob Joseph, Ruifeng Wang, Liron Himi,
	Nagadheeraj Rottela, Srikanth Jampala, Gagandeep Singh, Jay Zhou,
	Ravi Kumar, Richardson, Bruce, olivier.matz,
	honnappa.nagarahalli, Stephen Hemminger, alexr

Hi Fan & Akhil,

> -----Original Message-----
> From: Zhang, Roy Fan <roy.fan.zhang@intel.com>
> Sent: Friday, May 1, 2020 2:18 PM
> 
> Hi Akhil,
> 
> > -----Original Message-----
> > From: dev <dev-bounces@dpdk.org> On Behalf Of Akhil Goyal
> > Sent: Wednesday, April 22, 2020 2:44 PM
> > To: Coyle, David <david.coyle@intel.com>; Doherty, Declan
> > <declan.doherty@intel.com>; Thomas Monjalon
> <thomas@monjalon.net>;
> > Yigit, Ferruh <ferruh.yigit@intel.com>; Trahe, Fiona
> > <fiona.trahe@intel.com>
> > Cc: techboard@dpdk.org; dev@dpdk.org; De Lara Guarch, Pablo
> > <pablo.de.lara.guarch@intel.com>; Ryan, Brendan
> > <brendan.ryan@intel.com>; Hemant Agrawal
> <hemant.agrawal@nxp.com>;
> > Anoob Joseph <anoobj@marvell.com>; Ruifeng Wang
> > <ruifeng.wang@arm.com>; Liron Himi <lironh@marvell.com>; Nagadheeraj
> > Rottela <rnagadheeraj@marvell.com>; Srikanth Jampala
> > <jsrikanth@marvell.com>; Gagandeep Singh <G.Singh@nxp.com>; Jay
> Zhou
> > <jianjay.zhou@huawei.com>; Ravi Kumar <ravi1.kumar@amd.com>;
> > Richardson, Bruce <bruce.richardson@intel.com>;
> > olivier.matz@6wind.com; honnappa.nagarahalli@arm.com; Stephen
> > Hemminger <stephen@networkplumber.org>; alexr@mellanox.com
> > Subject: Re: [dpdk-dev] [PATCH v3 0/4] add AESNI-MB rawdev for multi-
> > function processing
> ...
> > Yes, it is preferred, but it should be a union to
> > rte_crypto_sym_op/rte_crypto_asym_op.
> > Crypto_op->type as RTE_CRYPTO_OP_TYPE_SECURITY and sess_type as
> > RTE_CRYPTO_OP_SECURITY_SESSION The size of rte_crypto_op will remain
> > as is and there will be no ABI breakage I guess.
> >
> [Fan: with this way the PMD will have to do rte_crypto_op.type check, and
> then look into rte_security_op field, only when it find the security_op type is
> crypto_crc, it will process the security_op data. Would that being too many
> reads and checking for a single op? Can we create a new API for rte_security
> to process rte_security_ops for Crypto_CRC or future needs?] ...

[DC] If we were to add new enqueue/dequeue APIs to rte_security, then this may
cause extra churn and extra paths of code in a customer's application. For the
DOCSIS Crypto-CRC use-case which is currently supported by IPSecMB, only the
AES-DOCSISBPI cipher algorithm is supported. For these Crypto-CRC ops, they would
create rte_security sessions, attach these to rte_security_ops and enqueue/dequeue
using the new APIs in rte_security.

However, the customer may also be using the legacy DES-DOCSISBPI cipher algorithm
for some subscribers, and this algorithm is not supported in the chained Crypto-CRC
functionality in IPSecMB (and most likely never will be). So for these the customer
would need to create cryptodev sessions, attach these to rte_crypto_ops and enqueue/
dequeue with the cryptodev enq/deq APIs. That is 2 different paths of code now in
the application datapath, where some packets in a batch need to be enqueued through
rte_security and some need to be enqueued through cryptodev.

If rte_crypto_ops are always used and enqueued/dequeued through cryptodev, then the
only thing that changes is the type of session that is created and either the security session
or the cryptodev session gets attached to the crypto_op.

Now, we could add support to rte_security for DES-DOCSISBPI too, but it would not be a
combined operation with CRC - it would be a simple cipher operation going through
rte_security. But that, to me, does not seem like a good use of rte_security.

For DOCSIS Crypto-CRC, we may also want to take advantage of the
rte_cryptodev_sym_cpu_crypto_process() API which was added to cryptodev recently to
avoid the enqueue/dequeue overhead. A similar API would also then need to be added
to rte_security.

Taking all of the above into account, I feel keeping the normal cryptodev enqueue/dequeue
would be best. Having said all that, we do need to consider performance in the PMD of the
extra op type checks. Take aesni_mb PMD as an example. It would need to check
rte_crypto_op->type and if it's not RTE_CRYPTO_OP_TYPE_SECURITY, then it can assume
it's an RTE_CRYPTO_OP_TYPE_SYMMETRIC op and carry on as normal for existing symmetric
operations. Security ops will need some extra parsing but this is new functionality. The impact
on existing functionality of the extra checks would certainly need to be tested though, but as
all the op data will be in the same cache line, I don't see any major impact.

Akhil & Fan (& others), I would be interested to hear your feedback on this.

Regards,
David

> 
> Regards,
> Fan

^ permalink raw reply	[relevance 0%]

* [dpdk-dev] Release candidate 20.05-rc2 ABI
  @ 2020-05-12 16:41  7% ` Ray Kinsella
  2020-05-12 20:40  4%   ` Honnappa Nagarahalli
  0 siblings, 1 reply; 200+ results
From: Ray Kinsella @ 2020-05-12 16:41 UTC (permalink / raw)
  To: Thomas Monjalon, dpdk-dev, Ananyev, Konstantin, Yipeng Wang,
	Richardson, Bruce, Declan Doherty, Nicolas Chautru

Folks, 

Few ABI observations based on the 20.05-rc2,
(please correct me if I am wrong)

1. rte_ring.h - struct rte_ring

Changes to the structure of rte_ring throws up a whole bunch of false positives that 
have been suppressed in libabigail.ignore. It is not used by end applications 
and should not be exposed in public headers. 

Suggest that in the v20.11 timeframe we use the opportunity to use opaque pointers 
in librte_efd, librte_hash, librte_pmd_ring, librte_ring, librte_pdump to make this
issue go away permanently. 

2. rte_cryptodev_pmd.h - struct rte_cryptodev_ops

Similarly, changes to the structure of rte_cryptodev_ops are causing false 
positives, also suppressed in libabigail.ignore. It is not used by end applications 
and should not be exposed in public headers. 

3. rte_bbdev.h - struct rte_bbdev_driver_info

Similarly, changes to the structure rte_bbdev are causing false 
positives, also suppressed in libabigail.ignore. It is not used by end applications 
and should not be exposed in public headers. 

Thanks,

Ray K

On 12/05/2020 03:22, Thomas Monjalon wrote:
> A new DPDK release candidate is ready for testing:
> 	https://git.dpdk.org/dpdk/tag/?id=v20.05-rc2
> 
> There are 286 new patches in this snapshot.
> 
> Release notes:
> 	http://doc.dpdk.org/guides/rel_notes/release_20_05.html
> 
> Highlights of 20.05-rc2:
> 	- rte_graph
> 	- telemetry rework
> 	- ChaCha20-Poly1305 crypto algorithm
> 
> The -rc3 should include only some bug fixes, simple cleanups, doc
> and tooling. We have one week to complete this milestone.
> Then one more week (allowing -rc4) should be needed before the release.
> 
> Please test and report issues on bugs.dpdk.org.
> As a community, we must close as many bugs as possible for -rc3.
> 
> Thank you everyone
> 
> 

^ permalink raw reply	[relevance 7%]

* [dpdk-dev] [PATCH v2 09/12] net/dpaa: move internal symbols into INTERNAL section
  2020-05-12 14:00  3% ` [dpdk-dev] [PATCH v2 01/12] " Hemant Agrawal
                     ` (4 preceding siblings ...)
  2020-05-12 14:00  3%   ` [dpdk-dev] [PATCH v2 08/12] net/dpaa2: " Hemant Agrawal
@ 2020-05-12 14:00  3%   ` Hemant Agrawal
  2020-05-13 12:44  4%   ` [dpdk-dev] [PATCH v2 01/12] common/dpaax: " Thomas Monjalon
    7 siblings, 0 replies; 200+ results
From: Hemant Agrawal @ 2020-05-12 14:00 UTC (permalink / raw)
  To: dev, david.marchand; +Cc: Hemant Agrawal

This patch moves the internal symbols to INTERNAL sections
so that any change in them is not reported as ABI breakage.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/net/dpaa/dpaa_ethdev.h            | 2 ++
 drivers/net/dpaa/rte_pmd_dpaa_version.map | 9 ++++++++-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/drivers/net/dpaa/dpaa_ethdev.h b/drivers/net/dpaa/dpaa_ethdev.h
index af9fc2105d..7393a9df05 100644
--- a/drivers/net/dpaa/dpaa_ethdev.h
+++ b/drivers/net/dpaa/dpaa_ethdev.h
@@ -160,12 +160,14 @@ struct dpaa_if_stats {
 	uint64_t tund;		/**<Tx Undersized */
 };
 
+__rte_internal
 int
 dpaa_eth_eventq_attach(const struct rte_eth_dev *dev,
 		int eth_rx_queue_id,
 		u16 ch_id,
 		const struct rte_event_eth_rx_adapter_queue_conf *queue_conf);
 
+__rte_internal
 int
 dpaa_eth_eventq_detach(const struct rte_eth_dev *dev,
 			   int eth_rx_queue_id);
diff --git a/drivers/net/dpaa/rte_pmd_dpaa_version.map b/drivers/net/dpaa/rte_pmd_dpaa_version.map
index f403a1526d..3df144dc8d 100644
--- a/drivers/net/dpaa/rte_pmd_dpaa_version.map
+++ b/drivers/net/dpaa/rte_pmd_dpaa_version.map
@@ -1,9 +1,16 @@
 DPDK_20.0 {
 	global:
 
+	rte_pmd_dpaa_set_tx_loopback;
+
+	local: *;
+};
+
+INTERNAL {
+	global:
+
 	dpaa_eth_eventq_attach;
 	dpaa_eth_eventq_detach;
-	rte_pmd_dpaa_set_tx_loopback;
 
 	local: *;
 };
-- 
2.17.1


^ permalink raw reply	[relevance 3%]

* [dpdk-dev] [PATCH v2 08/12] net/dpaa2: move internal symbols into INTERNAL section
  2020-05-12 14:00  3% ` [dpdk-dev] [PATCH v2 01/12] " Hemant Agrawal
                     ` (3 preceding siblings ...)
  2020-05-12 14:00  3%   ` [dpdk-dev] [PATCH v2 07/12] crypto: " Hemant Agrawal
@ 2020-05-12 14:00  3%   ` Hemant Agrawal
  2020-05-12 14:00  3%   ` [dpdk-dev] [PATCH v2 09/12] net/dpaa: " Hemant Agrawal
                     ` (2 subsequent siblings)
  7 siblings, 0 replies; 200+ results
From: Hemant Agrawal @ 2020-05-12 14:00 UTC (permalink / raw)
  To: dev, david.marchand; +Cc: Hemant Agrawal

This patch moves the internal symbols to INTERNAL sections
so that any change in them is not reported as ABI breakage.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/net/dpaa2/dpaa2_ethdev.h            | 2 ++
 drivers/net/dpaa2/rte_pmd_dpaa2_version.map | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/dpaa2/dpaa2_ethdev.h b/drivers/net/dpaa2/dpaa2_ethdev.h
index 2c49a7f01f..c7fb6539ff 100644
--- a/drivers/net/dpaa2/dpaa2_ethdev.h
+++ b/drivers/net/dpaa2/dpaa2_ethdev.h
@@ -164,11 +164,13 @@ int dpaa2_remove_flow_dist(struct rte_eth_dev *eth_dev,
 
 int dpaa2_attach_bp_list(struct dpaa2_dev_priv *priv, void *blist);
 
+__rte_internal
 int dpaa2_eth_eventq_attach(const struct rte_eth_dev *dev,
 		int eth_rx_queue_id,
 		struct dpaa2_dpcon_dev *dpcon,
 		const struct rte_event_eth_rx_adapter_queue_conf *queue_conf);
 
+__rte_internal
 int dpaa2_eth_eventq_detach(const struct rte_eth_dev *dev,
 		int eth_rx_queue_id);
 
diff --git a/drivers/net/dpaa2/rte_pmd_dpaa2_version.map b/drivers/net/dpaa2/rte_pmd_dpaa2_version.map
index f2bb793319..78ea74e058 100644
--- a/drivers/net/dpaa2/rte_pmd_dpaa2_version.map
+++ b/drivers/net/dpaa2/rte_pmd_dpaa2_version.map
@@ -1,4 +1,4 @@
-DPDK_20.0 {
+INTERNAL {
 	global:
 
 	dpaa2_eth_eventq_attach;
-- 
2.17.1


^ permalink raw reply	[relevance 3%]

* [dpdk-dev] [PATCH v2 06/12] bus/dpaa: move internal symbols into INTERNAL section
  2020-05-12 14:00  3% ` [dpdk-dev] [PATCH v2 01/12] " Hemant Agrawal
  2020-05-12 14:00  3%   ` [dpdk-dev] [PATCH v2 02/12] mempool/dpaa2: " Hemant Agrawal
  2020-05-12 14:00  1%   ` [dpdk-dev] [PATCH v2 03/12] bus/fslmc: " Hemant Agrawal
@ 2020-05-12 14:00  1%   ` Hemant Agrawal
  2020-05-12 14:00  3%   ` [dpdk-dev] [PATCH v2 07/12] crypto: " Hemant Agrawal
                     ` (4 subsequent siblings)
  7 siblings, 0 replies; 200+ results
From: Hemant Agrawal @ 2020-05-12 14:00 UTC (permalink / raw)
  To: dev, david.marchand; +Cc: Hemant Agrawal

This patch moves the internal symbols to INTERNAL sections
so that any change in them is not reported as ABI breakage.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/bus/dpaa/include/fsl_bman.h       |  6 +++++
 drivers/bus/dpaa/include/fsl_fman.h       | 27 +++++++++++++++++++
 drivers/bus/dpaa/include/fsl_qman.h       | 32 +++++++++++++++++++++++
 drivers/bus/dpaa/include/fsl_usd.h        |  6 +++++
 drivers/bus/dpaa/include/netcfg.h         |  2 ++
 drivers/bus/dpaa/rte_bus_dpaa_version.map |  7 +----
 drivers/bus/dpaa/rte_dpaa_bus.h           |  5 ++++
 7 files changed, 79 insertions(+), 6 deletions(-)

diff --git a/drivers/bus/dpaa/include/fsl_bman.h b/drivers/bus/dpaa/include/fsl_bman.h
index f9cd972153..82da2fcfe0 100644
--- a/drivers/bus/dpaa/include/fsl_bman.h
+++ b/drivers/bus/dpaa/include/fsl_bman.h
@@ -264,12 +264,14 @@ int bman_shutdown_pool(u32 bpid);
  * the structure provided by the caller can be released or reused after the
  * function returns.
  */
+__rte_internal
 struct bman_pool *bman_new_pool(const struct bman_pool_params *params);
 
 /**
  * bman_free_pool - Deallocates a Buffer Pool object
  * @pool: the pool object to release
  */
+__rte_internal
 void bman_free_pool(struct bman_pool *pool);
 
 /**
@@ -279,6 +281,7 @@ void bman_free_pool(struct bman_pool *pool);
  * The returned pointer refers to state within the pool object so must not be
  * modified and can no longer be read once the pool object is destroyed.
  */
+__rte_internal
 const struct bman_pool_params *bman_get_params(const struct bman_pool *pool);
 
 /**
@@ -289,6 +292,7 @@ const struct bman_pool_params *bman_get_params(const struct bman_pool *pool);
  * @flags: bit-mask of BMAN_RELEASE_FLAG_*** options
  *
  */
+__rte_internal
 int bman_release(struct bman_pool *pool, const struct bm_buffer *bufs, u8 num,
 		 u32 flags);
 
@@ -302,6 +306,7 @@ int bman_release(struct bman_pool *pool, const struct bm_buffer *bufs, u8 num,
  * The return value will be the number of buffers obtained from the pool, or a
  * negative error code if a h/w error or pool starvation was encountered.
  */
+__rte_internal
 int bman_acquire(struct bman_pool *pool, struct bm_buffer *bufs, u8 num,
 		 u32 flags);
 
@@ -317,6 +322,7 @@ int bman_query_pools(struct bm_pool_state *state);
  *
  * Return the number of the free buffers
  */
+__rte_internal
 u32 bman_query_free_buffers(struct bman_pool *pool);
 
 /**
diff --git a/drivers/bus/dpaa/include/fsl_fman.h b/drivers/bus/dpaa/include/fsl_fman.h
index 5705ebfdce..6c87c8db0d 100644
--- a/drivers/bus/dpaa/include/fsl_fman.h
+++ b/drivers/bus/dpaa/include/fsl_fman.h
@@ -7,6 +7,8 @@
 #ifndef __FSL_FMAN_H
 #define __FSL_FMAN_H
 
+#include <rte_compat.h>
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -43,18 +45,23 @@ struct fm_status_t {
 } __rte_packed;
 
 /* Set MAC address for a particular interface */
+__rte_internal
 int fman_if_add_mac_addr(struct fman_if *p, uint8_t *eth, uint8_t addr_num);
 
 /* Remove a MAC address for a particular interface */
+__rte_internal
 void fman_if_clear_mac_addr(struct fman_if *p, uint8_t addr_num);
 
 /* Get the FMAN statistics */
+__rte_internal
 void fman_if_stats_get(struct fman_if *p, struct rte_eth_stats *stats);
 
 /* Reset the FMAN statistics */
+__rte_internal
 void fman_if_stats_reset(struct fman_if *p);
 
 /* Get all of the FMAN statistics */
+__rte_internal
 void fman_if_stats_get_all(struct fman_if *p, uint64_t *value, int n);
 
 /* Set ignore pause option for a specific interface */
@@ -64,32 +71,43 @@ void fman_if_set_rx_ignore_pause_frames(struct fman_if *p, bool enable);
 void fman_if_conf_max_frame_len(struct fman_if *p, unsigned int max_frame_len);
 
 /* Enable/disable Rx promiscuous mode on specified interface */
+__rte_internal
 void fman_if_promiscuous_enable(struct fman_if *p);
+__rte_internal
 void fman_if_promiscuous_disable(struct fman_if *p);
 
 /* Enable/disable Rx on specific interfaces */
+__rte_internal
 void fman_if_enable_rx(struct fman_if *p);
+__rte_internal
 void fman_if_disable_rx(struct fman_if *p);
 
 /* Enable/disable loopback on specific interfaces */
+__rte_internal
 void fman_if_loopback_enable(struct fman_if *p);
+__rte_internal
 void fman_if_loopback_disable(struct fman_if *p);
 
 /* Set buffer pool on specific interface */
+__rte_internal
 void fman_if_set_bp(struct fman_if *fm_if, unsigned int num, int bpid,
 		    size_t bufsize);
 
 /* Get Flow Control threshold parameters on specific interface */
+__rte_internal
 int fman_if_get_fc_threshold(struct fman_if *fm_if);
 
 /* Enable and Set Flow Control threshold parameters on specific interface */
+__rte_internal
 int fman_if_set_fc_threshold(struct fman_if *fm_if,
 			u32 high_water, u32 low_water, u32 bpid);
 
 /* Get Flow Control pause quanta on specific interface */
+__rte_internal
 int fman_if_get_fc_quanta(struct fman_if *fm_if);
 
 /* Set Flow Control pause quanta on specific interface */
+__rte_internal
 int fman_if_set_fc_quanta(struct fman_if *fm_if, u16 pause_quanta);
 
 /* Set default error fqid on specific interface */
@@ -99,35 +117,44 @@ void fman_if_set_err_fqid(struct fman_if *fm_if, uint32_t err_fqid);
 int fman_if_get_ic_params(struct fman_if *fm_if, struct fman_if_ic_params *icp);
 
 /* Set IC transfer params */
+__rte_internal
 int fman_if_set_ic_params(struct fman_if *fm_if,
 			  const struct fman_if_ic_params *icp);
 
 /* Get interface fd->offset value */
+__rte_internal
 int fman_if_get_fdoff(struct fman_if *fm_if);
 
 /* Set interface fd->offset value */
+__rte_internal
 void fman_if_set_fdoff(struct fman_if *fm_if, uint32_t fd_offset);
 
 /* Get interface SG enable status value */
+__rte_internal
 int fman_if_get_sg_enable(struct fman_if *fm_if);
 
 /* Set interface SG support mode */
+__rte_internal
 void fman_if_set_sg(struct fman_if *fm_if, int enable);
 
 /* Get interface Max Frame length (MTU) */
 uint16_t fman_if_get_maxfrm(struct fman_if *fm_if);
 
 /* Set interface  Max Frame length (MTU) */
+__rte_internal
 void fman_if_set_maxfrm(struct fman_if *fm_if, uint16_t max_frm);
 
 /* Set interface next invoked action for dequeue operation */
 void fman_if_set_dnia(struct fman_if *fm_if, uint32_t nia);
 
 /* discard error packets on rx */
+__rte_internal
 void fman_if_discard_rx_errors(struct fman_if *fm_if);
 
+__rte_internal
 void fman_if_set_mcast_filter_table(struct fman_if *p);
 
+__rte_internal
 void fman_if_reset_mcast_filter_table(struct fman_if *p);
 
 int fman_if_add_hash_mac_addr(struct fman_if *p, uint8_t *eth);
diff --git a/drivers/bus/dpaa/include/fsl_qman.h b/drivers/bus/dpaa/include/fsl_qman.h
index 1b3342e7e6..4411bb0a79 100644
--- a/drivers/bus/dpaa/include/fsl_qman.h
+++ b/drivers/bus/dpaa/include/fsl_qman.h
@@ -1314,6 +1314,7 @@ struct qman_cgr {
 #define QMAN_CGR_MODE_FRAME          0x00000001
 
 #ifdef CONFIG_FSL_QMAN_FQ_LOOKUP
+__rte_internal
 void qman_set_fq_lookup_table(void **table);
 #endif
 
@@ -1322,6 +1323,7 @@ void qman_set_fq_lookup_table(void **table);
  */
 int qman_get_portal_index(void);
 
+__rte_internal
 u32 qman_portal_dequeue(struct rte_event ev[], unsigned int poll_limit,
 			void **bufs);
 
@@ -1333,6 +1335,7 @@ u32 qman_portal_dequeue(struct rte_event ev[], unsigned int poll_limit,
  * processed via qman_poll_***() functions). Returns zero for success, or
  * -EINVAL if the current CPU is sharing a portal hosted on another CPU.
  */
+__rte_internal
 int qman_irqsource_add(u32 bits);
 
 /**
@@ -1340,6 +1343,7 @@ int qman_irqsource_add(u32 bits);
  * takes portal (fq specific) as input rather than using the thread affined
  * portal.
  */
+__rte_internal
 int qman_fq_portal_irqsource_add(struct qman_portal *p, u32 bits);
 
 /**
@@ -1350,6 +1354,7 @@ int qman_fq_portal_irqsource_add(struct qman_portal *p, u32 bits);
  * instead be processed via qman_poll_***() functions. Returns zero for success,
  * or -EINVAL if the current CPU is sharing a portal hosted on another CPU.
  */
+__rte_internal
 int qman_irqsource_remove(u32 bits);
 
 /**
@@ -1357,6 +1362,7 @@ int qman_irqsource_remove(u32 bits);
  * takes portal (fq specific) as input rather than using the thread affined
  * portal.
  */
+__rte_internal
 int qman_fq_portal_irqsource_remove(struct qman_portal *p, u32 bits);
 
 /**
@@ -1369,6 +1375,7 @@ int qman_fq_portal_irqsource_remove(struct qman_portal *p, u32 bits);
  */
 u16 qman_affine_channel(int cpu);
 
+__rte_internal
 unsigned int qman_portal_poll_rx(unsigned int poll_limit,
 				 void **bufs, struct qman_portal *q);
 
@@ -1380,6 +1387,7 @@ unsigned int qman_portal_poll_rx(unsigned int poll_limit,
  *
  * This function will issue a volatile dequeue command to the QMAN.
  */
+__rte_internal
 int qman_set_vdq(struct qman_fq *fq, u16 num, uint32_t vdqcr_flags);
 
 /**
@@ -1390,6 +1398,7 @@ int qman_set_vdq(struct qman_fq *fq, u16 num, uint32_t vdqcr_flags);
  * is issued. It will keep returning NULL until there is no packet available on
  * the DQRR.
  */
+__rte_internal
 struct qm_dqrr_entry *qman_dequeue(struct qman_fq *fq);
 
 /**
@@ -1401,6 +1410,7 @@ struct qm_dqrr_entry *qman_dequeue(struct qman_fq *fq);
  * This will consume the DQRR enrey and make it available for next volatile
  * dequeue.
  */
+__rte_internal
 void qman_dqrr_consume(struct qman_fq *fq,
 		       struct qm_dqrr_entry *dq);
 
@@ -1414,6 +1424,7 @@ void qman_dqrr_consume(struct qman_fq *fq,
  * this function will return -EINVAL, otherwise the return value is >=0 and
  * represents the number of DQRR entries processed.
  */
+__rte_internal
 int qman_poll_dqrr(unsigned int limit);
 
 /**
@@ -1460,6 +1471,7 @@ void qman_start_dequeues(void);
  * (SDQCR). The requested pools are limited to those the portal has dequeue
  * access to.
  */
+__rte_internal
 void qman_static_dequeue_add(u32 pools, struct qman_portal *qm);
 
 /**
@@ -1507,6 +1519,7 @@ void qman_dca(const struct qm_dqrr_entry *dq, int park_request);
  * function must be called from the same CPU as that which processed the DQRR
  * entry in the first place.
  */
+__rte_internal
 void qman_dca_index(u8 index, int park_request);
 
 /**
@@ -1564,6 +1577,7 @@ void qman_set_dc_ern(qman_cb_dc_ern handler, int affine);
  * a frame queue object based on that, rather than assuming/requiring that it be
  * Out of Service.
  */
+__rte_internal
 int qman_create_fq(u32 fqid, u32 flags, struct qman_fq *fq);
 
 /**
@@ -1582,6 +1596,7 @@ void qman_destroy_fq(struct qman_fq *fq, u32 flags);
  * qman_fq_fqid - Queries the frame queue ID of a FQ object
  * @fq: the frame queue object to query
  */
+__rte_internal
 u32 qman_fq_fqid(struct qman_fq *fq);
 
 /**
@@ -1594,6 +1609,7 @@ u32 qman_fq_fqid(struct qman_fq *fq);
  * This captures the state, as seen by the driver, at the time the function
  * executes.
  */
+__rte_internal
 void qman_fq_state(struct qman_fq *fq, enum qman_fq_state *state, u32 *flags);
 
 /**
@@ -1630,6 +1646,7 @@ void qman_fq_state(struct qman_fq *fq, enum qman_fq_state *state, u32 *flags);
  * context_a.address fields and will leave the stashing fields provided by the
  * user alone, otherwise it will zero out the context_a.stashing fields.
  */
+__rte_internal
 int qman_init_fq(struct qman_fq *fq, u32 flags, struct qm_mcc_initfq *opts);
 
 /**
@@ -1659,6 +1676,7 @@ int qman_schedule_fq(struct qman_fq *fq);
  * caller should be prepared to accept the callback as the function is called,
  * not only once it has returned.
  */
+__rte_internal
 int qman_retire_fq(struct qman_fq *fq, u32 *flags);
 
 /**
@@ -1668,6 +1686,7 @@ int qman_retire_fq(struct qman_fq *fq, u32 *flags);
  * The frame queue must be retired and empty, and if any order restoration list
  * was released as ERNs at the time of retirement, they must all be consumed.
  */
+__rte_internal
 int qman_oos_fq(struct qman_fq *fq);
 
 /**
@@ -1701,6 +1720,7 @@ int qman_query_fq_has_pkts(struct qman_fq *fq);
  * @fq: the frame queue object to be queried
  * @np: storage for the queried FQD fields
  */
+__rte_internal
 int qman_query_fq_np(struct qman_fq *fq, struct qm_mcr_queryfq_np *np);
 
 /**
@@ -1708,6 +1728,7 @@ int qman_query_fq_np(struct qman_fq *fq, struct qm_mcr_queryfq_np *np);
  * @fq: the frame queue object to be queried
  * @frm_cnt: number of frames in the queue
  */
+__rte_internal
 int qman_query_fq_frm_cnt(struct qman_fq *fq, u32 *frm_cnt);
 
 /**
@@ -1738,6 +1759,7 @@ int qman_query_wq(u8 query_dedicated, struct qm_mcr_querywq *wq);
  * callback, or by waiting for the QMAN_FQ_STATE_VDQCR bit to disappear from the
  * "flags" retrieved from qman_fq_state().
  */
+__rte_internal
 int qman_volatile_dequeue(struct qman_fq *fq, u32 flags, u32 vdqcr);
 
 /**
@@ -1773,8 +1795,10 @@ int qman_volatile_dequeue(struct qman_fq *fq, u32 flags, u32 vdqcr);
  * of an already busy hardware resource by throttling many of the to-be-dropped
  * enqueues "at the source".
  */
+__rte_internal
 int qman_enqueue(struct qman_fq *fq, const struct qm_fd *fd, u32 flags);
 
+__rte_internal
 int qman_enqueue_multi(struct qman_fq *fq, const struct qm_fd *fd, u32 *flags,
 		       int frames_to_send);
 
@@ -1788,6 +1812,7 @@ int qman_enqueue_multi(struct qman_fq *fq, const struct qm_fd *fd, u32 *flags,
  * This API is similar to qman_enqueue_multi(), but it takes fd which needs
  * to be processed by different frame queues.
  */
+__rte_internal
 int
 qman_enqueue_multi_fq(struct qman_fq *fq[], const struct qm_fd *fd,
 		      u32 *flags, int frames_to_send);
@@ -1876,6 +1901,7 @@ int qman_shutdown_fq(u32 fqid);
  * @fqid: the base FQID of the range to deallocate
  * @count: the number of FQIDs in the range
  */
+__rte_internal
 int qman_reserve_fqid_range(u32 fqid, unsigned int count);
 static inline int qman_reserve_fqid(u32 fqid)
 {
@@ -1895,6 +1921,7 @@ static inline int qman_reserve_fqid(u32 fqid)
  * than requested (though alignment will be as requested). If @partial is zero,
  * the return value will either be 'count' or negative.
  */
+__rte_internal
 int qman_alloc_pool_range(u32 *result, u32 count, u32 align, int partial);
 static inline int qman_alloc_pool(u32 *result)
 {
@@ -1942,6 +1969,7 @@ void qman_seed_pool_range(u32 id, unsigned int count);
  * any unspecified parameters) will be used rather than a modify hw hardware
  * (which only modifies the specified parameters).
  */
+__rte_internal
 int qman_create_cgr(struct qman_cgr *cgr, u32 flags,
 		    struct qm_mcc_initcgr *opts);
 
@@ -1964,6 +1992,7 @@ int qman_create_cgr_to_dcp(struct qman_cgr *cgr, u32 flags, u16 dcp_portal,
  * is executed. This must be excuted on the same affine portal on which it was
  * created.
  */
+__rte_internal
 int qman_delete_cgr(struct qman_cgr *cgr);
 
 /**
@@ -1980,6 +2009,7 @@ int qman_delete_cgr(struct qman_cgr *cgr);
  * unspecified parameters) will be used rather than a modify hw hardware (which
  * only modifies the specified parameters).
  */
+__rte_internal
 int qman_modify_cgr(struct qman_cgr *cgr, u32 flags,
 		    struct qm_mcc_initcgr *opts);
 
@@ -2008,6 +2038,7 @@ int qman_query_congestion(struct qm_mcr_querycongestion *congestion);
  * than requested (though alignment will be as requested). If @partial is zero,
  * the return value will either be 'count' or negative.
  */
+__rte_internal
 int qman_alloc_cgrid_range(u32 *result, u32 count, u32 align, int partial);
 static inline int qman_alloc_cgrid(u32 *result)
 {
@@ -2021,6 +2052,7 @@ static inline int qman_alloc_cgrid(u32 *result)
  * @id: the base CGR ID of the range to deallocate
  * @count: the number of CGR IDs in the range
  */
+__rte_internal
 void qman_release_cgrid_range(u32 id, unsigned int count);
 static inline void qman_release_cgrid(u32 id)
 {
diff --git a/drivers/bus/dpaa/include/fsl_usd.h b/drivers/bus/dpaa/include/fsl_usd.h
index 263d9bb976..30ec63a09d 100644
--- a/drivers/bus/dpaa/include/fsl_usd.h
+++ b/drivers/bus/dpaa/include/fsl_usd.h
@@ -58,6 +58,7 @@ int bman_allocate_raw_portal(struct dpaa_raw_portal *portal);
 int bman_free_raw_portal(struct dpaa_raw_portal *portal);
 
 /* Obtain thread-local UIO file-descriptors */
+__rte_internal
 int qman_thread_fd(void);
 int bman_thread_fd(void);
 
@@ -66,8 +67,12 @@ int bman_thread_fd(void);
  * processing is complete. As such, it is essential to call this before going
  * into another blocking read/select/poll.
  */
+__rte_internal
 void qman_thread_irq(void);
+
+__rte_internal
 void bman_thread_irq(void);
+__rte_internal
 void qman_fq_portal_thread_irq(struct qman_portal *qp);
 
 void qman_clear_irq(void);
@@ -77,6 +82,7 @@ int qman_global_init(void);
 int bman_global_init(void);
 
 /* Direct portal create and destroy */
+__rte_internal
 struct qman_portal *fsl_qman_fq_portal_create(int *fd);
 int fsl_qman_fq_portal_destroy(struct qman_portal *qp);
 int fsl_qman_fq_portal_init(struct qman_portal *qp);
diff --git a/drivers/bus/dpaa/include/netcfg.h b/drivers/bus/dpaa/include/netcfg.h
index bf7bfae8cb..d7d1befd24 100644
--- a/drivers/bus/dpaa/include/netcfg.h
+++ b/drivers/bus/dpaa/include/netcfg.h
@@ -46,11 +46,13 @@ struct netcfg_interface {
  * cfg_file: FMC config XML file
  * Returns the configuration information in newly allocated memory.
  */
+__rte_internal
 struct netcfg_info *netcfg_acquire(void);
 
 /* cfg_ptr: configuration information pointer.
  * Frees the resources allocated by the configuration layer.
  */
+__rte_internal
 void netcfg_release(struct netcfg_info *cfg_ptr);
 
 #ifdef RTE_LIBRTE_DPAA_DEBUG_DRIVER
diff --git a/drivers/bus/dpaa/rte_bus_dpaa_version.map b/drivers/bus/dpaa/rte_bus_dpaa_version.map
index e6ca4361e0..f4947fac41 100644
--- a/drivers/bus/dpaa/rte_bus_dpaa_version.map
+++ b/drivers/bus/dpaa/rte_bus_dpaa_version.map
@@ -1,4 +1,4 @@
-DPDK_20.0 {
+INTERNAL {
 	global:
 
 	bman_acquire;
@@ -13,7 +13,6 @@ DPDK_20.0 {
 	dpaa_logtype_pmd;
 	dpaa_netcfg;
 	dpaa_svr_family;
-	fman_ccsr_map_fd;
 	fman_dealloc_bufs_mask_hi;
 	fman_dealloc_bufs_mask_lo;
 	fman_if_add_mac_addr;
@@ -51,7 +50,6 @@ DPDK_20.0 {
 	qm_channel_pool1;
 	qman_alloc_cgrid_range;
 	qman_alloc_pool_range;
-	qman_clear_irq;
 	qman_create_cgr;
 	qman_create_fq;
 	qman_dca_index;
@@ -87,10 +85,7 @@ DPDK_20.0 {
 	qman_volatile_dequeue;
 	rte_dpaa_driver_register;
 	rte_dpaa_driver_unregister;
-	rte_dpaa_mem_ptov;
 	rte_dpaa_portal_fq_close;
 	rte_dpaa_portal_fq_init;
 	rte_dpaa_portal_init;
-
-	local: *;
 };
diff --git a/drivers/bus/dpaa/rte_dpaa_bus.h b/drivers/bus/dpaa/rte_dpaa_bus.h
index 373aca9785..d4aee132ef 100644
--- a/drivers/bus/dpaa/rte_dpaa_bus.h
+++ b/drivers/bus/dpaa/rte_dpaa_bus.h
@@ -158,6 +158,7 @@ rte_dpaa_mem_vtop(void *vaddr)
  *   A pointer to a rte_dpaa_driver structure describing the driver
  *   to be registered.
  */
+__rte_internal
 void rte_dpaa_driver_register(struct rte_dpaa_driver *driver);
 
 /**
@@ -167,6 +168,7 @@ void rte_dpaa_driver_register(struct rte_dpaa_driver *driver);
  *	A pointer to a rte_dpaa_driver structure describing the driver
  *	to be unregistered.
  */
+__rte_internal
 void rte_dpaa_driver_unregister(struct rte_dpaa_driver *driver);
 
 /**
@@ -178,10 +180,13 @@ void rte_dpaa_driver_unregister(struct rte_dpaa_driver *driver);
  * @return
  *	0 in case of success, error otherwise
  */
+__rte_internal
 int rte_dpaa_portal_init(void *arg);
 
+__rte_internal
 int rte_dpaa_portal_fq_init(void *arg, struct qman_fq *fq);
 
+__rte_internal
 int rte_dpaa_portal_fq_close(struct qman_fq *fq);
 
 /**
-- 
2.17.1


^ permalink raw reply	[relevance 1%]

* [dpdk-dev] [PATCH v2 07/12] crypto: move internal symbols into INTERNAL section
  2020-05-12 14:00  3% ` [dpdk-dev] [PATCH v2 01/12] " Hemant Agrawal
                     ` (2 preceding siblings ...)
  2020-05-12 14:00  1%   ` [dpdk-dev] [PATCH v2 06/12] bus/dpaa: " Hemant Agrawal
@ 2020-05-12 14:00  3%   ` Hemant Agrawal
  2020-05-12 14:00  3%   ` [dpdk-dev] [PATCH v2 08/12] net/dpaa2: " Hemant Agrawal
                     ` (3 subsequent siblings)
  7 siblings, 0 replies; 200+ results
From: Hemant Agrawal @ 2020-05-12 14:00 UTC (permalink / raw)
  To: dev, david.marchand; +Cc: Hemant Agrawal

This patch moves the internal symbols to INTERNAL sections
so that any change in them is not reported as ABI breakage.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/crypto/dpaa2_sec/dpaa2_sec_event.h             | 5 +++--
 drivers/crypto/dpaa2_sec/rte_pmd_dpaa2_sec_version.map | 2 +-
 drivers/crypto/dpaa_sec/dpaa_sec_event.h               | 8 ++++----
 drivers/crypto/dpaa_sec/rte_pmd_dpaa_sec_version.map   | 4 +---
 4 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_event.h b/drivers/crypto/dpaa2_sec/dpaa2_sec_event.h
index c779d5d837..675cbbb81d 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_event.h
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_event.h
@@ -6,12 +6,13 @@
 #ifndef _DPAA2_SEC_EVENT_H_
 #define _DPAA2_SEC_EVENT_H_
 
-int
-dpaa2_sec_eventq_attach(const struct rte_cryptodev *dev,
+__rte_internal
+int dpaa2_sec_eventq_attach(const struct rte_cryptodev *dev,
 		int qp_id,
 		struct dpaa2_dpcon_dev *dpcon,
 		const struct rte_event *event);
 
+__rte_internal
 int dpaa2_sec_eventq_detach(const struct rte_cryptodev *dev,
 		int qp_id);
 
diff --git a/drivers/crypto/dpaa2_sec/rte_pmd_dpaa2_sec_version.map b/drivers/crypto/dpaa2_sec/rte_pmd_dpaa2_sec_version.map
index 5952d645fd..1352f576e5 100644
--- a/drivers/crypto/dpaa2_sec/rte_pmd_dpaa2_sec_version.map
+++ b/drivers/crypto/dpaa2_sec/rte_pmd_dpaa2_sec_version.map
@@ -1,4 +1,4 @@
-DPDK_20.0 {
+INTERNAL {
 	global:
 
 	dpaa2_sec_eventq_attach;
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec_event.h b/drivers/crypto/dpaa_sec/dpaa_sec_event.h
index 8d1a018096..0b09fa8f75 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec_event.h
+++ b/drivers/crypto/dpaa_sec/dpaa_sec_event.h
@@ -6,14 +6,14 @@
 #ifndef _DPAA_SEC_EVENT_H_
 #define _DPAA_SEC_EVENT_H_
 
-int
-dpaa_sec_eventq_attach(const struct rte_cryptodev *dev,
+__rte_internal
+int dpaa_sec_eventq_attach(const struct rte_cryptodev *dev,
 		int qp_id,
 		uint16_t ch_id,
 		const struct rte_event *event);
 
-int
-dpaa_sec_eventq_detach(const struct rte_cryptodev *dev,
+__rte_internal
+int dpaa_sec_eventq_detach(const struct rte_cryptodev *dev,
 		int qp_id);
 
 #endif /* _DPAA_SEC_EVENT_H_ */
diff --git a/drivers/crypto/dpaa_sec/rte_pmd_dpaa_sec_version.map b/drivers/crypto/dpaa_sec/rte_pmd_dpaa_sec_version.map
index 8580fa13db..aed07fb371 100644
--- a/drivers/crypto/dpaa_sec/rte_pmd_dpaa_sec_version.map
+++ b/drivers/crypto/dpaa_sec/rte_pmd_dpaa_sec_version.map
@@ -1,8 +1,6 @@
-DPDK_20.0 {
+INTERNAL {
 	global:
 
 	dpaa_sec_eventq_attach;
 	dpaa_sec_eventq_detach;
-
-	local: *;
 };
-- 
2.17.1


^ permalink raw reply	[relevance 3%]

* [dpdk-dev] [PATCH v2 03/12] bus/fslmc: move internal symbols into INTERNAL section
  2020-05-12 14:00  3% ` [dpdk-dev] [PATCH v2 01/12] " Hemant Agrawal
  2020-05-12 14:00  3%   ` [dpdk-dev] [PATCH v2 02/12] mempool/dpaa2: " Hemant Agrawal
@ 2020-05-12 14:00  1%   ` Hemant Agrawal
  2020-05-12 14:00  1%   ` [dpdk-dev] [PATCH v2 06/12] bus/dpaa: " Hemant Agrawal
                     ` (5 subsequent siblings)
  7 siblings, 0 replies; 200+ results
From: Hemant Agrawal @ 2020-05-12 14:00 UTC (permalink / raw)
  To: dev, david.marchand; +Cc: Hemant Agrawal

This patch moves the internal symbols to INTERNAL sections
so that any change in them is not reported as ABI breakage.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/bus/fslmc/fslmc_vfio.h                |  4 ++
 drivers/bus/fslmc/mc/fsl_dpbp.h               |  6 +++
 drivers/bus/fslmc/mc/fsl_dpci.h               |  3 ++
 drivers/bus/fslmc/mc/fsl_dpcon.h              |  2 +
 drivers/bus/fslmc/mc/fsl_dpdmai.h             |  8 ++++
 drivers/bus/fslmc/mc/fsl_dpio.h               |  9 ++++
 drivers/bus/fslmc/mc/fsl_dpmng.h              |  2 +
 drivers/bus/fslmc/mc/fsl_mc_cmd.h             |  1 +
 drivers/bus/fslmc/portal/dpaa2_hw_dpio.h      |  5 +++
 drivers/bus/fslmc/portal/dpaa2_hw_pvt.h       |  8 ++++
 .../bus/fslmc/qbman/include/fsl_qbman_debug.h |  3 ++
 .../fslmc/qbman/include/fsl_qbman_portal.h    | 41 +++++++++++++++++++
 drivers/bus/fslmc/rte_bus_fslmc_version.map   |  4 +-
 drivers/bus/fslmc/rte_fslmc.h                 |  4 ++
 14 files changed, 97 insertions(+), 3 deletions(-)

diff --git a/drivers/bus/fslmc/fslmc_vfio.h b/drivers/bus/fslmc/fslmc_vfio.h
index c988121294..609e48aea3 100644
--- a/drivers/bus/fslmc/fslmc_vfio.h
+++ b/drivers/bus/fslmc/fslmc_vfio.h
@@ -41,7 +41,11 @@ typedef struct fslmc_vfio_container {
 } fslmc_vfio_container;
 
 extern char *fslmc_container;
+
+__rte_internal
 int rte_dpaa2_intr_enable(struct rte_intr_handle *intr_handle, int index);
+
+__rte_internal
 int rte_dpaa2_intr_disable(struct rte_intr_handle *intr_handle, int index);
 
 int rte_dpaa2_vfio_setup_intr(struct rte_intr_handle *intr_handle,
diff --git a/drivers/bus/fslmc/mc/fsl_dpbp.h b/drivers/bus/fslmc/mc/fsl_dpbp.h
index 9d405b42c4..7b537a21be 100644
--- a/drivers/bus/fslmc/mc/fsl_dpbp.h
+++ b/drivers/bus/fslmc/mc/fsl_dpbp.h
@@ -14,6 +14,7 @@
 
 struct fsl_mc_io;
 
+__rte_internal
 int dpbp_open(struct fsl_mc_io *mc_io,
 	      uint32_t cmd_flags,
 	      int dpbp_id,
@@ -42,10 +43,12 @@ int dpbp_destroy(struct fsl_mc_io *mc_io,
 		 uint32_t cmd_flags,
 		 uint32_t obj_id);
 
+__rte_internal
 int dpbp_enable(struct fsl_mc_io *mc_io,
 		uint32_t cmd_flags,
 		uint16_t token);
 
+__rte_internal
 int dpbp_disable(struct fsl_mc_io *mc_io,
 		 uint32_t cmd_flags,
 		 uint16_t token);
@@ -55,6 +58,7 @@ int dpbp_is_enabled(struct fsl_mc_io *mc_io,
 		    uint16_t token,
 		    int *en);
 
+__rte_internal
 int dpbp_reset(struct fsl_mc_io *mc_io,
 	       uint32_t cmd_flags,
 	       uint16_t token);
@@ -70,6 +74,7 @@ struct dpbp_attr {
 	uint16_t bpid;
 };
 
+__rte_internal
 int dpbp_get_attributes(struct fsl_mc_io *mc_io,
 			uint32_t cmd_flags,
 			uint16_t token,
@@ -88,6 +93,7 @@ int dpbp_get_api_version(struct fsl_mc_io *mc_io,
 			 uint16_t *major_ver,
 			 uint16_t *minor_ver);
 
+__rte_internal
 int dpbp_get_num_free_bufs(struct fsl_mc_io *mc_io,
 			   uint32_t cmd_flags,
 			   uint16_t token,
diff --git a/drivers/bus/fslmc/mc/fsl_dpci.h b/drivers/bus/fslmc/mc/fsl_dpci.h
index a0ee5bfe69..81fd3438aa 100644
--- a/drivers/bus/fslmc/mc/fsl_dpci.h
+++ b/drivers/bus/fslmc/mc/fsl_dpci.h
@@ -181,6 +181,7 @@ struct dpci_rx_queue_cfg {
 	int order_preservation_en;
 };
 
+__rte_internal
 int dpci_set_rx_queue(struct fsl_mc_io *mc_io,
 		      uint32_t cmd_flags,
 		      uint16_t token,
@@ -228,6 +229,7 @@ int dpci_get_api_version(struct fsl_mc_io *mc_io,
 			 uint16_t *major_ver,
 			 uint16_t *minor_ver);
 
+__rte_internal
 int dpci_set_opr(struct fsl_mc_io *mc_io,
 		 uint32_t cmd_flags,
 		 uint16_t token,
@@ -235,6 +237,7 @@ int dpci_set_opr(struct fsl_mc_io *mc_io,
 		 uint8_t options,
 		 struct opr_cfg *cfg);
 
+__rte_internal
 int dpci_get_opr(struct fsl_mc_io *mc_io,
 		 uint32_t cmd_flags,
 		 uint16_t token,
diff --git a/drivers/bus/fslmc/mc/fsl_dpcon.h b/drivers/bus/fslmc/mc/fsl_dpcon.h
index af81d51195..7caa6c68a1 100644
--- a/drivers/bus/fslmc/mc/fsl_dpcon.h
+++ b/drivers/bus/fslmc/mc/fsl_dpcon.h
@@ -20,6 +20,7 @@ struct fsl_mc_io;
  */
 #define DPCON_INVALID_DPIO_ID		(int)(-1)
 
+__rte_internal
 int dpcon_open(struct fsl_mc_io *mc_io,
 	       uint32_t cmd_flags,
 	       int dpcon_id,
@@ -77,6 +78,7 @@ struct dpcon_attr {
 	uint8_t num_priorities;
 };
 
+__rte_internal
 int dpcon_get_attributes(struct fsl_mc_io *mc_io,
 			 uint32_t cmd_flags,
 			 uint16_t token,
diff --git a/drivers/bus/fslmc/mc/fsl_dpdmai.h b/drivers/bus/fslmc/mc/fsl_dpdmai.h
index 40469cc139..e7e8a5dda9 100644
--- a/drivers/bus/fslmc/mc/fsl_dpdmai.h
+++ b/drivers/bus/fslmc/mc/fsl_dpdmai.h
@@ -23,11 +23,13 @@ struct fsl_mc_io;
  */
 #define DPDMAI_ALL_QUEUES	(uint8_t)(-1)
 
+__rte_internal
 int dpdmai_open(struct fsl_mc_io *mc_io,
 		uint32_t cmd_flags,
 		int dpdmai_id,
 		uint16_t *token);
 
+__rte_internal
 int dpdmai_close(struct fsl_mc_io *mc_io,
 		 uint32_t cmd_flags,
 		 uint16_t token);
@@ -54,10 +56,12 @@ int dpdmai_destroy(struct fsl_mc_io *mc_io,
 		   uint32_t cmd_flags,
 		   uint32_t object_id);
 
+__rte_internal
 int dpdmai_enable(struct fsl_mc_io *mc_io,
 		  uint32_t cmd_flags,
 		  uint16_t token);
 
+__rte_internal
 int dpdmai_disable(struct fsl_mc_io *mc_io,
 		   uint32_t cmd_flags,
 		   uint16_t token);
@@ -82,6 +86,7 @@ struct dpdmai_attr {
 	uint8_t num_of_queues;
 };
 
+__rte_internal
 int dpdmai_get_attributes(struct fsl_mc_io *mc_io,
 			  uint32_t cmd_flags,
 			  uint16_t token,
@@ -148,6 +153,7 @@ struct dpdmai_rx_queue_cfg {
 
 };
 
+__rte_internal
 int dpdmai_set_rx_queue(struct fsl_mc_io *mc_io,
 			uint32_t cmd_flags,
 			uint16_t token,
@@ -168,6 +174,7 @@ struct dpdmai_rx_queue_attr {
 	uint32_t fqid;
 };
 
+__rte_internal
 int dpdmai_get_rx_queue(struct fsl_mc_io *mc_io,
 			uint32_t cmd_flags,
 			uint16_t token,
@@ -184,6 +191,7 @@ struct dpdmai_tx_queue_attr {
 	uint32_t fqid;
 };
 
+__rte_internal
 int dpdmai_get_tx_queue(struct fsl_mc_io *mc_io,
 			uint32_t cmd_flags,
 			uint16_t token,
diff --git a/drivers/bus/fslmc/mc/fsl_dpio.h b/drivers/bus/fslmc/mc/fsl_dpio.h
index 3158f53191..92e97db94b 100644
--- a/drivers/bus/fslmc/mc/fsl_dpio.h
+++ b/drivers/bus/fslmc/mc/fsl_dpio.h
@@ -13,11 +13,13 @@
 
 struct fsl_mc_io;
 
+__rte_internal
 int dpio_open(struct fsl_mc_io *mc_io,
 	      uint32_t cmd_flags,
 	      int dpio_id,
 	      uint16_t *token);
 
+__rte_internal
 int dpio_close(struct fsl_mc_io *mc_io,
 	       uint32_t cmd_flags,
 	       uint16_t token);
@@ -57,10 +59,12 @@ int dpio_destroy(struct fsl_mc_io *mc_io,
 		 uint32_t cmd_flags,
 		 uint32_t object_id);
 
+__rte_internal
 int dpio_enable(struct fsl_mc_io *mc_io,
 		uint32_t cmd_flags,
 		uint16_t token);
 
+__rte_internal
 int dpio_disable(struct fsl_mc_io *mc_io,
 		 uint32_t cmd_flags,
 		 uint16_t token);
@@ -70,10 +74,12 @@ int dpio_is_enabled(struct fsl_mc_io *mc_io,
 		    uint16_t token,
 		    int *en);
 
+__rte_internal
 int dpio_reset(struct fsl_mc_io *mc_io,
 	       uint32_t cmd_flags,
 	       uint16_t token);
 
+__rte_internal
 int dpio_set_stashing_destination(struct fsl_mc_io *mc_io,
 				  uint32_t cmd_flags,
 				  uint16_t token,
@@ -84,12 +90,14 @@ int dpio_get_stashing_destination(struct fsl_mc_io *mc_io,
 				  uint16_t token,
 				  uint8_t *sdest);
 
+__rte_internal
 int dpio_add_static_dequeue_channel(struct fsl_mc_io *mc_io,
 				    uint32_t cmd_flags,
 				    uint16_t token,
 				    int dpcon_id,
 				    uint8_t *channel_index);
 
+__rte_internal
 int dpio_remove_static_dequeue_channel(struct fsl_mc_io *mc_io,
 				       uint32_t cmd_flags,
 				       uint16_t token,
@@ -119,6 +127,7 @@ struct dpio_attr {
 	uint32_t clk;
 };
 
+__rte_internal
 int dpio_get_attributes(struct fsl_mc_io *mc_io,
 			uint32_t cmd_flags,
 			uint16_t token,
diff --git a/drivers/bus/fslmc/mc/fsl_dpmng.h b/drivers/bus/fslmc/mc/fsl_dpmng.h
index 36c387af27..cdd8506625 100644
--- a/drivers/bus/fslmc/mc/fsl_dpmng.h
+++ b/drivers/bus/fslmc/mc/fsl_dpmng.h
@@ -34,6 +34,7 @@ struct mc_version {
 	uint32_t revision;
 };
 
+__rte_internal
 int mc_get_version(struct fsl_mc_io *mc_io,
 		   uint32_t cmd_flags,
 		   struct mc_version *mc_ver_info);
@@ -48,6 +49,7 @@ struct mc_soc_version {
 	uint32_t pvr;
 };
 
+__rte_internal
 int mc_get_soc_version(struct fsl_mc_io *mc_io,
 		       uint32_t cmd_flags,
 		       struct mc_soc_version *mc_platform_info);
diff --git a/drivers/bus/fslmc/mc/fsl_mc_cmd.h b/drivers/bus/fslmc/mc/fsl_mc_cmd.h
index ac919610cf..06ea41a3b2 100644
--- a/drivers/bus/fslmc/mc/fsl_mc_cmd.h
+++ b/drivers/bus/fslmc/mc/fsl_mc_cmd.h
@@ -80,6 +80,7 @@ enum mc_cmd_status {
 
 #define MC_CMD_HDR_FLAGS_MASK	0xFF00FF00
 
+__rte_internal
 int mc_send_command(struct fsl_mc_io *mc_io, struct mc_command *cmd);
 
 static inline uint64_t mc_encode_cmd_header(uint16_t cmd_id,
diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.h b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.h
index 2829c93806..7c5966241a 100644
--- a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.h
+++ b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.h
@@ -36,20 +36,25 @@ extern uint8_t dpaa2_eqcr_size;
 extern struct dpaa2_io_portal_t dpaa2_io_portal[RTE_MAX_LCORE];
 
 /* Affine a DPIO portal to current processing thread */
+__rte_internal
 int dpaa2_affine_qbman_swp(void);
 
 /* Affine additional DPIO portal to current crypto processing thread */
+__rte_internal
 int dpaa2_affine_qbman_ethrx_swp(void);
 
 /* allocate memory for FQ - dq storage */
+__rte_internal
 int
 dpaa2_alloc_dq_storage(struct queue_storage_info_t *q_storage);
 
 /* free memory for FQ- dq storage */
+__rte_internal
 void
 dpaa2_free_dq_storage(struct queue_storage_info_t *q_storage);
 
 /* free the enqueue response descriptors */
+__rte_internal
 uint32_t
 dpaa2_free_eq_descriptors(void);
 
diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h
index 368fe7c688..33b191f823 100644
--- a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h
+++ b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h
@@ -426,11 +426,19 @@ void set_swp_active_dqs(uint16_t dpio_index, struct qbman_result *dqs)
 {
 	rte_global_active_dqs_list[dpio_index].global_active_dqs = dqs;
 }
+__rte_internal
 struct dpaa2_dpbp_dev *dpaa2_alloc_dpbp_dev(void);
+
+__rte_internal
 void dpaa2_free_dpbp_dev(struct dpaa2_dpbp_dev *dpbp);
+
+__rte_internal
 int dpaa2_dpbp_supported(void);
 
+__rte_internal
 struct dpaa2_dpci_dev *rte_dpaa2_alloc_dpci_dev(void);
+
+__rte_internal
 void rte_dpaa2_free_dpci_dev(struct dpaa2_dpci_dev *dpci);
 
 #endif
diff --git a/drivers/bus/fslmc/qbman/include/fsl_qbman_debug.h b/drivers/bus/fslmc/qbman/include/fsl_qbman_debug.h
index e010b1b6ae..328f2022fc 100644
--- a/drivers/bus/fslmc/qbman/include/fsl_qbman_debug.h
+++ b/drivers/bus/fslmc/qbman/include/fsl_qbman_debug.h
@@ -24,7 +24,10 @@ uint8_t verb;
 	uint8_t reserved2[29];
 };
 
+__rte_internal
 int qbman_fq_query_state(struct qbman_swp *s, uint32_t fqid,
 			 struct qbman_fq_query_np_rslt *r);
+
+__rte_internal
 uint32_t qbman_fq_state_frame_count(const struct qbman_fq_query_np_rslt *r);
 uint32_t qbman_fq_state_byte_count(const struct qbman_fq_query_np_rslt *r);
diff --git a/drivers/bus/fslmc/qbman/include/fsl_qbman_portal.h b/drivers/bus/fslmc/qbman/include/fsl_qbman_portal.h
index 88f0a99686..7ac0f82106 100644
--- a/drivers/bus/fslmc/qbman/include/fsl_qbman_portal.h
+++ b/drivers/bus/fslmc/qbman/include/fsl_qbman_portal.h
@@ -117,6 +117,7 @@ uint32_t qbman_swp_interrupt_read_status(struct qbman_swp *p);
  * @p: the given software portal object.
  * @mask: The value to set in SWP_ISR register.
  */
+__rte_internal
 void qbman_swp_interrupt_clear_status(struct qbman_swp *p, uint32_t mask);
 
 /**
@@ -286,6 +287,7 @@ void qbman_swp_push_get(struct qbman_swp *s, uint8_t channel_idx, int *enabled);
  * rather by specifying the index (from 0 to 15) that has been mapped to the
  * desired channel.
  */
+__rte_internal
 void qbman_swp_push_set(struct qbman_swp *s, uint8_t channel_idx, int enable);
 
 /* ------------------- */
@@ -325,6 +327,7 @@ enum qbman_pull_type_e {
  * default/starting state.
  * @d: the pull dequeue descriptor to be cleared.
  */
+__rte_internal
 void qbman_pull_desc_clear(struct qbman_pull_desc *d);
 
 /**
@@ -340,6 +343,7 @@ void qbman_pull_desc_clear(struct qbman_pull_desc *d);
  * the caller provides in 'storage_phys'), and 'stash' controls whether or not
  * those writes to main-memory express a cache-warming attribute.
  */
+__rte_internal
 void qbman_pull_desc_set_storage(struct qbman_pull_desc *d,
 				 struct qbman_result *storage,
 				 uint64_t storage_phys,
@@ -349,6 +353,7 @@ void qbman_pull_desc_set_storage(struct qbman_pull_desc *d,
  * @d: the pull dequeue descriptor to be set.
  * @numframes: number of frames to be set, must be between 1 and 16, inclusive.
  */
+__rte_internal
 void qbman_pull_desc_set_numframes(struct qbman_pull_desc *d,
 				   uint8_t numframes);
 /**
@@ -372,6 +377,7 @@ void qbman_pull_desc_set_token(struct qbman_pull_desc *d, uint8_t token);
  * qbman_pull_desc_set_fq() - Set fqid from which the dequeue command dequeues.
  * @fqid: the frame queue index of the given FQ.
  */
+__rte_internal
 void qbman_pull_desc_set_fq(struct qbman_pull_desc *d, uint32_t fqid);
 
 /**
@@ -407,6 +413,7 @@ void qbman_pull_desc_set_rad(struct qbman_pull_desc *d, int rad);
  * Return 0 for success, and -EBUSY if the software portal is not ready
  * to do pull dequeue.
  */
+__rte_internal
 int qbman_swp_pull(struct qbman_swp *s, struct qbman_pull_desc *d);
 
 /* -------------------------------- */
@@ -421,12 +428,14 @@ int qbman_swp_pull(struct qbman_swp *s, struct qbman_pull_desc *d);
  * only once, so repeated calls can return a sequence of DQRR entries, without
  * requiring they be consumed immediately or in any particular order.
  */
+__rte_internal
 const struct qbman_result *qbman_swp_dqrr_next(struct qbman_swp *p);
 
 /**
  * qbman_swp_prefetch_dqrr_next() - prefetch the next DQRR entry.
  * @s: the software portal object.
  */
+__rte_internal
 void qbman_swp_prefetch_dqrr_next(struct qbman_swp *s);
 
 /**
@@ -435,6 +444,7 @@ void qbman_swp_prefetch_dqrr_next(struct qbman_swp *s);
  * @s: the software portal object.
  * @dq: the DQRR entry to be consumed.
  */
+__rte_internal
 void qbman_swp_dqrr_consume(struct qbman_swp *s, const struct qbman_result *dq);
 
 /**
@@ -442,6 +452,7 @@ void qbman_swp_dqrr_consume(struct qbman_swp *s, const struct qbman_result *dq);
  * @s: the software portal object.
  * @dqrr_index: the DQRR index entry to be consumed.
  */
+__rte_internal
 void qbman_swp_dqrr_idx_consume(struct qbman_swp *s, uint8_t dqrr_index);
 
 /**
@@ -450,6 +461,7 @@ void qbman_swp_dqrr_idx_consume(struct qbman_swp *s, uint8_t dqrr_index);
  *
  * Return dqrr index.
  */
+__rte_internal
 uint8_t qbman_get_dqrr_idx(const struct qbman_result *dqrr);
 
 /**
@@ -460,6 +472,7 @@ uint8_t qbman_get_dqrr_idx(const struct qbman_result *dqrr);
  *
  * Return dqrr entry object.
  */
+__rte_internal
 struct qbman_result *qbman_get_dqrr_from_idx(struct qbman_swp *s, uint8_t idx);
 
 /* ------------------------------------------------- */
@@ -485,6 +498,7 @@ struct qbman_result *qbman_get_dqrr_from_idx(struct qbman_swp *s, uint8_t idx);
  * Return 1 for getting a valid dequeue result, or 0 for not getting a valid
  * dequeue result.
  */
+__rte_internal
 int qbman_result_has_new_result(struct qbman_swp *s,
 				struct qbman_result *dq);
 
@@ -497,8 +511,10 @@ int qbman_result_has_new_result(struct qbman_swp *s,
  * Return 1 for getting a valid dequeue result, or 0 for not getting a valid
  * dequeue result.
  */
+__rte_internal
 int qbman_check_command_complete(struct qbman_result *dq);
 
+__rte_internal
 int qbman_check_new_result(struct qbman_result *dq);
 
 /* -------------------------------------------------------- */
@@ -624,6 +640,7 @@ int qbman_result_is_FQPN(const struct qbman_result *dq);
  *
  * Return the state field.
  */
+__rte_internal
 uint8_t qbman_result_DQ_flags(const struct qbman_result *dq);
 
 /**
@@ -658,6 +675,7 @@ static inline int qbman_result_DQ_is_pull_complete(
  *
  * Return seqnum.
  */
+__rte_internal
 uint16_t qbman_result_DQ_seqnum(const struct qbman_result *dq);
 
 /**
@@ -667,6 +685,7 @@ uint16_t qbman_result_DQ_seqnum(const struct qbman_result *dq);
  *
  * Return odpid.
  */
+__rte_internal
 uint16_t qbman_result_DQ_odpid(const struct qbman_result *dq);
 
 /**
@@ -699,6 +718,7 @@ uint32_t qbman_result_DQ_frame_count(const struct qbman_result *dq);
  *
  * Return the frame queue context.
  */
+__rte_internal
 uint64_t qbman_result_DQ_fqd_ctx(const struct qbman_result *dq);
 
 /**
@@ -707,6 +727,7 @@ uint64_t qbman_result_DQ_fqd_ctx(const struct qbman_result *dq);
  *
  * Return the frame descriptor.
  */
+__rte_internal
 const struct qbman_fd *qbman_result_DQ_fd(const struct qbman_result *dq);
 
 /* State-change notifications (FQDAN/CDAN/CSCN/...). */
@@ -717,6 +738,7 @@ const struct qbman_fd *qbman_result_DQ_fd(const struct qbman_result *dq);
  *
  * Return the state in the notifiation.
  */
+__rte_internal
 uint8_t qbman_result_SCN_state(const struct qbman_result *scn);
 
 /**
@@ -850,6 +872,7 @@ struct qbman_eq_response {
  * default/starting state.
  * @d: the given enqueue descriptor.
  */
+__rte_internal
 void qbman_eq_desc_clear(struct qbman_eq_desc *d);
 
 /* Exactly one of the following descriptor "actions" should be set. (Calling
@@ -870,6 +893,7 @@ void qbman_eq_desc_clear(struct qbman_eq_desc *d);
  * @response_success: 1 = enqueue with response always; 0 = enqueue with
  * rejections returned on a FQ.
  */
+__rte_internal
 void qbman_eq_desc_set_no_orp(struct qbman_eq_desc *d, int respond_success);
 /**
  * qbman_eq_desc_set_orp() - Set order-resotration in the enqueue descriptor
@@ -881,6 +905,7 @@ void qbman_eq_desc_set_no_orp(struct qbman_eq_desc *d, int respond_success);
  * @incomplete: indiates whether this is the last fragments using the same
  * sequeue number.
  */
+__rte_internal
 void qbman_eq_desc_set_orp(struct qbman_eq_desc *d, int respond_success,
 			   uint16_t opr_id, uint16_t seqnum, int incomplete);
 
@@ -915,6 +940,7 @@ void qbman_eq_desc_set_orp_nesn(struct qbman_eq_desc *d, uint16_t opr_id,
  * data structure.) 'stash' controls whether or not the write to main-memory
  * expresses a cache-warming attribute.
  */
+__rte_internal
 void qbman_eq_desc_set_response(struct qbman_eq_desc *d,
 				uint64_t storage_phys,
 				int stash);
@@ -929,6 +955,7 @@ void qbman_eq_desc_set_response(struct qbman_eq_desc *d,
  * result "storage" before issuing an enqueue, and use any non-zero 'token'
  * value.
  */
+__rte_internal
 void qbman_eq_desc_set_token(struct qbman_eq_desc *d, uint8_t token);
 
 /**
@@ -944,6 +971,7 @@ void qbman_eq_desc_set_token(struct qbman_eq_desc *d, uint8_t token);
  * @d: the enqueue descriptor
  * @fqid: the id of the frame queue to be enqueued.
  */
+__rte_internal
 void qbman_eq_desc_set_fq(struct qbman_eq_desc *d, uint32_t fqid);
 
 /**
@@ -953,6 +981,7 @@ void qbman_eq_desc_set_fq(struct qbman_eq_desc *d, uint32_t fqid);
  * @qd_bin: the queuing destination bin
  * @qd_prio: the queuing destination priority.
  */
+__rte_internal
 void qbman_eq_desc_set_qd(struct qbman_eq_desc *d, uint32_t qdid,
 			  uint16_t qd_bin, uint8_t qd_prio);
 
@@ -978,6 +1007,7 @@ void qbman_eq_desc_set_eqdi(struct qbman_eq_desc *d, int enable);
  * held-active (order-preserving) FQ, whether the FQ should be parked instead of
  * being rescheduled.)
  */
+__rte_internal
 void qbman_eq_desc_set_dca(struct qbman_eq_desc *d, int enable,
 			   uint8_t dqrr_idx, int park);
 
@@ -987,6 +1017,7 @@ void qbman_eq_desc_set_dca(struct qbman_eq_desc *d, int enable,
  *
  * Return the fd pointer.
  */
+__rte_internal
 struct qbman_fd *qbman_result_eqresp_fd(struct qbman_result *eqresp);
 
 /**
@@ -997,6 +1028,7 @@ struct qbman_fd *qbman_result_eqresp_fd(struct qbman_result *eqresp);
  * This value is set into the response id before the enqueue command, which,
  * get overwritten by qbman once the enqueue command is complete.
  */
+__rte_internal
 void qbman_result_eqresp_set_rspid(struct qbman_result *eqresp, uint8_t val);
 
 /**
@@ -1009,6 +1041,7 @@ void qbman_result_eqresp_set_rspid(struct qbman_result *eqresp, uint8_t val);
  * copied into the enqueue response to determine if the command has been
  * completed, and response has been updated.
  */
+__rte_internal
 uint8_t qbman_result_eqresp_rspid(struct qbman_result *eqresp);
 
 /**
@@ -1017,6 +1050,7 @@ uint8_t qbman_result_eqresp_rspid(struct qbman_result *eqresp);
  *
  * Return 0 when command is sucessful.
  */
+__rte_internal
 uint8_t qbman_result_eqresp_rc(struct qbman_result *eqresp);
 
 /**
@@ -1043,6 +1077,7 @@ int qbman_swp_enqueue(struct qbman_swp *s, const struct qbman_eq_desc *d,
  *
  * Return the number of enqueued frames, -EBUSY if the EQCR is not ready.
  */
+__rte_internal
 int qbman_swp_enqueue_multiple(struct qbman_swp *s,
 			       const struct qbman_eq_desc *d,
 			       const struct qbman_fd *fd,
@@ -1060,6 +1095,7 @@ int qbman_swp_enqueue_multiple(struct qbman_swp *s,
  *
  * Return the number of enqueued frames, -EBUSY if the EQCR is not ready.
  */
+__rte_internal
 int qbman_swp_enqueue_multiple_fd(struct qbman_swp *s,
 				  const struct qbman_eq_desc *d,
 				  struct qbman_fd **fd,
@@ -1076,6 +1112,7 @@ int qbman_swp_enqueue_multiple_fd(struct qbman_swp *s,
  *
  * Return the number of enqueued frames, -EBUSY if the EQCR is not ready.
  */
+__rte_internal
 int qbman_swp_enqueue_multiple_desc(struct qbman_swp *s,
 				    const struct qbman_eq_desc *d,
 				    const struct qbman_fd *fd,
@@ -1117,12 +1154,14 @@ struct qbman_release_desc {
  * default/starting state.
  * @d: the qbman release descriptor.
  */
+__rte_internal
 void qbman_release_desc_clear(struct qbman_release_desc *d);
 
 /**
  * qbman_release_desc_set_bpid() - Set the ID of the buffer pool to release to
  * @d: the qbman release descriptor.
  */
+__rte_internal
 void qbman_release_desc_set_bpid(struct qbman_release_desc *d, uint16_t bpid);
 
 /**
@@ -1141,6 +1180,7 @@ void qbman_release_desc_set_rcdi(struct qbman_release_desc *d, int enable);
  *
  * Return 0 for success, -EBUSY if the release command ring is not ready.
  */
+__rte_internal
 int qbman_swp_release(struct qbman_swp *s, const struct qbman_release_desc *d,
 		      const uint64_t *buffers, unsigned int num_buffers);
 
@@ -1166,6 +1206,7 @@ int qbman_swp_release_thresh(struct qbman_swp *s, unsigned int thresh);
  * Return 0 for success, or negative error code if the acquire command
  * fails.
  */
+__rte_internal
 int qbman_swp_acquire(struct qbman_swp *s, uint16_t bpid, uint64_t *buffers,
 		      unsigned int num_buffers);
 
diff --git a/drivers/bus/fslmc/rte_bus_fslmc_version.map b/drivers/bus/fslmc/rte_bus_fslmc_version.map
index fe45575046..04e61156c3 100644
--- a/drivers/bus/fslmc/rte_bus_fslmc_version.map
+++ b/drivers/bus/fslmc/rte_bus_fslmc_version.map
@@ -1,4 +1,4 @@
-DPDK_20.0 {
+INTERNAL {
 	global:
 
 	dpaa2_affine_qbman_ethrx_swp;
@@ -11,7 +11,6 @@ DPDK_20.0 {
 	dpaa2_free_dpbp_dev;
 	dpaa2_free_dq_storage;
 	dpaa2_free_eq_descriptors;
-	dpaa2_get_qbman_swp;
 	dpaa2_io_portal;
 	dpaa2_svr_family;
 	dpaa2_virt_mode;
@@ -101,7 +100,6 @@ DPDK_20.0 {
 	rte_fslmc_driver_unregister;
 	rte_fslmc_get_device_count;
 	rte_fslmc_object_register;
-	rte_fslmc_vfio_dmamap;
 	rte_global_active_dqs_list;
 	rte_mcp_ptr_list;
 
diff --git a/drivers/bus/fslmc/rte_fslmc.h b/drivers/bus/fslmc/rte_fslmc.h
index 96ba8dc259..5078b48ee1 100644
--- a/drivers/bus/fslmc/rte_fslmc.h
+++ b/drivers/bus/fslmc/rte_fslmc.h
@@ -162,6 +162,7 @@ RTE_DECLARE_PER_LCORE(struct dpaa2_portal_dqrr, dpaa2_held_bufs);
  *   A pointer to a rte_dpaa2_driver structure describing the driver
  *   to be registered.
  */
+__rte_internal
 void rte_fslmc_driver_register(struct rte_dpaa2_driver *driver);
 
 /**
@@ -171,6 +172,7 @@ void rte_fslmc_driver_register(struct rte_dpaa2_driver *driver);
  *   A pointer to a rte_dpaa2_driver structure describing the driver
  *   to be unregistered.
  */
+__rte_internal
 void rte_fslmc_driver_unregister(struct rte_dpaa2_driver *driver);
 
 /** Helper for DPAA2 device registration from driver (eth, crypto) instance */
@@ -189,6 +191,7 @@ RTE_PMD_EXPORT_NAME(nm, __COUNTER__)
  *   A pointer to a rte_dpaa_object structure describing the mc object
  *   to be registered.
  */
+__rte_internal
 void rte_fslmc_object_register(struct rte_dpaa2_object *object);
 
 /**
@@ -200,6 +203,7 @@ void rte_fslmc_object_register(struct rte_dpaa2_object *object);
  *   >=0 for count; 0 indicates either no device of the said type scanned or
  *   invalid device type.
  */
+__rte_internal
 uint32_t rte_fslmc_get_device_count(enum rte_dpaa2_dev_type device_type);
 
 /** Helper for DPAA2 object registration */
-- 
2.17.1


^ permalink raw reply	[relevance 1%]

* [dpdk-dev] [PATCH v2 02/12] mempool/dpaa2: move internal symbols into INTERNAL section
  2020-05-12 14:00  3% ` [dpdk-dev] [PATCH v2 01/12] " Hemant Agrawal
@ 2020-05-12 14:00  3%   ` Hemant Agrawal
  2020-05-12 14:00  1%   ` [dpdk-dev] [PATCH v2 03/12] bus/fslmc: " Hemant Agrawal
                     ` (6 subsequent siblings)
  7 siblings, 0 replies; 200+ results
From: Hemant Agrawal @ 2020-05-12 14:00 UTC (permalink / raw)
  To: dev, david.marchand; +Cc: Hemant Agrawal

This patch moves the internal symbols to INTERNAL sections
so that any change in them is not reported as ABI breakage.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/mempool/dpaa/rte_mempool_dpaa_version.map   | 2 +-
 drivers/mempool/dpaa2/dpaa2_hw_mempool.h            | 1 +
 drivers/mempool/dpaa2/rte_mempool_dpaa2_version.map | 9 +++++++--
 3 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/drivers/mempool/dpaa/rte_mempool_dpaa_version.map b/drivers/mempool/dpaa/rte_mempool_dpaa_version.map
index 9eebaf7ffd..142547ee38 100644
--- a/drivers/mempool/dpaa/rte_mempool_dpaa_version.map
+++ b/drivers/mempool/dpaa/rte_mempool_dpaa_version.map
@@ -1,4 +1,4 @@
-DPDK_20.0 {
+INTERNAL {
 	global:
 
 	rte_dpaa_bpid_info;
diff --git a/drivers/mempool/dpaa2/dpaa2_hw_mempool.h b/drivers/mempool/dpaa2/dpaa2_hw_mempool.h
index fa0f2280d5..53fa1552d1 100644
--- a/drivers/mempool/dpaa2/dpaa2_hw_mempool.h
+++ b/drivers/mempool/dpaa2/dpaa2_hw_mempool.h
@@ -61,6 +61,7 @@ struct dpaa2_bp_info {
 
 extern struct dpaa2_bp_info *rte_dpaa2_bpid_info;
 
+__rte_internal
 int rte_dpaa2_mbuf_alloc_bulk(struct rte_mempool *pool,
 		       void **obj_table, unsigned int count);
 
diff --git a/drivers/mempool/dpaa2/rte_mempool_dpaa2_version.map b/drivers/mempool/dpaa2/rte_mempool_dpaa2_version.map
index cd4bc88273..686b024624 100644
--- a/drivers/mempool/dpaa2/rte_mempool_dpaa2_version.map
+++ b/drivers/mempool/dpaa2/rte_mempool_dpaa2_version.map
@@ -1,10 +1,15 @@
 DPDK_20.0 {
 	global:
 
-	rte_dpaa2_bpid_info;
-	rte_dpaa2_mbuf_alloc_bulk;
 	rte_dpaa2_mbuf_from_buf_addr;
 	rte_dpaa2_mbuf_pool_bpid;
 
 	local: *;
 };
+
+INTERNAL {
+	global:
+
+	rte_dpaa2_bpid_info;
+	rte_dpaa2_mbuf_alloc_bulk;
+};
-- 
2.17.1


^ permalink raw reply	[relevance 3%]

* [dpdk-dev] [PATCH v2 01/12] common/dpaax: move internal symbols into INTERNAL section
  2020-05-05 14:08  3% [dpdk-dev] [PATCH 1/7] common/dpaax: move internal symbols into INTERNAL section Hemant Agrawal
                   ` (6 preceding siblings ...)
  2020-05-05 17:07  4% ` [dpdk-dev] [PATCH 1/7] common/dpaax: " David Marchand
@ 2020-05-12 14:00  3% ` Hemant Agrawal
  2020-05-12 14:00  3%   ` [dpdk-dev] [PATCH v2 02/12] mempool/dpaa2: " Hemant Agrawal
                     ` (7 more replies)
  7 siblings, 8 replies; 200+ results
From: Hemant Agrawal @ 2020-05-12 14:00 UTC (permalink / raw)
  To: dev, david.marchand; +Cc: Hemant Agrawal

This patch moves the internal symbols to INTERNAL sections
so that any change in them is not reported as ABI breakage.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/common/dpaax/dpaa_of.h                    | 15 +++++++++++++++
 drivers/common/dpaax/dpaax_iova_table.h           |  4 ++++
 drivers/common/dpaax/rte_common_dpaax_version.map |  2 +-
 3 files changed, 20 insertions(+), 1 deletion(-)

diff --git a/drivers/common/dpaax/dpaa_of.h b/drivers/common/dpaax/dpaa_of.h
index 960b421766..38d91a1afe 100644
--- a/drivers/common/dpaax/dpaa_of.h
+++ b/drivers/common/dpaax/dpaa_of.h
@@ -24,6 +24,7 @@
 #include <limits.h>
 #include <rte_common.h>
 #include <dpaa_list.h>
+#include <rte_compat.h>
 
 #ifndef OF_INIT_DEFAULT_PATH
 #define OF_INIT_DEFAULT_PATH "/proc/device-tree"
@@ -102,6 +103,7 @@ struct dt_file {
 	uint64_t buf[OF_FILE_BUF_MAX >> 3];
 };
 
+__rte_internal
 const struct device_node *of_find_compatible_node(
 					const struct device_node *from,
 					const char *type __rte_unused,
@@ -113,32 +115,44 @@ const struct device_node *of_find_compatible_node(
 		dev_node != NULL; \
 		dev_node = of_find_compatible_node(dev_node, type, compatible))
 
+__rte_internal
 const void *of_get_property(const struct device_node *from, const char *name,
 			    size_t *lenp) __attribute__((nonnull(2)));
+__rte_internal
 bool of_device_is_available(const struct device_node *dev_node);
 
+
+__rte_internal
 const struct device_node *of_find_node_by_phandle(uint64_t ph);
 
+__rte_internal
 const struct device_node *of_get_parent(const struct device_node *dev_node);
 
+__rte_internal
 const struct device_node *of_get_next_child(const struct device_node *dev_node,
 					    const struct device_node *prev);
 
+__rte_internal
 const void *of_get_mac_address(const struct device_node *np);
 
 #define for_each_child_node(parent, child) \
 	for (child = of_get_next_child(parent, NULL); child != NULL; \
 			child = of_get_next_child(parent, child))
 
+
+__rte_internal
 uint32_t of_n_addr_cells(const struct device_node *dev_node);
 uint32_t of_n_size_cells(const struct device_node *dev_node);
 
+__rte_internal
 const uint32_t *of_get_address(const struct device_node *dev_node, size_t idx,
 			       uint64_t *size, uint32_t *flags);
 
+__rte_internal
 uint64_t of_translate_address(const struct device_node *dev_node,
 			      const uint32_t *addr) __attribute__((nonnull));
 
+__rte_internal
 bool of_device_is_compatible(const struct device_node *dev_node,
 			     const char *compatible);
 
@@ -146,6 +160,7 @@ bool of_device_is_compatible(const struct device_node *dev_node,
  * subsystem that is device-tree-dependent. Eg. Qman/Bman, config layers, etc.
  * The path should usually be "/proc/device-tree".
  */
+__rte_internal
 int of_init_path(const char *dt_path);
 
 /* of_finish() allows a controlled tear-down of the device-tree layer, eg. if a
diff --git a/drivers/common/dpaax/dpaax_iova_table.h b/drivers/common/dpaax/dpaax_iova_table.h
index fc3b9e7a8f..230fba8ba0 100644
--- a/drivers/common/dpaax/dpaax_iova_table.h
+++ b/drivers/common/dpaax/dpaax_iova_table.h
@@ -61,9 +61,13 @@ extern struct dpaax_iova_table *dpaax_iova_table_p;
 #define DPAAX_MEM_SPLIT_MASK_OFF (DPAAX_MEM_SPLIT - 1) /**< Offset */
 
 /* APIs exposed */
+__rte_internal
 int dpaax_iova_table_populate(void);
+__rte_internal
 void dpaax_iova_table_depopulate(void);
+__rte_internal
 int dpaax_iova_table_update(phys_addr_t paddr, void *vaddr, size_t length);
+__rte_internal
 void dpaax_iova_table_dump(void);
 
 static inline void *dpaax_iova_table_get_va(phys_addr_t paddr) __rte_hot;
diff --git a/drivers/common/dpaax/rte_common_dpaax_version.map b/drivers/common/dpaax/rte_common_dpaax_version.map
index f72eba761d..ad2b2b3fec 100644
--- a/drivers/common/dpaax/rte_common_dpaax_version.map
+++ b/drivers/common/dpaax/rte_common_dpaax_version.map
@@ -1,4 +1,4 @@
-DPDK_20.0 {
+INTERNAL {
 	global:
 
 	dpaax_iova_table_depopulate;
-- 
2.17.1


^ permalink raw reply	[relevance 3%]

* Re: [dpdk-dev] [PATCH v4 1/2] common/mlx5: add rte internal tag and avoid comparison
  2020-05-07 11:31  2%       ` [dpdk-dev] [PATCH v4 " Ophir Munk
@ 2020-05-12 10:52  0%         ` Raslan Darawsheh
  0 siblings, 0 replies; 200+ results
From: Raslan Darawsheh @ 2020-05-12 10:52 UTC (permalink / raw)
  To: Ophir Munk, dev, David Marchand
  Cc: Ray Kinsella, Matan Azrad, Thomas Monjalon

Hi,

> -----Original Message-----
> From: Ophir Munk <ophirmu@mellanox.com>
> Sent: Thursday, May 7, 2020 2:31 PM
> To: dev@dpdk.org; David Marchand <david.marchand@redhat.com>
> Cc: Ray Kinsella <mdr@ashroe.eu>; Matan Azrad <matan@mellanox.com>;
> Raslan Darawsheh <rasland@mellanox.com>; Thomas Monjalon
> <thomas@monjalon.net>; Ophir Munk <ophirmu@mellanox.com>
> Subject: [PATCH v4 1/2] common/mlx5: add rte internal tag and avoid
> comparison
> 
> Move mlx5 symbols in the map file to the INTERNAL section and add
> __internal tags to their definitions.
> Those symbols were exported in 20.02 and now (20.05) they are removed.
> Avoid ABI comparison issues between 20.05/20.08 and 20.02 by adding the
> suppress_file directive to libabigail.abignore file. This directive will
> prevent loading mlx5 common symbols and no comparison will be
> performed.
> 
> In addition move symbols from the EXPERIMENTAL section to the INTERNAL
> section.
> 
> Fixes: 7b4f1e6bd367 ("common/mlx5: introduce common library")
> 
> Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
> Acked-by: Matan Azrad <matan@mellanox.com>
> ---
> v4:
> Move symbols from EXPERIMENTAL section to INTERNAL section
> 
>  devtools/libabigail.abignore                    |  7 ++++
>  drivers/common/mlx5/mlx5_common.h               |  3 ++
>  drivers/common/mlx5/mlx5_common_mp.h            | 14 +++----
>  drivers/common/mlx5/mlx5_common_mr.h            | 26 ++++++------
>  drivers/common/mlx5/mlx5_devx_cmds.h            | 23 +++++++++++
>  drivers/common/mlx5/mlx5_nl.h                   | 18 ++++++++-
>  drivers/common/mlx5/rte_common_mlx5_version.map | 53
> ++++++++++++-------------
>  7 files changed, 95 insertions(+), 49 deletions(-)


Series rebased and applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh

^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [PATCH v5 2/2] cryptodev: version cryptodev info get function
  2020-05-11  8:18  4%         ` Akhil Goyal
  2020-05-11 11:38  4%           ` Akhil Goyal
@ 2020-05-11 16:09  5%           ` Ray Kinsella
  1 sibling, 0 replies; 200+ results
From: Ray Kinsella @ 2020-05-11 16:09 UTC (permalink / raw)
  To: Akhil Goyal, Arek Kusztal, dev
  Cc: fiona.trahe, ray.kinsella, bruce.richardson


Seems to be an issues on my side (see below).
Everything that the ABI Compliance Checker 2.3 complains about has already been reported and suppressed in libabigail.ignore.

Suggest you use libabigail going forward. 


Oddly enough

Fedora 31 / ABI Compliance Checker 2.3
[root@xyz abi-check]# abi-compliance-checker -l librte_cryptodev.so -old 24cd1b529/librte_cryptodev.so.dump -new 26c1ec175/librte_cryptodev.so.dumpPreparing, please wait ...
Comparing ABIs ...
Comparing APIs ...
Creating compatibility report ...
Binary compatibility: 100%
Source compatibility: 100%
Total binary compatibility problems: 0, warnings: 0
Total source compatibility problems: 0, warnings: 0
Report: compat_reports/librte_cryptodev.so/24cd1b529_to_26c1ec175/compat_report.html

Ubuntu 18.04/ ABI Compliance Checker 2.2

root@abc:/build/dpdk-next-crypto/abi-check# abi-compliance-checker -l librte_cryptodev.so -old 6ef23d92d/librte_cryptodev.so.dump -new 6488cc1cf/librte_cryptodev.so.dump
Preparing, please wait ...
Comparing ABIs ...
Comparing APIs ...
Creating compatibility report ...
Binary compatibility: 99.4%
Source compatibility: 100%
Total binary compatibility problems: 1, warnings: 1
Total source compatibility problems: 0, warnings: 0
Report: compat_reports/librte_cryptodev.so/6ef23d92d_to_6488cc1cf/compat_report.html

Ray K

On 11/05/2020 09:18, Akhil Goyal wrote:
> Hi Ray,
> 
> Previously, I only ran the script for the 2 patches.
> 
> ./devtools/validate-abi.sh <commit id previous to these two patches> HEAD
> 
> However when I run for v20.02 and HEAD, the list is quite big. I believe most of them are either experimental or internal PMD. But cryptodev is still there.
> 
> NOTICE: abi-compliance-checker returned 1
> NOTICE: ABI may be incompatible, check reports/logs for details.
> NOTICE: Incompatible list:  librte_bbdev.so librte_common_iavf.so librte_common_octeontx2.so librte_cryptodev.so librte_eal.so librte_efd.so librte_eventdev.so librte_hash.so librte_ipsec.so librte_meter.so librte_pdump.so librte_pmd_crypto_scheduler.so librte_pmd_dpaa2_sec.so librte_pmd_dpaa_sec.so librte_pmd_ring.so librte_ring.so librte_vhost.so
> 
> Regards,
> Akhil
> 
>> -----Original Message-----
>> From: Ray Kinsella <mdr@ashroe.eu>
>> Sent: Monday, May 11, 2020 1:18 PM
>> To: Akhil Goyal <akhil.goyal@nxp.com>; Arek Kusztal
>> <arkadiuszx.kusztal@intel.com>; dev@dpdk.org
>> Cc: fiona.trahe@intel.com; ray.kinsella@intel.com; bruce.richardson@intel.com
>> Subject: Re: [dpdk-dev] [PATCH v5 2/2] cryptodev: version cryptodev info get
>> function
>>
>> Hi Akhil,
>>
>> So 1st thing is that this that validate-abi uses "ABI Compliance Checker",
>> which does not use libabigail.ignore.
>>
>> So you will end up with different results compared to using libabigail as follows:
>>
>> DPDK_ABI_REF_DIR=<some absolute path>
>> DPDK_ABI_REF_VERSION=v20.02 ./devtools/test-meson-builds.sh
>>
>> I did check with the "ABI Compliance Checker" (I like this tool also), however I
>> got the following
>>
>> NOTICE: No error detected, ABI is compatible.
>> INFO: Logs are in /root/src/dpdk/abi-check/abi-check.log
>> INFO: HTML reports are in /root/src/dpdk/abi-check/compat_reports directory
>>
>> What references did you use with validate-abi.sh (I used v20.02 and HEAD).
>>
>> Ray K
>>
>> On 09/05/2020 22:11, Akhil Goyal wrote:
>>> Hi Ray/Arek,
>>>
>>> I still see Incompatible cryptodev even after update in the abignore list.
>>> I checked it with ./devtools/validate-abi.sh
>>> NOTICE: ABI may be incompatible, check reports/logs for details.
>>> NOTICE: Incompatible list:  librte_cryptodev.so
>>>
>>> Did I miss something?
>>>
>>>
>>>>
>>>> On 07/05/2020 11:57, Arek Kusztal wrote:
>>>>> This patch adds versioned function rte_cryptodev_info_get()
>>>>> to prevent some issues with ABI policy.
>>>>> Node v21 works in same way as before, returning driver capabilities
>>>>> directly to the API caller. These capabilities may include new elements
>>>>> not part of the v20 ABI.
>>>>> Node v20 function maintains compatibility with v20 ABI releases
>>>>> by stripping out elements not supported in v20 ABI. Because
>>>>> rte_cryptodev_info_get is called by other API functions,
>>>>> rte_cryptodev_sym_capability_get function is versioned the same way.
>>>>>
>>>>> Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
>>>>> ---
>>>>> v2:
>>>>> - changed version numbers of symbols to 20.0.2
>>>>> v3:
>>>>> - added v2/v3 informations
>>>>> - changed version numbers of symbols to 21
>>>>> v4:
>>>>> - fixed clang build by movind binding default symbol
>>>>> - implemented mailing list comments
>>>>> - added abidiff tool suppression entries
>>>>> v5:
>>>>> - fixed meson build
>>>>>
>>>>>  devtools/libabigail.abignore                   |   8 ++
>>>>>  lib/librte_cryptodev/meson.build               |   1 +
>>>>>  lib/librte_cryptodev/rte_cryptodev.c           | 147
>>>> ++++++++++++++++++++++++-
>>>>>  lib/librte_cryptodev/rte_cryptodev.h           |  34 +++++-
>>>>>  lib/librte_cryptodev/rte_cryptodev_version.map |   7 ++
>>>>>  5 files changed, 191 insertions(+), 6 deletions(-)
>>>>>
>>>> [SNIP]
>>>>
>>>> Acked-by: Ray Kinsella <mdr@ashroe.eu>

^ permalink raw reply	[relevance 5%]

* Re: [dpdk-dev] [PATCH 1/2] common/octeontx2: move internal symbols to INTERNAL section
  2020-05-11 10:00  3% [dpdk-dev] [PATCH 1/2] common/octeontx2: move internal symbols to INTERNAL section pbhagavatula
  2020-05-11 10:00  3% ` [dpdk-dev] [PATCH 2/2] mempool/octeontx2: " pbhagavatula
@ 2020-05-11 14:45  0% ` Thomas Monjalon
  2020-05-13  1:04  3% ` [dpdk-dev] [PATCH v2 " pbhagavatula
  2 siblings, 0 replies; 200+ results
From: Thomas Monjalon @ 2020-05-11 14:45 UTC (permalink / raw)
  To: Pavan Nikhilesh
  Cc: jerinj, Nithin Dabilpuram, Anoob Joseph, Ray Kinsella,
	Neil Horman, dev, david.marchand

11/05/2020 12:00, pbhagavatula@marvell.com:
> From: Pavan Nikhilesh <pbhagavatula@marvell.com>
> 
> Move the internal symbols to INTERNAL sections so that any
> change in them is not reported as ABI breakage.
> 
> Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
> ---
>  drivers/common/octeontx2/otx2_common.h           |  8 ++++++++
>  drivers/common/octeontx2/otx2_dev.h              |  3 +++
>  drivers/common/octeontx2/otx2_irq.h              |  3 +++
>  drivers/common/octeontx2/otx2_mbox.h             |  6 ++++++
>  drivers/common/octeontx2/otx2_sec_idev.h         |  6 ++++++
>  .../octeontx2/rte_common_octeontx2_version.map   | 16 +++-------------
>  6 files changed, 29 insertions(+), 13 deletions(-)

You probably need to add an exception in libabigail.ignore file
for symbols moved from stable to internal.


> --- a/drivers/common/octeontx2/rte_common_octeontx2_version.map
> +++ b/drivers/common/octeontx2/rte_common_octeontx2_version.map
> @@ -1,4 +1,4 @@
> -DPDK_20.0 {
> +INTERNAL {
>  	global:
>  
>  	otx2_dev_active_vfs;
> @@ -30,23 +30,13 @@ DPDK_20.0 {
>  	otx2_sso_pf_func_get;
>  	otx2_sso_pf_func_set;
>  	otx2_unregister_irq;
> -
> -	local: *;
> -};
> -
> -DPDK_21 {
> -	global:
> -
>  	otx2_eth_dev_is_sec_capable;
>  	otx2_sec_idev_cfg_init;
>  	otx2_sec_idev_tx_cpt_qp_add;
>  	otx2_sec_idev_tx_cpt_qp_remove;
>  	otx2_sec_idev_tx_cpt_qp_get;
>  	otx2_sec_idev_tx_cpt_qp_put;
> -} DPDK_20.0;
> -
> -EXPERIMENTAL {
> -	global:
> -
>  	otx2_logtype_ep;
> +
> +	local: *;
>  };

I think you should sort symbols in alphabetical way.




^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [RFC] hash: unify crc32 API header for x86 and ARM
  2020-05-11 12:10  0%             ` Ananyev, Konstantin
@ 2020-05-11 12:32  0%               ` Pavan Nikhilesh Bhagavatula
  0 siblings, 0 replies; 200+ results
From: Pavan Nikhilesh Bhagavatula @ 2020-05-11 12:32 UTC (permalink / raw)
  To: Ananyev, Konstantin, Jerin Jacob Kollanukkaran, thomas, Wang,
	Yipeng1, Gobriel, Sameh, Richardson, Bruce, Ruifeng Wang
  Cc: dev

>> >> >> >> From: Pavan Nikhilesh <pbhagavatula@marvell.com>
>> >> >> >>
>> >> >> >> Merge crc32 hash calculation public API headers for x86 and
>> >ARM,
>> >> >> >> split implementations of x86 and ARM into their respective
>> >private
>> >> >> >> headers.
>> >> >> >> This reduces the ifdef code clutter while keeping current ABI
>> >> >intact.
>> >> >> >>
>> >> >> >> Although we install `rte_crc_arm64.h` it is not used in any of
>the
>> >lib
>> >> >or
>> >> >> >> drivers layers. All the libs and drivers use `rte_hash_crc.h`
>which
>> >> >falls
>> >> >> >> back to SW crc32 calculation for ARM platform.
>> >> >> >>
>> >> >> >> Signed-off-by: Pavan Nikhilesh
><pbhagavatula@marvell.com>
>> >> >> >> ---
>> >> >> >>
>> >> >> >>  Currently, if application incorrectly sets CRC32_ARM64 as
>crc32
>> >> >> >algorithm
>> >> >> >>  through `rte_hash_crc_set_alg()` on x86 or vice-versa we
>> >fallback
>> >> >to
>> >> >> >algorithm
>> >> >> >>  set previously via `rte_hash_crc_set_alg()` instead of setting
>> >the
>> >> >best
>> >> >> >>  available.
>> >> >> >>  This behaviour should probably change to setting the best
>> >> >available
>> >> >> >algorithm
>> >> >> >>  and is up for discussion.
>> >> >> >>
>> >> >> >>  app/test/test_hash.c            |   6 +
>> >> >> >>  lib/librte_hash/Makefile        |   5 -
>> >> >> >>  lib/librte_hash/crc_arm64.h     |  67 +++++++++++
>> >> >> >>  lib/librte_hash/crc_x86.h       |  68 +++++++++++
>> >> >> >>  lib/librte_hash/meson.build     |   3 +-
>> >> >> >>  lib/librte_hash/rte_crc_arm64.h | 183 --------------------------
>----
>> >> >> >>  lib/librte_hash/rte_hash_crc.h  | 193 +++++++++++++-------
>----
>> >---
>> >> >----
>> >> >> >-
>> >> >> >>  7 files changed, 219 insertions(+), 306 deletions(-)
>> >> >> >>  create mode 100644 lib/librte_hash/crc_arm64.h
>> >> >> >>  create mode 100644 lib/librte_hash/crc_x86.h
>> >> >> >>  delete mode 100644 lib/librte_hash/rte_crc_arm64.h
>> >> >> >>
>> >> >> >> diff --git a/app/test/test_hash.c b/app/test/test_hash.c
>> >> >> >> index afa3a1a3c..7bd457dac 100644
>> >> >> >> --- a/app/test/test_hash.c
>> >> >> >> +++ b/app/test/test_hash.c
>> >> >> >> @@ -195,7 +195,13 @@ test_crc32_hash_alg_equiv(void)
>> >> >> >>  	}
>> >> >> >>
>> >> >> >>  	/* Resetting to best available algorithm */
>> >> >> >> +#if defined RTE_ARCH_X86
>> >> >> >>  	rte_hash_crc_set_alg(CRC32_SSE42_x64);
>> >> >> >> +#elif defined RTE_ARCH_ARM64
>> >> >> >> +	rte_hash_crc_set_alg(CRC32_ARM64);
>> >> >> >> +#else
>> >> >> >> +	rte_hash_crc_set_alg(CRC32_SW);
>> >> >> >> +#endif
>> >> >> >>
>> >> >> >>  	if (i == CRC32_ITERATIONS)
>> >> >> >>  		return 0;
>> >> >> >> diff --git a/lib/librte_hash/Makefile
>b/lib/librte_hash/Makefile
>> >> >> >> index ec9f86499..f640afc42 100644
>> >> >> >> --- a/lib/librte_hash/Makefile
>> >> >> >> +++ b/lib/librte_hash/Makefile
>> >> >> >> @@ -19,11 +19,6 @@ SRCS-$(CONFIG_RTE_LIBRTE_HASH)
>+=
>> >> >> >rte_fbk_hash.c
>> >> >> >>  # install this header file
>> >> >> >>  SYMLINK-$(CONFIG_RTE_LIBRTE_HASH)-include :=
>rte_hash.h
>> >> >> >>  SYMLINK-$(CONFIG_RTE_LIBRTE_HASH)-include +=
>> >> >rte_hash_crc.h
>> >> >> >> -ifeq ($(CONFIG_RTE_ARCH_ARM64),y)
>> >> >> >> -ifneq ($(findstring
>> >RTE_MACHINE_CPUFLAG_CRC32,$(CFLAGS)),)
>> >> >> >> -SYMLINK-$(CONFIG_RTE_LIBRTE_HASH)-include +=
>> >> >rte_crc_arm64.h
>> >> >> >> -endif
>> >> >> >> -endif
>> >> >> >>  SYMLINK-$(CONFIG_RTE_LIBRTE_HASH)-include +=
>> >rte_jhash.h
>> >> >> >>  SYMLINK-$(CONFIG_RTE_LIBRTE_HASH)-include +=
>> >rte_thash.h
>> >> >> >>  SYMLINK-$(CONFIG_RTE_LIBRTE_HASH)-include +=
>> >> >rte_fbk_hash.h
>> >> >> >> diff --git a/lib/librte_hash/crc_arm64.h
>> >> >b/lib/librte_hash/crc_arm64.h
>> >> >> >> new file mode 100644
>> >> >> >> index 000000000..8e75f8297
>> >> >> >
>> >> >> >Wouldn't that break 'make  install T=...'?
>> >> >>
>> >> >> My bad I verified with meson and it was building fine.
>> >> >>
>> >> >> >As now rte_hash_crc.h includes not public headers (crc_x86.h,
>> >etc.).
>> >> >> >Same question about external apps, where they would get
>from
>> >> >these
>> >> >> >headers?
>> >> >>
>> >> >> I think in the next version we can directly have the arch specific
>> >> >functions
>> >> >> Implemented in rte_hash_crc.h. Since its pretty stable code and
>> >> >overhead of extra
>> >> >> ~120 lines.
>> >> >
>> >> >Ok... but why not then just leave arch specific headers, as they
>are
>> >right
>> >> >now?
>> >> >What is wrong with current approach?
>> >>
>> >> The problem is if any application directly includes only
>> >rte_crc_arm64.h
>> >> (completely legal) it will break the build.
>> >
>> >But we can probably mark rte_crc_arm64.h as internal, and warn
>users
>> >not to
>> >include it directly (same for rte_crc_x86.h and any other arch specific
>> >headers).
>>
>> Yes but I think merging them would be a cleaner, number of
>constructors would be
>> one and maybe we could select the best available algorithm on a
>given platform when
>> application requests unsupported one.
>
>Ok, but we can still have one constructor, and two (or more) different
>arch specific headers,
>that would be included into main header conditionally by  #ifdef
>RTE_ARCH_....
>
>>
>> As Yipeng mentioned do you thing having a indirect call instead of
>runtime branch be
>> depreciative in terms of performance?
>
>I think run-time branch by some global var would be much faster than
>indirect function call
>(at least on IA).
>

Ok, makes sense as in a tight loop the run-time branch would be hoisted out.
Let me draft a RFC v2.

>>
>> >
>> >>
>> >> Example:
>> >>
>> >> diff --git a/lib/librte_efd/rte_efd.c b/lib/librte_efd/rte_efd.c
>> >> index 6a799556d..318670940 100644
>> >> --- a/lib/librte_efd/rte_efd.c
>> >> +++ b/lib/librte_efd/rte_efd.c
>> >> @@ -19,7 +19,7 @@
>> >>  #include <rte_memcpy.h>
>> >>  #include <rte_ring.h>
>> >>  #include <rte_jhash.h>
>> >> -#include <rte_hash_crc.h>
>> >> +#include <rte_crc_arm64.h>
>> >>  #include <rte_tailq.h>
>> >>
>> >>  #include "rte_efd.h"
>> >> (END)
>> >>
>> >> Causes:
>> >>
>> >> ../lib/librte_hash/rte_crc_arm64.h: In function
>> >'rte_hash_crc_set_alg':
>> >> ../lib/librte_hash/rte_crc_arm64.h:77:7: error: 'CRC32_ARM64'
>> >undeclared (first use in this function)
>> >>    77 |  case CRC32_ARM64:
>> >>       |       ^~~~~~~~~~~
>> >> ../lib/librte_hash/rte_crc_arm64.h:77:7: note: each undeclared
>> >identifier is reported only once for each function it appears in
>> >> ../lib/librte_hash/rte_crc_arm64.h:79:10: error: 'CRC32_SW'
>> >undeclared (first use in this function)
>> >>    79 |    alg = CRC32_SW;
>> >>       |          ^~~~~~~~
>> >> ../lib/librte_hash/rte_crc_arm64.h:82:3: error: 'crc32_alg'
>undeclared
>> >(first use in this function)
>> >>    82 |   crc32_alg = alg;
>> >>       |   ^~~~~~~~~
>> >> ../lib/librte_hash/rte_crc_arm64.h: In function
>> >'rte_hash_crc_init_alg':
>> >> ../lib/librte_hash/rte_crc_arm64.h:92:23: error: 'CRC32_ARM64'
>> >undeclared (first use in this function)
>> >>    92 |  rte_hash_crc_set_alg(CRC32_ARM64);
>> >>
>> >> Thanks,
>> >> Pavan.
>> >>
>> >>


^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [RFC] hash: unify crc32 API header for x86 and ARM
  2020-05-11 10:57  0%           ` Pavan Nikhilesh Bhagavatula
@ 2020-05-11 12:10  0%             ` Ananyev, Konstantin
  2020-05-11 12:32  0%               ` Pavan Nikhilesh Bhagavatula
  0 siblings, 1 reply; 200+ results
From: Ananyev, Konstantin @ 2020-05-11 12:10 UTC (permalink / raw)
  To: Pavan Nikhilesh Bhagavatula, Jerin Jacob Kollanukkaran, thomas,
	Wang, Yipeng1, Gobriel, Sameh, Richardson, Bruce, Ruifeng Wang
  Cc: dev

> 
> >> >> >> From: Pavan Nikhilesh <pbhagavatula@marvell.com>
> >> >> >>
> >> >> >> Merge crc32 hash calculation public API headers for x86 and
> >ARM,
> >> >> >> split implementations of x86 and ARM into their respective
> >private
> >> >> >> headers.
> >> >> >> This reduces the ifdef code clutter while keeping current ABI
> >> >intact.
> >> >> >>
> >> >> >> Although we install `rte_crc_arm64.h` it is not used in any of the
> >lib
> >> >or
> >> >> >> drivers layers. All the libs and drivers use `rte_hash_crc.h` which
> >> >falls
> >> >> >> back to SW crc32 calculation for ARM platform.
> >> >> >>
> >> >> >> Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
> >> >> >> ---
> >> >> >>
> >> >> >>  Currently, if application incorrectly sets CRC32_ARM64 as crc32
> >> >> >algorithm
> >> >> >>  through `rte_hash_crc_set_alg()` on x86 or vice-versa we
> >fallback
> >> >to
> >> >> >algorithm
> >> >> >>  set previously via `rte_hash_crc_set_alg()` instead of setting
> >the
> >> >best
> >> >> >>  available.
> >> >> >>  This behaviour should probably change to setting the best
> >> >available
> >> >> >algorithm
> >> >> >>  and is up for discussion.
> >> >> >>
> >> >> >>  app/test/test_hash.c            |   6 +
> >> >> >>  lib/librte_hash/Makefile        |   5 -
> >> >> >>  lib/librte_hash/crc_arm64.h     |  67 +++++++++++
> >> >> >>  lib/librte_hash/crc_x86.h       |  68 +++++++++++
> >> >> >>  lib/librte_hash/meson.build     |   3 +-
> >> >> >>  lib/librte_hash/rte_crc_arm64.h | 183 ------------------------------
> >> >> >>  lib/librte_hash/rte_hash_crc.h  | 193 +++++++++++++-----------
> >---
> >> >----
> >> >> >-
> >> >> >>  7 files changed, 219 insertions(+), 306 deletions(-)
> >> >> >>  create mode 100644 lib/librte_hash/crc_arm64.h
> >> >> >>  create mode 100644 lib/librte_hash/crc_x86.h
> >> >> >>  delete mode 100644 lib/librte_hash/rte_crc_arm64.h
> >> >> >>
> >> >> >> diff --git a/app/test/test_hash.c b/app/test/test_hash.c
> >> >> >> index afa3a1a3c..7bd457dac 100644
> >> >> >> --- a/app/test/test_hash.c
> >> >> >> +++ b/app/test/test_hash.c
> >> >> >> @@ -195,7 +195,13 @@ test_crc32_hash_alg_equiv(void)
> >> >> >>  	}
> >> >> >>
> >> >> >>  	/* Resetting to best available algorithm */
> >> >> >> +#if defined RTE_ARCH_X86
> >> >> >>  	rte_hash_crc_set_alg(CRC32_SSE42_x64);
> >> >> >> +#elif defined RTE_ARCH_ARM64
> >> >> >> +	rte_hash_crc_set_alg(CRC32_ARM64);
> >> >> >> +#else
> >> >> >> +	rte_hash_crc_set_alg(CRC32_SW);
> >> >> >> +#endif
> >> >> >>
> >> >> >>  	if (i == CRC32_ITERATIONS)
> >> >> >>  		return 0;
> >> >> >> diff --git a/lib/librte_hash/Makefile b/lib/librte_hash/Makefile
> >> >> >> index ec9f86499..f640afc42 100644
> >> >> >> --- a/lib/librte_hash/Makefile
> >> >> >> +++ b/lib/librte_hash/Makefile
> >> >> >> @@ -19,11 +19,6 @@ SRCS-$(CONFIG_RTE_LIBRTE_HASH) +=
> >> >> >rte_fbk_hash.c
> >> >> >>  # install this header file
> >> >> >>  SYMLINK-$(CONFIG_RTE_LIBRTE_HASH)-include := rte_hash.h
> >> >> >>  SYMLINK-$(CONFIG_RTE_LIBRTE_HASH)-include +=
> >> >rte_hash_crc.h
> >> >> >> -ifeq ($(CONFIG_RTE_ARCH_ARM64),y)
> >> >> >> -ifneq ($(findstring
> >RTE_MACHINE_CPUFLAG_CRC32,$(CFLAGS)),)
> >> >> >> -SYMLINK-$(CONFIG_RTE_LIBRTE_HASH)-include +=
> >> >rte_crc_arm64.h
> >> >> >> -endif
> >> >> >> -endif
> >> >> >>  SYMLINK-$(CONFIG_RTE_LIBRTE_HASH)-include +=
> >rte_jhash.h
> >> >> >>  SYMLINK-$(CONFIG_RTE_LIBRTE_HASH)-include +=
> >rte_thash.h
> >> >> >>  SYMLINK-$(CONFIG_RTE_LIBRTE_HASH)-include +=
> >> >rte_fbk_hash.h
> >> >> >> diff --git a/lib/librte_hash/crc_arm64.h
> >> >b/lib/librte_hash/crc_arm64.h
> >> >> >> new file mode 100644
> >> >> >> index 000000000..8e75f8297
> >> >> >
> >> >> >Wouldn't that break 'make  install T=...'?
> >> >>
> >> >> My bad I verified with meson and it was building fine.
> >> >>
> >> >> >As now rte_hash_crc.h includes not public headers (crc_x86.h,
> >etc.).
> >> >> >Same question about external apps, where they would get from
> >> >these
> >> >> >headers?
> >> >>
> >> >> I think in the next version we can directly have the arch specific
> >> >functions
> >> >> Implemented in rte_hash_crc.h. Since its pretty stable code and
> >> >overhead of extra
> >> >> ~120 lines.
> >> >
> >> >Ok... but why not then just leave arch specific headers, as they are
> >right
> >> >now?
> >> >What is wrong with current approach?
> >>
> >> The problem is if any application directly includes only
> >rte_crc_arm64.h
> >> (completely legal) it will break the build.
> >
> >But we can probably mark rte_crc_arm64.h as internal, and warn users
> >not to
> >include it directly (same for rte_crc_x86.h and any other arch specific
> >headers).
> 
> Yes but I think merging them would be a cleaner, number of constructors would be
> one and maybe we could select the best available algorithm on a given platform when
> application requests unsupported one.

Ok, but we can still have one constructor, and two (or more) different arch specific headers,
that would be included into main header conditionally by  #ifdef RTE_ARCH_....

> 
> As Yipeng mentioned do you thing having a indirect call instead of runtime branch be
> depreciative in terms of performance?

I think run-time branch by some global var would be much faster than indirect function call
(at least on IA).

> 
> >
> >>
> >> Example:
> >>
> >> diff --git a/lib/librte_efd/rte_efd.c b/lib/librte_efd/rte_efd.c
> >> index 6a799556d..318670940 100644
> >> --- a/lib/librte_efd/rte_efd.c
> >> +++ b/lib/librte_efd/rte_efd.c
> >> @@ -19,7 +19,7 @@
> >>  #include <rte_memcpy.h>
> >>  #include <rte_ring.h>
> >>  #include <rte_jhash.h>
> >> -#include <rte_hash_crc.h>
> >> +#include <rte_crc_arm64.h>
> >>  #include <rte_tailq.h>
> >>
> >>  #include "rte_efd.h"
> >> (END)
> >>
> >> Causes:
> >>
> >> ../lib/librte_hash/rte_crc_arm64.h: In function
> >'rte_hash_crc_set_alg':
> >> ../lib/librte_hash/rte_crc_arm64.h:77:7: error: 'CRC32_ARM64'
> >undeclared (first use in this function)
> >>    77 |  case CRC32_ARM64:
> >>       |       ^~~~~~~~~~~
> >> ../lib/librte_hash/rte_crc_arm64.h:77:7: note: each undeclared
> >identifier is reported only once for each function it appears in
> >> ../lib/librte_hash/rte_crc_arm64.h:79:10: error: 'CRC32_SW'
> >undeclared (first use in this function)
> >>    79 |    alg = CRC32_SW;
> >>       |          ^~~~~~~~
> >> ../lib/librte_hash/rte_crc_arm64.h:82:3: error: 'crc32_alg' undeclared
> >(first use in this function)
> >>    82 |   crc32_alg = alg;
> >>       |   ^~~~~~~~~
> >> ../lib/librte_hash/rte_crc_arm64.h: In function
> >'rte_hash_crc_init_alg':
> >> ../lib/librte_hash/rte_crc_arm64.h:92:23: error: 'CRC32_ARM64'
> >undeclared (first use in this function)
> >>    92 |  rte_hash_crc_set_alg(CRC32_ARM64);
> >>
> >> Thanks,
> >> Pavan.
> >>
> >>


^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [PATCH v5 2/2] cryptodev: version cryptodev info get function
  2020-05-11  8:18  4%         ` Akhil Goyal
@ 2020-05-11 11:38  4%           ` Akhil Goyal
  2020-05-11 16:09  5%           ` Ray Kinsella
  1 sibling, 0 replies; 200+ results
From: Akhil Goyal @ 2020-05-11 11:38 UTC (permalink / raw)
  To: Ray Kinsella, Arek Kusztal, dev, thomas
  Cc: fiona.trahe, ray.kinsella, bruce.richardson

Hi Ray,

I have applied the series on dpdk-next-crypto  as per your validation of ABI.

Thomas,
Please validate this series at your end before applying to master. I am not too sure on the ABI stuff.

Regards,
Akhil

> -----Original Message-----
> From: Akhil Goyal
> Sent: Monday, May 11, 2020 1:48 PM
> To: 'Ray Kinsella' <mdr@ashroe.eu>; Arek Kusztal
> <arkadiuszx.kusztal@intel.com>; dev@dpdk.org
> Cc: fiona.trahe@intel.com; ray.kinsella@intel.com; bruce.richardson@intel.com
> Subject: RE: [dpdk-dev] [PATCH v5 2/2] cryptodev: version cryptodev info get
> function
> 
> Hi Ray,
> 
> Previously, I only ran the script for the 2 patches.
> 
> ./devtools/validate-abi.sh <commit id previous to these two patches> HEAD
> 
> However when I run for v20.02 and HEAD, the list is quite big. I believe most of
> them are either experimental or internal PMD. But cryptodev is still there.
> 
> NOTICE: abi-compliance-checker returned 1
> NOTICE: ABI may be incompatible, check reports/logs for details.
> NOTICE: Incompatible list:  librte_bbdev.so librte_common_iavf.so
> librte_common_octeontx2.so librte_cryptodev.so librte_eal.so librte_efd.so
> librte_eventdev.so librte_hash.so librte_ipsec.so librte_meter.so
> librte_pdump.so librte_pmd_crypto_scheduler.so librte_pmd_dpaa2_sec.so
> librte_pmd_dpaa_sec.so librte_pmd_ring.so librte_ring.so librte_vhost.so
> 
> Regards,
> Akhil
> 
> > -----Original Message-----
> > From: Ray Kinsella <mdr@ashroe.eu>
> > Sent: Monday, May 11, 2020 1:18 PM
> > To: Akhil Goyal <akhil.goyal@nxp.com>; Arek Kusztal
> > <arkadiuszx.kusztal@intel.com>; dev@dpdk.org
> > Cc: fiona.trahe@intel.com; ray.kinsella@intel.com;
> bruce.richardson@intel.com
> > Subject: Re: [dpdk-dev] [PATCH v5 2/2] cryptodev: version cryptodev info get
> > function
> >
> > Hi Akhil,
> >
> > So 1st thing is that this that validate-abi uses "ABI Compliance Checker",
> > which does not use libabigail.ignore.
> >
> > So you will end up with different results compared to using libabigail as follows:
> >
> > DPDK_ABI_REF_DIR=<some absolute path>
> > DPDK_ABI_REF_VERSION=v20.02 ./devtools/test-meson-builds.sh
> >
> > I did check with the "ABI Compliance Checker" (I like this tool also), however I
> > got the following
> >
> > NOTICE: No error detected, ABI is compatible.
> > INFO: Logs are in /root/src/dpdk/abi-check/abi-check.log
> > INFO: HTML reports are in /root/src/dpdk/abi-check/compat_reports
> directory
> >
> > What references did you use with validate-abi.sh (I used v20.02 and HEAD).
> >
> > Ray K
> >
> > On 09/05/2020 22:11, Akhil Goyal wrote:
> > > Hi Ray/Arek,
> > >
> > > I still see Incompatible cryptodev even after update in the abignore list.
> > > I checked it with ./devtools/validate-abi.sh
> > > NOTICE: ABI may be incompatible, check reports/logs for details.
> > > NOTICE: Incompatible list:  librte_cryptodev.so
> > >
> > > Did I miss something?
> > >
> > >
> > >>
> > >> On 07/05/2020 11:57, Arek Kusztal wrote:
> > >>> This patch adds versioned function rte_cryptodev_info_get()
> > >>> to prevent some issues with ABI policy.
> > >>> Node v21 works in same way as before, returning driver capabilities
> > >>> directly to the API caller. These capabilities may include new elements
> > >>> not part of the v20 ABI.
> > >>> Node v20 function maintains compatibility with v20 ABI releases
> > >>> by stripping out elements not supported in v20 ABI. Because
> > >>> rte_cryptodev_info_get is called by other API functions,
> > >>> rte_cryptodev_sym_capability_get function is versioned the same way.
> > >>>
> > >>> Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
> > >>> ---
> > >>> v2:
> > >>> - changed version numbers of symbols to 20.0.2
> > >>> v3:
> > >>> - added v2/v3 informations
> > >>> - changed version numbers of symbols to 21
> > >>> v4:
> > >>> - fixed clang build by movind binding default symbol
> > >>> - implemented mailing list comments
> > >>> - added abidiff tool suppression entries
> > >>> v5:
> > >>> - fixed meson build
> > >>>
> > >>>  devtools/libabigail.abignore                   |   8 ++
> > >>>  lib/librte_cryptodev/meson.build               |   1 +
> > >>>  lib/librte_cryptodev/rte_cryptodev.c           | 147
> > >> ++++++++++++++++++++++++-
> > >>>  lib/librte_cryptodev/rte_cryptodev.h           |  34 +++++-
> > >>>  lib/librte_cryptodev/rte_cryptodev_version.map |   7 ++
> > >>>  5 files changed, 191 insertions(+), 6 deletions(-)
> > >>>
> > >> [SNIP]
> > >>
> > >> Acked-by: Ray Kinsella <mdr@ashroe.eu>

^ permalink raw reply	[relevance 4%]

* Re: [dpdk-dev] [RFC] hash: unify crc32 API header for x86 and ARM
  2020-05-11 10:27  0%         ` Ananyev, Konstantin
@ 2020-05-11 10:57  0%           ` Pavan Nikhilesh Bhagavatula
  2020-05-11 12:10  0%             ` Ananyev, Konstantin
  0 siblings, 1 reply; 200+ results
From: Pavan Nikhilesh Bhagavatula @ 2020-05-11 10:57 UTC (permalink / raw)
  To: Ananyev, Konstantin, Jerin Jacob Kollanukkaran, thomas, Wang,
	Yipeng1, Gobriel, Sameh, Richardson, Bruce, Ruifeng Wang
  Cc: dev

>> >> >> From: Pavan Nikhilesh <pbhagavatula@marvell.com>
>> >> >>
>> >> >> Merge crc32 hash calculation public API headers for x86 and
>ARM,
>> >> >> split implementations of x86 and ARM into their respective
>private
>> >> >> headers.
>> >> >> This reduces the ifdef code clutter while keeping current ABI
>> >intact.
>> >> >>
>> >> >> Although we install `rte_crc_arm64.h` it is not used in any of the
>lib
>> >or
>> >> >> drivers layers. All the libs and drivers use `rte_hash_crc.h` which
>> >falls
>> >> >> back to SW crc32 calculation for ARM platform.
>> >> >>
>> >> >> Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
>> >> >> ---
>> >> >>
>> >> >>  Currently, if application incorrectly sets CRC32_ARM64 as crc32
>> >> >algorithm
>> >> >>  through `rte_hash_crc_set_alg()` on x86 or vice-versa we
>fallback
>> >to
>> >> >algorithm
>> >> >>  set previously via `rte_hash_crc_set_alg()` instead of setting
>the
>> >best
>> >> >>  available.
>> >> >>  This behaviour should probably change to setting the best
>> >available
>> >> >algorithm
>> >> >>  and is up for discussion.
>> >> >>
>> >> >>  app/test/test_hash.c            |   6 +
>> >> >>  lib/librte_hash/Makefile        |   5 -
>> >> >>  lib/librte_hash/crc_arm64.h     |  67 +++++++++++
>> >> >>  lib/librte_hash/crc_x86.h       |  68 +++++++++++
>> >> >>  lib/librte_hash/meson.build     |   3 +-
>> >> >>  lib/librte_hash/rte_crc_arm64.h | 183 ------------------------------
>> >> >>  lib/librte_hash/rte_hash_crc.h  | 193 +++++++++++++-----------
>---
>> >----
>> >> >-
>> >> >>  7 files changed, 219 insertions(+), 306 deletions(-)
>> >> >>  create mode 100644 lib/librte_hash/crc_arm64.h
>> >> >>  create mode 100644 lib/librte_hash/crc_x86.h
>> >> >>  delete mode 100644 lib/librte_hash/rte_crc_arm64.h
>> >> >>
>> >> >> diff --git a/app/test/test_hash.c b/app/test/test_hash.c
>> >> >> index afa3a1a3c..7bd457dac 100644
>> >> >> --- a/app/test/test_hash.c
>> >> >> +++ b/app/test/test_hash.c
>> >> >> @@ -195,7 +195,13 @@ test_crc32_hash_alg_equiv(void)
>> >> >>  	}
>> >> >>
>> >> >>  	/* Resetting to best available algorithm */
>> >> >> +#if defined RTE_ARCH_X86
>> >> >>  	rte_hash_crc_set_alg(CRC32_SSE42_x64);
>> >> >> +#elif defined RTE_ARCH_ARM64
>> >> >> +	rte_hash_crc_set_alg(CRC32_ARM64);
>> >> >> +#else
>> >> >> +	rte_hash_crc_set_alg(CRC32_SW);
>> >> >> +#endif
>> >> >>
>> >> >>  	if (i == CRC32_ITERATIONS)
>> >> >>  		return 0;
>> >> >> diff --git a/lib/librte_hash/Makefile b/lib/librte_hash/Makefile
>> >> >> index ec9f86499..f640afc42 100644
>> >> >> --- a/lib/librte_hash/Makefile
>> >> >> +++ b/lib/librte_hash/Makefile
>> >> >> @@ -19,11 +19,6 @@ SRCS-$(CONFIG_RTE_LIBRTE_HASH) +=
>> >> >rte_fbk_hash.c
>> >> >>  # install this header file
>> >> >>  SYMLINK-$(CONFIG_RTE_LIBRTE_HASH)-include := rte_hash.h
>> >> >>  SYMLINK-$(CONFIG_RTE_LIBRTE_HASH)-include +=
>> >rte_hash_crc.h
>> >> >> -ifeq ($(CONFIG_RTE_ARCH_ARM64),y)
>> >> >> -ifneq ($(findstring
>RTE_MACHINE_CPUFLAG_CRC32,$(CFLAGS)),)
>> >> >> -SYMLINK-$(CONFIG_RTE_LIBRTE_HASH)-include +=
>> >rte_crc_arm64.h
>> >> >> -endif
>> >> >> -endif
>> >> >>  SYMLINK-$(CONFIG_RTE_LIBRTE_HASH)-include +=
>rte_jhash.h
>> >> >>  SYMLINK-$(CONFIG_RTE_LIBRTE_HASH)-include +=
>rte_thash.h
>> >> >>  SYMLINK-$(CONFIG_RTE_LIBRTE_HASH)-include +=
>> >rte_fbk_hash.h
>> >> >> diff --git a/lib/librte_hash/crc_arm64.h
>> >b/lib/librte_hash/crc_arm64.h
>> >> >> new file mode 100644
>> >> >> index 000000000..8e75f8297
>> >> >
>> >> >Wouldn't that break 'make  install T=...'?
>> >>
>> >> My bad I verified with meson and it was building fine.
>> >>
>> >> >As now rte_hash_crc.h includes not public headers (crc_x86.h,
>etc.).
>> >> >Same question about external apps, where they would get from
>> >these
>> >> >headers?
>> >>
>> >> I think in the next version we can directly have the arch specific
>> >functions
>> >> Implemented in rte_hash_crc.h. Since its pretty stable code and
>> >overhead of extra
>> >> ~120 lines.
>> >
>> >Ok... but why not then just leave arch specific headers, as they are
>right
>> >now?
>> >What is wrong with current approach?
>>
>> The problem is if any application directly includes only
>rte_crc_arm64.h
>> (completely legal) it will break the build.
>
>But we can probably mark rte_crc_arm64.h as internal, and warn users
>not to
>include it directly (same for rte_crc_x86.h and any other arch specific
>headers).

Yes but I think merging them would be a cleaner, number of constructors would be 
one and maybe we could select the best available algorithm on a given platform when 
application requests unsupported one.

As Yipeng mentioned do you thing having a indirect call instead of runtime branch be 
depreciative in terms of performance?

>
>>
>> Example:
>>
>> diff --git a/lib/librte_efd/rte_efd.c b/lib/librte_efd/rte_efd.c
>> index 6a799556d..318670940 100644
>> --- a/lib/librte_efd/rte_efd.c
>> +++ b/lib/librte_efd/rte_efd.c
>> @@ -19,7 +19,7 @@
>>  #include <rte_memcpy.h>
>>  #include <rte_ring.h>
>>  #include <rte_jhash.h>
>> -#include <rte_hash_crc.h>
>> +#include <rte_crc_arm64.h>
>>  #include <rte_tailq.h>
>>
>>  #include "rte_efd.h"
>> (END)
>>
>> Causes:
>>
>> ../lib/librte_hash/rte_crc_arm64.h: In function
>'rte_hash_crc_set_alg':
>> ../lib/librte_hash/rte_crc_arm64.h:77:7: error: 'CRC32_ARM64'
>undeclared (first use in this function)
>>    77 |  case CRC32_ARM64:
>>       |       ^~~~~~~~~~~
>> ../lib/librte_hash/rte_crc_arm64.h:77:7: note: each undeclared
>identifier is reported only once for each function it appears in
>> ../lib/librte_hash/rte_crc_arm64.h:79:10: error: 'CRC32_SW'
>undeclared (first use in this function)
>>    79 |    alg = CRC32_SW;
>>       |          ^~~~~~~~
>> ../lib/librte_hash/rte_crc_arm64.h:82:3: error: 'crc32_alg' undeclared
>(first use in this function)
>>    82 |   crc32_alg = alg;
>>       |   ^~~~~~~~~
>> ../lib/librte_hash/rte_crc_arm64.h: In function
>'rte_hash_crc_init_alg':
>> ../lib/librte_hash/rte_crc_arm64.h:92:23: error: 'CRC32_ARM64'
>undeclared (first use in this function)
>>    92 |  rte_hash_crc_set_alg(CRC32_ARM64);
>>
>> Thanks,
>> Pavan.
>>
>>


^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [RFC] hash: unify crc32 API header for x86 and ARM
  2020-05-11 10:23  0%       ` Pavan Nikhilesh Bhagavatula
@ 2020-05-11 10:27  0%         ` Ananyev, Konstantin
  2020-05-11 10:57  0%           ` Pavan Nikhilesh Bhagavatula
  0 siblings, 1 reply; 200+ results
From: Ananyev, Konstantin @ 2020-05-11 10:27 UTC (permalink / raw)
  To: Pavan Nikhilesh Bhagavatula, Jerin Jacob Kollanukkaran, thomas,
	Wang, Yipeng1, Gobriel, Sameh, Richardson, Bruce, Ruifeng Wang
  Cc: dev


> 
> >> >> From: Pavan Nikhilesh <pbhagavatula@marvell.com>
> >> >>
> >> >> Merge crc32 hash calculation public API headers for x86 and ARM,
> >> >> split implementations of x86 and ARM into their respective private
> >> >> headers.
> >> >> This reduces the ifdef code clutter while keeping current ABI
> >intact.
> >> >>
> >> >> Although we install `rte_crc_arm64.h` it is not used in any of the lib
> >or
> >> >> drivers layers. All the libs and drivers use `rte_hash_crc.h` which
> >falls
> >> >> back to SW crc32 calculation for ARM platform.
> >> >>
> >> >> Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
> >> >> ---
> >> >>
> >> >>  Currently, if application incorrectly sets CRC32_ARM64 as crc32
> >> >algorithm
> >> >>  through `rte_hash_crc_set_alg()` on x86 or vice-versa we fallback
> >to
> >> >algorithm
> >> >>  set previously via `rte_hash_crc_set_alg()` instead of setting the
> >best
> >> >>  available.
> >> >>  This behaviour should probably change to setting the best
> >available
> >> >algorithm
> >> >>  and is up for discussion.
> >> >>
> >> >>  app/test/test_hash.c            |   6 +
> >> >>  lib/librte_hash/Makefile        |   5 -
> >> >>  lib/librte_hash/crc_arm64.h     |  67 +++++++++++
> >> >>  lib/librte_hash/crc_x86.h       |  68 +++++++++++
> >> >>  lib/librte_hash/meson.build     |   3 +-
> >> >>  lib/librte_hash/rte_crc_arm64.h | 183 ------------------------------
> >> >>  lib/librte_hash/rte_hash_crc.h  | 193 +++++++++++++--------------
> >----
> >> >-
> >> >>  7 files changed, 219 insertions(+), 306 deletions(-)
> >> >>  create mode 100644 lib/librte_hash/crc_arm64.h
> >> >>  create mode 100644 lib/librte_hash/crc_x86.h
> >> >>  delete mode 100644 lib/librte_hash/rte_crc_arm64.h
> >> >>
> >> >> diff --git a/app/test/test_hash.c b/app/test/test_hash.c
> >> >> index afa3a1a3c..7bd457dac 100644
> >> >> --- a/app/test/test_hash.c
> >> >> +++ b/app/test/test_hash.c
> >> >> @@ -195,7 +195,13 @@ test_crc32_hash_alg_equiv(void)
> >> >>  	}
> >> >>
> >> >>  	/* Resetting to best available algorithm */
> >> >> +#if defined RTE_ARCH_X86
> >> >>  	rte_hash_crc_set_alg(CRC32_SSE42_x64);
> >> >> +#elif defined RTE_ARCH_ARM64
> >> >> +	rte_hash_crc_set_alg(CRC32_ARM64);
> >> >> +#else
> >> >> +	rte_hash_crc_set_alg(CRC32_SW);
> >> >> +#endif
> >> >>
> >> >>  	if (i == CRC32_ITERATIONS)
> >> >>  		return 0;
> >> >> diff --git a/lib/librte_hash/Makefile b/lib/librte_hash/Makefile
> >> >> index ec9f86499..f640afc42 100644
> >> >> --- a/lib/librte_hash/Makefile
> >> >> +++ b/lib/librte_hash/Makefile
> >> >> @@ -19,11 +19,6 @@ SRCS-$(CONFIG_RTE_LIBRTE_HASH) +=
> >> >rte_fbk_hash.c
> >> >>  # install this header file
> >> >>  SYMLINK-$(CONFIG_RTE_LIBRTE_HASH)-include := rte_hash.h
> >> >>  SYMLINK-$(CONFIG_RTE_LIBRTE_HASH)-include +=
> >rte_hash_crc.h
> >> >> -ifeq ($(CONFIG_RTE_ARCH_ARM64),y)
> >> >> -ifneq ($(findstring RTE_MACHINE_CPUFLAG_CRC32,$(CFLAGS)),)
> >> >> -SYMLINK-$(CONFIG_RTE_LIBRTE_HASH)-include +=
> >rte_crc_arm64.h
> >> >> -endif
> >> >> -endif
> >> >>  SYMLINK-$(CONFIG_RTE_LIBRTE_HASH)-include += rte_jhash.h
> >> >>  SYMLINK-$(CONFIG_RTE_LIBRTE_HASH)-include += rte_thash.h
> >> >>  SYMLINK-$(CONFIG_RTE_LIBRTE_HASH)-include +=
> >rte_fbk_hash.h
> >> >> diff --git a/lib/librte_hash/crc_arm64.h
> >b/lib/librte_hash/crc_arm64.h
> >> >> new file mode 100644
> >> >> index 000000000..8e75f8297
> >> >
> >> >Wouldn't that break 'make  install T=...'?
> >>
> >> My bad I verified with meson and it was building fine.
> >>
> >> >As now rte_hash_crc.h includes not public headers (crc_x86.h, etc.).
> >> >Same question about external apps, where they would get from
> >these
> >> >headers?
> >>
> >> I think in the next version we can directly have the arch specific
> >functions
> >> Implemented in rte_hash_crc.h. Since its pretty stable code and
> >overhead of extra
> >> ~120 lines.
> >
> >Ok... but why not then just leave arch specific headers, as they are right
> >now?
> >What is wrong with current approach?
> 
> The problem is if any application directly includes only rte_crc_arm64.h
> (completely legal) it will break the build.

But we can probably mark rte_crc_arm64.h as internal, and warn users not to
include it directly (same for rte_crc_x86.h and any other arch specific headers). 

> 
> Example:
> 
> diff --git a/lib/librte_efd/rte_efd.c b/lib/librte_efd/rte_efd.c
> index 6a799556d..318670940 100644
> --- a/lib/librte_efd/rte_efd.c
> +++ b/lib/librte_efd/rte_efd.c
> @@ -19,7 +19,7 @@
>  #include <rte_memcpy.h>
>  #include <rte_ring.h>
>  #include <rte_jhash.h>
> -#include <rte_hash_crc.h>
> +#include <rte_crc_arm64.h>
>  #include <rte_tailq.h>
> 
>  #include "rte_efd.h"
> (END)
> 
> Causes:
> 
> ../lib/librte_hash/rte_crc_arm64.h: In function 'rte_hash_crc_set_alg':
> ../lib/librte_hash/rte_crc_arm64.h:77:7: error: 'CRC32_ARM64' undeclared (first use in this function)
>    77 |  case CRC32_ARM64:
>       |       ^~~~~~~~~~~
> ../lib/librte_hash/rte_crc_arm64.h:77:7: note: each undeclared identifier is reported only once for each function it appears in
> ../lib/librte_hash/rte_crc_arm64.h:79:10: error: 'CRC32_SW' undeclared (first use in this function)
>    79 |    alg = CRC32_SW;
>       |          ^~~~~~~~
> ../lib/librte_hash/rte_crc_arm64.h:82:3: error: 'crc32_alg' undeclared (first use in this function)
>    82 |   crc32_alg = alg;
>       |   ^~~~~~~~~
> ../lib/librte_hash/rte_crc_arm64.h: In function 'rte_hash_crc_init_alg':
> ../lib/librte_hash/rte_crc_arm64.h:92:23: error: 'CRC32_ARM64' undeclared (first use in this function)
>    92 |  rte_hash_crc_set_alg(CRC32_ARM64);
> 
> Thanks,
> Pavan.
> 
> 


^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [RFC] hash: unify crc32 API header for x86 and ARM
  2020-05-11  9:46  0%     ` Ananyev, Konstantin
@ 2020-05-11 10:23  0%       ` Pavan Nikhilesh Bhagavatula
  2020-05-11 10:27  0%         ` Ananyev, Konstantin
  0 siblings, 1 reply; 200+ results
From: Pavan Nikhilesh Bhagavatula @ 2020-05-11 10:23 UTC (permalink / raw)
  To: Ananyev, Konstantin, Jerin Jacob Kollanukkaran, thomas, Wang,
	Yipeng1, Gobriel, Sameh, Richardson, Bruce, Ruifeng Wang
  Cc: dev

>> >> From: Pavan Nikhilesh <pbhagavatula@marvell.com>
>> >>
>> >> Merge crc32 hash calculation public API headers for x86 and ARM,
>> >> split implementations of x86 and ARM into their respective private
>> >> headers.
>> >> This reduces the ifdef code clutter while keeping current ABI
>intact.
>> >>
>> >> Although we install `rte_crc_arm64.h` it is not used in any of the lib
>or
>> >> drivers layers. All the libs and drivers use `rte_hash_crc.h` which
>falls
>> >> back to SW crc32 calculation for ARM platform.
>> >>
>> >> Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
>> >> ---
>> >>
>> >>  Currently, if application incorrectly sets CRC32_ARM64 as crc32
>> >algorithm
>> >>  through `rte_hash_crc_set_alg()` on x86 or vice-versa we fallback
>to
>> >algorithm
>> >>  set previously via `rte_hash_crc_set_alg()` instead of setting the
>best
>> >>  available.
>> >>  This behaviour should probably change to setting the best
>available
>> >algorithm
>> >>  and is up for discussion.
>> >>
>> >>  app/test/test_hash.c            |   6 +
>> >>  lib/librte_hash/Makefile        |   5 -
>> >>  lib/librte_hash/crc_arm64.h     |  67 +++++++++++
>> >>  lib/librte_hash/crc_x86.h       |  68 +++++++++++
>> >>  lib/librte_hash/meson.build     |   3 +-
>> >>  lib/librte_hash/rte_crc_arm64.h | 183 ------------------------------
>> >>  lib/librte_hash/rte_hash_crc.h  | 193 +++++++++++++--------------
>----
>> >-
>> >>  7 files changed, 219 insertions(+), 306 deletions(-)
>> >>  create mode 100644 lib/librte_hash/crc_arm64.h
>> >>  create mode 100644 lib/librte_hash/crc_x86.h
>> >>  delete mode 100644 lib/librte_hash/rte_crc_arm64.h
>> >>
>> >> diff --git a/app/test/test_hash.c b/app/test/test_hash.c
>> >> index afa3a1a3c..7bd457dac 100644
>> >> --- a/app/test/test_hash.c
>> >> +++ b/app/test/test_hash.c
>> >> @@ -195,7 +195,13 @@ test_crc32_hash_alg_equiv(void)
>> >>  	}
>> >>
>> >>  	/* Resetting to best available algorithm */
>> >> +#if defined RTE_ARCH_X86
>> >>  	rte_hash_crc_set_alg(CRC32_SSE42_x64);
>> >> +#elif defined RTE_ARCH_ARM64
>> >> +	rte_hash_crc_set_alg(CRC32_ARM64);
>> >> +#else
>> >> +	rte_hash_crc_set_alg(CRC32_SW);
>> >> +#endif
>> >>
>> >>  	if (i == CRC32_ITERATIONS)
>> >>  		return 0;
>> >> diff --git a/lib/librte_hash/Makefile b/lib/librte_hash/Makefile
>> >> index ec9f86499..f640afc42 100644
>> >> --- a/lib/librte_hash/Makefile
>> >> +++ b/lib/librte_hash/Makefile
>> >> @@ -19,11 +19,6 @@ SRCS-$(CONFIG_RTE_LIBRTE_HASH) +=
>> >rte_fbk_hash.c
>> >>  # install this header file
>> >>  SYMLINK-$(CONFIG_RTE_LIBRTE_HASH)-include := rte_hash.h
>> >>  SYMLINK-$(CONFIG_RTE_LIBRTE_HASH)-include +=
>rte_hash_crc.h
>> >> -ifeq ($(CONFIG_RTE_ARCH_ARM64),y)
>> >> -ifneq ($(findstring RTE_MACHINE_CPUFLAG_CRC32,$(CFLAGS)),)
>> >> -SYMLINK-$(CONFIG_RTE_LIBRTE_HASH)-include +=
>rte_crc_arm64.h
>> >> -endif
>> >> -endif
>> >>  SYMLINK-$(CONFIG_RTE_LIBRTE_HASH)-include += rte_jhash.h
>> >>  SYMLINK-$(CONFIG_RTE_LIBRTE_HASH)-include += rte_thash.h
>> >>  SYMLINK-$(CONFIG_RTE_LIBRTE_HASH)-include +=
>rte_fbk_hash.h
>> >> diff --git a/lib/librte_hash/crc_arm64.h
>b/lib/librte_hash/crc_arm64.h
>> >> new file mode 100644
>> >> index 000000000..8e75f8297
>> >
>> >Wouldn't that break 'make  install T=...'?
>>
>> My bad I verified with meson and it was building fine.
>>
>> >As now rte_hash_crc.h includes not public headers (crc_x86.h, etc.).
>> >Same question about external apps, where they would get from
>these
>> >headers?
>>
>> I think in the next version we can directly have the arch specific
>functions
>> Implemented in rte_hash_crc.h. Since its pretty stable code and
>overhead of extra
>> ~120 lines.
>
>Ok... but why not then just leave arch specific headers, as they are right
>now?
>What is wrong with current approach?

The problem is if any application directly includes only rte_crc_arm64.h 
(completely legal) it will break the build.

Example:

diff --git a/lib/librte_efd/rte_efd.c b/lib/librte_efd/rte_efd.c
index 6a799556d..318670940 100644
--- a/lib/librte_efd/rte_efd.c
+++ b/lib/librte_efd/rte_efd.c
@@ -19,7 +19,7 @@
 #include <rte_memcpy.h>
 #include <rte_ring.h>
 #include <rte_jhash.h>
-#include <rte_hash_crc.h>
+#include <rte_crc_arm64.h>
 #include <rte_tailq.h>

 #include "rte_efd.h"
(END)

Causes:

../lib/librte_hash/rte_crc_arm64.h: In function 'rte_hash_crc_set_alg':
../lib/librte_hash/rte_crc_arm64.h:77:7: error: 'CRC32_ARM64' undeclared (first use in this function)
   77 |  case CRC32_ARM64:
      |       ^~~~~~~~~~~
../lib/librte_hash/rte_crc_arm64.h:77:7: note: each undeclared identifier is reported only once for each function it appears in
../lib/librte_hash/rte_crc_arm64.h:79:10: error: 'CRC32_SW' undeclared (first use in this function)
   79 |    alg = CRC32_SW;
      |          ^~~~~~~~
../lib/librte_hash/rte_crc_arm64.h:82:3: error: 'crc32_alg' undeclared (first use in this function)
   82 |   crc32_alg = alg;
      |   ^~~~~~~~~
../lib/librte_hash/rte_crc_arm64.h: In function 'rte_hash_crc_init_alg':
../lib/librte_hash/rte_crc_arm64.h:92:23: error: 'CRC32_ARM64' undeclared (first use in this function)
   92 |  rte_hash_crc_set_alg(CRC32_ARM64);

Thanks,
Pavan.




^ permalink raw reply	[relevance 0%]

* [dpdk-dev] [PATCH 2/2] mempool/octeontx2: move internal symbols to INTERNAL section
  2020-05-11 10:00  3% [dpdk-dev] [PATCH 1/2] common/octeontx2: move internal symbols to INTERNAL section pbhagavatula
@ 2020-05-11 10:00  3% ` pbhagavatula
  2020-05-11 14:45  0% ` [dpdk-dev] [PATCH 1/2] common/octeontx2: " Thomas Monjalon
  2020-05-13  1:04  3% ` [dpdk-dev] [PATCH v2 " pbhagavatula
  2 siblings, 0 replies; 200+ results
From: pbhagavatula @ 2020-05-11 10:00 UTC (permalink / raw)
  To: jerinj, Nithin Dabilpuram, Ray Kinsella, Neil Horman
  Cc: thomas, dev, Pavan Nikhilesh

From: Pavan Nikhilesh <pbhagavatula@marvell.com>

Move the internal symbols to INTERNAL sections so that any
change in them is not reported as ABI breakage.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
 drivers/mempool/octeontx2/otx2_mempool.h                    | 2 ++
 drivers/mempool/octeontx2/rte_mempool_octeontx2_version.map | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/mempool/octeontx2/otx2_mempool.h b/drivers/mempool/octeontx2/otx2_mempool.h
index adcc0db24..8aa548248 100644
--- a/drivers/mempool/octeontx2/otx2_mempool.h
+++ b/drivers/mempool/octeontx2/otx2_mempool.h
@@ -206,7 +206,9 @@ npa_lf_aura_op_range_set(uint64_t aura_handle, uint64_t start_iova,
 }
 
 /* NPA LF */
+__rte_internal
 int otx2_npa_lf_init(struct rte_pci_device *pci_dev, void *otx2_dev);
+__rte_internal
 int otx2_npa_lf_fini(void);
 
 /* IRQ */
diff --git a/drivers/mempool/octeontx2/rte_mempool_octeontx2_version.map b/drivers/mempool/octeontx2/rte_mempool_octeontx2_version.map
index d4f81aed8..e6887ceb8 100644
--- a/drivers/mempool/octeontx2/rte_mempool_octeontx2_version.map
+++ b/drivers/mempool/octeontx2/rte_mempool_octeontx2_version.map
@@ -1,4 +1,4 @@
-DPDK_20.0 {
+INTERNAL {
 	global:
 
 	otx2_npa_lf_fini;
-- 
2.17.1


^ permalink raw reply	[relevance 3%]

* [dpdk-dev] [PATCH 1/2] common/octeontx2: move internal symbols to INTERNAL section
@ 2020-05-11 10:00  3% pbhagavatula
  2020-05-11 10:00  3% ` [dpdk-dev] [PATCH 2/2] mempool/octeontx2: " pbhagavatula
                   ` (2 more replies)
  0 siblings, 3 replies; 200+ results
From: pbhagavatula @ 2020-05-11 10:00 UTC (permalink / raw)
  To: jerinj, Nithin Dabilpuram, Anoob Joseph, Ray Kinsella, Neil Horman
  Cc: thomas, dev, Pavan Nikhilesh

From: Pavan Nikhilesh <pbhagavatula@marvell.com>

Move the internal symbols to INTERNAL sections so that any
change in them is not reported as ABI breakage.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
 drivers/common/octeontx2/otx2_common.h           |  8 ++++++++
 drivers/common/octeontx2/otx2_dev.h              |  3 +++
 drivers/common/octeontx2/otx2_irq.h              |  3 +++
 drivers/common/octeontx2/otx2_mbox.h             |  6 ++++++
 drivers/common/octeontx2/otx2_sec_idev.h         |  6 ++++++
 .../octeontx2/rte_common_octeontx2_version.map   | 16 +++-------------
 6 files changed, 29 insertions(+), 13 deletions(-)

diff --git a/drivers/common/octeontx2/otx2_common.h b/drivers/common/octeontx2/otx2_common.h
index e62cdea07..174702687 100644
--- a/drivers/common/octeontx2/otx2_common.h
+++ b/drivers/common/octeontx2/otx2_common.h
@@ -62,13 +62,21 @@ struct otx2_idev_cfg {
 	};
 };
 
+__rte_internal
 struct otx2_idev_cfg *otx2_intra_dev_get_cfg(void);
+__rte_internal
 void otx2_sso_pf_func_set(uint16_t sso_pf_func);
+__rte_internal
 uint16_t otx2_sso_pf_func_get(void);
+__rte_internal
 uint16_t otx2_npa_pf_func_get(void);
+__rte_internal
 struct otx2_npa_lf *otx2_npa_lf_obj_get(void);
+__rte_internal
 void otx2_npa_set_defaults(struct otx2_idev_cfg *idev);
+__rte_internal
 int otx2_npa_lf_active(void *dev);
+__rte_internal
 int otx2_npa_lf_obj_ref(void);
 
 /* Log */
diff --git a/drivers/common/octeontx2/otx2_dev.h b/drivers/common/octeontx2/otx2_dev.h
index 13b75e118..cd4fe517d 100644
--- a/drivers/common/octeontx2/otx2_dev.h
+++ b/drivers/common/octeontx2/otx2_dev.h
@@ -94,6 +94,7 @@ struct otx2_dev {
 	OTX2_DEV;
 };
 
+__rte_internal
 int otx2_dev_priv_init(struct rte_pci_device *pci_dev, void *otx2_dev);
 
 /* Common dev init and fini routines */
@@ -116,7 +117,9 @@ otx2_dev_init(struct rte_pci_device *pci_dev, void *otx2_dev)
 	return otx2_dev_priv_init(pci_dev, otx2_dev);
 }
 
+__rte_internal
 void otx2_dev_fini(struct rte_pci_device *pci_dev, void *otx2_dev);
+__rte_internal
 int otx2_dev_active_vfs(void *otx2_dev);
 
 #define RVU_PFVF_PF_SHIFT	10
diff --git a/drivers/common/octeontx2/otx2_irq.h b/drivers/common/octeontx2/otx2_irq.h
index 9d326276e..0683cf554 100644
--- a/drivers/common/octeontx2/otx2_irq.h
+++ b/drivers/common/octeontx2/otx2_irq.h
@@ -16,10 +16,13 @@ typedef struct {
 	uint64_t bits[MAX_VFPF_DWORD_BITS];
 } otx2_intr_t;
 
+__rte_internal
 int otx2_register_irq(struct rte_intr_handle *intr_handle,
 		      rte_intr_callback_fn cb, void *data, unsigned int vec);
+__rte_internal
 void otx2_unregister_irq(struct rte_intr_handle *intr_handle,
 			 rte_intr_callback_fn cb, void *data, unsigned int vec);
+__rte_internal
 int otx2_disable_irqs(struct rte_intr_handle *intr_handle);
 
 #endif /* _OTX2_IRQ_H_ */
diff --git a/drivers/common/octeontx2/otx2_mbox.h b/drivers/common/octeontx2/otx2_mbox.h
index 5351deaf2..8af8ada05 100644
--- a/drivers/common/octeontx2/otx2_mbox.h
+++ b/drivers/common/octeontx2/otx2_mbox.h
@@ -1582,19 +1582,25 @@ struct tim_enable_rsp {
 	uint32_t __otx2_io currentbucket;
 };
 
+__rte_internal
 const char *otx2_mbox_id2name(uint16_t id);
 int otx2_mbox_id2size(uint16_t id);
 void otx2_mbox_reset(struct otx2_mbox *mbox, int devid);
 int otx2_mbox_init(struct otx2_mbox *mbox, uintptr_t hwbase, uintptr_t reg_base,
 		   int direction, int ndevsi, uint64_t intr_offset);
 void otx2_mbox_fini(struct otx2_mbox *mbox);
+__rte_internal
 void otx2_mbox_msg_send(struct otx2_mbox *mbox, int devid);
+__rte_internal
 int otx2_mbox_wait_for_rsp(struct otx2_mbox *mbox, int devid);
 int otx2_mbox_wait_for_rsp_tmo(struct otx2_mbox *mbox, int devid, uint32_t tmo);
+__rte_internal
 int otx2_mbox_get_rsp(struct otx2_mbox *mbox, int devid, void **msg);
+__rte_internal
 int otx2_mbox_get_rsp_tmo(struct otx2_mbox *mbox, int devid, void **msg,
 			  uint32_t tmo);
 int otx2_mbox_get_availmem(struct otx2_mbox *mbox, int devid);
+__rte_internal
 struct mbox_msghdr *otx2_mbox_alloc_msg_rsp(struct otx2_mbox *mbox, int devid,
 					    int size, int size_rsp);
 
diff --git a/drivers/common/octeontx2/otx2_sec_idev.h b/drivers/common/octeontx2/otx2_sec_idev.h
index c681f5094..89cdaf66a 100644
--- a/drivers/common/octeontx2/otx2_sec_idev.h
+++ b/drivers/common/octeontx2/otx2_sec_idev.h
@@ -22,16 +22,22 @@ struct otx2_sec_idev_cfg {
 	rte_spinlock_t tx_cpt_lock;
 };
 
+__rte_internal
 uint8_t otx2_eth_dev_is_sec_capable(struct rte_eth_dev *eth_dev);
 
+__rte_internal
 int otx2_sec_idev_cfg_init(int port_id);
 
+__rte_internal
 int otx2_sec_idev_tx_cpt_qp_add(uint16_t port_id, struct otx2_cpt_qp *qp);
 
+__rte_internal
 int otx2_sec_idev_tx_cpt_qp_remove(struct otx2_cpt_qp *qp);
 
+__rte_internal
 int otx2_sec_idev_tx_cpt_qp_put(struct otx2_cpt_qp *qp);
 
+__rte_internal
 int otx2_sec_idev_tx_cpt_qp_get(uint16_t port_id, struct otx2_cpt_qp **qp);
 
 #endif /* _OTX2_SEC_IDEV_H_ */
diff --git a/drivers/common/octeontx2/rte_common_octeontx2_version.map b/drivers/common/octeontx2/rte_common_octeontx2_version.map
index 01279c339..94af2ed69 100644
--- a/drivers/common/octeontx2/rte_common_octeontx2_version.map
+++ b/drivers/common/octeontx2/rte_common_octeontx2_version.map
@@ -1,4 +1,4 @@
-DPDK_20.0 {
+INTERNAL {
 	global:
 
 	otx2_dev_active_vfs;
@@ -30,23 +30,13 @@ DPDK_20.0 {
 	otx2_sso_pf_func_get;
 	otx2_sso_pf_func_set;
 	otx2_unregister_irq;
-
-	local: *;
-};
-
-DPDK_21 {
-	global:
-
 	otx2_eth_dev_is_sec_capable;
 	otx2_sec_idev_cfg_init;
 	otx2_sec_idev_tx_cpt_qp_add;
 	otx2_sec_idev_tx_cpt_qp_remove;
 	otx2_sec_idev_tx_cpt_qp_get;
 	otx2_sec_idev_tx_cpt_qp_put;
-} DPDK_20.0;
-
-EXPERIMENTAL {
-	global:
-
 	otx2_logtype_ep;
+
+	local: *;
 };
-- 
2.17.1


^ permalink raw reply	[relevance 3%]

* Re: [dpdk-dev] [RFC] hash: unify crc32 API header for x86 and ARM
  2020-05-10 22:53  0%   ` Pavan Nikhilesh Bhagavatula
@ 2020-05-11  9:46  0%     ` Ananyev, Konstantin
  2020-05-11 10:23  0%       ` Pavan Nikhilesh Bhagavatula
  0 siblings, 1 reply; 200+ results
From: Ananyev, Konstantin @ 2020-05-11  9:46 UTC (permalink / raw)
  To: Pavan Nikhilesh Bhagavatula, Jerin Jacob Kollanukkaran, thomas,
	Wang, Yipeng1, Gobriel, Sameh, Richardson, Bruce, Ruifeng Wang
  Cc: dev

> >> From: Pavan Nikhilesh <pbhagavatula@marvell.com>
> >>
> >> Merge crc32 hash calculation public API headers for x86 and ARM,
> >> split implementations of x86 and ARM into their respective private
> >> headers.
> >> This reduces the ifdef code clutter while keeping current ABI intact.
> >>
> >> Although we install `rte_crc_arm64.h` it is not used in any of the lib or
> >> drivers layers. All the libs and drivers use `rte_hash_crc.h` which falls
> >> back to SW crc32 calculation for ARM platform.
> >>
> >> Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
> >> ---
> >>
> >>  Currently, if application incorrectly sets CRC32_ARM64 as crc32
> >algorithm
> >>  through `rte_hash_crc_set_alg()` on x86 or vice-versa we fallback to
> >algorithm
> >>  set previously via `rte_hash_crc_set_alg()` instead of setting the best
> >>  available.
> >>  This behaviour should probably change to setting the best available
> >algorithm
> >>  and is up for discussion.
> >>
> >>  app/test/test_hash.c            |   6 +
> >>  lib/librte_hash/Makefile        |   5 -
> >>  lib/librte_hash/crc_arm64.h     |  67 +++++++++++
> >>  lib/librte_hash/crc_x86.h       |  68 +++++++++++
> >>  lib/librte_hash/meson.build     |   3 +-
> >>  lib/librte_hash/rte_crc_arm64.h | 183 ------------------------------
> >>  lib/librte_hash/rte_hash_crc.h  | 193 +++++++++++++------------------
> >-
> >>  7 files changed, 219 insertions(+), 306 deletions(-)
> >>  create mode 100644 lib/librte_hash/crc_arm64.h
> >>  create mode 100644 lib/librte_hash/crc_x86.h
> >>  delete mode 100644 lib/librte_hash/rte_crc_arm64.h
> >>
> >> diff --git a/app/test/test_hash.c b/app/test/test_hash.c
> >> index afa3a1a3c..7bd457dac 100644
> >> --- a/app/test/test_hash.c
> >> +++ b/app/test/test_hash.c
> >> @@ -195,7 +195,13 @@ test_crc32_hash_alg_equiv(void)
> >>  	}
> >>
> >>  	/* Resetting to best available algorithm */
> >> +#if defined RTE_ARCH_X86
> >>  	rte_hash_crc_set_alg(CRC32_SSE42_x64);
> >> +#elif defined RTE_ARCH_ARM64
> >> +	rte_hash_crc_set_alg(CRC32_ARM64);
> >> +#else
> >> +	rte_hash_crc_set_alg(CRC32_SW);
> >> +#endif
> >>
> >>  	if (i == CRC32_ITERATIONS)
> >>  		return 0;
> >> diff --git a/lib/librte_hash/Makefile b/lib/librte_hash/Makefile
> >> index ec9f86499..f640afc42 100644
> >> --- a/lib/librte_hash/Makefile
> >> +++ b/lib/librte_hash/Makefile
> >> @@ -19,11 +19,6 @@ SRCS-$(CONFIG_RTE_LIBRTE_HASH) +=
> >rte_fbk_hash.c
> >>  # install this header file
> >>  SYMLINK-$(CONFIG_RTE_LIBRTE_HASH)-include := rte_hash.h
> >>  SYMLINK-$(CONFIG_RTE_LIBRTE_HASH)-include += rte_hash_crc.h
> >> -ifeq ($(CONFIG_RTE_ARCH_ARM64),y)
> >> -ifneq ($(findstring RTE_MACHINE_CPUFLAG_CRC32,$(CFLAGS)),)
> >> -SYMLINK-$(CONFIG_RTE_LIBRTE_HASH)-include += rte_crc_arm64.h
> >> -endif
> >> -endif
> >>  SYMLINK-$(CONFIG_RTE_LIBRTE_HASH)-include += rte_jhash.h
> >>  SYMLINK-$(CONFIG_RTE_LIBRTE_HASH)-include += rte_thash.h
> >>  SYMLINK-$(CONFIG_RTE_LIBRTE_HASH)-include += rte_fbk_hash.h
> >> diff --git a/lib/librte_hash/crc_arm64.h b/lib/librte_hash/crc_arm64.h
> >> new file mode 100644
> >> index 000000000..8e75f8297
> >
> >Wouldn't that break 'make  install T=...'?
> 
> My bad I verified with meson and it was building fine.
> 
> >As now rte_hash_crc.h includes not public headers (crc_x86.h, etc.).
> >Same question about external apps, where they would get from these
> >headers?
> 
> I think in the next version we can directly have the arch specific functions
> Implemented in rte_hash_crc.h. Since its pretty stable code and overhead of extra
> ~120 lines.

Ok... but why not then just leave arch specific headers, as they are right now?
What is wrong with current approach?

^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [PATCH v5 2/2] cryptodev: version cryptodev info get function
  2020-05-11  7:47  5%       ` Ray Kinsella
@ 2020-05-11  8:18  4%         ` Akhil Goyal
  2020-05-11 11:38  4%           ` Akhil Goyal
  2020-05-11 16:09  5%           ` Ray Kinsella
  0 siblings, 2 replies; 200+ results
From: Akhil Goyal @ 2020-05-11  8:18 UTC (permalink / raw)
  To: Ray Kinsella, Arek Kusztal, dev
  Cc: fiona.trahe, ray.kinsella, bruce.richardson

Hi Ray,

Previously, I only ran the script for the 2 patches.

./devtools/validate-abi.sh <commit id previous to these two patches> HEAD

However when I run for v20.02 and HEAD, the list is quite big. I believe most of them are either experimental or internal PMD. But cryptodev is still there.

NOTICE: abi-compliance-checker returned 1
NOTICE: ABI may be incompatible, check reports/logs for details.
NOTICE: Incompatible list:  librte_bbdev.so librte_common_iavf.so librte_common_octeontx2.so librte_cryptodev.so librte_eal.so librte_efd.so librte_eventdev.so librte_hash.so librte_ipsec.so librte_meter.so librte_pdump.so librte_pmd_crypto_scheduler.so librte_pmd_dpaa2_sec.so librte_pmd_dpaa_sec.so librte_pmd_ring.so librte_ring.so librte_vhost.so

Regards,
Akhil

> -----Original Message-----
> From: Ray Kinsella <mdr@ashroe.eu>
> Sent: Monday, May 11, 2020 1:18 PM
> To: Akhil Goyal <akhil.goyal@nxp.com>; Arek Kusztal
> <arkadiuszx.kusztal@intel.com>; dev@dpdk.org
> Cc: fiona.trahe@intel.com; ray.kinsella@intel.com; bruce.richardson@intel.com
> Subject: Re: [dpdk-dev] [PATCH v5 2/2] cryptodev: version cryptodev info get
> function
> 
> Hi Akhil,
> 
> So 1st thing is that this that validate-abi uses "ABI Compliance Checker",
> which does not use libabigail.ignore.
> 
> So you will end up with different results compared to using libabigail as follows:
> 
> DPDK_ABI_REF_DIR=<some absolute path>
> DPDK_ABI_REF_VERSION=v20.02 ./devtools/test-meson-builds.sh
> 
> I did check with the "ABI Compliance Checker" (I like this tool also), however I
> got the following
> 
> NOTICE: No error detected, ABI is compatible.
> INFO: Logs are in /root/src/dpdk/abi-check/abi-check.log
> INFO: HTML reports are in /root/src/dpdk/abi-check/compat_reports directory
> 
> What references did you use with validate-abi.sh (I used v20.02 and HEAD).
> 
> Ray K
> 
> On 09/05/2020 22:11, Akhil Goyal wrote:
> > Hi Ray/Arek,
> >
> > I still see Incompatible cryptodev even after update in the abignore list.
> > I checked it with ./devtools/validate-abi.sh
> > NOTICE: ABI may be incompatible, check reports/logs for details.
> > NOTICE: Incompatible list:  librte_cryptodev.so
> >
> > Did I miss something?
> >
> >
> >>
> >> On 07/05/2020 11:57, Arek Kusztal wrote:
> >>> This patch adds versioned function rte_cryptodev_info_get()
> >>> to prevent some issues with ABI policy.
> >>> Node v21 works in same way as before, returning driver capabilities
> >>> directly to the API caller. These capabilities may include new elements
> >>> not part of the v20 ABI.
> >>> Node v20 function maintains compatibility with v20 ABI releases
> >>> by stripping out elements not supported in v20 ABI. Because
> >>> rte_cryptodev_info_get is called by other API functions,
> >>> rte_cryptodev_sym_capability_get function is versioned the same way.
> >>>
> >>> Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
> >>> ---
> >>> v2:
> >>> - changed version numbers of symbols to 20.0.2
> >>> v3:
> >>> - added v2/v3 informations
> >>> - changed version numbers of symbols to 21
> >>> v4:
> >>> - fixed clang build by movind binding default symbol
> >>> - implemented mailing list comments
> >>> - added abidiff tool suppression entries
> >>> v5:
> >>> - fixed meson build
> >>>
> >>>  devtools/libabigail.abignore                   |   8 ++
> >>>  lib/librte_cryptodev/meson.build               |   1 +
> >>>  lib/librte_cryptodev/rte_cryptodev.c           | 147
> >> ++++++++++++++++++++++++-
> >>>  lib/librte_cryptodev/rte_cryptodev.h           |  34 +++++-
> >>>  lib/librte_cryptodev/rte_cryptodev_version.map |   7 ++
> >>>  5 files changed, 191 insertions(+), 6 deletions(-)
> >>>
> >> [SNIP]
> >>
> >> Acked-by: Ray Kinsella <mdr@ashroe.eu>

^ permalink raw reply	[relevance 4%]

* Re: [dpdk-dev] [PATCH v5 2/2] cryptodev: version cryptodev info get function
  2020-05-09 21:11  4%     ` Akhil Goyal
  2020-05-11  6:12  0%       ` Ray Kinsella
@ 2020-05-11  7:47  5%       ` Ray Kinsella
  2020-05-11  8:18  4%         ` Akhil Goyal
  1 sibling, 1 reply; 200+ results
From: Ray Kinsella @ 2020-05-11  7:47 UTC (permalink / raw)
  To: Akhil Goyal, Arek Kusztal, dev
  Cc: fiona.trahe, ray.kinsella, bruce.richardson

Hi Akhil,

So 1st thing is that this that validate-abi uses "ABI Compliance Checker",
which does not use libabigail.ignore.

So you will end up with different results compared to using libabigail as follows:

DPDK_ABI_REF_DIR=<some absolute path> DPDK_ABI_REF_VERSION=v20.02 ./devtools/test-meson-builds.sh

I did check with the "ABI Compliance Checker" (I like this tool also), however I got the following 

NOTICE: No error detected, ABI is compatible.
INFO: Logs are in /root/src/dpdk/abi-check/abi-check.log
INFO: HTML reports are in /root/src/dpdk/abi-check/compat_reports directory

What references did you use with validate-abi.sh (I used v20.02 and HEAD).

Ray K

On 09/05/2020 22:11, Akhil Goyal wrote:
> Hi Ray/Arek,
> 
> I still see Incompatible cryptodev even after update in the abignore list.
> I checked it with ./devtools/validate-abi.sh
> NOTICE: ABI may be incompatible, check reports/logs for details.
> NOTICE: Incompatible list:  librte_cryptodev.so
> 
> Did I miss something?
> 
> 
>>
>> On 07/05/2020 11:57, Arek Kusztal wrote:
>>> This patch adds versioned function rte_cryptodev_info_get()
>>> to prevent some issues with ABI policy.
>>> Node v21 works in same way as before, returning driver capabilities
>>> directly to the API caller. These capabilities may include new elements
>>> not part of the v20 ABI.
>>> Node v20 function maintains compatibility with v20 ABI releases
>>> by stripping out elements not supported in v20 ABI. Because
>>> rte_cryptodev_info_get is called by other API functions,
>>> rte_cryptodev_sym_capability_get function is versioned the same way.
>>>
>>> Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
>>> ---
>>> v2:
>>> - changed version numbers of symbols to 20.0.2
>>> v3:
>>> - added v2/v3 informations
>>> - changed version numbers of symbols to 21
>>> v4:
>>> - fixed clang build by movind binding default symbol
>>> - implemented mailing list comments
>>> - added abidiff tool suppression entries
>>> v5:
>>> - fixed meson build
>>>
>>>  devtools/libabigail.abignore                   |   8 ++
>>>  lib/librte_cryptodev/meson.build               |   1 +
>>>  lib/librte_cryptodev/rte_cryptodev.c           | 147
>> ++++++++++++++++++++++++-
>>>  lib/librte_cryptodev/rte_cryptodev.h           |  34 +++++-
>>>  lib/librte_cryptodev/rte_cryptodev_version.map |   7 ++
>>>  5 files changed, 191 insertions(+), 6 deletions(-)
>>>
>> [SNIP]
>>
>> Acked-by: Ray Kinsella <mdr@ashroe.eu>

^ permalink raw reply	[relevance 5%]

* Re: [dpdk-dev] [PATCH v5 2/2] cryptodev: version cryptodev info get function
  2020-05-09 21:11  4%     ` Akhil Goyal
@ 2020-05-11  6:12  0%       ` Ray Kinsella
  2020-05-11  7:47  5%       ` Ray Kinsella
  1 sibling, 0 replies; 200+ results
From: Ray Kinsella @ 2020-05-11  6:12 UTC (permalink / raw)
  To: Akhil Goyal, Arek Kusztal, dev
  Cc: fiona.trahe, ray.kinsella, bruce.richardson

Hi Akhil,

I didn't see this - checking again.

Ray K

On 09/05/2020 22:11, Akhil Goyal wrote:
> Hi Ray/Arek,
> 
> I still see Incompatible cryptodev even after update in the abignore list.
> I checked it with ./devtools/validate-abi.sh
> NOTICE: ABI may be incompatible, check reports/logs for details.
> NOTICE: Incompatible list:  librte_cryptodev.so
> 
> Did I miss something?
> 
> 
>>
>> On 07/05/2020 11:57, Arek Kusztal wrote:
>>> This patch adds versioned function rte_cryptodev_info_get()
>>> to prevent some issues with ABI policy.
>>> Node v21 works in same way as before, returning driver capabilities
>>> directly to the API caller. These capabilities may include new elements
>>> not part of the v20 ABI.
>>> Node v20 function maintains compatibility with v20 ABI releases
>>> by stripping out elements not supported in v20 ABI. Because
>>> rte_cryptodev_info_get is called by other API functions,
>>> rte_cryptodev_sym_capability_get function is versioned the same way.
>>>
>>> Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
>>> ---
>>> v2:
>>> - changed version numbers of symbols to 20.0.2
>>> v3:
>>> - added v2/v3 informations
>>> - changed version numbers of symbols to 21
>>> v4:
>>> - fixed clang build by movind binding default symbol
>>> - implemented mailing list comments
>>> - added abidiff tool suppression entries
>>> v5:
>>> - fixed meson build
>>>
>>>  devtools/libabigail.abignore                   |   8 ++
>>>  lib/librte_cryptodev/meson.build               |   1 +
>>>  lib/librte_cryptodev/rte_cryptodev.c           | 147
>> ++++++++++++++++++++++++-
>>>  lib/librte_cryptodev/rte_cryptodev.h           |  34 +++++-
>>>  lib/librte_cryptodev/rte_cryptodev_version.map |   7 ++
>>>  5 files changed, 191 insertions(+), 6 deletions(-)
>>>
>> [SNIP]
>>
>> Acked-by: Ray Kinsella <mdr@ashroe.eu>

^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [RFC] hash: unify crc32 API header for x86 and ARM
  2020-05-08 12:55  0% ` Ananyev, Konstantin
@ 2020-05-10 22:53  0%   ` Pavan Nikhilesh Bhagavatula
  2020-05-11  9:46  0%     ` Ananyev, Konstantin
  0 siblings, 1 reply; 200+ results
From: Pavan Nikhilesh Bhagavatula @ 2020-05-10 22:53 UTC (permalink / raw)
  To: Ananyev, Konstantin, Jerin Jacob Kollanukkaran, thomas, Wang,
	Yipeng1, Gobriel, Sameh, Richardson, Bruce, Ruifeng Wang
  Cc: dev

>> From: Pavan Nikhilesh <pbhagavatula@marvell.com>
>>
>> Merge crc32 hash calculation public API headers for x86 and ARM,
>> split implementations of x86 and ARM into their respective private
>> headers.
>> This reduces the ifdef code clutter while keeping current ABI intact.
>>
>> Although we install `rte_crc_arm64.h` it is not used in any of the lib or
>> drivers layers. All the libs and drivers use `rte_hash_crc.h` which falls
>> back to SW crc32 calculation for ARM platform.
>>
>> Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
>> ---
>>
>>  Currently, if application incorrectly sets CRC32_ARM64 as crc32
>algorithm
>>  through `rte_hash_crc_set_alg()` on x86 or vice-versa we fallback to
>algorithm
>>  set previously via `rte_hash_crc_set_alg()` instead of setting the best
>>  available.
>>  This behaviour should probably change to setting the best available
>algorithm
>>  and is up for discussion.
>>
>>  app/test/test_hash.c            |   6 +
>>  lib/librte_hash/Makefile        |   5 -
>>  lib/librte_hash/crc_arm64.h     |  67 +++++++++++
>>  lib/librte_hash/crc_x86.h       |  68 +++++++++++
>>  lib/librte_hash/meson.build     |   3 +-
>>  lib/librte_hash/rte_crc_arm64.h | 183 ------------------------------
>>  lib/librte_hash/rte_hash_crc.h  | 193 +++++++++++++------------------
>-
>>  7 files changed, 219 insertions(+), 306 deletions(-)
>>  create mode 100644 lib/librte_hash/crc_arm64.h
>>  create mode 100644 lib/librte_hash/crc_x86.h
>>  delete mode 100644 lib/librte_hash/rte_crc_arm64.h
>>
>> diff --git a/app/test/test_hash.c b/app/test/test_hash.c
>> index afa3a1a3c..7bd457dac 100644
>> --- a/app/test/test_hash.c
>> +++ b/app/test/test_hash.c
>> @@ -195,7 +195,13 @@ test_crc32_hash_alg_equiv(void)
>>  	}
>>
>>  	/* Resetting to best available algorithm */
>> +#if defined RTE_ARCH_X86
>>  	rte_hash_crc_set_alg(CRC32_SSE42_x64);
>> +#elif defined RTE_ARCH_ARM64
>> +	rte_hash_crc_set_alg(CRC32_ARM64);
>> +#else
>> +	rte_hash_crc_set_alg(CRC32_SW);
>> +#endif
>>
>>  	if (i == CRC32_ITERATIONS)
>>  		return 0;
>> diff --git a/lib/librte_hash/Makefile b/lib/librte_hash/Makefile
>> index ec9f86499..f640afc42 100644
>> --- a/lib/librte_hash/Makefile
>> +++ b/lib/librte_hash/Makefile
>> @@ -19,11 +19,6 @@ SRCS-$(CONFIG_RTE_LIBRTE_HASH) +=
>rte_fbk_hash.c
>>  # install this header file
>>  SYMLINK-$(CONFIG_RTE_LIBRTE_HASH)-include := rte_hash.h
>>  SYMLINK-$(CONFIG_RTE_LIBRTE_HASH)-include += rte_hash_crc.h
>> -ifeq ($(CONFIG_RTE_ARCH_ARM64),y)
>> -ifneq ($(findstring RTE_MACHINE_CPUFLAG_CRC32,$(CFLAGS)),)
>> -SYMLINK-$(CONFIG_RTE_LIBRTE_HASH)-include += rte_crc_arm64.h
>> -endif
>> -endif
>>  SYMLINK-$(CONFIG_RTE_LIBRTE_HASH)-include += rte_jhash.h
>>  SYMLINK-$(CONFIG_RTE_LIBRTE_HASH)-include += rte_thash.h
>>  SYMLINK-$(CONFIG_RTE_LIBRTE_HASH)-include += rte_fbk_hash.h
>> diff --git a/lib/librte_hash/crc_arm64.h b/lib/librte_hash/crc_arm64.h
>> new file mode 100644
>> index 000000000..8e75f8297
>
>Wouldn't that break 'make  install T=...'?

My bad I verified with meson and it was building fine.

>As now rte_hash_crc.h includes not public headers (crc_x86.h, etc.).
>Same question about external apps, where they would get from these
>headers?

I think in the next version we can directly have the arch specific functions
Implemented in rte_hash_crc.h. Since its pretty stable code and overhead of extra 
~120 lines.

>
>> --- /dev/null
>> +++ b/lib/librte_hash/crc_arm64.h
>> @@ -0,0 +1,67 @@
>> +/* SPDX-License-Identifier: BSD-3-Clause
>> + * Copyright(c) 2015 Cavium, Inc
>> + */
>> +


^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [RFC] hash: unify crc32 API header for x86 and ARM
  2020-05-06 22:02  0% ` Wang, Yipeng1
@ 2020-05-10 22:49  0%   ` Pavan Nikhilesh Bhagavatula
  0 siblings, 0 replies; 200+ results
From: Pavan Nikhilesh Bhagavatula @ 2020-05-10 22:49 UTC (permalink / raw)
  To: Wang, Yipeng1, Van Haaren, Harry, Jerin Jacob Kollanukkaran,
	thomas, Gobriel, Sameh, Richardson, Bruce, Ruifeng Wang
  Cc: dev

>> Subject: [dpdk-dev] [RFC] hash: unify crc32 API header for x86 and
>ARM
>>
>> From: Pavan Nikhilesh <pbhagavatula@marvell.com>
>>
>> Merge crc32 hash calculation public API headers for x86 and ARM, split
>> implementations of x86 and ARM into their respective private
>headers.
>> This reduces the ifdef code clutter while keeping current ABI intact.
>>
>> Although we install `rte_crc_arm64.h` it is not used in any of the lib or
>drivers
>> layers. All the libs and drivers use `rte_hash_crc.h` which falls back to
>SW
>> crc32 calculation for ARM platform.
>>
>> Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
>> ---
>>
>>  Currently, if application incorrectly sets CRC32_ARM64 as crc32
>algorithm
>> through `rte_hash_crc_set_alg()` on x86 or vice-versa we fallback to
>> algorithm  set previously via `rte_hash_crc_set_alg()` instead of
>setting the
>> best  available.
>>  This behaviour should probably change to setting the best available
>> algorithm  and is up for discussion.
>
>[Wang, Yipeng] Should it be an illegal flag if I set ARM64
>On x86? I am thinking we should generate a warning message into logs
>if this happens.

The current behavior (with and without this patch) is to fallback to software CRC.
Warning log sounds good. Maybe we can fallback to best available CRC mode on 
the platform too.

>>
>>  app/test/test_hash.c            |   6 +
>>  lib/librte_hash/Makefile        |   5 -
>>  lib/librte_hash/crc_arm64.h     |  67 +++++++++++
>>  lib/librte_hash/crc_x86.h       |  68 +++++++++++
>>  lib/librte_hash/meson.build     |   3 +-
>>  lib/librte_hash/rte_crc_arm64.h | 183 ------------------------------
>> lib/librte_hash/rte_hash_crc.h  | 193 +++++++++++++-------------------
>>  7 files changed, 219 insertions(+), 306 deletions(-)  create mode
>100644
>> lib/librte_hash/crc_arm64.h  create mode 100644
>lib/librte_hash/crc_x86.h
>> delete mode 100644 lib/librte_hash/rte_crc_arm64.h
>>
>> diff --git a/app/test/test_hash.c b/app/test/test_hash.c index
>> afa3a1a3c..7bd457dac 100644
>> --- a/app/test/test_hash.c
>> +++ b/app/test/test_hash.c
>> @@ -195,7 +195,13 @@ test_crc32_hash_alg_equiv(void)
>>  	}
>>
>>  	/* Resetting to best available algorithm */
>> +#if defined RTE_ARCH_X86
>>  	rte_hash_crc_set_alg(CRC32_SSE42_x64);
>> +#elif defined RTE_ARCH_ARM64
>> +	rte_hash_crc_set_alg(CRC32_ARM64);
>> +#else
>> +	rte_hash_crc_set_alg(CRC32_SW);
>> +#endif
>>
>>  	if (i == CRC32_ITERATIONS)
>>  		return 0;
>> diff --git a/lib/librte_hash/Makefile b/lib/librte_hash/Makefile index
>> ec9f86499..f640afc42 100644
>> --- a/lib/librte_hash/Makefile
>> +++ b/lib/librte_hash/Makefile
>> @@ -19,11 +19,6 @@ SRCS-$(CONFIG_RTE_LIBRTE_HASH) +=
>rte_fbk_hash.c
>> # install this header file  SYMLINK-$(CONFIG_RTE_LIBRTE_HASH)-
>include :=
>> rte_hash.h  SYMLINK-$(CONFIG_RTE_LIBRTE_HASH)-include +=
>> rte_hash_crc.h -ifeq ($(CONFIG_RTE_ARCH_ARM64),y) -ifneq
>($(findstring
>> RTE_MACHINE_CPUFLAG_CRC32,$(CFLAGS)),)
>> -SYMLINK-$(CONFIG_RTE_LIBRTE_HASH)-include += rte_crc_arm64.h
>-endif
>> -endif  SYMLINK-$(CONFIG_RTE_LIBRTE_HASH)-include +=
>rte_jhash.h
>> SYMLINK-$(CONFIG_RTE_LIBRTE_HASH)-include += rte_thash.h
>SYMLINK-
>> $(CONFIG_RTE_LIBRTE_HASH)-include += rte_fbk_hash.h diff --git
>> a/lib/librte_hash/crc_arm64.h b/lib/librte_hash/crc_arm64.h new file
>mode
>> 100644 index 000000000..8e75f8297
>> --- /dev/null
>> +++ b/lib/librte_hash/crc_arm64.h
>> @@ -0,0 +1,67 @@
>> +/* SPDX-License-Identifier: BSD-3-Clause
>> + * Copyright(c) 2015 Cavium, Inc
>> + */
>> +
>> +#ifndef _CRC_ARM64_H_
>> +#define _CRC_ARM64_H_
>> +
>> +/**
>> + * @file
>> + *
>> + * CRC arm64 Hash
>> + */
>[Wang, Yipeng] It is hidden now so do we still need this doxygen region
>above?

I will remove in next version.

>> +
>> +#ifdef __cplusplus
>> +extern "C" {
>> +#endif
>> +
>> +#include <stdint.h>
>> +#include <rte_cpuflags.h>
>> +#include <rte_branch_prediction.h>
>> +#include <rte_common.h>
>[Wang, Yipeng] I don't think we need all these headers in this file.
>> +

Will remove in next version.

>> +static inline uint32_t
>> +crc32c_arm64_u8(uint8_t data, uint32_t init_val) {
>> +	__asm__ volatile(
>> +			"crc32cb %w[crc], %w[crc], %w[value]"
>> +			: [crc] "+r" (init_val)
>> +			: [value] "r" (data));
>> +	return init_val;
>> +}
>> +
>> +static inline uint32_t
>> +crc32c_arm64_u16(uint16_t data, uint32_t init_val) {
>> +	__asm__ volatile(
>> +			"crc32ch %w[crc], %w[crc], %w[value]"
>> +			: [crc] "+r" (init_val)
>> +			: [value] "r" (data));
>> +	return init_val;
>> +}
>> +
>> +static inline uint32_t
>> +crc32c_arm64_u32(uint32_t data, uint32_t init_val) {
>> +	__asm__ volatile(
>> +			"crc32cw %w[crc], %w[crc], %w[value]"
>> +			: [crc] "+r" (init_val)
>> +			: [value] "r" (data));
>> +	return init_val;
>> +}
>> +
>> +static inline uint32_t
>> +crc32c_arm64_u64(uint64_t data, uint32_t init_val) {
>> +	__asm__ volatile(
>> +			"crc32cx %w[crc], %w[crc], %x[value]"
>> +			: [crc] "+r" (init_val)
>> +			: [value] "r" (data));
>> +	return init_val;
>> +}
>> +
>> +#ifdef __cplusplus
>> +}
>> +#endif
>> +
>> +#endif /* _CRC_ARM64_H_ */
>> diff --git a/lib/librte_hash/crc_x86.h b/lib/librte_hash/crc_x86.h new
>file
>> mode 100644 index 000000000..fb45f2e98
>> --- /dev/null
>> +++ b/lib/librte_hash/crc_x86.h
>> @@ -0,0 +1,68 @@
>> +/* SPDX-License-Identifier: BSD-3-Clause
>> + * Copyright(c) 2010-2014 Intel Corporation  */
>> +
>> +#ifndef _CRC_X86_H_
>> +#define _CRC_X86_H_
>> +
>> +#if defined(RTE_ARCH_X86)
>> +static inline uint32_t
>> +crc32c_sse42_u8(uint8_t data, uint32_t init_val) {
>> +	__asm__ volatile(
>> +			"crc32b %[data], %[init_val];"
>> +			: [init_val] "+r" (init_val)
>> +			: [data] "rm" (data));
>> +	return init_val;
>> +}
>> +
>> +static inline uint32_t
>> +crc32c_sse42_u16(uint16_t data, uint32_t init_val) {
>> +	__asm__ volatile(
>> +			"crc32w %[data], %[init_val];"
>> +			: [init_val] "+r" (init_val)
>> +			: [data] "rm" (data));
>> +	return init_val;
>> +}
>> +
>> +static inline uint32_t
>> +crc32c_sse42_u32(uint32_t data, uint32_t init_val) {
>> +	__asm__ volatile(
>> +			"crc32l %[data], %[init_val];"
>> +			: [init_val] "+r" (init_val)
>> +			: [data] "rm" (data));
>> +	return init_val;
>> +}
>> +
>> +static inline uint32_t
>> +crc32c_sse42_u64_mimic(uint64_t data, uint32_t init_val) {
>> +	union {
>> +		uint32_t u32[2];
>> +		uint64_t u64;
>> +	} d;
>> +
>> +	d.u64 = data;
>> +	init_val = crc32c_sse42_u32(d.u32[0], init_val);
>> +	init_val = crc32c_sse42_u32(d.u32[1], init_val);
>> +	return init_val;
>> +}
>> +#endif
>> +
>> +#ifdef RTE_ARCH_X86_64
>> +static inline uint32_t
>> +crc32c_sse42_u64(uint64_t data, uint32_t init_val) {
>> +	uint64_t val = init_val;
>> +
>> +	__asm__ volatile(
>> +			"crc32q %[data], %[init_val];"
>> +			: [init_val] "+r" (val)
>> +			: [data] "rm" (data));
>> +	return (uint32_t)val;
>> +}
>> +#endif
>> +
>> +#endif
>> diff --git a/lib/librte_hash/meson.build b/lib/librte_hash/meson.build
>index
>> 6ab46ae9d..90a180bc8 100644
>> --- a/lib/librte_hash/meson.build
>> +++ b/lib/librte_hash/meson.build
>> @@ -1,8 +1,7 @@
>>  # SPDX-License-Identifier: BSD-3-Clause  # Copyright(c) 2017 Intel
>> Corporation
>>
>> -headers = files('rte_crc_arm64.h',
>> -	'rte_fbk_hash.h',
>> +headers = files('rte_fbk_hash.h',
>>  	'rte_hash_crc.h',
>>  	'rte_hash.h',
>>  	'rte_jhash.h',
>> diff --git a/lib/librte_hash/rte_crc_arm64.h
>> b/lib/librte_hash/rte_crc_arm64.h deleted file mode 100644 index
>> b4628cfc0..000000000
>> --- a/lib/librte_hash/rte_crc_arm64.h
>> +++ /dev/null
>> @@ -1,183 +0,0 @@
>> -/* SPDX-License-Identifier: BSD-3-Clause
>> - * Copyright(c) 2015 Cavium, Inc
>> - */
>> -
>> -#ifndef _RTE_CRC_ARM64_H_
>> -#define _RTE_CRC_ARM64_H_
>> -
>> -/**
>> - * @file
>> - *
>> - * RTE CRC arm64 Hash
>> - */
>> -
>> -#ifdef __cplusplus
>> -extern "C" {
>> -#endif
>> -
>> -#include <stdint.h>
>> -#include <rte_cpuflags.h>
>> -#include <rte_branch_prediction.h>
>> -#include <rte_common.h>
>> -
>> -static inline uint32_t
>> -crc32c_arm64_u8(uint8_t data, uint32_t init_val) -{
>> -	__asm__ volatile(
>> -			"crc32cb %w[crc], %w[crc], %w[value]"
>> -			: [crc] "+r" (init_val)
>> -			: [value] "r" (data));
>> -	return init_val;
>> -}
>> -
>> -static inline uint32_t
>> -crc32c_arm64_u16(uint16_t data, uint32_t init_val) -{
>> -	__asm__ volatile(
>> -			"crc32ch %w[crc], %w[crc], %w[value]"
>> -			: [crc] "+r" (init_val)
>> -			: [value] "r" (data));
>> -	return init_val;
>> -}
>> -
>> -static inline uint32_t
>> -crc32c_arm64_u32(uint32_t data, uint32_t init_val) -{
>> -	__asm__ volatile(
>> -			"crc32cw %w[crc], %w[crc], %w[value]"
>> -			: [crc] "+r" (init_val)
>> -			: [value] "r" (data));
>> -	return init_val;
>> -}
>> -
>> -static inline uint32_t
>> -crc32c_arm64_u64(uint64_t data, uint32_t init_val) -{
>> -	__asm__ volatile(
>> -			"crc32cx %w[crc], %w[crc], %x[value]"
>> -			: [crc] "+r" (init_val)
>> -			: [value] "r" (data));
>> -	return init_val;
>> -}
>> -
>> -/**
>> - * Allow or disallow use of arm64 SIMD instrinsics for CRC32 hash
>> - * calculation.
>> - *
>> - * @param alg
>> - *   An OR of following flags:
>> - *   - (CRC32_SW) Don't use arm64 crc intrinsics
>> - *   - (CRC32_ARM64) Use ARMv8 CRC intrinsic if available
>> - *
>> - */
>> -static inline void
>> -rte_hash_crc_set_alg(uint8_t alg)
>> -{
>> -	switch (alg) {
>> -	case CRC32_ARM64:
>> -		if (!rte_cpu_get_flag_enabled(RTE_CPUFLAG_CRC32))
>> -			alg = CRC32_SW;
>> -		/* fall-through */
>> -	case CRC32_SW:
>> -		crc32_alg = alg;
>> -		/* fall-through */
>> -	default:
>> -		break;
>> -	}
>> -}
>> -
>> -/* Setting the best available algorithm */
>> -RTE_INIT(rte_hash_crc_init_alg)
>> -{
>> -	rte_hash_crc_set_alg(CRC32_ARM64);
>> -}
>> -
>> -/**
>> - * Use single crc32 instruction to perform a hash on a 1 byte value.
>> - * Fall back to software crc32 implementation in case arm64 crc
>intrinsics is
>> - * not supported
>> - *
>> - * @param data
>> - *   Data to perform hash on.
>> - * @param init_val
>> - *   Value to initialise hash generator.
>> - * @return
>> - *   32bit calculated hash value.
>> - */
>> -static inline uint32_t
>> -rte_hash_crc_1byte(uint8_t data, uint32_t init_val) -{
>> -	if (likely(crc32_alg & CRC32_ARM64))
>> -		return crc32c_arm64_u8(data, init_val);
>> -
>> -	return crc32c_1byte(data, init_val);
>> -}
>> -
>> -/**
>> - * Use single crc32 instruction to perform a hash on a 2 bytes value.
>> - * Fall back to software crc32 implementation in case arm64 crc
>intrinsics is
>> - * not supported
>> - *
>> - * @param data
>> - *   Data to perform hash on.
>> - * @param init_val
>> - *   Value to initialise hash generator.
>> - * @return
>> - *   32bit calculated hash value.
>> - */
>> -static inline uint32_t
>> -rte_hash_crc_2byte(uint16_t data, uint32_t init_val) -{
>> -	if (likely(crc32_alg & CRC32_ARM64))
>> -		return crc32c_arm64_u16(data, init_val);
>> -
>> -	return crc32c_2bytes(data, init_val);
>> -}
>> -
>> -/**
>> - * Use single crc32 instruction to perform a hash on a 4 byte value.
>> - * Fall back to software crc32 implementation in case arm64 crc
>intrinsics is
>> - * not supported
>> - *
>> - * @param data
>> - *   Data to perform hash on.
>> - * @param init_val
>> - *   Value to initialise hash generator.
>> - * @return
>> - *   32bit calculated hash value.
>> - */
>> -static inline uint32_t
>> -rte_hash_crc_4byte(uint32_t data, uint32_t init_val) -{
>> -	if (likely(crc32_alg & CRC32_ARM64))
>> -		return crc32c_arm64_u32(data, init_val);
>> -
>> -	return crc32c_1word(data, init_val);
>> -}
>> -
>> -/**
>> - * Use single crc32 instruction to perform a hash on a 8 byte value.
>> - * Fall back to software crc32 implementation in case arm64 crc
>intrinsics is
>> - * not supported
>> - *
>> - * @param data
>> - *   Data to perform hash on.
>> - * @param init_val
>> - *   Value to initialise hash generator.
>> - * @return
>> - *   32bit calculated hash value.
>> - */
>> -static inline uint32_t
>> -rte_hash_crc_8byte(uint64_t data, uint32_t init_val) -{
>> -	if (likely(crc32_alg == CRC32_ARM64))
>> -		return crc32c_arm64_u64(data, init_val);
>> -
>> -	return crc32c_2words(data, init_val);
>> -}
>> -
>> -#ifdef __cplusplus
>> -}
>> -#endif
>> -
>> -#endif /* _RTE_CRC_ARM64_H_ */
>> diff --git a/lib/librte_hash/rte_hash_crc.h
>b/lib/librte_hash/rte_hash_crc.h
>> index cf28031b3..292697db1 100644
>> --- a/lib/librte_hash/rte_hash_crc.h
>> +++ b/lib/librte_hash/rte_hash_crc.h
>> @@ -21,6 +21,15 @@ extern "C" {
>>  #include <rte_branch_prediction.h>
>>  #include <rte_common.h>
>>
>> +typedef uint32_t
>> +(*crc32_handler_1b)(uint8_t data, uint32_t init_val); typedef
>uint32_t
>> +(*crc32_handler_2b)(uint16_t data, uint32_t init_val); typedef
>uint32_t
>> +(*crc32_handler_4b)(uint32_t data, uint32_t init_val); typedef
>uint32_t
>> +(*crc32_handler_8b)(uint64_t data, uint32_t init_val);
>
>[Wang, Yipeng] I guess functions pointers makes the code cleaner.
>I am just not sure on performance implications for indirect call.
>@Harry for his comment.
>

Sadly there is no perf testcase for crc hash computation. Maybe we could
have a simple testcase in hash_perf_autotest in next version.

>> +
>>  /* Lookup tables for software implementation of CRC32C */  static
>const
>> uint32_t crc32c_tables[8][256] = {{
>>   0x00000000, 0xF26B8303, 0xE13B70F7, 0x1350F3F4, 0xC79A971F,
>0x35F1141C,
>> 0x26A1E7E8, 0xD4CA64EB, @@ -322,7 +331,7 @@
>crc32c_2bytes(uint16_t
>> data, uint32_t init_val)  }
>>
>>  static inline uint32_t
>> -crc32c_1word(uint32_t data, uint32_t init_val)
>> +crc32c_4bytes(uint32_t data, uint32_t init_val)
>>  {
>>  	uint32_t crc, term1, term2;
>>  	crc = init_val;
>> @@ -336,7 +345,7 @@ crc32c_1word(uint32_t data, uint32_t init_val)
>}
>>
>>  static inline uint32_t
>> -crc32c_2words(uint64_t data, uint32_t init_val)
>> +crc32c_8bytes(uint64_t data, uint32_t init_val)
>>  {
>>  	uint32_t crc, term1, term2;
>>  	union {
>> @@ -357,109 +366,94 @@ crc32c_2words(uint64_t data, uint32_t
>init_val)
>>
>>  	return crc;
>>  }
>> -
>> -#if defined(RTE_ARCH_X86)
>> -static inline uint32_t
>> -crc32c_sse42_u8(uint8_t data, uint32_t init_val) -{
>> -	__asm__ volatile(
>> -			"crc32b %[data], %[init_val];"
>> -			: [init_val] "+r" (init_val)
>> -			: [data] "rm" (data));
>> -	return init_val;
>> -}
>> -
>> -static inline uint32_t
>> -crc32c_sse42_u16(uint16_t data, uint32_t init_val) -{
>> -	__asm__ volatile(
>> -			"crc32w %[data], %[init_val];"
>> -			: [init_val] "+r" (init_val)
>> -			: [data] "rm" (data));
>> -	return init_val;
>> -}
>> -
>> -static inline uint32_t
>> -crc32c_sse42_u32(uint32_t data, uint32_t init_val) -{
>> -	__asm__ volatile(
>> -			"crc32l %[data], %[init_val];"
>> -			: [init_val] "+r" (init_val)
>> -			: [data] "rm" (data));
>> -	return init_val;
>> -}
>> -
>> -static inline uint32_t
>> -crc32c_sse42_u64_mimic(uint64_t data, uint64_t init_val) -{
>> -	union {
>> -		uint32_t u32[2];
>> -		uint64_t u64;
>> -	} d;
>> -
>> -	d.u64 = data;
>> -	init_val = crc32c_sse42_u32(d.u32[0], (uint32_t)init_val);
>> -	init_val = crc32c_sse42_u32(d.u32[1], (uint32_t)init_val);
>> -	return (uint32_t)init_val;
>> -}
>> -#endif
>> -
>> -#ifdef RTE_ARCH_X86_64
>> -static inline uint32_t
>> -crc32c_sse42_u64(uint64_t data, uint64_t init_val) -{
>> -	__asm__ volatile(
>> -			"crc32q %[data], %[init_val];"
>> -			: [init_val] "+r" (init_val)
>> -			: [data] "rm" (data));
>> -	return (uint32_t)init_val;
>> -}
>> -#endif
>> -
>[Wang, Yipeng] keep the blank line before define.

Will add in next version.

>>  #define CRC32_SW            (1U << 0)
>>  #define CRC32_SSE42         (1U << 1)
>>  #define CRC32_x64           (1U << 2)
>>  #define CRC32_SSE42_x64     (CRC32_x64|CRC32_SSE42)
>>  #define CRC32_ARM64         (1U << 3)
>>
>> -static uint8_t crc32_alg = CRC32_SW;
>> +static crc32_handler_1b crc32_1b = crc32c_1byte; static
>> +crc32_handler_2b crc32_2b = crc32c_2bytes; static crc32_handler_4b
>> +crc32_4b = crc32c_4bytes; static crc32_handler_8b crc32_8b =
>> +crc32c_8bytes;
>>
>>  #if defined(RTE_ARCH_ARM64) &&
>> defined(RTE_MACHINE_CPUFLAG_CRC32)
>> -#include "rte_crc_arm64.h"
>> -#else
>> +#include "crc_arm64.h"
>> +#endif
>> +
>> +#if defined(RTE_ARCH_X86)
>> +#include "crc_x86.h"
>> +#endif
>>
>>  /**
>> - * Allow or disallow use of SSE4.2 instrinsics for CRC32 hash
>> + * Allow or disallow use of SSE4.2/ARMv8 instrinsics for CRC32 hash
>>   * calculation.
>>   *
>>   * @param alg
>>   *   An OR of following flags:
>> - *   - (CRC32_SW) Don't use SSE4.2 intrinsics
>> + *   - (CRC32_SW) Don't use SSE4.2 intrinsics (default non-
>[x86/ARMv8])
>>   *   - (CRC32_SSE42) Use SSE4.2 intrinsics if available
>> - *   - (CRC32_SSE42_x64) Use 64-bit SSE4.2 intrinsic if available
>(default)
>> - *
>> + *   - (CRC32_SSE42_x64) Use 64-bit SSE4.2 intrinsic if available
>(default x86)
>> + *   - (CRC32_ARM64) Use ARMv8 CRC intrinsic if available
>>   */
>>  static inline void
>>  rte_hash_crc_set_alg(uint8_t alg)
>>  {
>> -#if defined(RTE_ARCH_X86)
>> -	if (alg == CRC32_SSE42_x64 &&
>> -
>	!rte_cpu_get_flag_enabled(RTE_CPUFLAG_EM64T))
>> -		alg = CRC32_SSE42;
>> +	switch (alg) {
>> +	case CRC32_SSE42_x64:
>> +#if defined RTE_ARCH_X86
>> +		crc32_1b = crc32c_sse42_u8;
>> +		crc32_2b = crc32c_sse42_u16;
>> +		crc32_4b = crc32c_sse42_u32;
>> +
>> +	if (!rte_cpu_get_flag_enabled(RTE_CPUFLAG_EM64T))
>> +		crc32_8b = crc32c_sse42_u64_mimic;
>> +	else
>> +		crc32_8b = crc32c_sse42_u64;
>>  #endif
>> -	crc32_alg = alg;
>> +		break;
>> +	case CRC32_SSE42:
>> +#if defined RTE_ARCH_X86
>> +		crc32_1b = crc32c_sse42_u8;
>> +		crc32_2b = crc32c_sse42_u16;
>> +		crc32_4b = crc32c_sse42_u32;
>> +		crc32_8b = crc32c_sse42_u64_mimic;
>> +#endif
>> +		break;
>> +	case CRC32_ARM64:
>> +#if defined RTE_ARCH_ARM64
>> +	if (rte_cpu_get_flag_enabled(RTE_CPUFLAG_CRC32)) {
>> +		crc32_1b = crc32c_arm64_u8;
>> +		crc32_2b = crc32c_arm64_u16;
>> +		crc32_4b = crc32c_arm64_u32;
>> +		crc32_8b = crc32c_arm64_u64;
>> +	}
>> +#endif
>> +		break;
>> +	case CRC32_SW:
>> +	default:
>> +		crc32_1b = crc32c_1byte;
>> +		crc32_2b = crc32c_2bytes;
>> +		crc32_4b = crc32c_4bytes;
>> +		crc32_8b = crc32c_8bytes;
>> +	break;
>> +	}
>>  }
>>
>>  /* Setting the best available algorithm */
>>  RTE_INIT(rte_hash_crc_init_alg)
>>  {
>> +#if defined RTE_ARCH_X86
>>  	rte_hash_crc_set_alg(CRC32_SSE42_x64);
>> +#elif defined RTE_ARCH_ARM64
>> +	rte_hash_crc_set_alg(CRC32_ARM64);
>> +#else
>> +	rte_hash_crc_set_alg(CRC32_SW);
>> +#endif
>>  }
>>
>>  /**
>> - * Use single crc32 instruction to perform a hash on a byte value.
>> - * Fall back to software crc32 implementation in case SSE4.2 is
>> - * not supported
>> + * Calculate crc32 hash value of 1bytes.
>>   *
>>   * @param data
>>   *   Data to perform hash on.
>> @@ -471,18 +465,11 @@ RTE_INIT(rte_hash_crc_init_alg)  static inline
>> uint32_t  rte_hash_crc_1byte(uint8_t data, uint32_t init_val)  { -#if
>defined
>> RTE_ARCH_X86
>> -	if (likely(crc32_alg & CRC32_SSE42))
>> -		return crc32c_sse42_u8(data, init_val);
>> -#endif
>> -
>> -	return crc32c_1byte(data, init_val);
>> +	return (crc32_1b)(data, init_val);
>>  }
>>
>>  /**
>> - * Use single crc32 instruction to perform a hash on a 2 bytes value.
>> - * Fall back to software crc32 implementation in case SSE4.2 is
>> - * not supported
>> + * Calculate crc32 hash value of 2bytes.
>>   *
>>   * @param data
>>   *   Data to perform hash on.
>> @@ -494,18 +481,11 @@ rte_hash_crc_1byte(uint8_t data, uint32_t
>init_val)
>> static inline uint32_t  rte_hash_crc_2byte(uint16_t data, uint32_t
>init_val)  { -
>> #if defined RTE_ARCH_X86
>> -	if (likely(crc32_alg & CRC32_SSE42))
>> -		return crc32c_sse42_u16(data, init_val);
>> -#endif
>> -
>> -	return crc32c_2bytes(data, init_val);
>> +	return (crc32_2b)(data, init_val);
>>  }
>>
>>  /**
>> - * Use single crc32 instruction to perform a hash on a 4 byte value.
>> - * Fall back to software crc32 implementation in case SSE4.2 is
>> - * not supported
>> + * Calculate crc32 hash value of 4bytes.
>>   *
>>   * @param data
>>   *   Data to perform hash on.
>> @@ -517,18 +497,11 @@ rte_hash_crc_2byte(uint16_t data, uint32_t
>init_val)
>> static inline uint32_t  rte_hash_crc_4byte(uint32_t data, uint32_t
>init_val)  { -
>> #if defined RTE_ARCH_X86
>> -	if (likely(crc32_alg & CRC32_SSE42))
>> -		return crc32c_sse42_u32(data, init_val);
>> -#endif
>> -
>> -	return crc32c_1word(data, init_val);
>> +	return (crc32_4b)(data, init_val);
>>  }
>>
>>  /**
>> - * Use single crc32 instruction to perform a hash on a 8 byte value.
>> - * Fall back to software crc32 implementation in case SSE4.2 is
>> - * not supported
>> + * Calculate crc32 hash value of 8bytes.
>>   *
>>   * @param data
>>   *   Data to perform hash on.
>> @@ -540,21 +513,9 @@ rte_hash_crc_4byte(uint32_t data, uint32_t
>init_val)
>> static inline uint32_t  rte_hash_crc_8byte(uint64_t data, uint32_t
>init_val)  { -
>> #ifdef RTE_ARCH_X86_64
>> -	if (likely(crc32_alg == CRC32_SSE42_x64))
>> -		return crc32c_sse42_u64(data, init_val);
>> -#endif
>> -
>> -#if defined RTE_ARCH_X86
>> -	if (likely(crc32_alg & CRC32_SSE42))
>> -		return crc32c_sse42_u64_mimic(data, init_val);
>> -#endif
>> -
>> -	return crc32c_2words(data, init_val);
>> +	return (crc32_8b)(data, init_val);
>>  }
>>
>> -#endif
>> -
>>  /**
>>   * Calculate CRC32 hash on user-supplied byte array.
>>   *
>> --
>> 2.17.1
>[Wang, Yipeng]
>Thanks for the patch, please see my comment inlined.
>

Thanks for the review.

>I think it is good to hide the architecture specific headers.
>And I agree with Harry that we shouldn't silently remove a public
>header.
>I don't know the best practice on handling this though (e.g. symlink or
>dummyfile), either way looks fine to me.
>Bruce/Thomas may comment.
>
>


^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [PATCH v3 1/2] common/mlx5: add rte internal tag and avoid comparison
  2020-05-07 20:08  3%           ` Thomas Monjalon
@ 2020-05-10  8:14  0%             ` Ophir Munk
  0 siblings, 0 replies; 200+ results
From: Ophir Munk @ 2020-05-10  8:14 UTC (permalink / raw)
  To: Thomas Monjalon
  Cc: dev, David Marchand, Ray Kinsella, Matan Azrad, Raslan Darawsheh

Thanks for clarifying the INTERNAL/EXPERIMENTAL difference.

> -----Original Message-----
> From: Thomas Monjalon <thomas@monjalon.net>
> Sent: Thursday, May 7, 2020 11:08 PM
> To: Ophir Munk <ophirmu@mellanox.com>
> Cc: dev@dpdk.org; David Marchand <david.marchand@redhat.com>; Ray
> Kinsella <mdr@ashroe.eu>; Matan Azrad <matan@mellanox.com>; Raslan
> Darawsheh <rasland@mellanox.com>
> Subject: Re: [PATCH v3 1/2] common/mlx5: add rte internal tag and avoid
> comparison
> 
> 07/05/2020 13:41, Ophir Munk:
> > From: Thomas Monjalon <thomas@monjalon.net>
> > > 07/05/2020 10:56, Ophir Munk:
> > > > Move mlx5 symbols in the map file to the INTERNAL section and add
> > > > __internal tags to their definitions.
> > > > Those symbols were exported in 20.02 and now (20.05) they are
> removed.
> > > [...]
> > > > --- a/drivers/common/mlx5/rte_common_mlx5_version.map
> > > > +++ b/drivers/common/mlx5/rte_common_mlx5_version.map
> > > > @@ -1,8 +1,10 @@
> > > > -DPDK_21 {
> > > > +INTERNAL {
> > >
> > > I think you forgot the EXPERIMENTAL section.
> > > In my opinion, everything should be in INTERNAL and marked with
> > > __rte_internal in source code.
> > >
> >
> > I moved all EXPERIMENTAL to INTERNAL and sent V4.
> > A general question: what is the difference between EXPERIMENTAL and
> INTERNAL functionalities?
> > In the end both indicate to skip ABI check.
> 
> Regarding ABI check, yes the result is the same.
> Regarding API, it is different:
> INTERNAL is forbidden to applications,
> while EXPERIMENTAL is to be used with cautious as compatibility is not
> guaranteed.
> 


^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [PATCH v5 2/2] cryptodev: version cryptodev info get function
  2020-05-07 11:05  0%   ` Ray Kinsella
@ 2020-05-09 21:11  4%     ` Akhil Goyal
  2020-05-11  6:12  0%       ` Ray Kinsella
  2020-05-11  7:47  5%       ` Ray Kinsella
  0 siblings, 2 replies; 200+ results
From: Akhil Goyal @ 2020-05-09 21:11 UTC (permalink / raw)
  To: Ray Kinsella, Arek Kusztal, dev
  Cc: fiona.trahe, ray.kinsella, bruce.richardson

Hi Ray/Arek,

I still see Incompatible cryptodev even after update in the abignore list.
I checked it with ./devtools/validate-abi.sh
NOTICE: ABI may be incompatible, check reports/logs for details.
NOTICE: Incompatible list:  librte_cryptodev.so

Did I miss something?


> 
> On 07/05/2020 11:57, Arek Kusztal wrote:
> > This patch adds versioned function rte_cryptodev_info_get()
> > to prevent some issues with ABI policy.
> > Node v21 works in same way as before, returning driver capabilities
> > directly to the API caller. These capabilities may include new elements
> > not part of the v20 ABI.
> > Node v20 function maintains compatibility with v20 ABI releases
> > by stripping out elements not supported in v20 ABI. Because
> > rte_cryptodev_info_get is called by other API functions,
> > rte_cryptodev_sym_capability_get function is versioned the same way.
> >
> > Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
> > ---
> > v2:
> > - changed version numbers of symbols to 20.0.2
> > v3:
> > - added v2/v3 informations
> > - changed version numbers of symbols to 21
> > v4:
> > - fixed clang build by movind binding default symbol
> > - implemented mailing list comments
> > - added abidiff tool suppression entries
> > v5:
> > - fixed meson build
> >
> >  devtools/libabigail.abignore                   |   8 ++
> >  lib/librte_cryptodev/meson.build               |   1 +
> >  lib/librte_cryptodev/rte_cryptodev.c           | 147
> ++++++++++++++++++++++++-
> >  lib/librte_cryptodev/rte_cryptodev.h           |  34 +++++-
> >  lib/librte_cryptodev/rte_cryptodev_version.map |   7 ++
> >  5 files changed, 191 insertions(+), 6 deletions(-)
> >
> [SNIP]
> 
> Acked-by: Ray Kinsella <mdr@ashroe.eu>

^ permalink raw reply	[relevance 4%]

* [dpdk-dev] [PATCH v6 00/10] NXP DPAAx fixes and enhancement
  2020-05-07 10:46  3%   ` [dpdk-dev] [PATCH v4 0/9] " Hemant Agrawal
  2020-05-08 12:59  3%     ` [dpdk-dev] [PATCH v5 " Hemant Agrawal
@ 2020-05-08 13:02  3%     ` Hemant Agrawal
  1 sibling, 0 replies; 200+ results
From: Hemant Agrawal @ 2020-05-08 13:02 UTC (permalink / raw)
  To: dev, ferruh.yigit

v6: missed one patch
v5: split the default param patch and enhance commit details
v4: address the review comments
v3: Limiting the patches to avoid ABI breakage.

Apeksha Gupta (1):
  bus/fslmc: fix dereferencing null pointer

Hemant Agrawal (4):
  net/dpaa2: add default values for Rx params in info
  net/dpaa2: reduce prints in queue count functions
  bus/fslmc: fix the size of qman fq desc
  net/dpaa2: add the support for additional link speeds

Jun Yang (1):
  net/dpaa2: fix cong group id for multiple tcs

Nipun Gupta (3):
  net/dpaa2: do not prefetch annotaion for physical mode
  drivers: dpaa2 enhance portal alloc failure log
  net/dpaa2: support UDP dst port based muxing

Rohit Raj (1):
  net/dpaa2: fix 10G port negotiation issue

 doc/guides/nics/features/dpaa2.ini          |  2 +-
 drivers/bus/fslmc/portal/dpaa2_hw_pvt.h     |  6 +--
 drivers/bus/fslmc/qbman/qbman_debug.c       |  9 ++--
 drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c |  8 ++-
 drivers/event/dpaa2/dpaa2_eventdev.c        |  8 ++-
 drivers/mempool/dpaa2/dpaa2_hw_mempool.c    | 12 +++--
 drivers/net/dpaa/dpaa_ethdev.c              |  4 ++
 drivers/net/dpaa/dpaa_ethdev.h              |  1 +
 drivers/net/dpaa2/dpaa2_ethdev.c            | 32 ++++++++----
 drivers/net/dpaa2/dpaa2_ethdev.h            |  2 +
 drivers/net/dpaa2/dpaa2_mux.c               | 24 ++++++++-
 drivers/net/dpaa2/dpaa2_rxtx.c              | 56 ++++++++++++++-------
 drivers/raw/dpaa2_cmdif/dpaa2_cmdif.c       |  8 ++-
 drivers/raw/dpaa2_qdma/dpaa2_qdma.c         | 12 +++--
 14 files changed, 135 insertions(+), 49 deletions(-)

-- 
2.17.1


^ permalink raw reply	[relevance 3%]

* [dpdk-dev] [PATCH v5 0/9] NXP DPAAx fixes and enhancements
  2020-05-07 10:46  3%   ` [dpdk-dev] [PATCH v4 0/9] " Hemant Agrawal
@ 2020-05-08 12:59  3%     ` Hemant Agrawal
  2020-05-08 13:02  3%     ` [dpdk-dev] [PATCH v6 00/10] NXP DPAAx fixes and enhancement Hemant Agrawal
  1 sibling, 0 replies; 200+ results
From: Hemant Agrawal @ 2020-05-08 12:59 UTC (permalink / raw)
  To: dev, ferruh.yigit

v5: split the default param patch and enhance commit details
v4: address the review comments
v3: Limiting the patches to avoid ABI breakage.

Hemant Agrawal (4):
  net/dpaa2: add default values for Rx params in info
  net/dpaa2: reduce prints in queue count functions
  bus/fslmc: fix the size of qman fq desc
  net/dpaa2: add the support for additional link speeds

Jun Yang (1):
  net/dpaa2: fix cong group id for multiple tcs

Nipun Gupta (3):
  net/dpaa2: do not prefetch annotaion for physical mode
  drivers: dpaa2 enhance portal alloc failure log
  net/dpaa2: support UDP dst port based muxing

Rohit Raj (1):
  net/dpaa2: fix 10G port negotiation issue

 doc/guides/nics/features/dpaa2.ini          |  2 +-
 drivers/bus/fslmc/portal/dpaa2_hw_pvt.h     |  6 +--
 drivers/bus/fslmc/qbman/qbman_debug.c       |  2 +-
 drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c |  8 ++-
 drivers/event/dpaa2/dpaa2_eventdev.c        |  8 ++-
 drivers/mempool/dpaa2/dpaa2_hw_mempool.c    | 12 +++--
 drivers/net/dpaa/dpaa_ethdev.c              |  4 ++
 drivers/net/dpaa/dpaa_ethdev.h              |  1 +
 drivers/net/dpaa2/dpaa2_ethdev.c            | 32 ++++++++----
 drivers/net/dpaa2/dpaa2_ethdev.h            |  2 +
 drivers/net/dpaa2/dpaa2_mux.c               | 24 ++++++++-
 drivers/net/dpaa2/dpaa2_rxtx.c              | 56 ++++++++++++++-------
 drivers/raw/dpaa2_cmdif/dpaa2_cmdif.c       |  8 ++-
 drivers/raw/dpaa2_qdma/dpaa2_qdma.c         | 12 +++--
 14 files changed, 131 insertions(+), 46 deletions(-)

-- 
2.17.1


^ permalink raw reply	[relevance 3%]

* Re: [dpdk-dev] [RFC] hash: unify crc32 API header for x86 and ARM
  2020-04-29 18:05  2% [dpdk-dev] [RFC] hash: unify crc32 API header for x86 and ARM pbhagavatula
  2020-04-30  9:14  0% ` Van Haaren, Harry
  2020-05-06 22:02  0% ` Wang, Yipeng1
@ 2020-05-08 12:55  0% ` Ananyev, Konstantin
  2020-05-10 22:53  0%   ` Pavan Nikhilesh Bhagavatula
  2020-05-12 20:40  3% ` [dpdk-dev] [RFC v2] " pbhagavatula
  3 siblings, 1 reply; 200+ results
From: Ananyev, Konstantin @ 2020-05-08 12:55 UTC (permalink / raw)
  To: pbhagavatula, jerinj, thomas, Wang, Yipeng1, Gobriel, Sameh,
	Richardson, Bruce, Ruifeng Wang
  Cc: dev


> From: Pavan Nikhilesh <pbhagavatula@marvell.com>
> 
> Merge crc32 hash calculation public API headers for x86 and ARM,
> split implementations of x86 and ARM into their respective private
> headers.
> This reduces the ifdef code clutter while keeping current ABI intact.
> 
> Although we install `rte_crc_arm64.h` it is not used in any of the lib or
> drivers layers. All the libs and drivers use `rte_hash_crc.h` which falls
> back to SW crc32 calculation for ARM platform.
> 
> Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
> ---
> 
>  Currently, if application incorrectly sets CRC32_ARM64 as crc32 algorithm
>  through `rte_hash_crc_set_alg()` on x86 or vice-versa we fallback to algorithm
>  set previously via `rte_hash_crc_set_alg()` instead of setting the best
>  available.
>  This behaviour should probably change to setting the best available algorithm
>  and is up for discussion.
> 
>  app/test/test_hash.c            |   6 +
>  lib/librte_hash/Makefile        |   5 -
>  lib/librte_hash/crc_arm64.h     |  67 +++++++++++
>  lib/librte_hash/crc_x86.h       |  68 +++++++++++
>  lib/librte_hash/meson.build     |   3 +-
>  lib/librte_hash/rte_crc_arm64.h | 183 ------------------------------
>  lib/librte_hash/rte_hash_crc.h  | 193 +++++++++++++-------------------
>  7 files changed, 219 insertions(+), 306 deletions(-)
>  create mode 100644 lib/librte_hash/crc_arm64.h
>  create mode 100644 lib/librte_hash/crc_x86.h
>  delete mode 100644 lib/librte_hash/rte_crc_arm64.h
> 
> diff --git a/app/test/test_hash.c b/app/test/test_hash.c
> index afa3a1a3c..7bd457dac 100644
> --- a/app/test/test_hash.c
> +++ b/app/test/test_hash.c
> @@ -195,7 +195,13 @@ test_crc32_hash_alg_equiv(void)
>  	}
> 
>  	/* Resetting to best available algorithm */
> +#if defined RTE_ARCH_X86
>  	rte_hash_crc_set_alg(CRC32_SSE42_x64);
> +#elif defined RTE_ARCH_ARM64
> +	rte_hash_crc_set_alg(CRC32_ARM64);
> +#else
> +	rte_hash_crc_set_alg(CRC32_SW);
> +#endif
> 
>  	if (i == CRC32_ITERATIONS)
>  		return 0;
> diff --git a/lib/librte_hash/Makefile b/lib/librte_hash/Makefile
> index ec9f86499..f640afc42 100644
> --- a/lib/librte_hash/Makefile
> +++ b/lib/librte_hash/Makefile
> @@ -19,11 +19,6 @@ SRCS-$(CONFIG_RTE_LIBRTE_HASH) += rte_fbk_hash.c
>  # install this header file
>  SYMLINK-$(CONFIG_RTE_LIBRTE_HASH)-include := rte_hash.h
>  SYMLINK-$(CONFIG_RTE_LIBRTE_HASH)-include += rte_hash_crc.h
> -ifeq ($(CONFIG_RTE_ARCH_ARM64),y)
> -ifneq ($(findstring RTE_MACHINE_CPUFLAG_CRC32,$(CFLAGS)),)
> -SYMLINK-$(CONFIG_RTE_LIBRTE_HASH)-include += rte_crc_arm64.h
> -endif
> -endif
>  SYMLINK-$(CONFIG_RTE_LIBRTE_HASH)-include += rte_jhash.h
>  SYMLINK-$(CONFIG_RTE_LIBRTE_HASH)-include += rte_thash.h
>  SYMLINK-$(CONFIG_RTE_LIBRTE_HASH)-include += rte_fbk_hash.h
> diff --git a/lib/librte_hash/crc_arm64.h b/lib/librte_hash/crc_arm64.h
> new file mode 100644
> index 000000000..8e75f8297

Wouldn't that break 'make  install T=...'?
As now rte_hash_crc.h includes not public headers (crc_x86.h, etc.).
Same question about external apps, where they would get from these headers?

> --- /dev/null
> +++ b/lib/librte_hash/crc_arm64.h
> @@ -0,0 +1,67 @@
> +/* SPDX-License-Identifier: BSD-3-Clause
> + * Copyright(c) 2015 Cavium, Inc
> + */
> +
> +#ifndef _CRC_ARM64_H_
> +#define _CRC_ARM64_H_
> +
> +/**
> + * @file
> + *
> + * CRC arm64 Hash
> + */
> +
> +#ifdef __cplusplus
> +extern "C" {
> +#endif
> +
> +#include <stdint.h>
> +#include <rte_cpuflags.h>
> +#include <rte_branch_prediction.h>
> +#include <rte_common.h>
> +
> +static inline uint32_t
> +crc32c_arm64_u8(uint8_t data, uint32_t init_val)
> +{
> +	__asm__ volatile(
> +			"crc32cb %w[crc], %w[crc], %w[value]"
> +			: [crc] "+r" (init_val)
> +			: [value] "r" (data));
> +	return init_val;
> +}
> +
> +static inline uint32_t
> +crc32c_arm64_u16(uint16_t data, uint32_t init_val)
> +{
> +	__asm__ volatile(
> +			"crc32ch %w[crc], %w[crc], %w[value]"
> +			: [crc] "+r" (init_val)
> +			: [value] "r" (data));
> +	return init_val;
> +}
> +
> +static inline uint32_t
> +crc32c_arm64_u32(uint32_t data, uint32_t init_val)
> +{
> +	__asm__ volatile(
> +			"crc32cw %w[crc], %w[crc], %w[value]"
> +			: [crc] "+r" (init_val)
> +			: [value] "r" (data));
> +	return init_val;
> +}
> +
> +static inline uint32_t
> +crc32c_arm64_u64(uint64_t data, uint32_t init_val)
> +{
> +	__asm__ volatile(
> +			"crc32cx %w[crc], %w[crc], %x[value]"
> +			: [crc] "+r" (init_val)
> +			: [value] "r" (data));
> +	return init_val;
> +}
> +
> +#ifdef __cplusplus
> +}
> +#endif
> +
> +#endif /* _CRC_ARM64_H_ */
> diff --git a/lib/librte_hash/crc_x86.h b/lib/librte_hash/crc_x86.h
> new file mode 100644
> index 000000000..fb45f2e98
> --- /dev/null
> +++ b/lib/librte_hash/crc_x86.h
> @@ -0,0 +1,68 @@
> +/* SPDX-License-Identifier: BSD-3-Clause
> + * Copyright(c) 2010-2014 Intel Corporation
> + */
> +
> +#ifndef _CRC_X86_H_
> +#define _CRC_X86_H_
> +
> +#if defined(RTE_ARCH_X86)
> +static inline uint32_t
> +crc32c_sse42_u8(uint8_t data, uint32_t init_val)
> +{
> +	__asm__ volatile(
> +			"crc32b %[data], %[init_val];"
> +			: [init_val] "+r" (init_val)
> +			: [data] "rm" (data));
> +	return init_val;
> +}
> +
> +static inline uint32_t
> +crc32c_sse42_u16(uint16_t data, uint32_t init_val)
> +{
> +	__asm__ volatile(
> +			"crc32w %[data], %[init_val];"
> +			: [init_val] "+r" (init_val)
> +			: [data] "rm" (data));
> +	return init_val;
> +}
> +
> +static inline uint32_t
> +crc32c_sse42_u32(uint32_t data, uint32_t init_val)
> +{
> +	__asm__ volatile(
> +			"crc32l %[data], %[init_val];"
> +			: [init_val] "+r" (init_val)
> +			: [data] "rm" (data));
> +	return init_val;
> +}
> +
> +static inline uint32_t
> +crc32c_sse42_u64_mimic(uint64_t data, uint32_t init_val)
> +{
> +	union {
> +		uint32_t u32[2];
> +		uint64_t u64;
> +	} d;
> +
> +	d.u64 = data;
> +	init_val = crc32c_sse42_u32(d.u32[0], init_val);
> +	init_val = crc32c_sse42_u32(d.u32[1], init_val);
> +	return init_val;
> +}
> +#endif
> +
> +#ifdef RTE_ARCH_X86_64
> +static inline uint32_t
> +crc32c_sse42_u64(uint64_t data, uint32_t init_val)
> +{
> +	uint64_t val = init_val;
> +
> +	__asm__ volatile(
> +			"crc32q %[data], %[init_val];"
> +			: [init_val] "+r" (val)
> +			: [data] "rm" (data));
> +	return (uint32_t)val;
> +}
> +#endif
> +
> +#endif
> diff --git a/lib/librte_hash/meson.build b/lib/librte_hash/meson.build
> index 6ab46ae9d..90a180bc8 100644
> --- a/lib/librte_hash/meson.build
> +++ b/lib/librte_hash/meson.build
> @@ -1,8 +1,7 @@
>  # SPDX-License-Identifier: BSD-3-Clause
>  # Copyright(c) 2017 Intel Corporation
> 
> -headers = files('rte_crc_arm64.h',
> -	'rte_fbk_hash.h',
> +headers = files('rte_fbk_hash.h',
>  	'rte_hash_crc.h',
>  	'rte_hash.h',
>  	'rte_jhash.h',
> diff --git a/lib/librte_hash/rte_crc_arm64.h b/lib/librte_hash/rte_crc_arm64.h
> deleted file mode 100644
> index b4628cfc0..000000000
> --- a/lib/librte_hash/rte_crc_arm64.h
> +++ /dev/null
> @@ -1,183 +0,0 @@
> -/* SPDX-License-Identifier: BSD-3-Clause
> - * Copyright(c) 2015 Cavium, Inc
> - */
> -
> -#ifndef _RTE_CRC_ARM64_H_
> -#define _RTE_CRC_ARM64_H_
> -
> -/**
> - * @file
> - *
> - * RTE CRC arm64 Hash
> - */
> -
> -#ifdef __cplusplus
> -extern "C" {
> -#endif
> -
> -#include <stdint.h>
> -#include <rte_cpuflags.h>
> -#include <rte_branch_prediction.h>
> -#include <rte_common.h>
> -
> -static inline uint32_t
> -crc32c_arm64_u8(uint8_t data, uint32_t init_val)
> -{
> -	__asm__ volatile(
> -			"crc32cb %w[crc], %w[crc], %w[value]"
> -			: [crc] "+r" (init_val)
> -			: [value] "r" (data));
> -	return init_val;
> -}
> -
> -static inline uint32_t
> -crc32c_arm64_u16(uint16_t data, uint32_t init_val)
> -{
> -	__asm__ volatile(
> -			"crc32ch %w[crc], %w[crc], %w[value]"
> -			: [crc] "+r" (init_val)
> -			: [value] "r" (data));
> -	return init_val;
> -}
> -
> -static inline uint32_t
> -crc32c_arm64_u32(uint32_t data, uint32_t init_val)
> -{
> -	__asm__ volatile(
> -			"crc32cw %w[crc], %w[crc], %w[value]"
> -			: [crc] "+r" (init_val)
> -			: [value] "r" (data));
> -	return init_val;
> -}
> -
> -static inline uint32_t
> -crc32c_arm64_u64(uint64_t data, uint32_t init_val)
> -{
> -	__asm__ volatile(
> -			"crc32cx %w[crc], %w[crc], %x[value]"
> -			: [crc] "+r" (init_val)
> -			: [value] "r" (data));
> -	return init_val;
> -}
> -
> -/**
> - * Allow or disallow use of arm64 SIMD instrinsics for CRC32 hash
> - * calculation.
> - *
> - * @param alg
> - *   An OR of following flags:
> - *   - (CRC32_SW) Don't use arm64 crc intrinsics
> - *   - (CRC32_ARM64) Use ARMv8 CRC intrinsic if available
> - *
> - */
> -static inline void
> -rte_hash_crc_set_alg(uint8_t alg)
> -{
> -	switch (alg) {
> -	case CRC32_ARM64:
> -		if (!rte_cpu_get_flag_enabled(RTE_CPUFLAG_CRC32))
> -			alg = CRC32_SW;
> -		/* fall-through */
> -	case CRC32_SW:
> -		crc32_alg = alg;
> -		/* fall-through */
> -	default:
> -		break;
> -	}
> -}
> -
> -/* Setting the best available algorithm */
> -RTE_INIT(rte_hash_crc_init_alg)
> -{
> -	rte_hash_crc_set_alg(CRC32_ARM64);
> -}
> -
> -/**
> - * Use single crc32 instruction to perform a hash on a 1 byte value.
> - * Fall back to software crc32 implementation in case arm64 crc intrinsics is
> - * not supported
> - *
> - * @param data
> - *   Data to perform hash on.
> - * @param init_val
> - *   Value to initialise hash generator.
> - * @return
> - *   32bit calculated hash value.
> - */
> -static inline uint32_t
> -rte_hash_crc_1byte(uint8_t data, uint32_t init_val)
> -{
> -	if (likely(crc32_alg & CRC32_ARM64))
> -		return crc32c_arm64_u8(data, init_val);
> -
> -	return crc32c_1byte(data, init_val);
> -}
> -
> -/**
> - * Use single crc32 instruction to perform a hash on a 2 bytes value.
> - * Fall back to software crc32 implementation in case arm64 crc intrinsics is
> - * not supported
> - *
> - * @param data
> - *   Data to perform hash on.
> - * @param init_val
> - *   Value to initialise hash generator.
> - * @return
> - *   32bit calculated hash value.
> - */
> -static inline uint32_t
> -rte_hash_crc_2byte(uint16_t data, uint32_t init_val)
> -{
> -	if (likely(crc32_alg & CRC32_ARM64))
> -		return crc32c_arm64_u16(data, init_val);
> -
> -	return crc32c_2bytes(data, init_val);
> -}
> -
> -/**
> - * Use single crc32 instruction to perform a hash on a 4 byte value.
> - * Fall back to software crc32 implementation in case arm64 crc intrinsics is
> - * not supported
> - *
> - * @param data
> - *   Data to perform hash on.
> - * @param init_val
> - *   Value to initialise hash generator.
> - * @return
> - *   32bit calculated hash value.
> - */
> -static inline uint32_t
> -rte_hash_crc_4byte(uint32_t data, uint32_t init_val)
> -{
> -	if (likely(crc32_alg & CRC32_ARM64))
> -		return crc32c_arm64_u32(data, init_val);
> -
> -	return crc32c_1word(data, init_val);
> -}
> -
> -/**
> - * Use single crc32 instruction to perform a hash on a 8 byte value.
> - * Fall back to software crc32 implementation in case arm64 crc intrinsics is
> - * not supported
> - *
> - * @param data
> - *   Data to perform hash on.
> - * @param init_val
> - *   Value to initialise hash generator.
> - * @return
> - *   32bit calculated hash value.
> - */
> -static inline uint32_t
> -rte_hash_crc_8byte(uint64_t data, uint32_t init_val)
> -{
> -	if (likely(crc32_alg == CRC32_ARM64))
> -		return crc32c_arm64_u64(data, init_val);
> -
> -	return crc32c_2words(data, init_val);
> -}
> -
> -#ifdef __cplusplus
> -}
> -#endif
> -
> -#endif /* _RTE_CRC_ARM64_H_ */
> diff --git a/lib/librte_hash/rte_hash_crc.h b/lib/librte_hash/rte_hash_crc.h
> index cf28031b3..292697db1 100644
> --- a/lib/librte_hash/rte_hash_crc.h
> +++ b/lib/librte_hash/rte_hash_crc.h
> @@ -21,6 +21,15 @@ extern "C" {
>  #include <rte_branch_prediction.h>
>  #include <rte_common.h>
> 
> +typedef uint32_t
> +(*crc32_handler_1b)(uint8_t data, uint32_t init_val);
> +typedef uint32_t
> +(*crc32_handler_2b)(uint16_t data, uint32_t init_val);
> +typedef uint32_t
> +(*crc32_handler_4b)(uint32_t data, uint32_t init_val);
> +typedef uint32_t
> +(*crc32_handler_8b)(uint64_t data, uint32_t init_val);
> +
>  /* Lookup tables for software implementation of CRC32C */
>  static const uint32_t crc32c_tables[8][256] = {{
>   0x00000000, 0xF26B8303, 0xE13B70F7, 0x1350F3F4, 0xC79A971F, 0x35F1141C, 0x26A1E7E8, 0xD4CA64EB,
> @@ -322,7 +331,7 @@ crc32c_2bytes(uint16_t data, uint32_t init_val)
>  }
> 
>  static inline uint32_t
> -crc32c_1word(uint32_t data, uint32_t init_val)
> +crc32c_4bytes(uint32_t data, uint32_t init_val)
>  {
>  	uint32_t crc, term1, term2;
>  	crc = init_val;
> @@ -336,7 +345,7 @@ crc32c_1word(uint32_t data, uint32_t init_val)
>  }
> 
>  static inline uint32_t
> -crc32c_2words(uint64_t data, uint32_t init_val)
> +crc32c_8bytes(uint64_t data, uint32_t init_val)
>  {
>  	uint32_t crc, term1, term2;
>  	union {
> @@ -357,109 +366,94 @@ crc32c_2words(uint64_t data, uint32_t init_val)
> 
>  	return crc;
>  }
> -
> -#if defined(RTE_ARCH_X86)
> -static inline uint32_t
> -crc32c_sse42_u8(uint8_t data, uint32_t init_val)
> -{
> -	__asm__ volatile(
> -			"crc32b %[data], %[init_val];"
> -			: [init_val] "+r" (init_val)
> -			: [data] "rm" (data));
> -	return init_val;
> -}
> -
> -static inline uint32_t
> -crc32c_sse42_u16(uint16_t data, uint32_t init_val)
> -{
> -	__asm__ volatile(
> -			"crc32w %[data], %[init_val];"
> -			: [init_val] "+r" (init_val)
> -			: [data] "rm" (data));
> -	return init_val;
> -}
> -
> -static inline uint32_t
> -crc32c_sse42_u32(uint32_t data, uint32_t init_val)
> -{
> -	__asm__ volatile(
> -			"crc32l %[data], %[init_val];"
> -			: [init_val] "+r" (init_val)
> -			: [data] "rm" (data));
> -	return init_val;
> -}
> -
> -static inline uint32_t
> -crc32c_sse42_u64_mimic(uint64_t data, uint64_t init_val)
> -{
> -	union {
> -		uint32_t u32[2];
> -		uint64_t u64;
> -	} d;
> -
> -	d.u64 = data;
> -	init_val = crc32c_sse42_u32(d.u32[0], (uint32_t)init_val);
> -	init_val = crc32c_sse42_u32(d.u32[1], (uint32_t)init_val);
> -	return (uint32_t)init_val;
> -}
> -#endif
> -
> -#ifdef RTE_ARCH_X86_64
> -static inline uint32_t
> -crc32c_sse42_u64(uint64_t data, uint64_t init_val)
> -{
> -	__asm__ volatile(
> -			"crc32q %[data], %[init_val];"
> -			: [init_val] "+r" (init_val)
> -			: [data] "rm" (data));
> -	return (uint32_t)init_val;
> -}
> -#endif
> -
>  #define CRC32_SW            (1U << 0)
>  #define CRC32_SSE42         (1U << 1)
>  #define CRC32_x64           (1U << 2)
>  #define CRC32_SSE42_x64     (CRC32_x64|CRC32_SSE42)
>  #define CRC32_ARM64         (1U << 3)
> 
> -static uint8_t crc32_alg = CRC32_SW;
> +static crc32_handler_1b crc32_1b = crc32c_1byte;
> +static crc32_handler_2b crc32_2b = crc32c_2bytes;
> +static crc32_handler_4b crc32_4b = crc32c_4bytes;
> +static crc32_handler_8b crc32_8b = crc32c_8bytes;
> 
>  #if defined(RTE_ARCH_ARM64) && defined(RTE_MACHINE_CPUFLAG_CRC32)
> -#include "rte_crc_arm64.h"
> -#else
> +#include "crc_arm64.h"
> +#endif
> +
> +#if defined(RTE_ARCH_X86)
> +#include "crc_x86.h"
> +#endif
> 
>  /**
> - * Allow or disallow use of SSE4.2 instrinsics for CRC32 hash
> + * Allow or disallow use of SSE4.2/ARMv8 instrinsics for CRC32 hash
>   * calculation.
>   *
>   * @param alg
>   *   An OR of following flags:
> - *   - (CRC32_SW) Don't use SSE4.2 intrinsics
> + *   - (CRC32_SW) Don't use SSE4.2 intrinsics (default non-[x86/ARMv8])
>   *   - (CRC32_SSE42) Use SSE4.2 intrinsics if available
> - *   - (CRC32_SSE42_x64) Use 64-bit SSE4.2 intrinsic if available (default)
> - *
> + *   - (CRC32_SSE42_x64) Use 64-bit SSE4.2 intrinsic if available (default x86)
> + *   - (CRC32_ARM64) Use ARMv8 CRC intrinsic if available
>   */
>  static inline void
>  rte_hash_crc_set_alg(uint8_t alg)
>  {
> -#if defined(RTE_ARCH_X86)
> -	if (alg == CRC32_SSE42_x64 &&
> -			!rte_cpu_get_flag_enabled(RTE_CPUFLAG_EM64T))
> -		alg = CRC32_SSE42;
> +	switch (alg) {
> +	case CRC32_SSE42_x64:
> +#if defined RTE_ARCH_X86
> +		crc32_1b = crc32c_sse42_u8;
> +		crc32_2b = crc32c_sse42_u16;
> +		crc32_4b = crc32c_sse42_u32;
> +
> +	if (!rte_cpu_get_flag_enabled(RTE_CPUFLAG_EM64T))
> +		crc32_8b = crc32c_sse42_u64_mimic;
> +	else
> +		crc32_8b = crc32c_sse42_u64;
>  #endif
> -	crc32_alg = alg;
> +		break;
> +	case CRC32_SSE42:
> +#if defined RTE_ARCH_X86
> +		crc32_1b = crc32c_sse42_u8;
> +		crc32_2b = crc32c_sse42_u16;
> +		crc32_4b = crc32c_sse42_u32;
> +		crc32_8b = crc32c_sse42_u64_mimic;
> +#endif
> +		break;
> +	case CRC32_ARM64:
> +#if defined RTE_ARCH_ARM64
> +	if (rte_cpu_get_flag_enabled(RTE_CPUFLAG_CRC32)) {
> +		crc32_1b = crc32c_arm64_u8;
> +		crc32_2b = crc32c_arm64_u16;
> +		crc32_4b = crc32c_arm64_u32;
> +		crc32_8b = crc32c_arm64_u64;
> +	}
> +#endif
> +		break;
> +	case CRC32_SW:
> +	default:
> +		crc32_1b = crc32c_1byte;
> +		crc32_2b = crc32c_2bytes;
> +		crc32_4b = crc32c_4bytes;
> +		crc32_8b = crc32c_8bytes;
> +	break;
> +	}
>  }
> 
>  /* Setting the best available algorithm */
>  RTE_INIT(rte_hash_crc_init_alg)
>  {
> +#if defined RTE_ARCH_X86
>  	rte_hash_crc_set_alg(CRC32_SSE42_x64);
> +#elif defined RTE_ARCH_ARM64
> +	rte_hash_crc_set_alg(CRC32_ARM64);
> +#else
> +	rte_hash_crc_set_alg(CRC32_SW);
> +#endif
>  }
> 
>  /**
> - * Use single crc32 instruction to perform a hash on a byte value.
> - * Fall back to software crc32 implementation in case SSE4.2 is
> - * not supported
> + * Calculate crc32 hash value of 1bytes.
>   *
>   * @param data
>   *   Data to perform hash on.
> @@ -471,18 +465,11 @@ RTE_INIT(rte_hash_crc_init_alg)
>  static inline uint32_t
>  rte_hash_crc_1byte(uint8_t data, uint32_t init_val)
>  {
> -#if defined RTE_ARCH_X86
> -	if (likely(crc32_alg & CRC32_SSE42))
> -		return crc32c_sse42_u8(data, init_val);
> -#endif
> -
> -	return crc32c_1byte(data, init_val);
> +	return (crc32_1b)(data, init_val);
>  }
> 
>  /**
> - * Use single crc32 instruction to perform a hash on a 2 bytes value.
> - * Fall back to software crc32 implementation in case SSE4.2 is
> - * not supported
> + * Calculate crc32 hash value of 2bytes.
>   *
>   * @param data
>   *   Data to perform hash on.
> @@ -494,18 +481,11 @@ rte_hash_crc_1byte(uint8_t data, uint32_t init_val)
>  static inline uint32_t
>  rte_hash_crc_2byte(uint16_t data, uint32_t init_val)
>  {
> -#if defined RTE_ARCH_X86
> -	if (likely(crc32_alg & CRC32_SSE42))
> -		return crc32c_sse42_u16(data, init_val);
> -#endif
> -
> -	return crc32c_2bytes(data, init_val);
> +	return (crc32_2b)(data, init_val);
>  }
> 
>  /**
> - * Use single crc32 instruction to perform a hash on a 4 byte value.
> - * Fall back to software crc32 implementation in case SSE4.2 is
> - * not supported
> + * Calculate crc32 hash value of 4bytes.
>   *
>   * @param data
>   *   Data to perform hash on.
> @@ -517,18 +497,11 @@ rte_hash_crc_2byte(uint16_t data, uint32_t init_val)
>  static inline uint32_t
>  rte_hash_crc_4byte(uint32_t data, uint32_t init_val)
>  {
> -#if defined RTE_ARCH_X86
> -	if (likely(crc32_alg & CRC32_SSE42))
> -		return crc32c_sse42_u32(data, init_val);
> -#endif
> -
> -	return crc32c_1word(data, init_val);
> +	return (crc32_4b)(data, init_val);
>  }
> 
>  /**
> - * Use single crc32 instruction to perform a hash on a 8 byte value.
> - * Fall back to software crc32 implementation in case SSE4.2 is
> - * not supported
> + * Calculate crc32 hash value of 8bytes.
>   *
>   * @param data
>   *   Data to perform hash on.
> @@ -540,21 +513,9 @@ rte_hash_crc_4byte(uint32_t data, uint32_t init_val)
>  static inline uint32_t
>  rte_hash_crc_8byte(uint64_t data, uint32_t init_val)
>  {
> -#ifdef RTE_ARCH_X86_64
> -	if (likely(crc32_alg == CRC32_SSE42_x64))
> -		return crc32c_sse42_u64(data, init_val);
> -#endif
> -
> -#if defined RTE_ARCH_X86
> -	if (likely(crc32_alg & CRC32_SSE42))
> -		return crc32c_sse42_u64_mimic(data, init_val);
> -#endif
> -
> -	return crc32c_2words(data, init_val);
> +	return (crc32_8b)(data, init_val);
>  }
> 
> -#endif
> -
>  /**
>   * Calculate CRC32 hash on user-supplied byte array.
>   *
> --
> 2.17.1


^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [PATCH] librte_ethdev: extend dpdk api led control to query capability
  @ 2020-05-08 12:11  0%         ` Ferruh Yigit
  0 siblings, 0 replies; 200+ results
From: Ferruh Yigit @ 2020-05-08 12:11 UTC (permalink / raw)
  To: Laurent Hardy, Thomas Monjalon, David Marchand
  Cc: dev, Olivier Matz, Andrew Rybchenko

On 1/8/2020 1:58 PM, Laurent Hardy wrote:
> 
> On 1/8/20 2:06 PM, Thomas Monjalon wrote:
>> 08/01/2020 13:59, Ferruh Yigit:
>>> On 1/8/2020 10:31 AM, Laurent Hardy wrote:
>>>> Hi all,
>>>>
>>>> On 1/8/20 10:55 AM, David Marchand wrote:
>>>>> On Wed, Jan 8, 2020 at 10:09 AM Ferruh Yigit <ferruh.yigit@intel.com> wrote:
>>>>>> On 1/8/2020 8:56 AM, David Marchand wrote:
>>>>>>> Hello Laurent,
>>>>>>>
>>>>>>> Bonne année.
>>>>>>>
>>>>>>> Cc: maintainers.
>>>>>>>
>>>>>>> On Tue, Jan 7, 2020 at 3:57 PM Laurent Hardy <laurent.hardy@6wind.com> wrote:
>>>>>>>> In current led control API we have no way to know if a device is able
>>>>>>>> to handle on/off requests coming from the application.
>>>>>>>> Knowing if the device is led control capable could be useful to avoid
>>>>>>>> exchanges between application and kernel.
>>>>>>>> Using the on/off requests to flag if the device is led control capable
>>>>>>>> (based on the ENOSUP returned error) is not convenient as such request
>>>>>>>> can change the led state on device.
>>>>>>>>
>>>>>>>> This patch adds a new function rte_eth_led_ctrl_capable() that will look
>>>>>>>> for led_off/on dev ops availability on the related pmd, to know if the
>>>>>>>> device is able to handle such led control requests (on/off).
>>>>>>> This patch breaks the ABI, which is BAD :-).
>>>>>> Why it is an ABI break, dev_ops should be between library and drivers, so it
>>>>>> should be out of the ABI concern, isn't it.
>>>>> You are right.
>>>>> So in our context, this is not an ABI breakage.
>>>>> But abidiff still reports it, so maybe some filtering is required to
>>>>> avoid this false positive.
>>>>>
>>>>> Note that if we insert an ops before rx_queue_count, we would have a
>>>>> real ABI breakage, as this ops is accessed via an inline wrapper by
>>>>> applications.
>>>>>
>>>>>
>>>>>>> This new api only needs to look at the existing ops, so you can remove
>>>>>>> the (unused in your patch) dev_led_ctrl_capable ops.
>>>>>>>
>>>>>>> OTOH, would it make sense to expose this capability in dev_flags?
>>>>>>>
>>>>>> 'rte_eth_led_on()' & 'rte_eth_led_off()' APIs returns '-ENOTSUP' when the not
>>>>>> supported, can that help application to understand?
>>>>> You might want to know it is supported without changing the state.
>>>>> Laurent?
>>>> First, happy new year :)
>>>>
>>>> Yes exactly, the purpose of this patch is to query if the device is led
>>>> control capable or not without changing the led state.
>>>>
>>>> About exposing the capability through a dev_flags, means to make some
>>>> modification in each pmds. It looks more easy in term of pmds
>>>> maintenance to relying on the rte_eth_led_off()/on() dev ops
>>>> availability at rte_ethdev level, right ?
>>>>
>>> 'dev_flag' definition is not clear, right now it holds the combination of status
>>> and capability. And we have 'rte_eth_dev_info' struct, which is again
>>> combination of device capability and status.
>> I agree capabilities in ethdev are a bit of a mess.
>> I would appreciate someone makes a complete audit of it
>> so we can discuss how to improve the situation.
>>
>>
>>> Perhaps we should have explicit capabilities and status fields, even in the
>>> rte_device level which inherited by net/crypto devices etc..
>> No, ethdev capabilities should stay in ethdev.
>>
>>
>>> But for dev_ops, instead of having another capabilities indicator, which
>>> requires PMDs to keep this synchronized, I think it is better if we can self
>>> contain this information within dev_ops, like not implementing dev_ops would
>>> mean it is not supported, this way it is easier to maintain and less error prone.
>> It means the dev_ops is resetted at init if a device does not support the feature.
>> It is against having const dev_ops.
>>
>>
>>> Only we should have it without side effect,
>>>
>>> 1- adding an additional 'dry-run' parameter can work, but this means breaking
>>> ABI and updating majority of the ethdev APIs :)
>>> 2- Adding 'is_supported' versions of the APIs as we need can be an option, like
>>> 'rte_eth_led_on_is_supported()'
>>> 3- Olivier's suggestion to add a new API to get the led status, so that this
>>> information can be used select led API which won't cause side affect and let us
>>> learn if it is supported.
>>>
>>> Any other alternatives?
>>>
>>> I would prefer the 2) in above ones, which is very similar to the original patch.
> 
> I can provide a V2 which will remove the useless dev_led_ctrl_capable ops.

+1, dev_led_ctrl_capable is not used.

> 
> About the 'is_supported()' versions of APIs, in the current patch I 
> factorize
> the check on dev ops on and off availability in a same function named
> "led_ctrl_capable" but I can rename it if required.
> 
> Just in this specific case I don't dissociate on and off capability, as 
> being
> able to set the led off without a way to set it on again sounds a bit 
> unusual :)

What about following,
Right now there is not way to get led status, only have on/off
We can store status in ethdev layer add a 'rte_eth_led_status' which can return
status.
If the on/off dev_ops are not set, it can return 'unavailable' which covers your
usecase.


^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [PATCH v3 1/2] common/mlx5: add rte internal tag and avoid comparison
  2020-05-07 11:41  3%         ` Ophir Munk
@ 2020-05-07 20:08  3%           ` Thomas Monjalon
  2020-05-10  8:14  0%             ` Ophir Munk
  0 siblings, 1 reply; 200+ results
From: Thomas Monjalon @ 2020-05-07 20:08 UTC (permalink / raw)
  To: Ophir Munk
  Cc: dev, David Marchand, Ray Kinsella, Matan Azrad, Raslan Darawsheh

07/05/2020 13:41, Ophir Munk:
> From: Thomas Monjalon <thomas@monjalon.net>
> > 07/05/2020 10:56, Ophir Munk:
> > > Move mlx5 symbols in the map file to the INTERNAL section and add
> > > __internal tags to their definitions.
> > > Those symbols were exported in 20.02 and now (20.05) they are removed.
> > [...]
> > > --- a/drivers/common/mlx5/rte_common_mlx5_version.map
> > > +++ b/drivers/common/mlx5/rte_common_mlx5_version.map
> > > @@ -1,8 +1,10 @@
> > > -DPDK_21 {
> > > +INTERNAL {
> > 
> > I think you forgot the EXPERIMENTAL section.
> > In my opinion, everything should be in INTERNAL and marked with
> > __rte_internal in source code.
> > 
> 
> I moved all EXPERIMENTAL to INTERNAL and sent V4.
> A general question: what is the difference between EXPERIMENTAL and INTERNAL functionalities?
> In the end both indicate to skip ABI check. 

Regarding ABI check, yes the result is the same.
Regarding API, it is different:
INTERNAL is forbidden to applications,
while EXPERIMENTAL is to be used with cautious
as compatibility is not guaranteed.



^ permalink raw reply	[relevance 3%]

* Re: [dpdk-dev] [dpdk-stable] [PATCH] drivers/net: fix mlx* glue libraries ABI version
  2020-05-07 12:35  7%   ` David Marchand
@ 2020-05-07 20:04  4%     ` Thomas Monjalon
  0 siblings, 0 replies; 200+ results
From: Thomas Monjalon @ 2020-05-07 20:04 UTC (permalink / raw)
  To: David Marchand
  Cc: dpdk stable, dev, Matan Azrad, Shahaf Shuler,
	Viacheslav Ovsiienko, Raslan, Luca Boccassi, Ray Kinsella

07/05/2020 14:35, David Marchand:
> On Thu, Dec 12, 2019 at 11:18 PM Thomas Monjalon <thomas@monjalon.net> wrote:
> >
> > 04/12/2019 11:05, David Marchand:
> > > Those libraries have been missed when switching to global ABI version.
> >
> > The versioning of the glue libraries are for compatibility checks
> > between the PMD and its dependency (rdma-core) packaged as a plugin,
> > called glue library.
> >
> > This versioning is updated when there is a change in the verbs glue
> > interface, in order to avoid issues in case of PMD and glue
> > updated separately with a non-compatible version.
> > I don't think the mlx glue libraries are part of the ABI policy
> > which acts at the application level.
> >
> > Am I missing something?
> 
> Sorry, this patch fell into the cracks.
> 
> I agree that this is not part of the ABI policy.
> This version only indicates something internal.
> 
> But what I am proposing here is just to remove this special case.
> What is the point of exposing a special version, while the net drivers
> are the only one depending on those glue libs?
> Do you expect separate packaging for the net driver and its associated glue lib?
> 
> This special version also makes it impossible to install two versions
> of dpdk if those versions of dpdk need the same glue version.

Yes I'm OK with using DPDK version for glue versioning.



^ permalink raw reply	[relevance 4%]

* Re: [dpdk-dev] [PATCH v5 2/2] cryptodev: version cryptodev info get function
  2020-05-07 10:57 10% ` [dpdk-dev] [PATCH v5 2/2] cryptodev: version cryptodev info get function Arek Kusztal
  2020-05-07 11:05  0%   ` Ray Kinsella
@ 2020-05-07 18:12  0%   ` Trahe, Fiona
  1 sibling, 0 replies; 200+ results
From: Trahe, Fiona @ 2020-05-07 18:12 UTC (permalink / raw)
  To: Kusztal, ArkadiuszX, dev
  Cc: Kinsella, Ray, akhil.goyal, Richardson, Bruce, Trahe, Fiona



> -----Original Message-----
> From: Kusztal, ArkadiuszX <arkadiuszx.kusztal@intel.com>
> Sent: Thursday, May 7, 2020 11:57 AM
> To: dev@dpdk.org
> Cc: Trahe, Fiona <fiona.trahe@intel.com>; Kinsella, Ray <ray.kinsella@intel.com>;
> akhil.goyal@nxp.com; Richardson, Bruce <bruce.richardson@intel.com>; Kusztal, ArkadiuszX
> <arkadiuszx.kusztal@intel.com>
> Subject: [PATCH v5 2/2] cryptodev: version cryptodev info get function
> 
> This patch adds versioned function rte_cryptodev_info_get()
> to prevent some issues with ABI policy.
> Node v21 works in same way as before, returning driver capabilities
> directly to the API caller. These capabilities may include new elements
> not part of the v20 ABI.
> Node v20 function maintains compatibility with v20 ABI releases
> by stripping out elements not supported in v20 ABI. Because
> rte_cryptodev_info_get is called by other API functions,
> rte_cryptodev_sym_capability_get function is versioned the same way.
> 
> Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>

^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [PATCH] cryptodev: add support for user callback functions
  @ 2020-05-07 14:46  0%   ` Gujjar, Abhinandan S
  0 siblings, 0 replies; 200+ results
From: Gujjar, Abhinandan S @ 2020-05-07 14:46 UTC (permalink / raw)
  To: Ananyev, Konstantin, Doherty, Declan, jerinj, akhil.goyal, dev
  Cc: Vangati, Narender

Hi Konstantin,

Please find the comments inline.

> -----Original Message-----
> From: Ananyev, Konstantin <konstantin.ananyev@intel.com>
> Sent: Friday, April 24, 2020 8:40 PM
> To: Gujjar, Abhinandan S <abhinandan.gujjar@intel.com>; Doherty, Declan
> <declan.doherty@intel.com>; jerinj@marvell.com; akhil.goyal@nxp.com;
> dev@dpdk.org
> Cc: Vangati, Narender <narender.vangati@intel.com>; Gujjar, Abhinandan S
> <abhinandan.gujjar@intel.com>
> Subject: RE: [dpdk-dev] [PATCH] cryptodev: add support for user callback
> functions
> 
> 
> > In an eventdev world, multiple workers (with ordered queue) will be
> > working on IPsec ESP processing. The ESP header's sequence number is
> > unique and has to be sequentially incremented in an orderly manner.
> > This rises a need for incrementing sequence number in crypto stage
> > especially in event crypto adapter. By adding a user callback to
> > cryptodev at enqueue burst, the user callback will get executed in the
> > context of event crypto adapter. This helps the application to
> > increment the ESP sequence number atomically and orderly manner.
> >
> > Signed-off-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
> > ---
> >  config/common_base                             |   1 +
> >  lib/librte_cryptodev/rte_cryptodev.c           | 120 ++++++++++++++++++++++++
> >  lib/librte_cryptodev/rte_cryptodev.h           | 125
> ++++++++++++++++++++++++-
> >  lib/librte_cryptodev/rte_cryptodev_version.map |   3 +
> >  4 files changed, 248 insertions(+), 1 deletion(-)
> >
> > diff --git a/config/common_base b/config/common_base index
> > 9ec689d..6f93acb 100644
> > --- a/config/common_base
> > +++ b/config/common_base
> > @@ -586,6 +586,7 @@
> CONFIG_RTE_LIBRTE_PMD_BBDEV_FPGA_5GNR_FEC=y
> >  #
> >  CONFIG_RTE_LIBRTE_CRYPTODEV=y
> >  CONFIG_RTE_CRYPTO_MAX_DEVS=64
> > +CONFIG_RTE_CRYPTODEV_CALLBACKS=y
> >
> >  #
> >  # Compile PMD for ARMv8 Crypto device diff --git
> > a/lib/librte_cryptodev/rte_cryptodev.c
> > b/lib/librte_cryptodev/rte_cryptodev.c
> > index 2849b2e..5a4cba9 100644
> > --- a/lib/librte_cryptodev/rte_cryptodev.c
> > +++ b/lib/librte_cryptodev/rte_cryptodev.c
> > @@ -56,6 +56,9 @@
> >  /* spinlock for crypto device callbacks */  static rte_spinlock_t
> > rte_cryptodev_cb_lock = RTE_SPINLOCK_INITIALIZER;
> >
> > +/* spinlock for crypto device enq callbacks */ static rte_spinlock_t
> > +rte_cryptodev_enq_cb_lock = RTE_SPINLOCK_INITIALIZER;
> > +
> >
> >  /**
> >   * The user application callback description.
> > @@ -1256,6 +1259,123 @@ struct rte_cryptodev *
> > rte_spinlock_unlock(&rte_cryptodev_cb_lock);
> >  }
> >
> > +const struct rte_cryptodev_enq_callback *__rte_experimental
> > +rte_cryptodev_add_enq_callback(uint8_t dev_id,
> > +       uint16_t qp_id,
> > +       rte_cryptodev_enq_cb_fn cb_fn,
> > +       void *cb_arg)
> > +{
> > +struct rte_cryptodev *dev;
> > +struct rte_cryptodev_enq_callback *cb, *tail;
> > +
> > +if (!cb_fn)
> > +return NULL;
> > +
> > +if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) { CDEV_LOG_ERR("Invalid
> > +dev_id=%" PRIu8, dev_id); return NULL; }
> > +
> > +dev = &rte_crypto_devices[dev_id];
> > +if (qp_id >= dev->data->nb_queue_pairs) { CDEV_LOG_ERR("Invalid
> > +queue_pair_id=%d", qp_id); return NULL; }
> > +
> > +cb = rte_zmalloc(NULL, sizeof(*cb), 0); if (cb == NULL) {
> > +CDEV_LOG_ERR("Failed to allocate memory for callback on "
> > +     "dev=%d, queue_pair_id=%d", dev_id, qp_id); rte_errno = ENOMEM;
> > +return NULL; }
> > +
> > +cb->fn = cb_fn;
> > +cb->arg = cb_arg;
> > +
> > +rte_spinlock_lock(&rte_cryptodev_enq_cb_lock);
> > +if (dev->enq_cbs == NULL) {
> > +dev->enq_cbs = rte_zmalloc(NULL, sizeof(cb) *
> > +   dev->data->nb_queue_pairs, 0);
> > +if (dev->enq_cbs == NULL) {
> > +CDEV_LOG_ERR("Failed to allocate memory for callbacks"); rte_errno =
> > +ENOMEM; rte_free(cb); return NULL; } }
> > +
> > +/* Add the callbacks in fifo order. */ tail = dev->enq_cbs[qp_id]; if
> > +(tail) { while (tail->next) tail = tail->next;
> > +tail->next = cb;
> > +} else
> > +dev->enq_cbs[qp_id] = cb;
> > +
> > +rte_spinlock_unlock(&rte_cryptodev_enq_cb_lock);
> > +
> > +return cb;
> > +}
> > +
> > +int __rte_experimental
> > +rte_cryptodev_remove_enq_callback(uint8_t dev_id,
> > +  uint16_t qp_id,
> > +  const struct rte_cryptodev_enq_callback *cb) { struct rte_cryptodev
> > +*dev; struct rte_cryptodev_enq_callback **prev_cb, *curr_cb; uint16_t
> > +qp; int free_mem = 1; int ret = -EINVAL;
> > +
> > +if (!cb)
> > +return ret;
> > +
> > +if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) { CDEV_LOG_ERR("Invalid
> > +dev_id=%" PRIu8, dev_id); return ret; }
> > +
> > +dev = &rte_crypto_devices[dev_id];
> > +if (qp_id >= dev->data->nb_queue_pairs) { CDEV_LOG_ERR("Invalid
> > +queue_pair_id=%d", qp_id); return ret; }
> > +
> > +rte_spinlock_lock(&rte_cryptodev_enq_cb_lock);
> > +if (dev->enq_cbs == NULL) {
> > +rte_spinlock_unlock(&rte_cryptodev_enq_cb_lock);
> > +return ret;
> > +}
> > +
> > +prev_cb = &dev->enq_cbs[qp_id];
> > +for (; *prev_cb != NULL; prev_cb = &curr_cb->next) { curr_cb =
> > +*prev_cb; if (curr_cb == cb) {
> > +/* Remove the user cb from the callback list. */ *prev_cb =
> > +curr_cb->next; ret = 0; break; } }
> > +
> > +for (qp = 0; qp < dev->data->nb_queue_pairs; qp++) if
> > +(dev->enq_cbs[qp] != NULL) { free_mem = 0; break; }
> > +
> > +if (free_mem) {
> > +rte_free(dev->enq_cbs);
> > +dev->enq_cbs = NULL;
> > +}
> > +
> > +rte_spinlock_unlock(&rte_cryptodev_enq_cb_lock);
> > +
> > +return ret;
> > +}
> 
> Pls don't re-implement pitfall we have with ethdev rx/tx callback:
> right now with ethdev approach it is impossible to know when it is safe to free
> removed CB and free used by CB resources if any.
> Unless you do dev_stop() of course.
> So majority of ethdev CB uses have to either leave CB allocated forever after
> removal (memory leak), or invent some specific sync methods underneath that
> API.
> We probably need to introduce some sync mechanism here straightway (RCU or
> so) to avoid same issue.
Agree. I will try to explore more on sync mechanism using RCU/other options.

> 
> >
> >  int
> >  rte_cryptodev_sym_session_init(uint8_t dev_id, diff --git
> > a/lib/librte_cryptodev/rte_cryptodev.h
> > b/lib/librte_cryptodev/rte_cryptodev.h
> > index f4846d2..2cf466b 100644
> > --- a/lib/librte_cryptodev/rte_cryptodev.h
> > +++ b/lib/librte_cryptodev/rte_cryptodev.h
> > @@ -518,6 +518,32 @@ struct rte_cryptodev_qp_conf {  };
> >
> >  /**
> > + * Function type used for pre processing crypto ops when enqueue
> > +burst is
> > + * called.
> > + *
> > + * The callback function is called on enqueue burst immediately
> > + * before the crypto ops are put onto the hardware queue for processing.
> > + *
> > + * @paramdev_idThe identifier of the device.
> > + * @paramqp_idThe index of the queue pair in which ops are  *to be
> > +enqueued for processing. The value  *must be in the range [0,
> > +nb_queue_pairs - 1]  *previously supplied to
> > +**rte_cryptodev_configure*.
> > + * @paramopsThe address of an array of *nb_ops* pointers  *to
> > +*rte_crypto_op* structures which contain  *the crypto operations to
> > +be processed.
> > + * @paramnb_opsThe number of operations to process.
> > + * @paramuser_paramThe arbitrary user parameter passed in by the
> > +*application when the callback was originally  *registered.
> > + * @returnThe number of ops to be enqueued to the  *crypto device.
> > + */
> > +typedef uint16_t (*rte_cryptodev_enq_cb_fn)(uint16_t dev_id, uint16_t
> > +qp_id, struct rte_crypto_op **ops, uint16_t nb_ops, void
> > +*user_param);
> > +
> > +/**
> >   * Typedef for application callback function to be registered by application
> >   * software for notification of device events
> >   *
> > @@ -800,7 +826,6 @@ struct rte_cryptodev_config {  enum
> > rte_cryptodev_event_type event,  rte_cryptodev_cb_fn cb_fn, void
> > *cb_arg);
> >
> > -
> >  typedef uint16_t (*dequeue_pkt_burst_t)(void *qp,  struct
> > rte_crypto_op **ops,uint16_t nb_ops);  /**< Dequeue processed packets
> > from queue pair of a device. */ @@ -817,6 +842,17 @@ typedef uint16_t
> > (*enqueue_pkt_burst_t)(void *qp,
> >  /** Structure to keep track of registered callbacks */
> > TAILQ_HEAD(rte_cryptodev_cb_list, rte_cryptodev_callback);
> >
> > +/**
> > + * @internal
> > + * Structure used to hold information about the callbacks to be
> > +called for a
> > + * queue pair on enqueue.
> > + */
> > +struct rte_cryptodev_enq_callback {
> > +struct rte_cryptodev_enq_callback *next; rte_cryptodev_enq_cb_fn fn;
> > +void *arg; };
> > +
> >  /** The data structure associated with each crypto device. */  struct
> > rte_cryptodev {  dequeue_pkt_burst_t dequeue_burst; @@ -839,6 +875,9
> > @@ struct rte_cryptodev {  struct rte_cryptodev_cb_list link_intr_cbs;
> > /**< User application callback for interrupts if present */
> >
> > +struct rte_cryptodev_enq_callback **enq_cbs; /**< User application
> > +callback for pre enqueue processing */
> > +
> 
> Why not to put it at the very end of the structure?
> Would be safer in terms of ABI breakage problem, etc.
Ok
> 
> 
> >  void *security_ctx;
> >  /**< Context for security ops */
> >
> > @@ -966,6 +1005,18 @@ struct rte_cryptodev_data {  {  struct
> > rte_cryptodev *dev = &rte_cryptodevs[dev_id];
> >
> > +#ifdef RTE_CRYPTODEV_CALLBACKS
> > +if (unlikely(dev->enq_cbs != NULL && dev->enq_cbs[qp_id] != NULL)) {
> > +struct rte_cryptodev_enq_callback *cb =
> > +dev->enq_cbs[qp_id];
> > +
> > +do {
> > +nb_ops = cb->fn(dev_id, qp_id, ops, nb_ops,
> > +cb->arg);
> > +cb = cb->next;
> > +} while (cb != NULL);
> > +}
> > +#endif
> >  return (*dev->enqueue_burst)(
> >  dev->data->queue_pairs[qp_id], ops, nb_ops);  } @@ -1296,6 +1347,78
> > @@ struct rte_cryptodev_asym_session *  struct
> > rte_cryptodev_sym_session *sess, union rte_crypto_sym_ofs ofs,  struct
> > rte_crypto_sym_vec *vec);
> >
> > +
> > +/**
> > + * Add a user callback for a given crypto device and queue pair which
> > +will be
> > + * called on crypto ops enqueue.
> > + *
> > + * This API configures a function to be called for each burst of
> > +crypto ops
> > + * received on a given crypto device queue pair. The return value is
> > +a pointer
> > + * that can be used later to remove the callback using
> > + * rte_cryptodev_remove_enq_callback().
> > + *
> > + * Multiple functions are called in the order that they are added.
> > + *
> > + * @paramdev_idThe identifier of the device.
> > + * @paramqp_idThe index of the queue pair in which ops are  *to be
> > +enqueued for processing. The value  *must be in the range [0,
> > +nb_queue_pairs - 1]  *previously supplied to
> > +**rte_cryptodev_configure*.
> > + * @paramcb_fnThe callback function
> > + * @paramcb_argA generic pointer parameter which will be passed  *to
> > +each invocation of the callback function on  *this crypto device and
> > +queue pair.
> > + *
> > + * @return
> > + *   NULL on error.
> > + *   On success, a pointer value which can later be used to remove the
> callback.
> > + */
> > +
> > +const struct rte_cryptodev_enq_callback * __rte_experimental
> > +rte_cryptodev_add_enq_callback(uint8_t dev_id,
> > +       uint16_t qp_id,
> > +       rte_cryptodev_enq_cb_fn cb_fn,
> > +       void *cb_arg);
> > +
> > +
> > +/**
> > + * Remove a user callback function for given crypto device and queue pair.
> > + *
> > + * This function is used to removed callbacks that were added to a
> > +crypto
> > + * device queue pair using rte_cryptodev_add_enq_callback().
> > + *
> > + * Note: the callback is removed from the callback list but it isn't
> > +freed
> > + * since the it may still be in use. The memory for the callback can
> > +be
> > + * subsequently freed back by the application by calling rte_free().
> > + *
> > + * - Immediately - if the crypto device is stopped, or user knows that
> > + *   no callbacks are in flight e.g. if called from the thread doing enq/deq
> > + *   on that queue.
> > + *
> > + * - After a short delay - where the delay is sufficient to allow any
> > + *   in-flight callbacks to complete.
> > + *
> > + * @paramdev_idThe identifier of the device.
> > + * @paramqp_idThe index of the queue pair in which ops are  *to be
> > +enqueued for processing. The value  *must be in the range [0,
> > +nb_queue_pairs - 1]  *previously supplied to
> > +**rte_cryptodev_configure*.
> > + * @paramcbPointer to user supplied callback created via
> > +*rte_cryptodev_add_enq_callback().
> > + *
> > + * @return
> > + *   - 0: Success. Callback was removed.
> > + *   - -EINVAL:  The dev_id or the qp_id is out of range, or the callback
> > + *               is NULL or not found for the crypto device queue pair.
> > + */
> > +
> > +int __rte_experimental
> > +rte_cryptodev_remove_enq_callback(uint8_t dev_id,
> > +  uint16_t qp_id,
> > +  const struct rte_cryptodev_enq_callback *cb);
> > +
> >  #ifdef __cplusplus
> >  }
> >  #endif
> > diff --git a/lib/librte_cryptodev/rte_cryptodev_version.map
> > b/lib/librte_cryptodev/rte_cryptodev_version.map
> > index 6e41b4b..e8d3e77 100644
> > --- a/lib/librte_cryptodev/rte_cryptodev_version.map
> > +++ b/lib/librte_cryptodev/rte_cryptodev_version.map
> > @@ -58,9 +58,11 @@ DPDK_20.0 {
> >  local: *;
> >  };
> >
> > +
> >  EXPERIMENTAL {
> >  global:
> >
> > +rte_cryptodev_add_enq_callback;
> >  rte_cryptodev_asym_capability_get;
> >  rte_cryptodev_asym_get_header_session_size;
> >  rte_cryptodev_asym_get_private_session_size;
> > @@ -71,6 +73,7 @@ EXPERIMENTAL {
> >  rte_cryptodev_asym_session_init;
> >  rte_cryptodev_asym_xform_capability_check_modlen;
> >  rte_cryptodev_asym_xform_capability_check_optype;
> > +rte_cryptodev_remove_enq_callback;
> >  rte_cryptodev_sym_cpu_crypto_process;
> >  rte_cryptodev_sym_get_existing_header_session_size;
> >  rte_cryptodev_sym_session_get_user_data;
> > --
> > 1.9.1
> 


^ permalink raw reply	[relevance 0%]

* [dpdk-dev] DPDK Release Status Meeting 7/05/2020
@ 2020-05-07 12:53  4% Ferruh Yigit
  0 siblings, 0 replies; 200+ results
From: Ferruh Yigit @ 2020-05-07 12:53 UTC (permalink / raw)
  To: dpdk-dev; +Cc: Thomas Monjalon

Minutes 7 May 2020
------------------

Agenda:
* Release Dates
* -rc1 status
* Subtrees

Participants:
* Arm
* Debian/Microsoft
* Intel
* Marvell
* Mellanox
* NXP
* Red Hat


Release Dates
-------------

* v20.05 dates:
  * -rc2 pushed to		*Monday 11 May 2020*
  * -rc3			Friday 18 May 2020
  * Release pushed to		*Friday 22 May 2020*

* v20.08 proposal dates, please comment:
  * Proposal/V1:		Tuesday, 16 June 2020
  * Integration/Merge/RC1:	Tuesday, 14 July 2020
  * Release:			Friday, 7 August 2020

  * Please send roadmap for the release


-rc1 status
-----------

* No major/critical issue reported

* Intel testing found some issues and tracing them, there are still some open
  defects


Subtrees
--------

* main
  * vfio-pci VF token patchset may be pushed next release, it is not ready yet
    * thanks to Haiyue Wang for his effort (also for his __rte_internal work)
  * __rte_internal patcheset merged
    * In next stage drivers in common folder need to mark their APIs
      * NXP already sent patch for it
      * Do we need patches for QAT too?
  * gcc10 fixes
    * There are still warnings
      * mbuf markers and -fno-common remaining, not easy to address
    * We can ignore remaining ones in -rc2 while working for proper fixes
      * Need to mark/comment ignore to not forgot it
  * rte_graph has been merged
  * Will review telemetry patches today

* next-net
  * bonding patches in backlog, we need help on reviewing bonding patches
  * ethdev unknown speed change can be postponed to next release, there are
    some unresolved comments in mail list
  * There is a dpaa/dpaa2 patchset waiting for new version
  * Some bnxt patches not pulled, waiting for change
  * ~50 patches at this stage, not all will make -rc2
  * Raslan reported a tap PMD build error, will check offline

* next-crypto
  * A little later for -rc2, will be ready for pull on Monday
  * chacha20-poly1305 patchset is library change but can be considered for -rc2
    if the ABI versioning implementation is good

* next-eventdev
  * Nothing for -rc2, there may be some patches for -rc3

* next-virtio
  * 8 patches in the queue
  * There is an OvS issue but fix requires DPDK ABI break, that is why
    DPDK side fix will wait and need to find another solution on OvS side

* next-net-intel
  * Some fixes for -rc2 has been merged and pulled to next-net
  * fm10k patches are not received yet, if they are not received timely before
    -rc2, it may miss the release.

* next-net-mlx
  * There will be some more patches for -rc2
  * Can rte flow test application merged for -rc2?

* next-net-mrvl
  * There are a few patches in backlog



DPDK Release Status Meetings
============================

The DPDK Release Status Meeting is intended for DPDK Committers to discuss
the status of the master tree and sub-trees, and for project managers to
track progress or milestone dates.

The meeting occurs on Thursdays at 8:30 UTC. If you wish to attend just
send an email to "John McNamara <john.mcnamara@intel.com>" for the invite.

^ permalink raw reply	[relevance 4%]

* Re: [dpdk-dev] [dpdk-stable] [PATCH] drivers/net: fix mlx* glue libraries ABI version
  @ 2020-05-07 12:35  7%   ` David Marchand
  2020-05-07 20:04  4%     ` Thomas Monjalon
  0 siblings, 1 reply; 200+ results
From: David Marchand @ 2020-05-07 12:35 UTC (permalink / raw)
  To: Thomas Monjalon
  Cc: dpdk stable, dev, Matan Azrad, Shahaf Shuler,
	Viacheslav Ovsiienko, Raslan, Luca Boccassi, Ray Kinsella

On Thu, Dec 12, 2019 at 11:18 PM Thomas Monjalon <thomas@monjalon.net> wrote:
>
> 04/12/2019 11:05, David Marchand:
> > Those libraries have been missed when switching to global ABI version.
>
> The versioning of the glue libraries are for compatibility checks
> between the PMD and its dependency (rdma-core) packaged as a plugin,
> called glue library.
>
> This versioning is updated when there is a change in the verbs glue
> interface, in order to avoid issues in case of PMD and glue
> updated separately with a non-compatible version.
> I don't think the mlx glue libraries are part of the ABI policy
> which acts at the application level.
>
> Am I missing something?

Sorry, this patch fell into the cracks.

I agree that this is not part of the ABI policy.
This version only indicates something internal.

But what I am proposing here is just to remove this special case.
What is the point of exposing a special version, while the net drivers
are the only one depending on those glue libs?
Do you expect separate packaging for the net driver and its associated glue lib?

This special version also makes it impossible to install two versions
of dpdk if those versions of dpdk need the same glue version.

I still think it is better to align to the version of dpdk, though the
commitlog needs some work.


-- 
David Marchand


^ permalink raw reply	[relevance 7%]

* Re: [dpdk-dev] [PATCH v3 1/2] common/mlx5: add rte internal tag and avoid comparison
  @ 2020-05-07 11:41  3%         ` Ophir Munk
  2020-05-07 20:08  3%           ` Thomas Monjalon
  0 siblings, 1 reply; 200+ results
From: Ophir Munk @ 2020-05-07 11:41 UTC (permalink / raw)
  To: Thomas Monjalon
  Cc: dev, David Marchand, Ray Kinsella, Matan Azrad, Raslan Darawsheh



> -----Original Message-----
> From: Thomas Monjalon <thomas@monjalon.net>
> Sent: Thursday, May 7, 2020 1:23 PM
> To: Ophir Munk <ophirmu@mellanox.com>
> Cc: dev@dpdk.org; David Marchand <david.marchand@redhat.com>; Ray
> Kinsella <mdr@ashroe.eu>; Matan Azrad <matan@mellanox.com>; Raslan
> Darawsheh <rasland@mellanox.com>
> Subject: Re: [PATCH v3 1/2] common/mlx5: add rte internal tag and avoid
> comparison
> 
> 07/05/2020 10:56, Ophir Munk:
> > Move mlx5 symbols in the map file to the INTERNAL section and add
> > __internal tags to their definitions.
> > Those symbols were exported in 20.02 and now (20.05) they are removed.
> [...]
> > --- a/drivers/common/mlx5/rte_common_mlx5_version.map
> > +++ b/drivers/common/mlx5/rte_common_mlx5_version.map
> > @@ -1,8 +1,10 @@
> > -DPDK_21 {
> > +INTERNAL {
> 
> I think you forgot the EXPERIMENTAL section.
> In my opinion, everything should be in INTERNAL and marked with
> __rte_internal in source code.
> 

I moved all EXPERIMENTAL to INTERNAL and sent V4.
A general question: what is the difference between EXPERIMENTAL and INTERNAL functionalities?
In the end both indicate to skip ABI check. 


^ permalink raw reply	[relevance 3%]

* [dpdk-dev] [PATCH v4 1/2] common/mlx5: add rte internal tag and avoid comparison
  2020-05-07  8:56  2%     ` [dpdk-dev] [PATCH v3 " Ophir Munk
  @ 2020-05-07 11:31  2%       ` Ophir Munk
  2020-05-12 10:52  0%         ` Raslan Darawsheh
  1 sibling, 1 reply; 200+ results
From: Ophir Munk @ 2020-05-07 11:31 UTC (permalink / raw)
  To: dev, David Marchand
  Cc: Ray Kinsella, Matan Azrad, Raslan Darawsheh, Thomas Monjalon, Ophir Munk

Move mlx5 symbols in the map file to the INTERNAL section and add
__internal tags to their definitions.
Those symbols were exported in 20.02 and now (20.05) they are removed.
Avoid ABI comparison issues between 20.05/20.08 and 20.02 by adding the
suppress_file directive to libabigail.abignore file. This directive will
prevent loading mlx5 common symbols and no comparison will be performed.

In addition move symbols from the EXPERIMENTAL section to the INTERNAL
section.

Fixes: 7b4f1e6bd367 ("common/mlx5: introduce common library")

Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
---
v4:
Move symbols from EXPERIMENTAL section to INTERNAL section

 devtools/libabigail.abignore                    |  7 ++++
 drivers/common/mlx5/mlx5_common.h               |  3 ++
 drivers/common/mlx5/mlx5_common_mp.h            | 14 +++----
 drivers/common/mlx5/mlx5_common_mr.h            | 26 ++++++------
 drivers/common/mlx5/mlx5_devx_cmds.h            | 23 +++++++++++
 drivers/common/mlx5/mlx5_nl.h                   | 18 ++++++++-
 drivers/common/mlx5/rte_common_mlx5_version.map | 53 ++++++++++++-------------
 7 files changed, 95 insertions(+), 49 deletions(-)

diff --git a/devtools/libabigail.abignore b/devtools/libabigail.abignore
index 0326662..f22d540 100644
--- a/devtools/libabigail.abignore
+++ b/devtools/libabigail.abignore
@@ -35,3 +35,10 @@
         type_kind = enum
         name = rte_eth_event_type
         changed_enumerators = RTE_ETH_EVENT_MAX
+
+; These functions were moved from stable to internal.
+; Avoid loading the symbols and comparing them.
+; This is a temporary exception till DPDK 20.11
+[suppress_file]
+	file_name_regexp = ^librte_common_mlx5\.
+
diff --git a/drivers/common/mlx5/mlx5_common.h b/drivers/common/mlx5/mlx5_common.h
index c2d688a..b37b820 100644
--- a/drivers/common/mlx5/mlx5_common.h
+++ b/drivers/common/mlx5/mlx5_common.h
@@ -196,6 +196,7 @@ check_cqe(volatile struct mlx5_cqe *cqe, const uint16_t cqes_n,
 	return MLX5_CQE_STATUS_SW_OWN;
 }
 
+__rte_internal
 int mlx5_dev_to_pci_addr(const char *dev_path, struct rte_pci_addr *pci_addr);
 
 #define MLX5_CLASS_ARG_NAME "class"
@@ -206,7 +207,9 @@ enum mlx5_class {
 	MLX5_CLASS_INVALID,
 };
 
+__rte_internal
 enum mlx5_class mlx5_class_get(struct rte_devargs *devargs);
+__rte_internal
 void mlx5_translate_port_name(const char *port_name_in,
 			      struct mlx5_switch_info *port_info_out);
 
diff --git a/drivers/common/mlx5/mlx5_common_mp.h b/drivers/common/mlx5/mlx5_common_mp.h
index 7aab77a..05466fd 100644
--- a/drivers/common/mlx5/mlx5_common_mp.h
+++ b/drivers/common/mlx5/mlx5_common_mp.h
@@ -79,20 +79,20 @@ mp_init_msg(struct mlx5_mp_id *mp_id, struct rte_mp_msg *msg,
 	param->port_id = mp_id->port_id;
 }
 
-__rte_experimental
+__rte_internal
 int mlx5_mp_init_primary(const char *name, const rte_mp_t primary_action);
-__rte_experimental
+__rte_internal
 void mlx5_mp_uninit_primary(const char *name);
-__rte_experimental
+__rte_internal
 int mlx5_mp_init_secondary(const char *name, const rte_mp_t secondary_action);
-__rte_experimental
+__rte_internal
 void mlx5_mp_uninit_secondary(const char *name);
-__rte_experimental
+__rte_internal
 int mlx5_mp_req_mr_create(struct mlx5_mp_id *mp_id, uintptr_t addr);
-__rte_experimental
+__rte_internal
 int mlx5_mp_req_queue_state_modify(struct mlx5_mp_id *mp_id,
 				   struct mlx5_mp_arg_queue_state_modify *sm);
-__rte_experimental
+__rte_internal
 int mlx5_mp_req_verbs_cmd_fd(struct mlx5_mp_id *mp_id);
 
 #endif /* RTE_PMD_MLX5_COMMON_MP_H_ */
diff --git a/drivers/common/mlx5/mlx5_common_mr.h b/drivers/common/mlx5/mlx5_common_mr.h
index e805f96..4ea47cd 100644
--- a/drivers/common/mlx5/mlx5_common_mr.h
+++ b/drivers/common/mlx5/mlx5_common_mr.h
@@ -115,42 +115,42 @@ mlx5_mr_lookup_lkey(struct mr_cache_entry *lkp_tbl, uint16_t *cached_idx,
 	return UINT32_MAX;
 }
 
-__rte_experimental
+__rte_internal
 int mlx5_mr_btree_init(struct mlx5_mr_btree *bt, int n, int socket);
-__rte_experimental
+__rte_internal
 void mlx5_mr_btree_free(struct mlx5_mr_btree *bt);
-__rte_experimental
+__rte_internal
 void mlx5_mr_btree_dump(struct mlx5_mr_btree *bt __rte_unused);
-__rte_experimental
+__rte_internal
 uint32_t mlx5_mr_addr2mr_bh(struct ibv_pd *pd, struct mlx5_mp_id *mp_id,
 			    struct mlx5_mr_share_cache *share_cache,
 			    struct mlx5_mr_ctrl *mr_ctrl,
 			    uintptr_t addr, unsigned int mr_ext_memseg_en);
-__rte_experimental
+__rte_internal
 void mlx5_mr_release_cache(struct mlx5_mr_share_cache *mr_cache);
-__rte_experimental
+__rte_internal
 void mlx5_mr_dump_cache(struct mlx5_mr_share_cache *share_cache __rte_unused);
-__rte_experimental
+__rte_internal
 void mlx5_mr_rebuild_cache(struct mlx5_mr_share_cache *share_cache);
-__rte_experimental
+__rte_internal
 void mlx5_mr_flush_local_cache(struct mlx5_mr_ctrl *mr_ctrl);
-__rte_experimental
+__rte_internal
 int
 mlx5_mr_insert_cache(struct mlx5_mr_share_cache *share_cache,
 		     struct mlx5_mr *mr);
-__rte_experimental
+__rte_internal
 uint32_t
 mlx5_mr_lookup_cache(struct mlx5_mr_share_cache *share_cache,
 		     struct mr_cache_entry *entry, uintptr_t addr);
-__rte_experimental
+__rte_internal
 struct mlx5_mr *
 mlx5_mr_lookup_list(struct mlx5_mr_share_cache *share_cache,
 		    struct mr_cache_entry *entry, uintptr_t addr);
-__rte_experimental
+__rte_internal
 struct mlx5_mr *
 mlx5_create_mr_ext(struct ibv_pd *pd, uintptr_t addr, size_t len,
 		   int socket_id);
-__rte_experimental
+__rte_internal
 uint32_t
 mlx5_mr_create_primary(struct ibv_pd *pd,
 		       struct mlx5_mr_share_cache *share_cache,
diff --git a/drivers/common/mlx5/mlx5_devx_cmds.h b/drivers/common/mlx5/mlx5_devx_cmds.h
index f7802e6..6dc27da 100644
--- a/drivers/common/mlx5/mlx5_devx_cmds.h
+++ b/drivers/common/mlx5/mlx5_devx_cmds.h
@@ -300,52 +300,75 @@ struct mlx5_devx_qp_attr {
 
 /* mlx5_devx_cmds.c */
 
+__rte_internal
 struct mlx5_devx_obj *mlx5_devx_cmd_flow_counter_alloc(struct ibv_context *ctx,
 						       uint32_t bulk_sz);
+__rte_internal
 int mlx5_devx_cmd_destroy(struct mlx5_devx_obj *obj);
+__rte_internal
 int mlx5_devx_cmd_flow_counter_query(struct mlx5_devx_obj *dcs,
 				     int clear, uint32_t n_counters,
 				     uint64_t *pkts, uint64_t *bytes,
 				     uint32_t mkey, void *addr,
 				     struct mlx5dv_devx_cmd_comp *cmd_comp,
 				     uint64_t async_id);
+__rte_internal
 int mlx5_devx_cmd_query_hca_attr(struct ibv_context *ctx,
 				 struct mlx5_hca_attr *attr);
+__rte_internal
 struct mlx5_devx_obj *mlx5_devx_cmd_mkey_create(struct ibv_context *ctx,
 					      struct mlx5_devx_mkey_attr *attr);
+__rte_internal
 int mlx5_devx_get_out_command_status(void *out);
+__rte_internal
 int mlx5_devx_cmd_qp_query_tis_td(struct ibv_qp *qp, uint32_t tis_num,
 				  uint32_t *tis_td);
+__rte_internal
 struct mlx5_devx_obj *mlx5_devx_cmd_create_rq(struct ibv_context *ctx,
 				       struct mlx5_devx_create_rq_attr *rq_attr,
 				       int socket);
+__rte_internal
 int mlx5_devx_cmd_modify_rq(struct mlx5_devx_obj *rq,
 			    struct mlx5_devx_modify_rq_attr *rq_attr);
+__rte_internal
 struct mlx5_devx_obj *mlx5_devx_cmd_create_tir(struct ibv_context *ctx,
 					   struct mlx5_devx_tir_attr *tir_attr);
+__rte_internal
 struct mlx5_devx_obj *mlx5_devx_cmd_create_rqt(struct ibv_context *ctx,
 					   struct mlx5_devx_rqt_attr *rqt_attr);
+__rte_internal
 struct mlx5_devx_obj *mlx5_devx_cmd_create_sq(struct ibv_context *ctx,
 				      struct mlx5_devx_create_sq_attr *sq_attr);
+__rte_internal
 int mlx5_devx_cmd_modify_sq(struct mlx5_devx_obj *sq,
 			    struct mlx5_devx_modify_sq_attr *sq_attr);
+__rte_internal
 struct mlx5_devx_obj *mlx5_devx_cmd_create_tis(struct ibv_context *ctx,
 					   struct mlx5_devx_tis_attr *tis_attr);
+__rte_internal
 struct mlx5_devx_obj *mlx5_devx_cmd_create_td(struct ibv_context *ctx);
+__rte_internal
 int mlx5_devx_cmd_flow_dump(void *fdb_domain, void *rx_domain, void *tx_domain,
 			    FILE *file);
+__rte_internal
 struct mlx5_devx_obj *mlx5_devx_cmd_create_cq(struct ibv_context *ctx,
 					      struct mlx5_devx_cq_attr *attr);
+__rte_internal
 struct mlx5_devx_obj *mlx5_devx_cmd_create_virtq(struct ibv_context *ctx,
 					     struct mlx5_devx_virtq_attr *attr);
+__rte_internal
 int mlx5_devx_cmd_modify_virtq(struct mlx5_devx_obj *virtq_obj,
 			       struct mlx5_devx_virtq_attr *attr);
+__rte_internal
 int mlx5_devx_cmd_query_virtq(struct mlx5_devx_obj *virtq_obj,
 			      struct mlx5_devx_virtq_attr *attr);
+__rte_internal
 struct mlx5_devx_obj *mlx5_devx_cmd_create_qp(struct ibv_context *ctx,
 					      struct mlx5_devx_qp_attr *attr);
+__rte_internal
 int mlx5_devx_cmd_modify_qp_state(struct mlx5_devx_obj *qp,
 				  uint32_t qp_st_mod_op, uint32_t remote_qp_id);
+__rte_internal
 int mlx5_devx_cmd_modify_rqt(struct mlx5_devx_obj *rqt,
 			     struct mlx5_devx_rqt_attr *rqt_attr);
 
diff --git a/drivers/common/mlx5/mlx5_nl.h b/drivers/common/mlx5/mlx5_nl.h
index 2c3f837..53021e1 100644
--- a/drivers/common/mlx5/mlx5_nl.h
+++ b/drivers/common/mlx5/mlx5_nl.h
@@ -28,35 +28,51 @@ struct mlx5_nl_vlan_vmwa_context {
 	struct mlx5_nl_vlan_dev vlan_dev[4096];
 };
 
-
+__rte_internal
 int mlx5_nl_init(int protocol);
+__rte_internal
 int mlx5_nl_mac_addr_add(int nlsk_fd, unsigned int iface_idx, uint64_t *mac_own,
 			 struct rte_ether_addr *mac, uint32_t index);
+__rte_internal
 int mlx5_nl_mac_addr_remove(int nlsk_fd, unsigned int iface_idx,
 			    uint64_t *mac_own, struct rte_ether_addr *mac,
 			    uint32_t index);
+__rte_internal
 void mlx5_nl_mac_addr_sync(int nlsk_fd, unsigned int iface_idx,
 			   struct rte_ether_addr *mac_addrs, int n);
+__rte_internal
 void mlx5_nl_mac_addr_flush(int nlsk_fd, unsigned int iface_idx,
 			    struct rte_ether_addr *mac_addrs, int n,
 			    uint64_t *mac_own);
+__rte_internal
 int mlx5_nl_promisc(int nlsk_fd, unsigned int iface_idx, int enable);
+__rte_internal
 int mlx5_nl_allmulti(int nlsk_fd, unsigned int iface_idx, int enable);
+__rte_internal
 unsigned int mlx5_nl_portnum(int nl, const char *name);
+__rte_internal
 unsigned int mlx5_nl_ifindex(int nl, const char *name, uint32_t pindex);
+__rte_internal
 int mlx5_nl_vf_mac_addr_modify(int nlsk_fd, unsigned int iface_idx,
 			       struct rte_ether_addr *mac, int vf_index);
+__rte_internal
 int mlx5_nl_switch_info(int nl, unsigned int ifindex,
 			struct mlx5_switch_info *info);
 
+__rte_internal
 void mlx5_nl_vlan_vmwa_delete(struct mlx5_nl_vlan_vmwa_context *vmwa,
 			      uint32_t ifindex);
+__rte_internal
 uint32_t mlx5_nl_vlan_vmwa_create(struct mlx5_nl_vlan_vmwa_context *vmwa,
 				  uint32_t ifindex, uint16_t tag);
+__rte_internal
 int mlx5_nl_devlink_family_id_get(int nlsk_fd);
+__rte_internal
 int mlx5_nl_enable_roce_get(int nlsk_fd, int family_id, const char *pci_addr,
 			    int *enable);
+__rte_internal
 int mlx5_nl_driver_reload(int nlsk_fd, int family_id, const char *pci_addr);
+__rte_internal
 int mlx5_nl_enable_roce_set(int nlsk_fd, int family_id, const char *pci_addr,
 			    int enable);
 
diff --git a/drivers/common/mlx5/rte_common_mlx5_version.map b/drivers/common/mlx5/rte_common_mlx5_version.map
index 564a9a7..350e771 100644
--- a/drivers/common/mlx5/rte_common_mlx5_version.map
+++ b/drivers/common/mlx5/rte_common_mlx5_version.map
@@ -1,8 +1,12 @@
-DPDK_21 {
+INTERNAL {
 	global:
 
 	mlx5_class_get;
 
+	mlx5_create_mr_ext;
+
+	mlx5_dev_to_pci_addr;
+
 	mlx5_devx_cmd_create_cq;
 	mlx5_devx_cmd_create_qp;
 	mlx5_devx_cmd_create_rq;
@@ -27,7 +31,26 @@ DPDK_21 {
 	mlx5_devx_cmd_query_virtq;
 	mlx5_devx_get_out_command_status;
 
-	mlx5_dev_to_pci_addr;
+	mlx5_mp_init_primary;
+	mlx5_mp_uninit_primary;
+	mlx5_mp_init_secondary;
+	mlx5_mp_uninit_secondary;
+	mlx5_mp_req_mr_create;
+	mlx5_mp_req_queue_state_modify;
+	mlx5_mp_req_verbs_cmd_fd;
+
+	mlx5_mr_btree_init;
+	mlx5_mr_btree_free;
+	mlx5_mr_btree_dump;
+	mlx5_mr_addr2mr_bh;
+	mlx5_mr_release_cache;
+	mlx5_mr_dump_cache;
+	mlx5_mr_rebuild_cache;
+	mlx5_mr_insert_cache;
+	mlx5_mr_lookup_cache;
+	mlx5_mr_lookup_list;
+	mlx5_mr_create_primary;
+	mlx5_mr_flush_local_cache;
 
 	mlx5_nl_allmulti;
 	mlx5_nl_devlink_family_id_get;
@@ -48,31 +71,5 @@ DPDK_21 {
 	mlx5_nl_vlan_vmwa_delete;
 
 	mlx5_translate_port_name;
-
 };
 
-EXPERIMENTAL {
-        global:
-
-	mlx5_mp_init_primary;
-	mlx5_mp_uninit_primary;
-	mlx5_mp_init_secondary;
-	mlx5_mp_uninit_secondary;
-	mlx5_mp_req_mr_create;
-	mlx5_mp_req_queue_state_modify;
-	mlx5_mp_req_verbs_cmd_fd;
-
-	mlx5_mr_btree_init;
-	mlx5_mr_btree_free;
-	mlx5_mr_btree_dump;
-	mlx5_mr_addr2mr_bh;
-	mlx5_mr_release_cache;
-	mlx5_mr_dump_cache;
-	mlx5_mr_rebuild_cache;
-	mlx5_mr_insert_cache;
-	mlx5_mr_lookup_cache;
-	mlx5_mr_lookup_list;
-	mlx5_create_mr_ext;
-	mlx5_mr_create_primary;
-	mlx5_mr_flush_local_cache;
-};
-- 
2.8.4


^ permalink raw reply	[relevance 2%]

* Re: [dpdk-dev] [PATCH v5 2/2] cryptodev: version cryptodev info get function
  2020-05-07 10:57 10% ` [dpdk-dev] [PATCH v5 2/2] cryptodev: version cryptodev info get function Arek Kusztal
@ 2020-05-07 11:05  0%   ` Ray Kinsella
  2020-05-09 21:11  4%     ` Akhil Goyal
  2020-05-07 18:12  0%   ` Trahe, Fiona
  1 sibling, 1 reply; 200+ results
From: Ray Kinsella @ 2020-05-07 11:05 UTC (permalink / raw)
  To: Arek Kusztal, dev
  Cc: fiona.trahe, ray.kinsella, akhil.goyal, bruce.richardson



On 07/05/2020 11:57, Arek Kusztal wrote:
> This patch adds versioned function rte_cryptodev_info_get()
> to prevent some issues with ABI policy.
> Node v21 works in same way as before, returning driver capabilities
> directly to the API caller. These capabilities may include new elements
> not part of the v20 ABI.
> Node v20 function maintains compatibility with v20 ABI releases
> by stripping out elements not supported in v20 ABI. Because
> rte_cryptodev_info_get is called by other API functions,
> rte_cryptodev_sym_capability_get function is versioned the same way.
> 
> Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
> ---
> v2:
> - changed version numbers of symbols to 20.0.2
> v3:
> - added v2/v3 informations
> - changed version numbers of symbols to 21
> v4:
> - fixed clang build by movind binding default symbol
> - implemented mailing list comments
> - added abidiff tool suppression entries
> v5:
> - fixed meson build
> 
>  devtools/libabigail.abignore                   |   8 ++
>  lib/librte_cryptodev/meson.build               |   1 +
>  lib/librte_cryptodev/rte_cryptodev.c           | 147 ++++++++++++++++++++++++-
>  lib/librte_cryptodev/rte_cryptodev.h           |  34 +++++-
>  lib/librte_cryptodev/rte_cryptodev_version.map |   7 ++
>  5 files changed, 191 insertions(+), 6 deletions(-)
> 
[SNIP]

Acked-by: Ray Kinsella <mdr@ashroe.eu>

^ permalink raw reply	[relevance 0%]

* [dpdk-dev] [PATCH v5 2/2] cryptodev: version cryptodev info get function
  @ 2020-05-07 10:57 10% ` Arek Kusztal
  2020-05-07 11:05  0%   ` Ray Kinsella
  2020-05-07 18:12  0%   ` Trahe, Fiona
  0 siblings, 2 replies; 200+ results
From: Arek Kusztal @ 2020-05-07 10:57 UTC (permalink / raw)
  To: dev
  Cc: fiona.trahe, ray.kinsella, akhil.goyal, bruce.richardson, Arek Kusztal

This patch adds versioned function rte_cryptodev_info_get()
to prevent some issues with ABI policy.
Node v21 works in same way as before, returning driver capabilities
directly to the API caller. These capabilities may include new elements
not part of the v20 ABI.
Node v20 function maintains compatibility with v20 ABI releases
by stripping out elements not supported in v20 ABI. Because
rte_cryptodev_info_get is called by other API functions,
rte_cryptodev_sym_capability_get function is versioned the same way.

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
---
v2:
- changed version numbers of symbols to 20.0.2
v3:
- added v2/v3 informations
- changed version numbers of symbols to 21
v4:
- fixed clang build by movind binding default symbol
- implemented mailing list comments
- added abidiff tool suppression entries
v5:
- fixed meson build

 devtools/libabigail.abignore                   |   8 ++
 lib/librte_cryptodev/meson.build               |   1 +
 lib/librte_cryptodev/rte_cryptodev.c           | 147 ++++++++++++++++++++++++-
 lib/librte_cryptodev/rte_cryptodev.h           |  34 +++++-
 lib/librte_cryptodev/rte_cryptodev_version.map |   7 ++
 5 files changed, 191 insertions(+), 6 deletions(-)

diff --git a/devtools/libabigail.abignore b/devtools/libabigail.abignore
index 1911890..e479e20 100644
--- a/devtools/libabigail.abignore
+++ b/devtools/libabigail.abignore
@@ -24,3 +24,11 @@
         type_kind = enum
         name = rte_eth_event_type
         changed_enumerators = RTE_ETH_EVENT_MAX
+; Ignore Cryptodev AEAD xform enum and AEAD xform strings change
+; due to addition of Chacha20-Poly1305
+[suppress_type]
+        type_kind = enum
+        name = rte_crypto_aead_algorithm
+        changed_enumerators = RTE_CRYPTO_AEAD_LIST_END
+[suppress_variable]
+        name = rte_crypto_aead_algorithm_strings
diff --git a/lib/librte_cryptodev/meson.build b/lib/librte_cryptodev/meson.build
index c4c6b3b..df11440 100644
--- a/lib/librte_cryptodev/meson.build
+++ b/lib/librte_cryptodev/meson.build
@@ -1,6 +1,7 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017-2019 Intel Corporation
 
+use_function_versioning = true
 sources = files('rte_cryptodev.c', 'rte_cryptodev_pmd.c', 'cryptodev_trace_points.c')
 headers = files('rte_cryptodev.h',
 	'rte_cryptodev_pmd.h',
diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index a499c47..e4a7b71 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -36,6 +36,8 @@
 #include <rte_errno.h>
 #include <rte_spinlock.h>
 #include <rte_string_fns.h>
+#include <rte_compat.h>
+#include <rte_function_versioning.h>
 
 #include "rte_crypto.h"
 #include "rte_cryptodev.h"
@@ -57,6 +59,14 @@ static struct rte_cryptodev_global cryptodev_globals = {
 /* spinlock for crypto device callbacks */
 static rte_spinlock_t rte_cryptodev_cb_lock = RTE_SPINLOCK_INITIALIZER;
 
+static const struct rte_cryptodev_capabilities
+		cryptodev_undefined_capabilities[] = {
+		RTE_CRYPTODEV_END_OF_CAPABILITIES_LIST()
+};
+
+static struct rte_cryptodev_capabilities
+		*capability_copy[RTE_CRYPTO_MAX_DEVS];
+static uint8_t is_capability_checked[RTE_CRYPTO_MAX_DEVS];
 
 /**
  * The user application callback description.
@@ -281,15 +291,15 @@ rte_crypto_auth_operation_strings[] = {
 		[RTE_CRYPTO_AUTH_OP_GENERATE]	= "generate"
 };
 
-const struct rte_cryptodev_symmetric_capability *
-rte_cryptodev_sym_capability_get(uint8_t dev_id,
+const struct rte_cryptodev_symmetric_capability __vsym *
+rte_cryptodev_sym_capability_get_v20(uint8_t dev_id,
 		const struct rte_cryptodev_sym_capability_idx *idx)
 {
 	const struct rte_cryptodev_capabilities *capability;
 	struct rte_cryptodev_info dev_info;
 	int i = 0;
 
-	rte_cryptodev_info_get(dev_id, &dev_info);
+	rte_cryptodev_info_get_v20(dev_id, &dev_info);
 
 	while ((capability = &dev_info.capabilities[i++])->op !=
 			RTE_CRYPTO_OP_TYPE_UNDEFINED) {
@@ -313,8 +323,47 @@ rte_cryptodev_sym_capability_get(uint8_t dev_id,
 	}
 
 	return NULL;
+}
+VERSION_SYMBOL(rte_cryptodev_sym_capability_get, _v20, 20.0);
+
+const struct rte_cryptodev_symmetric_capability __vsym *
+rte_cryptodev_sym_capability_get_v21(uint8_t dev_id,
+		const struct rte_cryptodev_sym_capability_idx *idx)
+{
+	const struct rte_cryptodev_capabilities *capability;
+	struct rte_cryptodev_info dev_info;
+	int i = 0;
+
+	rte_cryptodev_info_get(dev_id, &dev_info);
+
+	while ((capability = &dev_info.capabilities[i++])->op !=
+			RTE_CRYPTO_OP_TYPE_UNDEFINED) {
+		if (capability->op != RTE_CRYPTO_OP_TYPE_SYMMETRIC)
+			continue;
 
+		if (capability->sym.xform_type != idx->type)
+			continue;
+
+		if (idx->type == RTE_CRYPTO_SYM_XFORM_AUTH &&
+			capability->sym.auth.algo == idx->algo.auth)
+			return &capability->sym;
+
+		if (idx->type == RTE_CRYPTO_SYM_XFORM_CIPHER &&
+			capability->sym.cipher.algo == idx->algo.cipher)
+			return &capability->sym;
+
+		if (idx->type == RTE_CRYPTO_SYM_XFORM_AEAD &&
+				capability->sym.aead.algo == idx->algo.aead)
+			return &capability->sym;
+	}
+
+	return NULL;
 }
+MAP_STATIC_SYMBOL(const struct rte_cryptodev_symmetric_capability *
+		rte_cryptodev_sym_capability_get(uint8_t dev_id,
+		const struct rte_cryptodev_sym_capability_idx *idx),
+		rte_cryptodev_sym_capability_get_v21);
+BIND_DEFAULT_SYMBOL(rte_cryptodev_sym_capability_get, _v21, 21);
 
 static int
 param_range_check(uint16_t size, const struct rte_crypto_param_range *range)
@@ -1016,6 +1065,12 @@ rte_cryptodev_close(uint8_t dev_id)
 	retval = (*dev->dev_ops->dev_close)(dev);
 	rte_cryptodev_trace_close(dev_id, retval);
 
+	if (capability_copy[dev_id]) {
+		free(capability_copy[dev_id]);
+		capability_copy[dev_id] = NULL;
+	}
+	is_capability_checked[dev_id] = 0;
+
 	if (retval < 0)
 		return retval;
 
@@ -1129,9 +1184,61 @@ rte_cryptodev_stats_reset(uint8_t dev_id)
 	(*dev->dev_ops->stats_reset)(dev);
 }
 
+static void
+get_v20_capabilities(uint8_t dev_id, struct rte_cryptodev_info *dev_info)
+{
+	const struct rte_cryptodev_capabilities *capability;
+	uint8_t found_invalid_capa = 0;
+	uint8_t counter = 0;
+
+	for (capability = dev_info->capabilities;
+			capability->op != RTE_CRYPTO_OP_TYPE_UNDEFINED;
+			++capability, ++counter) {
+		if (capability->op == RTE_CRYPTO_OP_TYPE_SYMMETRIC &&
+				capability->sym.xform_type ==
+					RTE_CRYPTO_SYM_XFORM_AEAD
+				&& capability->sym.aead.algo >=
+				RTE_CRYPTO_AEAD_CHACHA20_POLY1305) {
+			found_invalid_capa = 1;
+			counter--;
+		}
+	}
+	is_capability_checked[dev_id] = 1;
+	if (!found_invalid_capa)
+		return;
+	capability_copy[dev_id] = malloc(counter *
+		sizeof(struct rte_cryptodev_capabilities));
+	if (capability_copy[dev_id] == NULL) {
+		 /*
+		  * error case - no memory to store the trimmed
+		  * list, so have to return an empty list
+		  */
+		dev_info->capabilities =
+			cryptodev_undefined_capabilities;
+		is_capability_checked[dev_id] = 0;
+	} else {
+		counter = 0;
+		for (capability = dev_info->capabilities;
+				capability->op !=
+				RTE_CRYPTO_OP_TYPE_UNDEFINED;
+				capability++) {
+			if (!(capability->op ==
+				RTE_CRYPTO_OP_TYPE_SYMMETRIC
+				&& capability->sym.xform_type ==
+				RTE_CRYPTO_SYM_XFORM_AEAD
+				&& capability->sym.aead.algo >=
+				RTE_CRYPTO_AEAD_CHACHA20_POLY1305)) {
+				capability_copy[dev_id][counter++] =
+						*capability;
+			}
+		}
+		dev_info->capabilities =
+				capability_copy[dev_id];
+	}
+}
 
-void
-rte_cryptodev_info_get(uint8_t dev_id, struct rte_cryptodev_info *dev_info)
+void __vsym
+rte_cryptodev_info_get_v20(uint8_t dev_id, struct rte_cryptodev_info *dev_info)
 {
 	struct rte_cryptodev *dev;
 
@@ -1147,10 +1254,40 @@ rte_cryptodev_info_get(uint8_t dev_id, struct rte_cryptodev_info *dev_info)
 	RTE_FUNC_PTR_OR_RET(*dev->dev_ops->dev_infos_get);
 	(*dev->dev_ops->dev_infos_get)(dev, dev_info);
 
+	if (capability_copy[dev_id] == NULL) {
+		if (!is_capability_checked[dev_id])
+			get_v20_capabilities(dev_id, dev_info);
+	} else
+		dev_info->capabilities = capability_copy[dev_id];
+
 	dev_info->driver_name = dev->device->driver->name;
 	dev_info->device = dev->device;
 }
+VERSION_SYMBOL(rte_cryptodev_info_get, _v20, 20.0);
 
+void __vsym
+rte_cryptodev_info_get_v21(uint8_t dev_id, struct rte_cryptodev_info *dev_info)
+{
+	struct rte_cryptodev *dev;
+
+	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
+		CDEV_LOG_ERR("Invalid dev_id=%d", dev_id);
+		return;
+	}
+
+	dev = &rte_crypto_devices[dev_id];
+
+	memset(dev_info, 0, sizeof(struct rte_cryptodev_info));
+
+	RTE_FUNC_PTR_OR_RET(*dev->dev_ops->dev_infos_get);
+	(*dev->dev_ops->dev_infos_get)(dev, dev_info);
+
+	dev_info->driver_name = dev->device->driver->name;
+	dev_info->device = dev->device;
+}
+MAP_STATIC_SYMBOL(void rte_cryptodev_info_get(uint8_t dev_id,
+	struct rte_cryptodev_info *dev_info), rte_cryptodev_info_get_v21);
+BIND_DEFAULT_SYMBOL(rte_cryptodev_info_get, _v21, 21);
 
 int
 rte_cryptodev_callback_register(uint8_t dev_id,
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index 3dbb5ce..d8e8e46 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -219,6 +219,14 @@ struct rte_cryptodev_asym_capability_idx {
  *   - Return NULL if the capability not exist.
  */
 const struct rte_cryptodev_symmetric_capability *
+rte_cryptodev_sym_capability_get_v20(uint8_t dev_id,
+		const struct rte_cryptodev_sym_capability_idx *idx);
+
+const struct rte_cryptodev_symmetric_capability *
+rte_cryptodev_sym_capability_get_v21(uint8_t dev_id,
+		const struct rte_cryptodev_sym_capability_idx *idx);
+
+const struct rte_cryptodev_symmetric_capability *
 rte_cryptodev_sym_capability_get(uint8_t dev_id,
 		const struct rte_cryptodev_sym_capability_idx *idx);
 
@@ -762,9 +770,33 @@ rte_cryptodev_stats_reset(uint8_t dev_id);
  * the last valid element has it's op field set to
  * RTE_CRYPTO_OP_TYPE_UNDEFINED.
  */
-extern void
+
+void
 rte_cryptodev_info_get(uint8_t dev_id, struct rte_cryptodev_info *dev_info);
 
+/* An extra element RTE_CRYPTO_AEAD_CHACHA20_POLY1305 is added
+ * to enum rte_crypto_aead_algorithm, also changing the value of
+ *  RTE_CRYPTO_AEAD_LIST_END. To maintain ABI compatibility with applications
+ * which linked against earlier versions, preventing them, for example, from
+ * picking up the new value and using it to index into an array sized too small
+ * for it, it is necessary to have two versions of rte_cryptodev_info_get()
+ * The latest version just returns directly the capabilities retrieved from
+ * the device. The compatible version inspects the capabilities retrieved
+ * from the device, but only returns them directly if the new value
+ * is not included. If the new value is included, it allocates space
+ * for a copy of the device capabilities, trims the new value from this
+ * and returns this copy. It only needs to do this once per device.
+ * For the corner case of a corner case when the alloc may fail,
+ * an empty capability list is returned, as there is no mechanism to return
+ * an error and adding such a mechanism would itself be an ABI breakage.
+ * The compatible version can be removed after the next major ABI release.
+ */
+
+void
+rte_cryptodev_info_get_v20(uint8_t dev_id, struct rte_cryptodev_info *dev_info);
+
+void
+rte_cryptodev_info_get_v21(uint8_t dev_id, struct rte_cryptodev_info *dev_info);
 
 /**
  * Register a callback function for specific device id.
diff --git a/lib/librte_cryptodev/rte_cryptodev_version.map b/lib/librte_cryptodev/rte_cryptodev_version.map
index 87f5cd1..07a2d2f 100644
--- a/lib/librte_cryptodev/rte_cryptodev_version.map
+++ b/lib/librte_cryptodev/rte_cryptodev_version.map
@@ -58,6 +58,13 @@ DPDK_20.0 {
 	local: *;
 };
 
+DPDK_21 {
+	global:
+	rte_cryptodev_info_get;
+	rte_cryptodev_sym_capability_get;
+} DPDK_20.0;
+
+
 EXPERIMENTAL {
 	global:
 
-- 
2.1.0


^ permalink raw reply	[relevance 10%]

* [dpdk-dev] [PATCH v4 0/9] NXP DPAAx fixes and enhancements
  2020-05-04 12:41  3% ` [dpdk-dev] [PATCH v3 0/8] " Hemant Agrawal
@ 2020-05-07 10:46  3%   ` Hemant Agrawal
  2020-05-08 12:59  3%     ` [dpdk-dev] [PATCH v5 " Hemant Agrawal
  2020-05-08 13:02  3%     ` [dpdk-dev] [PATCH v6 00/10] NXP DPAAx fixes and enhancement Hemant Agrawal
  0 siblings, 2 replies; 200+ results
From: Hemant Agrawal @ 2020-05-07 10:46 UTC (permalink / raw)
  To: dev, ferruh.yigit

v4: address the review comments
v3: Limiting the patches to avoid ABI breakage.

Apeksha Gupta (1):
  bus/fslmc: fix dereferencing null pointer

Hemant Agrawal (3):
  net/dpaa2: add default values for Rx params in info
  net/dpaa2: reduce prints in queue count functions
  bus/fslmc: fix the size of qman fq desc

Jun Yang (1):
  net/dpaa2: fix cong group id for multiple tcs

Nipun Gupta (3):
  net/dpaa2: do not prefetch annotaion for physical mode
  drivers: dpaa2 enhance portal alloc failure log
  net/dpaa2: support UDP dst port based muxing

Rohit Raj (1):
  net/dpaa2: fix 10g port negotiation issue

 doc/guides/nics/features/dpaa2.ini          |  2 +-
 drivers/bus/fslmc/portal/dpaa2_hw_pvt.h     |  6 +--
 drivers/bus/fslmc/qbman/qbman_debug.c       |  9 ++--
 drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c |  8 ++-
 drivers/event/dpaa2/dpaa2_eventdev.c        |  8 ++-
 drivers/mempool/dpaa2/dpaa2_hw_mempool.c    | 12 +++--
 drivers/net/dpaa/dpaa_ethdev.c              |  4 ++
 drivers/net/dpaa/dpaa_ethdev.h              |  1 +
 drivers/net/dpaa2/dpaa2_ethdev.c            | 32 ++++++++----
 drivers/net/dpaa2/dpaa2_ethdev.h            |  2 +
 drivers/net/dpaa2/dpaa2_mux.c               | 24 ++++++++-
 drivers/net/dpaa2/dpaa2_rxtx.c              | 56 ++++++++++++++-------
 drivers/raw/dpaa2_cmdif/dpaa2_cmdif.c       |  8 ++-
 drivers/raw/dpaa2_qdma/dpaa2_qdma.c         | 12 +++--
 14 files changed, 135 insertions(+), 49 deletions(-)

-- 
2.17.1


^ permalink raw reply	[relevance 3%]

* [dpdk-dev] [PATCH v3 1/2] common/mlx5: add rte internal tag and avoid comparison
  2020-05-07  7:37  2%   ` [dpdk-dev] [PATCH v2 1/2] common/mlx5: add rte internal tag " Ophir Munk
  2020-05-07  7:44  0%     ` Matan Azrad
  2020-05-07  7:56  0%     ` Ray Kinsella
@ 2020-05-07  8:56  2%     ` Ophir Munk
    2020-05-07 11:31  2%       ` [dpdk-dev] [PATCH v4 " Ophir Munk
  2 siblings, 2 replies; 200+ results
From: Ophir Munk @ 2020-05-07  8:56 UTC (permalink / raw)
  To: dev, David Marchand
  Cc: Ray Kinsella, Matan Azrad, Raslan Darawsheh, Thomas Monjalon, Ophir Munk

Move mlx5 symbols in the map file to the INTERNAL section and add
__internal tags to their definitions.
Those symbols were exported in 20.02 and now (20.05) they are removed.
Avoid ABI comparison issues between 20.05/20.08 and 20.02 by adding the
suppress_file directive to libabigail.abignore file. This directive will
prevent loading mlx5 common symbols and no comparison will be performed.

Fixes: 7b4f1e6bd367 ("common/mlx5: introduce common library")

Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
---
v3: add "Fixes" and "Acked-by" to commit message

 devtools/libabigail.abignore                    |  7 +++++++
 drivers/common/mlx5/mlx5_common.h               |  3 +++
 drivers/common/mlx5/mlx5_devx_cmds.h            | 23 +++++++++++++++++++++++
 drivers/common/mlx5/mlx5_nl.h                   | 18 +++++++++++++++++-
 drivers/common/mlx5/rte_common_mlx5_version.map |  6 +++---
 5 files changed, 53 insertions(+), 4 deletions(-)

diff --git a/devtools/libabigail.abignore b/devtools/libabigail.abignore
index 0326662..f22d540 100644
--- a/devtools/libabigail.abignore
+++ b/devtools/libabigail.abignore
@@ -35,3 +35,10 @@
         type_kind = enum
         name = rte_eth_event_type
         changed_enumerators = RTE_ETH_EVENT_MAX
+
+; These functions were moved from stable to internal.
+; Avoid loading the symbols and comparing them.
+; This is a temporary exception till DPDK 20.11
+[suppress_file]
+	file_name_regexp = ^librte_common_mlx5\.
+
diff --git a/drivers/common/mlx5/mlx5_common.h b/drivers/common/mlx5/mlx5_common.h
index c2d688a..b37b820 100644
--- a/drivers/common/mlx5/mlx5_common.h
+++ b/drivers/common/mlx5/mlx5_common.h
@@ -196,6 +196,7 @@ check_cqe(volatile struct mlx5_cqe *cqe, const uint16_t cqes_n,
 	return MLX5_CQE_STATUS_SW_OWN;
 }
 
+__rte_internal
 int mlx5_dev_to_pci_addr(const char *dev_path, struct rte_pci_addr *pci_addr);
 
 #define MLX5_CLASS_ARG_NAME "class"
@@ -206,7 +207,9 @@ enum mlx5_class {
 	MLX5_CLASS_INVALID,
 };
 
+__rte_internal
 enum mlx5_class mlx5_class_get(struct rte_devargs *devargs);
+__rte_internal
 void mlx5_translate_port_name(const char *port_name_in,
 			      struct mlx5_switch_info *port_info_out);
 
diff --git a/drivers/common/mlx5/mlx5_devx_cmds.h b/drivers/common/mlx5/mlx5_devx_cmds.h
index f7802e6..6dc27da 100644
--- a/drivers/common/mlx5/mlx5_devx_cmds.h
+++ b/drivers/common/mlx5/mlx5_devx_cmds.h
@@ -300,52 +300,75 @@ struct mlx5_devx_qp_attr {
 
 /* mlx5_devx_cmds.c */
 
+__rte_internal
 struct mlx5_devx_obj *mlx5_devx_cmd_flow_counter_alloc(struct ibv_context *ctx,
 						       uint32_t bulk_sz);
+__rte_internal
 int mlx5_devx_cmd_destroy(struct mlx5_devx_obj *obj);
+__rte_internal
 int mlx5_devx_cmd_flow_counter_query(struct mlx5_devx_obj *dcs,
 				     int clear, uint32_t n_counters,
 				     uint64_t *pkts, uint64_t *bytes,
 				     uint32_t mkey, void *addr,
 				     struct mlx5dv_devx_cmd_comp *cmd_comp,
 				     uint64_t async_id);
+__rte_internal
 int mlx5_devx_cmd_query_hca_attr(struct ibv_context *ctx,
 				 struct mlx5_hca_attr *attr);
+__rte_internal
 struct mlx5_devx_obj *mlx5_devx_cmd_mkey_create(struct ibv_context *ctx,
 					      struct mlx5_devx_mkey_attr *attr);
+__rte_internal
 int mlx5_devx_get_out_command_status(void *out);
+__rte_internal
 int mlx5_devx_cmd_qp_query_tis_td(struct ibv_qp *qp, uint32_t tis_num,
 				  uint32_t *tis_td);
+__rte_internal
 struct mlx5_devx_obj *mlx5_devx_cmd_create_rq(struct ibv_context *ctx,
 				       struct mlx5_devx_create_rq_attr *rq_attr,
 				       int socket);
+__rte_internal
 int mlx5_devx_cmd_modify_rq(struct mlx5_devx_obj *rq,
 			    struct mlx5_devx_modify_rq_attr *rq_attr);
+__rte_internal
 struct mlx5_devx_obj *mlx5_devx_cmd_create_tir(struct ibv_context *ctx,
 					   struct mlx5_devx_tir_attr *tir_attr);
+__rte_internal
 struct mlx5_devx_obj *mlx5_devx_cmd_create_rqt(struct ibv_context *ctx,
 					   struct mlx5_devx_rqt_attr *rqt_attr);
+__rte_internal
 struct mlx5_devx_obj *mlx5_devx_cmd_create_sq(struct ibv_context *ctx,
 				      struct mlx5_devx_create_sq_attr *sq_attr);
+__rte_internal
 int mlx5_devx_cmd_modify_sq(struct mlx5_devx_obj *sq,
 			    struct mlx5_devx_modify_sq_attr *sq_attr);
+__rte_internal
 struct mlx5_devx_obj *mlx5_devx_cmd_create_tis(struct ibv_context *ctx,
 					   struct mlx5_devx_tis_attr *tis_attr);
+__rte_internal
 struct mlx5_devx_obj *mlx5_devx_cmd_create_td(struct ibv_context *ctx);
+__rte_internal
 int mlx5_devx_cmd_flow_dump(void *fdb_domain, void *rx_domain, void *tx_domain,
 			    FILE *file);
+__rte_internal
 struct mlx5_devx_obj *mlx5_devx_cmd_create_cq(struct ibv_context *ctx,
 					      struct mlx5_devx_cq_attr *attr);
+__rte_internal
 struct mlx5_devx_obj *mlx5_devx_cmd_create_virtq(struct ibv_context *ctx,
 					     struct mlx5_devx_virtq_attr *attr);
+__rte_internal
 int mlx5_devx_cmd_modify_virtq(struct mlx5_devx_obj *virtq_obj,
 			       struct mlx5_devx_virtq_attr *attr);
+__rte_internal
 int mlx5_devx_cmd_query_virtq(struct mlx5_devx_obj *virtq_obj,
 			      struct mlx5_devx_virtq_attr *attr);
+__rte_internal
 struct mlx5_devx_obj *mlx5_devx_cmd_create_qp(struct ibv_context *ctx,
 					      struct mlx5_devx_qp_attr *attr);
+__rte_internal
 int mlx5_devx_cmd_modify_qp_state(struct mlx5_devx_obj *qp,
 				  uint32_t qp_st_mod_op, uint32_t remote_qp_id);
+__rte_internal
 int mlx5_devx_cmd_modify_rqt(struct mlx5_devx_obj *rqt,
 			     struct mlx5_devx_rqt_attr *rqt_attr);
 
diff --git a/drivers/common/mlx5/mlx5_nl.h b/drivers/common/mlx5/mlx5_nl.h
index 2c3f837..53021e1 100644
--- a/drivers/common/mlx5/mlx5_nl.h
+++ b/drivers/common/mlx5/mlx5_nl.h
@@ -28,35 +28,51 @@ struct mlx5_nl_vlan_vmwa_context {
 	struct mlx5_nl_vlan_dev vlan_dev[4096];
 };
 
-
+__rte_internal
 int mlx5_nl_init(int protocol);
+__rte_internal
 int mlx5_nl_mac_addr_add(int nlsk_fd, unsigned int iface_idx, uint64_t *mac_own,
 			 struct rte_ether_addr *mac, uint32_t index);
+__rte_internal
 int mlx5_nl_mac_addr_remove(int nlsk_fd, unsigned int iface_idx,
 			    uint64_t *mac_own, struct rte_ether_addr *mac,
 			    uint32_t index);
+__rte_internal
 void mlx5_nl_mac_addr_sync(int nlsk_fd, unsigned int iface_idx,
 			   struct rte_ether_addr *mac_addrs, int n);
+__rte_internal
 void mlx5_nl_mac_addr_flush(int nlsk_fd, unsigned int iface_idx,
 			    struct rte_ether_addr *mac_addrs, int n,
 			    uint64_t *mac_own);
+__rte_internal
 int mlx5_nl_promisc(int nlsk_fd, unsigned int iface_idx, int enable);
+__rte_internal
 int mlx5_nl_allmulti(int nlsk_fd, unsigned int iface_idx, int enable);
+__rte_internal
 unsigned int mlx5_nl_portnum(int nl, const char *name);
+__rte_internal
 unsigned int mlx5_nl_ifindex(int nl, const char *name, uint32_t pindex);
+__rte_internal
 int mlx5_nl_vf_mac_addr_modify(int nlsk_fd, unsigned int iface_idx,
 			       struct rte_ether_addr *mac, int vf_index);
+__rte_internal
 int mlx5_nl_switch_info(int nl, unsigned int ifindex,
 			struct mlx5_switch_info *info);
 
+__rte_internal
 void mlx5_nl_vlan_vmwa_delete(struct mlx5_nl_vlan_vmwa_context *vmwa,
 			      uint32_t ifindex);
+__rte_internal
 uint32_t mlx5_nl_vlan_vmwa_create(struct mlx5_nl_vlan_vmwa_context *vmwa,
 				  uint32_t ifindex, uint16_t tag);
+__rte_internal
 int mlx5_nl_devlink_family_id_get(int nlsk_fd);
+__rte_internal
 int mlx5_nl_enable_roce_get(int nlsk_fd, int family_id, const char *pci_addr,
 			    int *enable);
+__rte_internal
 int mlx5_nl_driver_reload(int nlsk_fd, int family_id, const char *pci_addr);
+__rte_internal
 int mlx5_nl_enable_roce_set(int nlsk_fd, int family_id, const char *pci_addr,
 			    int enable);
 
diff --git a/drivers/common/mlx5/rte_common_mlx5_version.map b/drivers/common/mlx5/rte_common_mlx5_version.map
index 564a9a7..61d1d4d 100644
--- a/drivers/common/mlx5/rte_common_mlx5_version.map
+++ b/drivers/common/mlx5/rte_common_mlx5_version.map
@@ -1,8 +1,10 @@
-DPDK_21 {
+INTERNAL {
 	global:
 
 	mlx5_class_get;
 
+	mlx5_dev_to_pci_addr;
+
 	mlx5_devx_cmd_create_cq;
 	mlx5_devx_cmd_create_qp;
 	mlx5_devx_cmd_create_rq;
@@ -27,8 +29,6 @@ DPDK_21 {
 	mlx5_devx_cmd_query_virtq;
 	mlx5_devx_get_out_command_status;
 
-	mlx5_dev_to_pci_addr;
-
 	mlx5_nl_allmulti;
 	mlx5_nl_devlink_family_id_get;
 	mlx5_nl_driver_reload;
-- 
2.8.4


^ permalink raw reply	[relevance 2%]

* Re: [dpdk-dev] [PATCH v2 1/2] common/mlx5: add rte internal tag and avoid comparison
  2020-05-07  7:37  2%   ` [dpdk-dev] [PATCH v2 1/2] common/mlx5: add rte internal tag " Ophir Munk
  2020-05-07  7:44  0%     ` Matan Azrad
@ 2020-05-07  7:56  0%     ` Ray Kinsella
  2020-05-07  8:56  2%     ` [dpdk-dev] [PATCH v3 " Ophir Munk
  2 siblings, 0 replies; 200+ results
From: Ray Kinsella @ 2020-05-07  7:56 UTC (permalink / raw)
  To: Ophir Munk, dev, David Marchand
  Cc: Matan Azrad, Raslan Darawsheh, Thomas Monjalon



On 07/05/2020 08:37, Ophir Munk wrote:
> Move mlx5 symbols in the map file to the INTERNAL section and add
> __internal tags to their definitions.
> Those symbols were exported in 20.02 and now (20.05) they are removed.
> Avoid ABI comparison issues between 20.05/20.08 and 20.02 by adding the
> suppress_file directive to libabigail.abignore file. This directive will
> prevent loading mlx5 common symbols and no comparison will be performed.
> 
> Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
> ---
>  devtools/libabigail.abignore                    |  7 +++++++
>  drivers/common/mlx5/mlx5_common.h               |  3 +++
>  drivers/common/mlx5/mlx5_devx_cmds.h            | 23 +++++++++++++++++++++++
>  drivers/common/mlx5/mlx5_nl.h                   | 18 +++++++++++++++++-
>  drivers/common/mlx5/rte_common_mlx5_version.map |  6 +++---
>  5 files changed, 53 insertions(+), 4 deletions(-)

Can you add a Fixes: section.
Referencing the original git commit that added the symbols we are ignoring?

Ray K

^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [PATCH v2 1/2] common/mlx5: add rte internal tag and avoid comparison
  2020-05-07  7:37  2%   ` [dpdk-dev] [PATCH v2 1/2] common/mlx5: add rte internal tag " Ophir Munk
@ 2020-05-07  7:44  0%     ` Matan Azrad
  2020-05-07  7:56  0%     ` Ray Kinsella
  2020-05-07  8:56  2%     ` [dpdk-dev] [PATCH v3 " Ophir Munk
  2 siblings, 0 replies; 200+ results
From: Matan Azrad @ 2020-05-07  7:44 UTC (permalink / raw)
  To: Ophir Munk, dev, David Marchand
  Cc: Ray Kinsella, Raslan Darawsheh, Thomas Monjalon



From: Ophir Munk:
> Move mlx5 symbols in the map file to the INTERNAL section and add
> __internal tags to their definitions.
> Those symbols were exported in 20.02 and now (20.05) they are removed.
> Avoid ABI comparison issues between 20.05/20.08 and 20.02 by adding the
> suppress_file directive to libabigail.abignore file. This directive will prevent
> loading mlx5 common symbols and no comparison will be performed.
> 
> Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>

^ permalink raw reply	[relevance 0%]

* [dpdk-dev] [PATCH v2 1/2] common/mlx5: add rte internal tag and avoid comparison
  @ 2020-05-07  7:37  2%   ` Ophir Munk
  2020-05-07  7:44  0%     ` Matan Azrad
                       ` (2 more replies)
  0 siblings, 3 replies; 200+ results
From: Ophir Munk @ 2020-05-07  7:37 UTC (permalink / raw)
  To: dev, David Marchand
  Cc: Ray Kinsella, Matan Azrad, Raslan Darawsheh, Thomas Monjalon, Ophir Munk

Move mlx5 symbols in the map file to the INTERNAL section and add
__internal tags to their definitions.
Those symbols were exported in 20.02 and now (20.05) they are removed.
Avoid ABI comparison issues between 20.05/20.08 and 20.02 by adding the
suppress_file directive to libabigail.abignore file. This directive will
prevent loading mlx5 common symbols and no comparison will be performed.

Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
---
 devtools/libabigail.abignore                    |  7 +++++++
 drivers/common/mlx5/mlx5_common.h               |  3 +++
 drivers/common/mlx5/mlx5_devx_cmds.h            | 23 +++++++++++++++++++++++
 drivers/common/mlx5/mlx5_nl.h                   | 18 +++++++++++++++++-
 drivers/common/mlx5/rte_common_mlx5_version.map |  6 +++---
 5 files changed, 53 insertions(+), 4 deletions(-)

diff --git a/devtools/libabigail.abignore b/devtools/libabigail.abignore
index 0326662..f22d540 100644
--- a/devtools/libabigail.abignore
+++ b/devtools/libabigail.abignore
@@ -35,3 +35,10 @@
         type_kind = enum
         name = rte_eth_event_type
         changed_enumerators = RTE_ETH_EVENT_MAX
+
+; These functions were moved from stable to internal.
+; Avoid loading the symbols and comparing them.
+; This is a temporary exception till DPDK 20.11
+[suppress_file]
+	file_name_regexp = ^librte_common_mlx5\.
+
diff --git a/drivers/common/mlx5/mlx5_common.h b/drivers/common/mlx5/mlx5_common.h
index c2d688a..b37b820 100644
--- a/drivers/common/mlx5/mlx5_common.h
+++ b/drivers/common/mlx5/mlx5_common.h
@@ -196,6 +196,7 @@ check_cqe(volatile struct mlx5_cqe *cqe, const uint16_t cqes_n,
 	return MLX5_CQE_STATUS_SW_OWN;
 }
 
+__rte_internal
 int mlx5_dev_to_pci_addr(const char *dev_path, struct rte_pci_addr *pci_addr);
 
 #define MLX5_CLASS_ARG_NAME "class"
@@ -206,7 +207,9 @@ enum mlx5_class {
 	MLX5_CLASS_INVALID,
 };
 
+__rte_internal
 enum mlx5_class mlx5_class_get(struct rte_devargs *devargs);
+__rte_internal
 void mlx5_translate_port_name(const char *port_name_in,
 			      struct mlx5_switch_info *port_info_out);
 
diff --git a/drivers/common/mlx5/mlx5_devx_cmds.h b/drivers/common/mlx5/mlx5_devx_cmds.h
index f7802e6..6dc27da 100644
--- a/drivers/common/mlx5/mlx5_devx_cmds.h
+++ b/drivers/common/mlx5/mlx5_devx_cmds.h
@@ -300,52 +300,75 @@ struct mlx5_devx_qp_attr {
 
 /* mlx5_devx_cmds.c */
 
+__rte_internal
 struct mlx5_devx_obj *mlx5_devx_cmd_flow_counter_alloc(struct ibv_context *ctx,
 						       uint32_t bulk_sz);
+__rte_internal
 int mlx5_devx_cmd_destroy(struct mlx5_devx_obj *obj);
+__rte_internal
 int mlx5_devx_cmd_flow_counter_query(struct mlx5_devx_obj *dcs,
 				     int clear, uint32_t n_counters,
 				     uint64_t *pkts, uint64_t *bytes,
 				     uint32_t mkey, void *addr,
 				     struct mlx5dv_devx_cmd_comp *cmd_comp,
 				     uint64_t async_id);
+__rte_internal
 int mlx5_devx_cmd_query_hca_attr(struct ibv_context *ctx,
 				 struct mlx5_hca_attr *attr);
+__rte_internal
 struct mlx5_devx_obj *mlx5_devx_cmd_mkey_create(struct ibv_context *ctx,
 					      struct mlx5_devx_mkey_attr *attr);
+__rte_internal
 int mlx5_devx_get_out_command_status(void *out);
+__rte_internal
 int mlx5_devx_cmd_qp_query_tis_td(struct ibv_qp *qp, uint32_t tis_num,
 				  uint32_t *tis_td);
+__rte_internal
 struct mlx5_devx_obj *mlx5_devx_cmd_create_rq(struct ibv_context *ctx,
 				       struct mlx5_devx_create_rq_attr *rq_attr,
 				       int socket);
+__rte_internal
 int mlx5_devx_cmd_modify_rq(struct mlx5_devx_obj *rq,
 			    struct mlx5_devx_modify_rq_attr *rq_attr);
+__rte_internal
 struct mlx5_devx_obj *mlx5_devx_cmd_create_tir(struct ibv_context *ctx,
 					   struct mlx5_devx_tir_attr *tir_attr);
+__rte_internal
 struct mlx5_devx_obj *mlx5_devx_cmd_create_rqt(struct ibv_context *ctx,
 					   struct mlx5_devx_rqt_attr *rqt_attr);
+__rte_internal
 struct mlx5_devx_obj *mlx5_devx_cmd_create_sq(struct ibv_context *ctx,
 				      struct mlx5_devx_create_sq_attr *sq_attr);
+__rte_internal
 int mlx5_devx_cmd_modify_sq(struct mlx5_devx_obj *sq,
 			    struct mlx5_devx_modify_sq_attr *sq_attr);
+__rte_internal
 struct mlx5_devx_obj *mlx5_devx_cmd_create_tis(struct ibv_context *ctx,
 					   struct mlx5_devx_tis_attr *tis_attr);
+__rte_internal
 struct mlx5_devx_obj *mlx5_devx_cmd_create_td(struct ibv_context *ctx);
+__rte_internal
 int mlx5_devx_cmd_flow_dump(void *fdb_domain, void *rx_domain, void *tx_domain,
 			    FILE *file);
+__rte_internal
 struct mlx5_devx_obj *mlx5_devx_cmd_create_cq(struct ibv_context *ctx,
 					      struct mlx5_devx_cq_attr *attr);
+__rte_internal
 struct mlx5_devx_obj *mlx5_devx_cmd_create_virtq(struct ibv_context *ctx,
 					     struct mlx5_devx_virtq_attr *attr);
+__rte_internal
 int mlx5_devx_cmd_modify_virtq(struct mlx5_devx_obj *virtq_obj,
 			       struct mlx5_devx_virtq_attr *attr);
+__rte_internal
 int mlx5_devx_cmd_query_virtq(struct mlx5_devx_obj *virtq_obj,
 			      struct mlx5_devx_virtq_attr *attr);
+__rte_internal
 struct mlx5_devx_obj *mlx5_devx_cmd_create_qp(struct ibv_context *ctx,
 					      struct mlx5_devx_qp_attr *attr);
+__rte_internal
 int mlx5_devx_cmd_modify_qp_state(struct mlx5_devx_obj *qp,
 				  uint32_t qp_st_mod_op, uint32_t remote_qp_id);
+__rte_internal
 int mlx5_devx_cmd_modify_rqt(struct mlx5_devx_obj *rqt,
 			     struct mlx5_devx_rqt_attr *rqt_attr);
 
diff --git a/drivers/common/mlx5/mlx5_nl.h b/drivers/common/mlx5/mlx5_nl.h
index 2c3f837..53021e1 100644
--- a/drivers/common/mlx5/mlx5_nl.h
+++ b/drivers/common/mlx5/mlx5_nl.h
@@ -28,35 +28,51 @@ struct mlx5_nl_vlan_vmwa_context {
 	struct mlx5_nl_vlan_dev vlan_dev[4096];
 };
 
-
+__rte_internal
 int mlx5_nl_init(int protocol);
+__rte_internal
 int mlx5_nl_mac_addr_add(int nlsk_fd, unsigned int iface_idx, uint64_t *mac_own,
 			 struct rte_ether_addr *mac, uint32_t index);
+__rte_internal
 int mlx5_nl_mac_addr_remove(int nlsk_fd, unsigned int iface_idx,
 			    uint64_t *mac_own, struct rte_ether_addr *mac,
 			    uint32_t index);
+__rte_internal
 void mlx5_nl_mac_addr_sync(int nlsk_fd, unsigned int iface_idx,
 			   struct rte_ether_addr *mac_addrs, int n);
+__rte_internal
 void mlx5_nl_mac_addr_flush(int nlsk_fd, unsigned int iface_idx,
 			    struct rte_ether_addr *mac_addrs, int n,
 			    uint64_t *mac_own);
+__rte_internal
 int mlx5_nl_promisc(int nlsk_fd, unsigned int iface_idx, int enable);
+__rte_internal
 int mlx5_nl_allmulti(int nlsk_fd, unsigned int iface_idx, int enable);
+__rte_internal
 unsigned int mlx5_nl_portnum(int nl, const char *name);
+__rte_internal
 unsigned int mlx5_nl_ifindex(int nl, const char *name, uint32_t pindex);
+__rte_internal
 int mlx5_nl_vf_mac_addr_modify(int nlsk_fd, unsigned int iface_idx,
 			       struct rte_ether_addr *mac, int vf_index);
+__rte_internal
 int mlx5_nl_switch_info(int nl, unsigned int ifindex,
 			struct mlx5_switch_info *info);
 
+__rte_internal
 void mlx5_nl_vlan_vmwa_delete(struct mlx5_nl_vlan_vmwa_context *vmwa,
 			      uint32_t ifindex);
+__rte_internal
 uint32_t mlx5_nl_vlan_vmwa_create(struct mlx5_nl_vlan_vmwa_context *vmwa,
 				  uint32_t ifindex, uint16_t tag);
+__rte_internal
 int mlx5_nl_devlink_family_id_get(int nlsk_fd);
+__rte_internal
 int mlx5_nl_enable_roce_get(int nlsk_fd, int family_id, const char *pci_addr,
 			    int *enable);
+__rte_internal
 int mlx5_nl_driver_reload(int nlsk_fd, int family_id, const char *pci_addr);
+__rte_internal
 int mlx5_nl_enable_roce_set(int nlsk_fd, int family_id, const char *pci_addr,
 			    int enable);
 
diff --git a/drivers/common/mlx5/rte_common_mlx5_version.map b/drivers/common/mlx5/rte_common_mlx5_version.map
index 564a9a7..61d1d4d 100644
--- a/drivers/common/mlx5/rte_common_mlx5_version.map
+++ b/drivers/common/mlx5/rte_common_mlx5_version.map
@@ -1,8 +1,10 @@
-DPDK_21 {
+INTERNAL {
 	global:
 
 	mlx5_class_get;
 
+	mlx5_dev_to_pci_addr;
+
 	mlx5_devx_cmd_create_cq;
 	mlx5_devx_cmd_create_qp;
 	mlx5_devx_cmd_create_rq;
@@ -27,8 +29,6 @@ DPDK_21 {
 	mlx5_devx_cmd_query_virtq;
 	mlx5_devx_get_out_command_status;
 
-	mlx5_dev_to_pci_addr;
-
 	mlx5_nl_allmulti;
 	mlx5_nl_devlink_family_id_get;
 	mlx5_nl_driver_reload;
-- 
2.8.4


^ permalink raw reply	[relevance 2%]

* Re: [dpdk-dev] [PATCH 1/7] common/dpaax: move internal symbols into INTERNAL section
  2020-05-07  6:20  0%   ` Hemant Agrawal
@ 2020-05-07  6:54  0%     ` Ray Kinsella
  0 siblings, 0 replies; 200+ results
From: Ray Kinsella @ 2020-05-07  6:54 UTC (permalink / raw)
  To: Hemant Agrawal, David Marchand; +Cc: dev



On 07/05/2020 07:20, Hemant Agrawal wrote:
> Hi David
> 
>> On Tue, May 5, 2020 at 4:10 PM Hemant Agrawal
>> <hemant.agrawal@nxp.com> wrote:
>>>
>>> This patch moves the internal symbols to INTERNAL sections so that any
>>> change in them is not reported as ABI breakage.
>>
>> Talking about the series (not just this patch as I did not look at the details),
>> travis reported a build issue:
>> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Ftravis-
>> ci.com%2Fgithub%2Fovsrobot%2Fdpdk%2Fbuilds%2F163985766&amp;data=02
>> %7C01%7Chemant.agrawal%40nxp.com%7C555963f208a3446deba708d7f116e
>> 1cf%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C6372429528900581
>> 54&amp;sdata=j2fqNXovCPfaLlPtZwS9TaMBKMBP5l7inwX%2BsndavS4%3D&am
>> p;reserved=0
>>
>> It looks like there is a versioned symbol for a static function of one of those
>> drivers.
>> $ git grep dpaa2_get_qbman_swp origin/master
>> origin/master:drivers/bus/fslmc/portal/dpaa2_hw_dpio.c:static struct
>> dpaa2_dpio_dev *dpaa2_get_qbman_swp(int lcoreid)
>> origin/master:drivers/bus/fslmc/portal/dpaa2_hw_dpio.c:
>> dpaa2_io_portal[lcore_id].dpio_dev = dpaa2_get_qbman_swp(lcore_id);
>> origin/master:drivers/bus/fslmc/portal/dpaa2_hw_dpio.c:
>> dpaa2_get_qbman_swp(lcore_id);
>> origin/master:drivers/bus/fslmc/rte_bus_fslmc_version.map:
>> dpaa2_get_qbman_swp;
> 
> [Hemant] yes, I saw it. It will be fixed in v2
> 
>>
>>
>> Once fixed, I don't understand how you chose to move some symbols to
>> INTERNAL and not others.
>> Can you explain the differences?
> 
> [Hemant] In most of the libraries the symbols are internal only. i.e. they are suppose to be used by other dpdk internal drivers.
> Only very few cases rte_dpaa2_mempool.h, rte_pmd_dpaa2.h rte_pmd_dpaa.h have few functions, which are suppose to be used by the external entities or applications.
> 
>>
>>
>> Finally, I would still expect a failure in the ABI check even if using
>> __rte_internal marking.
>> Marking them internal will make you free of changing those symbols in the
>> future.
>> The problem is the transient state we are in.
> 
> [Hemant] I also expect it like this. But still facing few issues w.r.t variables.
> __rte_internal can not be used as a predecessor for variable names. 
> In map files dpaa have some of the variables also defined as part of symbols for the faster access across libraries. 
> I am still looking a right way to handle them. 

I think your least error prone way is going to be to use an internal function to return a pointer to the variable(s).
rte_dpaa2+get_my_important variables.

> 
>>
>> In 20.02 (and I suppose 19.11 too), those symbols were exported and
>> versioned as stable DPDK_20.
>> So with the current ABI check script, this move will still be seen as a removal.
>>
>>
>> --
>> David Marchand
> 

^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [PATCH 1/7] common/dpaax: move internal symbols into INTERNAL section
  2020-05-05 17:07  4% ` [dpdk-dev] [PATCH 1/7] common/dpaax: " David Marchand
@ 2020-05-07  6:20  0%   ` Hemant Agrawal
  2020-05-07  6:54  0%     ` Ray Kinsella
  0 siblings, 1 reply; 200+ results
From: Hemant Agrawal @ 2020-05-07  6:20 UTC (permalink / raw)
  To: David Marchand; +Cc: dev, Ray Kinsella

Hi David

> On Tue, May 5, 2020 at 4:10 PM Hemant Agrawal
> <hemant.agrawal@nxp.com> wrote:
> >
> > This patch moves the internal symbols to INTERNAL sections so that any
> > change in them is not reported as ABI breakage.
> 
> Talking about the series (not just this patch as I did not look at the details),
> travis reported a build issue:
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Ftravis-
> ci.com%2Fgithub%2Fovsrobot%2Fdpdk%2Fbuilds%2F163985766&amp;data=02
> %7C01%7Chemant.agrawal%40nxp.com%7C555963f208a3446deba708d7f116e
> 1cf%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C6372429528900581
> 54&amp;sdata=j2fqNXovCPfaLlPtZwS9TaMBKMBP5l7inwX%2BsndavS4%3D&am
> p;reserved=0
> 
> It looks like there is a versioned symbol for a static function of one of those
> drivers.
> $ git grep dpaa2_get_qbman_swp origin/master
> origin/master:drivers/bus/fslmc/portal/dpaa2_hw_dpio.c:static struct
> dpaa2_dpio_dev *dpaa2_get_qbman_swp(int lcoreid)
> origin/master:drivers/bus/fslmc/portal/dpaa2_hw_dpio.c:
> dpaa2_io_portal[lcore_id].dpio_dev = dpaa2_get_qbman_swp(lcore_id);
> origin/master:drivers/bus/fslmc/portal/dpaa2_hw_dpio.c:
> dpaa2_get_qbman_swp(lcore_id);
> origin/master:drivers/bus/fslmc/rte_bus_fslmc_version.map:
> dpaa2_get_qbman_swp;

[Hemant] yes, I saw it. It will be fixed in v2

> 
> 
> Once fixed, I don't understand how you chose to move some symbols to
> INTERNAL and not others.
> Can you explain the differences?

[Hemant] In most of the libraries the symbols are internal only. i.e. they are suppose to be used by other dpdk internal drivers.
Only very few cases rte_dpaa2_mempool.h, rte_pmd_dpaa2.h rte_pmd_dpaa.h have few functions, which are suppose to be used by the external entities or applications.

> 
> 
> Finally, I would still expect a failure in the ABI check even if using
> __rte_internal marking.
> Marking them internal will make you free of changing those symbols in the
> future.
> The problem is the transient state we are in.

[Hemant] I also expect it like this. But still facing few issues w.r.t variables.
__rte_internal can not be used as a predecessor for variable names. 
In map files dpaa have some of the variables also defined as part of symbols for the faster access across libraries. 
I am still looking a right way to handle them. 

> 
> In 20.02 (and I suppose 19.11 too), those symbols were exported and
> versioned as stable DPDK_20.
> So with the current ABI check script, this move will still be seen as a removal.
> 
> 
> --
> David Marchand


^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [RFC] hash: unify crc32 API header for x86 and ARM
  2020-04-29 18:05  2% [dpdk-dev] [RFC] hash: unify crc32 API header for x86 and ARM pbhagavatula
  2020-04-30  9:14  0% ` Van Haaren, Harry
@ 2020-05-06 22:02  0% ` Wang, Yipeng1
  2020-05-10 22:49  0%   ` Pavan Nikhilesh Bhagavatula
  2020-05-08 12:55  0% ` Ananyev, Konstantin
  2020-05-12 20:40  3% ` [dpdk-dev] [RFC v2] " pbhagavatula
  3 siblings, 1 reply; 200+ results
From: Wang, Yipeng1 @ 2020-05-06 22:02 UTC (permalink / raw)
  To: Pavan Nikhilesh Bhagavatula, Van Haaren, Harry,
	Jerin Jacob Kollanukkaran, thomas, Gobriel, Sameh, Richardson,
	Bruce, Ruifeng Wang
  Cc: dev

> -----Original Message-----
> From: pbhagavatula@marvell.com <pbhagavatula@marvell.com>
> Sent: Wednesday, April 29, 2020 11:05 AM
> To: jerinj@marvell.com; thomas@monjalon.net; Wang, Yipeng1
> <yipeng1.wang@intel.com>; Gobriel, Sameh <sameh.gobriel@intel.com>;
> Richardson, Bruce <bruce.richardson@intel.com>; Ruifeng Wang
> <ruifeng.wang@arm.com>
> Cc: dev@dpdk.org; Pavan Nikhilesh <pbhagavatula@marvell.com>
> Subject: [dpdk-dev] [RFC] hash: unify crc32 API header for x86 and ARM
> 
> From: Pavan Nikhilesh <pbhagavatula@marvell.com>
> 
> Merge crc32 hash calculation public API headers for x86 and ARM, split
> implementations of x86 and ARM into their respective private headers.
> This reduces the ifdef code clutter while keeping current ABI intact.
> 
> Although we install `rte_crc_arm64.h` it is not used in any of the lib or drivers
> layers. All the libs and drivers use `rte_hash_crc.h` which falls back to SW
> crc32 calculation for ARM platform.
> 
> Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
> ---
> 
>  Currently, if application incorrectly sets CRC32_ARM64 as crc32 algorithm
> through `rte_hash_crc_set_alg()` on x86 or vice-versa we fallback to
> algorithm  set previously via `rte_hash_crc_set_alg()` instead of setting the
> best  available.
>  This behaviour should probably change to setting the best available
> algorithm  and is up for discussion.

[Wang, Yipeng] Should it be an illegal flag if I set ARM64
On x86? I am thinking we should generate a warning message into logs if this happens.
> 
>  app/test/test_hash.c            |   6 +
>  lib/librte_hash/Makefile        |   5 -
>  lib/librte_hash/crc_arm64.h     |  67 +++++++++++
>  lib/librte_hash/crc_x86.h       |  68 +++++++++++
>  lib/librte_hash/meson.build     |   3 +-
>  lib/librte_hash/rte_crc_arm64.h | 183 ------------------------------
> lib/librte_hash/rte_hash_crc.h  | 193 +++++++++++++-------------------
>  7 files changed, 219 insertions(+), 306 deletions(-)  create mode 100644
> lib/librte_hash/crc_arm64.h  create mode 100644 lib/librte_hash/crc_x86.h
> delete mode 100644 lib/librte_hash/rte_crc_arm64.h
> 
> diff --git a/app/test/test_hash.c b/app/test/test_hash.c index
> afa3a1a3c..7bd457dac 100644
> --- a/app/test/test_hash.c
> +++ b/app/test/test_hash.c
> @@ -195,7 +195,13 @@ test_crc32_hash_alg_equiv(void)
>  	}
> 
>  	/* Resetting to best available algorithm */
> +#if defined RTE_ARCH_X86
>  	rte_hash_crc_set_alg(CRC32_SSE42_x64);
> +#elif defined RTE_ARCH_ARM64
> +	rte_hash_crc_set_alg(CRC32_ARM64);
> +#else
> +	rte_hash_crc_set_alg(CRC32_SW);
> +#endif
> 
>  	if (i == CRC32_ITERATIONS)
>  		return 0;
> diff --git a/lib/librte_hash/Makefile b/lib/librte_hash/Makefile index
> ec9f86499..f640afc42 100644
> --- a/lib/librte_hash/Makefile
> +++ b/lib/librte_hash/Makefile
> @@ -19,11 +19,6 @@ SRCS-$(CONFIG_RTE_LIBRTE_HASH) += rte_fbk_hash.c
> # install this header file  SYMLINK-$(CONFIG_RTE_LIBRTE_HASH)-include :=
> rte_hash.h  SYMLINK-$(CONFIG_RTE_LIBRTE_HASH)-include +=
> rte_hash_crc.h -ifeq ($(CONFIG_RTE_ARCH_ARM64),y) -ifneq ($(findstring
> RTE_MACHINE_CPUFLAG_CRC32,$(CFLAGS)),)
> -SYMLINK-$(CONFIG_RTE_LIBRTE_HASH)-include += rte_crc_arm64.h -endif
> -endif  SYMLINK-$(CONFIG_RTE_LIBRTE_HASH)-include += rte_jhash.h
> SYMLINK-$(CONFIG_RTE_LIBRTE_HASH)-include += rte_thash.h  SYMLINK-
> $(CONFIG_RTE_LIBRTE_HASH)-include += rte_fbk_hash.h diff --git
> a/lib/librte_hash/crc_arm64.h b/lib/librte_hash/crc_arm64.h new file mode
> 100644 index 000000000..8e75f8297
> --- /dev/null
> +++ b/lib/librte_hash/crc_arm64.h
> @@ -0,0 +1,67 @@
> +/* SPDX-License-Identifier: BSD-3-Clause
> + * Copyright(c) 2015 Cavium, Inc
> + */
> +
> +#ifndef _CRC_ARM64_H_
> +#define _CRC_ARM64_H_
> +
> +/**
> + * @file
> + *
> + * CRC arm64 Hash
> + */
[Wang, Yipeng] It is hidden now so do we still need this doxygen region above?
> +
> +#ifdef __cplusplus
> +extern "C" {
> +#endif
> +
> +#include <stdint.h>
> +#include <rte_cpuflags.h>
> +#include <rte_branch_prediction.h>
> +#include <rte_common.h>
[Wang, Yipeng] I don't think we need all these headers in this file.
> +
> +static inline uint32_t
> +crc32c_arm64_u8(uint8_t data, uint32_t init_val) {
> +	__asm__ volatile(
> +			"crc32cb %w[crc], %w[crc], %w[value]"
> +			: [crc] "+r" (init_val)
> +			: [value] "r" (data));
> +	return init_val;
> +}
> +
> +static inline uint32_t
> +crc32c_arm64_u16(uint16_t data, uint32_t init_val) {
> +	__asm__ volatile(
> +			"crc32ch %w[crc], %w[crc], %w[value]"
> +			: [crc] "+r" (init_val)
> +			: [value] "r" (data));
> +	return init_val;
> +}
> +
> +static inline uint32_t
> +crc32c_arm64_u32(uint32_t data, uint32_t init_val) {
> +	__asm__ volatile(
> +			"crc32cw %w[crc], %w[crc], %w[value]"
> +			: [crc] "+r" (init_val)
> +			: [value] "r" (data));
> +	return init_val;
> +}
> +
> +static inline uint32_t
> +crc32c_arm64_u64(uint64_t data, uint32_t init_val) {
> +	__asm__ volatile(
> +			"crc32cx %w[crc], %w[crc], %x[value]"
> +			: [crc] "+r" (init_val)
> +			: [value] "r" (data));
> +	return init_val;
> +}
> +
> +#ifdef __cplusplus
> +}
> +#endif
> +
> +#endif /* _CRC_ARM64_H_ */
> diff --git a/lib/librte_hash/crc_x86.h b/lib/librte_hash/crc_x86.h new file
> mode 100644 index 000000000..fb45f2e98
> --- /dev/null
> +++ b/lib/librte_hash/crc_x86.h
> @@ -0,0 +1,68 @@
> +/* SPDX-License-Identifier: BSD-3-Clause
> + * Copyright(c) 2010-2014 Intel Corporation  */
> +
> +#ifndef _CRC_X86_H_
> +#define _CRC_X86_H_
> +
> +#if defined(RTE_ARCH_X86)
> +static inline uint32_t
> +crc32c_sse42_u8(uint8_t data, uint32_t init_val) {
> +	__asm__ volatile(
> +			"crc32b %[data], %[init_val];"
> +			: [init_val] "+r" (init_val)
> +			: [data] "rm" (data));
> +	return init_val;
> +}
> +
> +static inline uint32_t
> +crc32c_sse42_u16(uint16_t data, uint32_t init_val) {
> +	__asm__ volatile(
> +			"crc32w %[data], %[init_val];"
> +			: [init_val] "+r" (init_val)
> +			: [data] "rm" (data));
> +	return init_val;
> +}
> +
> +static inline uint32_t
> +crc32c_sse42_u32(uint32_t data, uint32_t init_val) {
> +	__asm__ volatile(
> +			"crc32l %[data], %[init_val];"
> +			: [init_val] "+r" (init_val)
> +			: [data] "rm" (data));
> +	return init_val;
> +}
> +
> +static inline uint32_t
> +crc32c_sse42_u64_mimic(uint64_t data, uint32_t init_val) {
> +	union {
> +		uint32_t u32[2];
> +		uint64_t u64;
> +	} d;
> +
> +	d.u64 = data;
> +	init_val = crc32c_sse42_u32(d.u32[0], init_val);
> +	init_val = crc32c_sse42_u32(d.u32[1], init_val);
> +	return init_val;
> +}
> +#endif
> +
> +#ifdef RTE_ARCH_X86_64
> +static inline uint32_t
> +crc32c_sse42_u64(uint64_t data, uint32_t init_val) {
> +	uint64_t val = init_val;
> +
> +	__asm__ volatile(
> +			"crc32q %[data], %[init_val];"
> +			: [init_val] "+r" (val)
> +			: [data] "rm" (data));
> +	return (uint32_t)val;
> +}
> +#endif
> +
> +#endif
> diff --git a/lib/librte_hash/meson.build b/lib/librte_hash/meson.build index
> 6ab46ae9d..90a180bc8 100644
> --- a/lib/librte_hash/meson.build
> +++ b/lib/librte_hash/meson.build
> @@ -1,8 +1,7 @@
>  # SPDX-License-Identifier: BSD-3-Clause  # Copyright(c) 2017 Intel
> Corporation
> 
> -headers = files('rte_crc_arm64.h',
> -	'rte_fbk_hash.h',
> +headers = files('rte_fbk_hash.h',
>  	'rte_hash_crc.h',
>  	'rte_hash.h',
>  	'rte_jhash.h',
> diff --git a/lib/librte_hash/rte_crc_arm64.h
> b/lib/librte_hash/rte_crc_arm64.h deleted file mode 100644 index
> b4628cfc0..000000000
> --- a/lib/librte_hash/rte_crc_arm64.h
> +++ /dev/null
> @@ -1,183 +0,0 @@
> -/* SPDX-License-Identifier: BSD-3-Clause
> - * Copyright(c) 2015 Cavium, Inc
> - */
> -
> -#ifndef _RTE_CRC_ARM64_H_
> -#define _RTE_CRC_ARM64_H_
> -
> -/**
> - * @file
> - *
> - * RTE CRC arm64 Hash
> - */
> -
> -#ifdef __cplusplus
> -extern "C" {
> -#endif
> -
> -#include <stdint.h>
> -#include <rte_cpuflags.h>
> -#include <rte_branch_prediction.h>
> -#include <rte_common.h>
> -
> -static inline uint32_t
> -crc32c_arm64_u8(uint8_t data, uint32_t init_val) -{
> -	__asm__ volatile(
> -			"crc32cb %w[crc], %w[crc], %w[value]"
> -			: [crc] "+r" (init_val)
> -			: [value] "r" (data));
> -	return init_val;
> -}
> -
> -static inline uint32_t
> -crc32c_arm64_u16(uint16_t data, uint32_t init_val) -{
> -	__asm__ volatile(
> -			"crc32ch %w[crc], %w[crc], %w[value]"
> -			: [crc] "+r" (init_val)
> -			: [value] "r" (data));
> -	return init_val;
> -}
> -
> -static inline uint32_t
> -crc32c_arm64_u32(uint32_t data, uint32_t init_val) -{
> -	__asm__ volatile(
> -			"crc32cw %w[crc], %w[crc], %w[value]"
> -			: [crc] "+r" (init_val)
> -			: [value] "r" (data));
> -	return init_val;
> -}
> -
> -static inline uint32_t
> -crc32c_arm64_u64(uint64_t data, uint32_t init_val) -{
> -	__asm__ volatile(
> -			"crc32cx %w[crc], %w[crc], %x[value]"
> -			: [crc] "+r" (init_val)
> -			: [value] "r" (data));
> -	return init_val;
> -}
> -
> -/**
> - * Allow or disallow use of arm64 SIMD instrinsics for CRC32 hash
> - * calculation.
> - *
> - * @param alg
> - *   An OR of following flags:
> - *   - (CRC32_SW) Don't use arm64 crc intrinsics
> - *   - (CRC32_ARM64) Use ARMv8 CRC intrinsic if available
> - *
> - */
> -static inline void
> -rte_hash_crc_set_alg(uint8_t alg)
> -{
> -	switch (alg) {
> -	case CRC32_ARM64:
> -		if (!rte_cpu_get_flag_enabled(RTE_CPUFLAG_CRC32))
> -			alg = CRC32_SW;
> -		/* fall-through */
> -	case CRC32_SW:
> -		crc32_alg = alg;
> -		/* fall-through */
> -	default:
> -		break;
> -	}
> -}
> -
> -/* Setting the best available algorithm */
> -RTE_INIT(rte_hash_crc_init_alg)
> -{
> -	rte_hash_crc_set_alg(CRC32_ARM64);
> -}
> -
> -/**
> - * Use single crc32 instruction to perform a hash on a 1 byte value.
> - * Fall back to software crc32 implementation in case arm64 crc intrinsics is
> - * not supported
> - *
> - * @param data
> - *   Data to perform hash on.
> - * @param init_val
> - *   Value to initialise hash generator.
> - * @return
> - *   32bit calculated hash value.
> - */
> -static inline uint32_t
> -rte_hash_crc_1byte(uint8_t data, uint32_t init_val) -{
> -	if (likely(crc32_alg & CRC32_ARM64))
> -		return crc32c_arm64_u8(data, init_val);
> -
> -	return crc32c_1byte(data, init_val);
> -}
> -
> -/**
> - * Use single crc32 instruction to perform a hash on a 2 bytes value.
> - * Fall back to software crc32 implementation in case arm64 crc intrinsics is
> - * not supported
> - *
> - * @param data
> - *   Data to perform hash on.
> - * @param init_val
> - *   Value to initialise hash generator.
> - * @return
> - *   32bit calculated hash value.
> - */
> -static inline uint32_t
> -rte_hash_crc_2byte(uint16_t data, uint32_t init_val) -{
> -	if (likely(crc32_alg & CRC32_ARM64))
> -		return crc32c_arm64_u16(data, init_val);
> -
> -	return crc32c_2bytes(data, init_val);
> -}
> -
> -/**
> - * Use single crc32 instruction to perform a hash on a 4 byte value.
> - * Fall back to software crc32 implementation in case arm64 crc intrinsics is
> - * not supported
> - *
> - * @param data
> - *   Data to perform hash on.
> - * @param init_val
> - *   Value to initialise hash generator.
> - * @return
> - *   32bit calculated hash value.
> - */
> -static inline uint32_t
> -rte_hash_crc_4byte(uint32_t data, uint32_t init_val) -{
> -	if (likely(crc32_alg & CRC32_ARM64))
> -		return crc32c_arm64_u32(data, init_val);
> -
> -	return crc32c_1word(data, init_val);
> -}
> -
> -/**
> - * Use single crc32 instruction to perform a hash on a 8 byte value.
> - * Fall back to software crc32 implementation in case arm64 crc intrinsics is
> - * not supported
> - *
> - * @param data
> - *   Data to perform hash on.
> - * @param init_val
> - *   Value to initialise hash generator.
> - * @return
> - *   32bit calculated hash value.
> - */
> -static inline uint32_t
> -rte_hash_crc_8byte(uint64_t data, uint32_t init_val) -{
> -	if (likely(crc32_alg == CRC32_ARM64))
> -		return crc32c_arm64_u64(data, init_val);
> -
> -	return crc32c_2words(data, init_val);
> -}
> -
> -#ifdef __cplusplus
> -}
> -#endif
> -
> -#endif /* _RTE_CRC_ARM64_H_ */
> diff --git a/lib/librte_hash/rte_hash_crc.h b/lib/librte_hash/rte_hash_crc.h
> index cf28031b3..292697db1 100644
> --- a/lib/librte_hash/rte_hash_crc.h
> +++ b/lib/librte_hash/rte_hash_crc.h
> @@ -21,6 +21,15 @@ extern "C" {
>  #include <rte_branch_prediction.h>
>  #include <rte_common.h>
> 
> +typedef uint32_t
> +(*crc32_handler_1b)(uint8_t data, uint32_t init_val); typedef uint32_t
> +(*crc32_handler_2b)(uint16_t data, uint32_t init_val); typedef uint32_t
> +(*crc32_handler_4b)(uint32_t data, uint32_t init_val); typedef uint32_t
> +(*crc32_handler_8b)(uint64_t data, uint32_t init_val);

[Wang, Yipeng] I guess functions pointers makes the code cleaner.
I am just not sure on performance implications for indirect call.
@Harry for his comment.

> +
>  /* Lookup tables for software implementation of CRC32C */  static const
> uint32_t crc32c_tables[8][256] = {{
>   0x00000000, 0xF26B8303, 0xE13B70F7, 0x1350F3F4, 0xC79A971F, 0x35F1141C,
> 0x26A1E7E8, 0xD4CA64EB, @@ -322,7 +331,7 @@ crc32c_2bytes(uint16_t
> data, uint32_t init_val)  }
> 
>  static inline uint32_t
> -crc32c_1word(uint32_t data, uint32_t init_val)
> +crc32c_4bytes(uint32_t data, uint32_t init_val)
>  {
>  	uint32_t crc, term1, term2;
>  	crc = init_val;
> @@ -336,7 +345,7 @@ crc32c_1word(uint32_t data, uint32_t init_val)  }
> 
>  static inline uint32_t
> -crc32c_2words(uint64_t data, uint32_t init_val)
> +crc32c_8bytes(uint64_t data, uint32_t init_val)
>  {
>  	uint32_t crc, term1, term2;
>  	union {
> @@ -357,109 +366,94 @@ crc32c_2words(uint64_t data, uint32_t init_val)
> 
>  	return crc;
>  }
> -
> -#if defined(RTE_ARCH_X86)
> -static inline uint32_t
> -crc32c_sse42_u8(uint8_t data, uint32_t init_val) -{
> -	__asm__ volatile(
> -			"crc32b %[data], %[init_val];"
> -			: [init_val] "+r" (init_val)
> -			: [data] "rm" (data));
> -	return init_val;
> -}
> -
> -static inline uint32_t
> -crc32c_sse42_u16(uint16_t data, uint32_t init_val) -{
> -	__asm__ volatile(
> -			"crc32w %[data], %[init_val];"
> -			: [init_val] "+r" (init_val)
> -			: [data] "rm" (data));
> -	return init_val;
> -}
> -
> -static inline uint32_t
> -crc32c_sse42_u32(uint32_t data, uint32_t init_val) -{
> -	__asm__ volatile(
> -			"crc32l %[data], %[init_val];"
> -			: [init_val] "+r" (init_val)
> -			: [data] "rm" (data));
> -	return init_val;
> -}
> -
> -static inline uint32_t
> -crc32c_sse42_u64_mimic(uint64_t data, uint64_t init_val) -{
> -	union {
> -		uint32_t u32[2];
> -		uint64_t u64;
> -	} d;
> -
> -	d.u64 = data;
> -	init_val = crc32c_sse42_u32(d.u32[0], (uint32_t)init_val);
> -	init_val = crc32c_sse42_u32(d.u32[1], (uint32_t)init_val);
> -	return (uint32_t)init_val;
> -}
> -#endif
> -
> -#ifdef RTE_ARCH_X86_64
> -static inline uint32_t
> -crc32c_sse42_u64(uint64_t data, uint64_t init_val) -{
> -	__asm__ volatile(
> -			"crc32q %[data], %[init_val];"
> -			: [init_val] "+r" (init_val)
> -			: [data] "rm" (data));
> -	return (uint32_t)init_val;
> -}
> -#endif
> -
[Wang, Yipeng] keep the blank line before define.
>  #define CRC32_SW            (1U << 0)
>  #define CRC32_SSE42         (1U << 1)
>  #define CRC32_x64           (1U << 2)
>  #define CRC32_SSE42_x64     (CRC32_x64|CRC32_SSE42)
>  #define CRC32_ARM64         (1U << 3)
> 
> -static uint8_t crc32_alg = CRC32_SW;
> +static crc32_handler_1b crc32_1b = crc32c_1byte; static
> +crc32_handler_2b crc32_2b = crc32c_2bytes; static crc32_handler_4b
> +crc32_4b = crc32c_4bytes; static crc32_handler_8b crc32_8b =
> +crc32c_8bytes;
> 
>  #if defined(RTE_ARCH_ARM64) &&
> defined(RTE_MACHINE_CPUFLAG_CRC32)
> -#include "rte_crc_arm64.h"
> -#else
> +#include "crc_arm64.h"
> +#endif
> +
> +#if defined(RTE_ARCH_X86)
> +#include "crc_x86.h"
> +#endif
> 
>  /**
> - * Allow or disallow use of SSE4.2 instrinsics for CRC32 hash
> + * Allow or disallow use of SSE4.2/ARMv8 instrinsics for CRC32 hash
>   * calculation.
>   *
>   * @param alg
>   *   An OR of following flags:
> - *   - (CRC32_SW) Don't use SSE4.2 intrinsics
> + *   - (CRC32_SW) Don't use SSE4.2 intrinsics (default non-[x86/ARMv8])
>   *   - (CRC32_SSE42) Use SSE4.2 intrinsics if available
> - *   - (CRC32_SSE42_x64) Use 64-bit SSE4.2 intrinsic if available (default)
> - *
> + *   - (CRC32_SSE42_x64) Use 64-bit SSE4.2 intrinsic if available (default x86)
> + *   - (CRC32_ARM64) Use ARMv8 CRC intrinsic if available
>   */
>  static inline void
>  rte_hash_crc_set_alg(uint8_t alg)
>  {
> -#if defined(RTE_ARCH_X86)
> -	if (alg == CRC32_SSE42_x64 &&
> -			!rte_cpu_get_flag_enabled(RTE_CPUFLAG_EM64T))
> -		alg = CRC32_SSE42;
> +	switch (alg) {
> +	case CRC32_SSE42_x64:
> +#if defined RTE_ARCH_X86
> +		crc32_1b = crc32c_sse42_u8;
> +		crc32_2b = crc32c_sse42_u16;
> +		crc32_4b = crc32c_sse42_u32;
> +
> +	if (!rte_cpu_get_flag_enabled(RTE_CPUFLAG_EM64T))
> +		crc32_8b = crc32c_sse42_u64_mimic;
> +	else
> +		crc32_8b = crc32c_sse42_u64;
>  #endif
> -	crc32_alg = alg;
> +		break;
> +	case CRC32_SSE42:
> +#if defined RTE_ARCH_X86
> +		crc32_1b = crc32c_sse42_u8;
> +		crc32_2b = crc32c_sse42_u16;
> +		crc32_4b = crc32c_sse42_u32;
> +		crc32_8b = crc32c_sse42_u64_mimic;
> +#endif
> +		break;
> +	case CRC32_ARM64:
> +#if defined RTE_ARCH_ARM64
> +	if (rte_cpu_get_flag_enabled(RTE_CPUFLAG_CRC32)) {
> +		crc32_1b = crc32c_arm64_u8;
> +		crc32_2b = crc32c_arm64_u16;
> +		crc32_4b = crc32c_arm64_u32;
> +		crc32_8b = crc32c_arm64_u64;
> +	}
> +#endif
> +		break;
> +	case CRC32_SW:
> +	default:
> +		crc32_1b = crc32c_1byte;
> +		crc32_2b = crc32c_2bytes;
> +		crc32_4b = crc32c_4bytes;
> +		crc32_8b = crc32c_8bytes;
> +	break;
> +	}
>  }
> 
>  /* Setting the best available algorithm */
>  RTE_INIT(rte_hash_crc_init_alg)
>  {
> +#if defined RTE_ARCH_X86
>  	rte_hash_crc_set_alg(CRC32_SSE42_x64);
> +#elif defined RTE_ARCH_ARM64
> +	rte_hash_crc_set_alg(CRC32_ARM64);
> +#else
> +	rte_hash_crc_set_alg(CRC32_SW);
> +#endif
>  }
> 
>  /**
> - * Use single crc32 instruction to perform a hash on a byte value.
> - * Fall back to software crc32 implementation in case SSE4.2 is
> - * not supported
> + * Calculate crc32 hash value of 1bytes.
>   *
>   * @param data
>   *   Data to perform hash on.
> @@ -471,18 +465,11 @@ RTE_INIT(rte_hash_crc_init_alg)  static inline
> uint32_t  rte_hash_crc_1byte(uint8_t data, uint32_t init_val)  { -#if defined
> RTE_ARCH_X86
> -	if (likely(crc32_alg & CRC32_SSE42))
> -		return crc32c_sse42_u8(data, init_val);
> -#endif
> -
> -	return crc32c_1byte(data, init_val);
> +	return (crc32_1b)(data, init_val);
>  }
> 
>  /**
> - * Use single crc32 instruction to perform a hash on a 2 bytes value.
> - * Fall back to software crc32 implementation in case SSE4.2 is
> - * not supported
> + * Calculate crc32 hash value of 2bytes.
>   *
>   * @param data
>   *   Data to perform hash on.
> @@ -494,18 +481,11 @@ rte_hash_crc_1byte(uint8_t data, uint32_t init_val)
> static inline uint32_t  rte_hash_crc_2byte(uint16_t data, uint32_t init_val)  { -
> #if defined RTE_ARCH_X86
> -	if (likely(crc32_alg & CRC32_SSE42))
> -		return crc32c_sse42_u16(data, init_val);
> -#endif
> -
> -	return crc32c_2bytes(data, init_val);
> +	return (crc32_2b)(data, init_val);
>  }
> 
>  /**
> - * Use single crc32 instruction to perform a hash on a 4 byte value.
> - * Fall back to software crc32 implementation in case SSE4.2 is
> - * not supported
> + * Calculate crc32 hash value of 4bytes.
>   *
>   * @param data
>   *   Data to perform hash on.
> @@ -517,18 +497,11 @@ rte_hash_crc_2byte(uint16_t data, uint32_t init_val)
> static inline uint32_t  rte_hash_crc_4byte(uint32_t data, uint32_t init_val)  { -
> #if defined RTE_ARCH_X86
> -	if (likely(crc32_alg & CRC32_SSE42))
> -		return crc32c_sse42_u32(data, init_val);
> -#endif
> -
> -	return crc32c_1word(data, init_val);
> +	return (crc32_4b)(data, init_val);
>  }
> 
>  /**
> - * Use single crc32 instruction to perform a hash on a 8 byte value.
> - * Fall back to software crc32 implementation in case SSE4.2 is
> - * not supported
> + * Calculate crc32 hash value of 8bytes.
>   *
>   * @param data
>   *   Data to perform hash on.
> @@ -540,21 +513,9 @@ rte_hash_crc_4byte(uint32_t data, uint32_t init_val)
> static inline uint32_t  rte_hash_crc_8byte(uint64_t data, uint32_t init_val)  { -
> #ifdef RTE_ARCH_X86_64
> -	if (likely(crc32_alg == CRC32_SSE42_x64))
> -		return crc32c_sse42_u64(data, init_val);
> -#endif
> -
> -#if defined RTE_ARCH_X86
> -	if (likely(crc32_alg & CRC32_SSE42))
> -		return crc32c_sse42_u64_mimic(data, init_val);
> -#endif
> -
> -	return crc32c_2words(data, init_val);
> +	return (crc32_8b)(data, init_val);
>  }
> 
> -#endif
> -
>  /**
>   * Calculate CRC32 hash on user-supplied byte array.
>   *
> --
> 2.17.1
[Wang, Yipeng] 
Thanks for the patch, please see my comment inlined.

I think it is good to hide the architecture specific headers.
And I agree with Harry that we shouldn't silently remove a public header.
I don't know the best practice on handling this though (e.g. symlink or dummyfile), either way looks fine to me.
Bruce/Thomas may comment.




^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [dpdk-stable] [PATCH] common/octeontx: fix GCC 9.1 ABI break
  2020-05-05 10:33  4%   ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
@ 2020-05-06 21:51  4%     ` Thomas Monjalon
  0 siblings, 0 replies; 200+ results
From: Thomas Monjalon @ 2020-05-06 21:51 UTC (permalink / raw)
  To: pbhagavatula; +Cc: Harman Kalra, stable, jerinj, dev, Ferruh Yigit

05/05/2020 12:33, Ferruh Yigit:
> On 5/4/2020 10:17 AM, Harman Kalra wrote:
> > On Sat, May 02, 2020 at 09:40:31PM +0530, pbhagavatula@marvell.com wrote:
> >> From: Pavan Nikhilesh <pbhagavatula@marvell.com>
> >>
> >> GCC 9.1 fixes a bug with passing bitfields as pass by value in function
> >> parameters and generates a warning for the same as below:
> >>
> >> drivers/common/octeontx/octeontx_mbox.c:282:1: note: parameter passing
> >> for argument of type ‘struct mbox_intf_ver’ changed in GCC 9.1
> >>
> >> Fix the warning generated by passing bitfield as pass by reference.
> >>
> >> Fixes: b4134b2d31cc ("common/octeontx: update mbox to version 1.1.3")
> >> Cc: stable@dpdk.org
> >>
> >> Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
> > 
> > Acked-by: Harman Kalra <hkalra@marvell.com>
> 
> Tested-by: Ferruh Yigit <ferruh.yigit@intel.com>

Applied, thanks



^ permalink raw reply	[relevance 4%]

* [dpdk-dev] [PATCH v3] doc: fix references to bind_default_symbol
  2020-05-05 17:49  5% [dpdk-dev] [PATCH v1] doc: fix references to bind_default_symbol Ray Kinsella
  2020-05-06  8:26  8% ` [dpdk-dev] [PATCH v2] " Ray Kinsella
@ 2020-05-06 15:41  8% ` Ray Kinsella
  1 sibling, 0 replies; 200+ results
From: Ray Kinsella @ 2020-05-06 15:41 UTC (permalink / raw)
  To: dev
  Cc: arkadiuszx.kusztal, bruce.richardson, Ray Kinsella, Neil Horman,
	John McNamara, Marko Kovacevic

The document abi_versioning.rst incorrectly instructs the developer to
add BIND_DEFAULT_SYMBOL to the public header, not the source file. This
commit fixes the issue and adds some clarifications.

The commit also clarifies the use of use_function_versioning in the
meson/ninja build system, and does some minor re-organization of the
document.

Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
---
v3:
 * added a note to ask contributors to ensure they review the meson/ninja
   section when adding "rte_function_versioning.h".

 doc/guides/contributing/abi_versioning.rst | 131 +++++++++++++++++++----------
 1 file changed, 87 insertions(+), 44 deletions(-)

diff --git a/doc/guides/contributing/abi_versioning.rst b/doc/guides/contributing/abi_versioning.rst
index a21f4e7..7065979 100644
--- a/doc/guides/contributing/abi_versioning.rst
+++ b/doc/guides/contributing/abi_versioning.rst
@@ -200,7 +200,7 @@ private, is safe), but it also requires modifying the code as follows
 Note also that, being a public function, the header file prototype must also be
 changed, as must all the call sites, to reflect the new ABI footprint.  We will
 maintain previous ABI versions that are accessible only to previously compiled
-binaries
+binaries.

 The addition of a parameter to the function is ABI breaking as the function is
 public, and existing application may use it in its current form. However, the
@@ -266,12 +266,12 @@ This file needs to be modified as follows

    } DPDK_20;

-The addition of the new block tells the linker that a new version node is
-available (DPDK_21), which contains the symbol rte_acl_create, and inherits
-the symbols from the DPDK_20 node. This list is directly translated into a
-list of exported symbols when DPDK is compiled as a shared library
+The addition of the new block tells the linker that a new version node
+``DPDK_21`` is available, which contains the symbol rte_acl_create, and inherits
+the symbols from the DPDK_20 node. This list is directly translated into a list
+of exported symbols when DPDK is compiled as a shared library.

-Next, we need to specify in the code which function map to the rte_acl_create
+Next, we need to specify in the code which function maps to the rte_acl_create
 symbol at which versions.  First, at the site of the initial symbol definition,
 we need to update the function so that it is uniquely named, and not in conflict
 with the public symbol name
@@ -288,24 +288,29 @@ with the public symbol name
         ...

 Note that the base name of the symbol was kept intact, as this is conducive to
-the macros used for versioning symbols and we have annotated the function as an
-implementation of versioned symbol.  That is our next step, mapping this new
-symbol name to the initial symbol name at version node 20.  Immediately after
-the function, we add this line of code
+the macros used for versioning symbols and we have annotated the function as
+``__vsym``, an implementation of a versioned symbol . That is our next step,
+mapping this new symbol name to the initial symbol name at version node 20.
+Immediately after the function, we add the VERSION_SYMBOL macro.

 .. code-block:: c

+   #include <rte_function_versioning.h>;
+
+   ...
    VERSION_SYMBOL(rte_acl_create, _v20, 20);

 Remembering to also add the rte_function_versioning.h header to the requisite c
-file where these changes are being made. The above macro instructs the linker to
+file where these changes are being made. The macro instructs the linker to
 create a new symbol ``rte_acl_create@DPDK_20``, which matches the symbol created
 in older builds, but now points to the above newly named function. We have now
 mapped the original rte_acl_create symbol to the original function (but with a
 new name).

-Next, we need to create the 21 version of the symbol. We create a new function
-name, with a different suffix, and implement it appropriately
+Please see the section :ref:`Enabling versioning macros
+<enabling_versioning_macros>` to enable this macro in the meson/ninja build.
+Next, we need to create the new ``v21`` version of the symbol. We create a new
+function name, with the ``v21`` suffix, and implement it appropriately

 .. code-block:: c

@@ -320,35 +325,57 @@ name, with a different suffix, and implement it appropriately
    }

 This code serves as our new API call. Its the same as our old call, but adds the
-new parameter in place. Next we need to map this function to the symbol
-``rte_acl_create@DPDK_21``. To do this, we modify the public prototype of the
-call in the header file, adding the macro there to inform all including
-applications, that on re-link, the default rte_acl_create symbol should point to
-this function. Note that we could do this by simply naming the function above
-rte_acl_create, and the linker would chose the most recent version tag to apply
-in the version script, but we can also do this in the header file
+new parameter in place. Next we need to map this function to the new default
+symbol ``rte_acl_create@DPDK_21``. To do this, immediately after the function,
+we add the BIND_DEFAULT_SYMBOL macro.
+
+.. code-block:: c
+
+   #include <rte_function_versioning.h>;
+
+   ...
+   BIND_DEFAULT_SYMBOL(rte_acl_create, _v21, 21);
+
+The macro instructs the linker to create the new default symbol
+``rte_acl_create@DPDK_21``, which points to the above newly named function.
+
+We finally modify the prototype of the call in the public header file,
+such that it contains both versions of the symbol and the public api.

 .. code-block:: c

    struct rte_acl_ctx *
-   -rte_acl_create(const struct rte_acl_param *param);
-   +rte_acl_create_v21(const struct rte_acl_param *param, int debug);
-   +BIND_DEFAULT_SYMBOL(rte_acl_create, _v21, 21);
-
-The BIND_DEFAULT_SYMBOL macro explicitly tells applications that include this
-header, to link to the rte_acl_create_v21 function and apply the DPDK_21
-version node to it.  This method is more explicit and flexible than just
-re-implementing the exact symbol name, and allows for other features (such as
-linking to the old symbol version by default, when the new ABI is to be opt-in
-for a period.
-
-One last thing we need to do.  Note that we've taken what was a public symbol,
-and duplicated it into two uniquely and differently named symbols.  We've then
-mapped each of those back to the public symbol ``rte_acl_create`` with different
-version tags.  This only applies to dynamic linking, as static linking has no
-notion of versioning.  That leaves this code in a position of no longer having a
-symbol simply named ``rte_acl_create`` and a static build will fail on that
-missing symbol.
+   rte_acl_create(const struct rte_acl_param *param);
+
+   struct rte_acl_ctx * __vsym
+   rte_acl_create_v20(const struct rte_acl_param *param);
+
+   struct rte_acl_ctx * __vsym
+   rte_acl_create_v21(const struct rte_acl_param *param, int debug);
+
+
+And that's it, on the next shared library rebuild, there will be two versions of
+rte_acl_create, an old DPDK_20 version, used by previously built applications,
+and a new DPDK_21 version, used by future built applications.
+
+.. note::
+
+   **Before you leave**, please take care to the review the sections on
+   :ref:`Mapping static symbols <mapping_static_symbols>`, :ref:`Enabling
+   versioning macros <enabling_versioning_macros>` and :ref:`ABI deprecation
+   <abi_decprecation>`.
+
+.. _mapping_static_symbols:
+
+Mapping static symbols
+______________________
+
+Now we've taken what was a public symbol, and duplicated it into two uniquely
+and differently named symbols. We've then mapped each of those back to the
+public symbol ``rte_acl_create`` with different version tags. This only applies
+to dynamic linking, as static linking has no notion of versioning. That leaves
+this code in a position of no longer having a symbol simply named
+``rte_acl_create`` and a static build will fail on that missing symbol.

 To correct this, we can simply map a function of our choosing back to the public
 symbol in the static build with the ``MAP_STATIC_SYMBOL`` macro.  Generally the
@@ -369,15 +396,31 @@ defined, we add this
 That tells the compiler that, when building a static library, any calls to the
 symbol ``rte_acl_create`` should be linked to ``rte_acl_create_v21``

-That's it, on the next shared library rebuild, there will be two versions of
-rte_acl_create, an old DPDK_20 version, used by previously built applications,
-and a new DPDK_21 version, used by future built applications.

+.. _enabling_versioning_macros:
+
+Enabling versioning macros
+__________________________
+
+Finally, we need to indicate to the :doc:`meson/ninja build system
+<../prog_guide/build-sdk-meson>` to enable versioning macros when building the
+library or driver. In the libraries or driver where we have added symbol
+versioning, in the ``meson.build`` file we add the following
+
+.. code-block::
+
+   use_function_versioning = true
+
+at the start of the head of the file. This will indicate to the tool-chain to
+enable the function version macros when building. There is no corresponding
+directive required for the ``make`` build system.
+
+.. _abi_decprecation:

 Deprecating part of a public API
 ________________________________

-Lets assume that you've done the above update, and in preparation for the next
+Lets assume that you've done the above updates, and in preparation for the next
 major ABI version you decide you would like to retire the old version of the
 function. After having gone through the ABI deprecation announcement process,
 removal is easy. Start by removing the symbol from the requisite version map
@@ -421,8 +464,8 @@ Next remove the corresponding versioned export.


 Note that the internal function definition could also be removed, but its used
-in our example by the newer version v21, so we leave it in place and declare it
-as static. This is a coding style choice.
+in our example by the newer version ``v21``, so we leave it in place and declare
+it as static. This is a coding style choice.

 .. _deprecating_entire_abi:

--
2.7.4

^ permalink raw reply	[relevance 8%]

* [dpdk-dev] [PATCH v13 0/2] support for VFIO-PCI VF token interface
    2020-05-05  7:46  4% ` [dpdk-dev] [PATCH v11 0/2] support for VFIO-PCI VF token interface Haiyue Wang
  2020-05-05 10:34  4% ` [dpdk-dev] [PATCH v12 " Haiyue Wang
@ 2020-05-06 11:35  4% ` Haiyue Wang
  2 siblings, 0 replies; 200+ results
From: Haiyue Wang @ 2020-05-06 11:35 UTC (permalink / raw)
  To: dev, anatoly.burakov, thomas, jerinj, david.marchand; +Cc: Haiyue Wang

v13: Rename the EAL get VF token function, and leave the freebsd type as empty.

v12: support to vfio devices with VF token and no token.

v11: Use the eal parameter to pass the VF token, then not every PCI
     device needs to be specified with this token. Also no ABI issue
     now.

v10: Use the __rte_internal to mark the internal API changing.

v9: Rewrite the document.

v8: Update the document.

v7: Add the Fixes tag in uuid, the release note and help
    document.

v6: Drop the Fixes tag in uuid, since the file has been
    moved to another place, not suitable to apply on stable.
    And this is not a bug, just some kind of enhancement.

v5: 1. Add the VF token parse error handling.
    2. Split into two patches for different logic module.
    3. Add more comments into the code for explaining the design.
    4. Drop the ABI change workaround, this patch set focuses on code review.

v4: 1. Ignore rte_vfio_setup_device ABI check since it is
       for Linux driver use.

v3: Fix the Travis build failed:
           (1). rte_uuid.h:97:55: error: unknown type name ‘size_t’
           (2). rte_uuid.h:58:2: error: implicit declaration of function ‘memcpy’

v2: Fix the FreeBSD build error.

v1: Update the commit message.

RFC v2:
         Based on Vamsi's RFC v1, and Alex's patch for Qemu
        [https://lore.kernel.org/lkml/20200204161737.34696b91@w520.home/]: 
       Use the devarg to pass-down the VF token.

RFC v1: https://patchwork.dpdk.org/patch/66281/ by Vamsi.

Haiyue Wang (2):
  eal: add uuid dependent header files explicitly
  eal: support for VFIO-PCI VF token

 doc/guides/linux_gsg/linux_drivers.rst        | 35 ++++++++++++++++++-
 doc/guides/linux_gsg/linux_eal_parameters.rst |  4 +++
 doc/guides/rel_notes/release_20_05.rst        |  6 ++++
 lib/librte_eal/common/eal_common_options.c    |  2 ++
 lib/librte_eal/common/eal_internal_cfg.h      |  2 ++
 lib/librte_eal/common/eal_options.h           |  2 ++
 lib/librte_eal/freebsd/eal.c                  |  4 +++
 lib/librte_eal/include/rte_eal.h              | 12 +++++++
 lib/librte_eal/include/rte_uuid.h             |  2 ++
 lib/librte_eal/linux/eal.c                    | 29 +++++++++++++++
 lib/librte_eal/linux/eal_vfio.c               | 19 ++++++++++
 lib/librte_eal/rte_eal_version.map            |  1 +
 12 files changed, 117 insertions(+), 1 deletion(-)

-- 
2.26.2


^ permalink raw reply	[relevance 4%]

* [dpdk-dev] [PATCH v2] doc: fix references to bind_default_symbol
  2020-05-05 17:49  5% [dpdk-dev] [PATCH v1] doc: fix references to bind_default_symbol Ray Kinsella
@ 2020-05-06  8:26  8% ` Ray Kinsella
  2020-05-06 15:41  8% ` [dpdk-dev] [PATCH v3] " Ray Kinsella
  1 sibling, 0 replies; 200+ results
From: Ray Kinsella @ 2020-05-06  8:26 UTC (permalink / raw)
  To: dev
  Cc: arkadiuszx.kusztal, bruce.richardson, Ray Kinsella, Neil Horman,
	John McNamara, Marko Kovacevic

The document abi_versioning.rst incorrectly instructs the developer to
add BIND_DEFAULT_SYMBOL to the public header, not the source file. This
commit fixes the issue and adds some clarifications.

The commit also clarifies the use of use_function_versioning in the
meson/ninja build system, and does some minor re-organization of the
document.

Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
---
v2:
 * Clarified the use of use_function_version in meson/ninja.
 * Some minor re-organization of the documentation.

 doc/guides/contributing/abi_versioning.rst | 123 +++++++++++++++++++----------
 1 file changed, 80 insertions(+), 43 deletions(-)

diff --git a/doc/guides/contributing/abi_versioning.rst b/doc/guides/contributing/abi_versioning.rst
index a21f4e7..6afaeee 100644
--- a/doc/guides/contributing/abi_versioning.rst
+++ b/doc/guides/contributing/abi_versioning.rst
@@ -200,7 +200,7 @@ private, is safe), but it also requires modifying the code as follows
 Note also that, being a public function, the header file prototype must also be
 changed, as must all the call sites, to reflect the new ABI footprint.  We will
 maintain previous ABI versions that are accessible only to previously compiled
-binaries
+binaries.

 The addition of a parameter to the function is ABI breaking as the function is
 public, and existing application may use it in its current form. However, the
@@ -266,12 +266,12 @@ This file needs to be modified as follows

    } DPDK_20;

-The addition of the new block tells the linker that a new version node is
-available (DPDK_21), which contains the symbol rte_acl_create, and inherits
-the symbols from the DPDK_20 node. This list is directly translated into a
-list of exported symbols when DPDK is compiled as a shared library
+The addition of the new block tells the linker that a new version node
+``DPDK_21`` is available, which contains the symbol rte_acl_create, and inherits
+the symbols from the DPDK_20 node. This list is directly translated into a list
+of exported symbols when DPDK is compiled as a shared library.

-Next, we need to specify in the code which function map to the rte_acl_create
+Next, we need to specify in the code which function maps to the rte_acl_create
 symbol at which versions.  First, at the site of the initial symbol definition,
 we need to update the function so that it is uniquely named, and not in conflict
 with the public symbol name
@@ -288,10 +288,10 @@ with the public symbol name
         ...

 Note that the base name of the symbol was kept intact, as this is conducive to
-the macros used for versioning symbols and we have annotated the function as an
-implementation of versioned symbol.  That is our next step, mapping this new
-symbol name to the initial symbol name at version node 20.  Immediately after
-the function, we add this line of code
+the macros used for versioning symbols and we have annotated the function as
+``__vsym``, an implementation of a versioned symbol . That is our next step,
+mapping this new symbol name to the initial symbol name at version node 20.
+Immediately after the function, we add this line of code

 .. code-block:: c

@@ -304,8 +304,8 @@ in older builds, but now points to the above newly named function. We have now
 mapped the original rte_acl_create symbol to the original function (but with a
 new name).

-Next, we need to create the 21 version of the symbol. We create a new function
-name, with a different suffix, and implement it appropriately
+Next, we need to create the new ``v21`` version of the symbol. We create a new
+function name, with the ``v21`` suffix, and implement it appropriately

 .. code-block:: c

@@ -320,35 +320,56 @@ name, with a different suffix, and implement it appropriately
    }

 This code serves as our new API call. Its the same as our old call, but adds the
-new parameter in place. Next we need to map this function to the symbol
-``rte_acl_create@DPDK_21``. To do this, we modify the public prototype of the
-call in the header file, adding the macro there to inform all including
-applications, that on re-link, the default rte_acl_create symbol should point to
-this function. Note that we could do this by simply naming the function above
-rte_acl_create, and the linker would chose the most recent version tag to apply
-in the version script, but we can also do this in the header file
+new parameter in place. Next we need to map this function to the new default
+symbol ``rte_acl_create@DPDK_21``. To do this, immediately after the function,
+we add this line of code
+
+.. code-block:: c
+
+   BIND_DEFAULT_SYMBOL(rte_acl_create, _v21, 21);
+
+Again, remembering to also add the rte_function_versioning.h header to the
+requisite c file. The above macro instructs the linker to create the new default
+symbol ``rte_acl_create@DPDK_21``, which points to the above newly named
+function.
+
+We finally modify the prototype of the call in the public header file,
+such that it contains both versions of the symbol and the public api.

 .. code-block:: c

    struct rte_acl_ctx *
-   -rte_acl_create(const struct rte_acl_param *param);
-   +rte_acl_create_v21(const struct rte_acl_param *param, int debug);
-   +BIND_DEFAULT_SYMBOL(rte_acl_create, _v21, 21);
-
-The BIND_DEFAULT_SYMBOL macro explicitly tells applications that include this
-header, to link to the rte_acl_create_v21 function and apply the DPDK_21
-version node to it.  This method is more explicit and flexible than just
-re-implementing the exact symbol name, and allows for other features (such as
-linking to the old symbol version by default, when the new ABI is to be opt-in
-for a period.
-
-One last thing we need to do.  Note that we've taken what was a public symbol,
-and duplicated it into two uniquely and differently named symbols.  We've then
-mapped each of those back to the public symbol ``rte_acl_create`` with different
-version tags.  This only applies to dynamic linking, as static linking has no
-notion of versioning.  That leaves this code in a position of no longer having a
-symbol simply named ``rte_acl_create`` and a static build will fail on that
-missing symbol.
+   rte_acl_create(const struct rte_acl_param *param);
+
+   struct rte_acl_ctx * __vsym
+   rte_acl_create_v20(const struct rte_acl_param *param);
+
+   struct rte_acl_ctx * __vsym
+   rte_acl_create_v21(const struct rte_acl_param *param, int debug);
+
+
+And that's it, on the next shared library rebuild, there will be two versions of
+rte_acl_create, an old DPDK_20 version, used by previously built applications,
+and a new DPDK_21 version, used by future built applications.
+
+.. note::
+
+   **Before you leave**, please take care to the review the sections on
+   :ref:`Mapping static symbols <mapping_static_symbols>`, :ref:`Enabling
+   versioning macros <enabling_versioning_macros>` and :ref:`ABI deprecation
+   <abi_decprecation>`.
+
+.. _mapping_static_symbols:
+
+Mapping static symbols
+______________________
+
+Now we've taken what was a public symbol, and duplicated it into two uniquely
+and differently named symbols. We've then mapped each of those back to the
+public symbol ``rte_acl_create`` with different version tags. This only applies
+to dynamic linking, as static linking has no notion of versioning. That leaves
+this code in a position of no longer having a symbol simply named
+``rte_acl_create`` and a static build will fail on that missing symbol.

 To correct this, we can simply map a function of our choosing back to the public
 symbol in the static build with the ``MAP_STATIC_SYMBOL`` macro.  Generally the
@@ -369,15 +390,31 @@ defined, we add this
 That tells the compiler that, when building a static library, any calls to the
 symbol ``rte_acl_create`` should be linked to ``rte_acl_create_v21``

-That's it, on the next shared library rebuild, there will be two versions of
-rte_acl_create, an old DPDK_20 version, used by previously built applications,
-and a new DPDK_21 version, used by future built applications.

+.. _enabling_versioning_macros:
+
+Enabling versioning macros
+__________________________
+
+Finally, we need to indicate to the :doc:`meson/ninja build system
+<../prog_guide/build-sdk-meson>` to enable versioning macros when building the
+library or driver. In the libraries or driver where we have added symbol
+versioning, in the ``meson.build`` file we add the following
+
+.. code-block::
+
+   use_function_versioning = true
+
+at the start of the head of the file. This will indicate to the tool-chain to
+enable the function version macros when building. There is no corresponding
+directive required for the ``make`` build system.
+
+.. _abi_decprecation:

 Deprecating part of a public API
 ________________________________

-Lets assume that you've done the above update, and in preparation for the next
+Lets assume that you've done the above updates, and in preparation for the next
 major ABI version you decide you would like to retire the old version of the
 function. After having gone through the ABI deprecation announcement process,
 removal is easy. Start by removing the symbol from the requisite version map
@@ -421,8 +458,8 @@ Next remove the corresponding versioned export.


 Note that the internal function definition could also be removed, but its used
-in our example by the newer version v21, so we leave it in place and declare it
-as static. This is a coding style choice.
+in our example by the newer version ``v21``, so we leave it in place and declare
+it as static. This is a coding style choice.

 .. _deprecating_entire_abi:

--
2.7.4

^ permalink raw reply	[relevance 8%]

* Re: [dpdk-dev] [ovs-dev] [PATCH] vhost: return -EAGAIN during unregistering vhost if it is busy.
  @ 2020-05-06  7:53  3%       ` Maxime Coquelin
  0 siblings, 0 replies; 200+ results
From: Maxime Coquelin @ 2020-05-06  7:53 UTC (permalink / raw)
  To: 王志克
  Cc: Zhike Wang, dev, dev, stable, xiaolong.ye, Ilya Maximets

Hi Zhike,

On 5/6/20 4:39 AM, 王志克 wrote:
> NO, it is different issue.
> 
> The current  deadlock  mentioned in this patch is caused by some
> blocking function (like ovsrcu_synchronize) in application (like OVS).
> In this patch, the application is needed  to break  the logical deadlock. 

Ok, so we need either a non-blocking rte_vhost_driver_unregister() in
DPDK, or a non-blocking .destroy_device() in OVS. Thanks for the
clarification, I misread your original commit message.

The problem with your patch is that you break the DPDK ABI, as current
unregistering API is supposed to be blocking. Meaning, that could not be
backported to older stable branches.

What we can do on DPDK side is to provide a new non-blocking API for
unregistering, or do

Any chance there is a way for OVS to prevent that?

Thanks,
Maxime

> 
> 
> 
> 
> 
> 
> At 2020-04-27 16:09:31, "Maxime Coquelin" <maxime.coquelin@redhat.com> wrote:
>>
>>
>>On 3/18/20 4:31 AM, 王志克 wrote:
>>> Involve openvswitch group since this fix is highly coupled with OVS.
>>> welcome comment.
>>> At 2020-03-12 17:57:19, "Zhike Wang" <wangzhike@jd.com> wrote:
>>>> The vhost_user_read_cb() and rte_vhost_driver_unregister()
>>>> can be called at the same time by 2 threads, and may lead to deadlock.
>>>> Eg thread1 calls vhost_user_read_cb()->vhost_user_get_vring_base()->destroy_device(),
>>>> then thread2 calls rte_vhost_driver_unregister(), and will retry the fdset_try_del() in loop.
>>>>
>>>> Some application implements destroy_device() as a blocking function, eg
>>>> OVS calls ovsrcu_synchronize() insides destroy_device(). As a result,
>>>> thread1(eg vhost_events) is blocked to wait quiesce of thread2(eg ovs-vswitchd),
>>>> and thread2 is in a loop to wait thread1 to give up the use of the vhost fd,
>>>> then leads to deadlock.
>>>>
>>>> It is better to return -EAGAIN to application, who will decide how to handle
>>>> (eg OVS can call ovsrcu_quiesce() and then retry).
>>>>
>>>> Signed-off-by: Zhike Wang <wangzhike@jd.com>
>>>> ---
>>>> lib/librte_vhost/rte_vhost.h | 4 +++-
>>>> lib/librte_vhost/socket.c    | 8 ++++----
>>>> 2 files changed, 7 insertions(+), 5 deletions(-)
>>
>>
>>Isn't it fixed with below commit that landed into DPDK v20.02?
>>
>>commit 5efb18e85f7fdb436d3e56591656051c16802066
>>Author: Maxime Coquelin <maxime.coquelin@redhat.com>
>>Date:   Tue Jan 14 19:53:57 2020 +0100
>>
>>    vhost: fix deadlock on port deletion
>>
>>    If the vhost-user application (e.g. OVS) deletes the vhost-user
>>    port while Qemu sends a vhost-user request, a deadlock can
>>    happen if the request handler tries to acquire vhost-user's
>>    global mutex, which is also locked by the vhost-user port
>>    deletion API (rte_vhost_driver_unregister).
>>
>>    This patch prevents the deadlock by making
>>    rte_vhost_driver_unregister() to release the mutex and try
>>    again if a request is being handled to give a chance to
>>    the request handler to complete.
>>
>>    Fixes: 8b4b949144b8 ("vhost: fix dead lock on closing in server mode")
>>    Fixes: 5fbb3941da9f ("vhost: introduce driver features related APIs")
>>    Cc: stable@dpdk.org
>>
>>    Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
>>    Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
>>    Acked-by: Eelco Chaudron <echaudro@redhat.com>
>>
>>>> diff --git a/lib/librte_vhost/rte_vhost.h b/lib/librte_vhost/rte_vhost.h
>>>> index c7b619a..276db11 100644
>>>> --- a/lib/librte_vhost/rte_vhost.h
>>>> +++ b/lib/librte_vhost/rte_vhost.h
>>>> @@ -389,7 +389,9 @@ void rte_vhost_log_used_vring(int vid, uint16_t vring_idx,
>>>>  */
>>>> int rte_vhost_driver_register(const char *path, uint64_t flags);
>>>>
>>>> -/* Unregister vhost driver. This is only meaningful to vhost user. */
>>>> +/* Unregister vhost driver. This is only meaningful to vhost user.
>>>> + * Return -EAGAIN if device is busy, and leave it to be handled by application.
>>>> + */
>>>> int rte_vhost_driver_unregister(const char *path);
>>>>
>>>> /**
>>>> diff --git a/lib/librte_vhost/socket.c b/lib/librte_vhost/socket.c
>>>> index 7c80121..a75a3f6 100644
>>>> --- a/lib/librte_vhost/socket.c
>>>> +++ b/lib/librte_vhost/socket.c
>>>> @@ -1027,7 +1027,8 @@ struct vhost_user_reconnect_list {
>>>> }
>>>>
>>>> /**
>>>> - * Unregister the specified vhost socket
>>>> + * Unregister the specified vhost socket.
>>>> + * Return -EAGAIN if device is busy, and leave it to be handled by application.
>>>>  */
>>>> int
>>>> rte_vhost_driver_unregister(const char *path)
>>>> @@ -1039,7 +1040,6 @@ struct vhost_user_reconnect_list {
>>>> 	if (path == NULL)
>>>> 		return -1;
>>>>
>>>> -again:
>>>> 	pthread_mutex_lock(&vhost_user.mutex);
>>>>
>>>> 	for (i = 0; i < vhost_user.vsocket_cnt; i++) {
>>>> @@ -1063,7 +1063,7 @@ struct vhost_user_reconnect_list {
>>>> 					pthread_mutex_unlock(
>>>> 							&vsocket->conn_mutex);
>>>> 					pthread_mutex_unlock(&vhost_user.mutex);
>>>> -					goto again;
>>>> +					return -EAGAIN;
>>>> 				}
>>>>
>>>> 				VHOST_LOG_CONFIG(INFO,
>>>> @@ -1085,7 +1085,7 @@ struct vhost_user_reconnect_list {
>>>> 				if (fdset_try_del(&vhost_user.fdset,
>>>> 						vsocket->socket_fd) == -1) {
>>>> 					pthread_mutex_unlock(&vhost_user.mutex);
>>>> -					goto again;
>>>> +					return -EAGAIN;
>>>> 				}
>>>>
>>>> 				close(vsocket->socket_fd);
>>>> -- 
>>>> 1.8.3.1
>>>>
>>> _______________________________________________
>>> dev mailing list
>>> dev@openvswitch.org
>>> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>>> 
> 
> 
> 
>  
> 


^ permalink raw reply	[relevance 3%]

* Re: [dpdk-dev] [PATCH v3 08/10] eal/windows: fix rte_page_sizes with Clang on Windows
  @ 2020-05-06  5:41  0%               ` Ray Kinsella
  0 siblings, 0 replies; 200+ results
From: Ray Kinsella @ 2020-05-06  5:41 UTC (permalink / raw)
  To: Jerin Jacob, Dmitry Kozlyuk
  Cc: dpdk-dev, Dmitry Malloy (MESHCHANINOV),
	Narcisa Ana Maria Vasile, Fady Bader, Tal Shnaiderman,
	Anatoly Burakov



On 15/04/2020 12:17, Jerin Jacob wrote:
> On Wed, Apr 15, 2020 at 4:39 PM Dmitry Kozlyuk <dmitry.kozliuk@gmail.com> wrote:
>>
>>
>>
>>> On Wed, Apr 15, 2020 at 4:02 PM Dmitry Kozlyuk <dmitry.kozliuk@gmail.com> wrote:
>>>>
>>>>> On Wed, Apr 15, 2020 at 1:16 AM Dmitry Kozlyuk <dmitry.kozliuk@gmail.com> wrote:
>>>>>>
>>>>>> Clang on Windows follows MS ABI where enum values are limited to 2^31-1.
>>>>>> Enum rte_page_size has members valued above this limit, which get
>>>>>> wrapped to zero, resulting in compilation error (duplicate values in
>>>>>> enum). Using MS ABI is mandatory for Windows EAL to call Win32 APIs.
>>>>>>
>>>>>> Define these values outside of the enum for Clang on Windows only.
>>>>>> This does not affect runtime, because Windows doesn't run on machines
>>>>>> with 4GiB and 16GiB hugepages.
>>>>>>
>>>>>> Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
>>>>>> ---
>>>>>>  lib/librte_eal/include/rte_memory.h | 6 ++++++
>>>>>>  1 file changed, 6 insertions(+)
>>>>>>
>>>>>> diff --git a/lib/librte_eal/include/rte_memory.h b/lib/librte_eal/include/rte_memory.h
>>>>>> index 1b7c3e5df..3ec673f51 100644
>>>>>> --- a/lib/librte_eal/include/rte_memory.h
>>>>>> +++ b/lib/librte_eal/include/rte_memory.h
>>>>>> @@ -34,8 +34,14 @@ enum rte_page_sizes {
>>>>>>         RTE_PGSIZE_256M  = 1ULL << 28,
>>>>>>         RTE_PGSIZE_512M  = 1ULL << 29,
>>>>>>         RTE_PGSIZE_1G    = 1ULL << 30,
>>>>>> +/* Work around Clang on Windows being limited to 32-bit underlying type. */
>>>>>
>>>>> It does look like "enum rte_page_sizes" NOT used as enum anywhere.
>>>>>
>>>>> [master][dpdk.org] $ grep -ri "enum rte_page_sizes" lib/
>>>>> lib/librte_eal/include/rte_memory.h:enum rte_page_sizes {
>>>>>
>>>>> Why not remove this workaround and define all items as #define to
>>>>> avoid below ifdef clutter.
>>>>>
>>>>>> +#if !defined(RTE_CC_CLANG) || !defined(RTE_EXEC_ENV_WINDOWS)
>>>>>
>>>>> See above.
>>>>>
>>>>>>         RTE_PGSIZE_4G    = 1ULL << 32,
>>>>>>         RTE_PGSIZE_16G   = 1ULL << 34,
>>>>>> +#else
>>>>>> +#define RTE_PGSIZE_4G  (1ULL << 32)
>>>>>> +#define RTE_PGSIZE_16G (1ULL << 34)
>>>>>> +#endif
>>>>>>  };
>>>>>>
>>>>>>  #define SOCKET_ID_ANY -1                    /**< Any NUMA socket. */
>>>>>> --
>>>>>> 2.25.1
>>>>>>
>>>>
>>>> This is a public header and removing enum rte_page_sizes will break API.
>>>> Moving members out of enum while keeping enum itself might break compilation
>>>> because of integer constants being converted to enum (with -Werror).
>>>
>>> If none of the public API is using this enum then I think, we may not
>>> need to make this enum as public.
>>
>> Agreed.
>>
>>> Since it has ULL, I believe both cases(enum or define), it will be
>>> treated as unsigned long long. ie. NO ABI breakage.
>>
>> I was talking about API only (compile-time compatibility). Getting rid of
>> #ifdef and workarounds sounds right, we'll just need a notice in release
>> notes.
> 
> Good to check ./devtools/check-abi.sh for any ABI breakage.

or something like this to cover all the bases.
DPDK_ABI_REF_DIR=/build/dpdk/reference/ DPDK_ABI_REF_VERSION=v20.02 ./devtools/test-meson-builds.sh


>>
>> --
>> Dmitry Kozlyuk

^ permalink raw reply	[relevance 0%]

* [dpdk-dev] [PATCH v1] doc: fix references to bind_default_symbol
@ 2020-05-05 17:49  5% Ray Kinsella
  2020-05-06  8:26  8% ` [dpdk-dev] [PATCH v2] " Ray Kinsella
  2020-05-06 15:41  8% ` [dpdk-dev] [PATCH v3] " Ray Kinsella
  0 siblings, 2 replies; 200+ results
From: Ray Kinsella @ 2020-05-05 17:49 UTC (permalink / raw)
  To: dev
  Cc: arkadiuszx.kusztal, bruce.richardson, Ray Kinsella, Neil Horman,
	John McNamara, Marko Kovacevic

The document abi_versioning.rst incorrectly instructs the developer to
add BIND_DEFAULT_SYMBOL to the public header, not the source file. This
commit fixes the issue and adds some clarifications.

Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
---
 doc/guides/contributing/abi_versioning.rst | 45 +++++++++++++++++-------------
 1 file changed, 25 insertions(+), 20 deletions(-)

diff --git a/doc/guides/contributing/abi_versioning.rst b/doc/guides/contributing/abi_versioning.rst
index a21f4e7..1eef3dd 100644
--- a/doc/guides/contributing/abi_versioning.rst
+++ b/doc/guides/contributing/abi_versioning.rst
@@ -271,7 +271,7 @@ available (DPDK_21), which contains the symbol rte_acl_create, and inherits
 the symbols from the DPDK_20 node. This list is directly translated into a
 list of exported symbols when DPDK is compiled as a shared library
 
-Next, we need to specify in the code which function map to the rte_acl_create
+Next, we need to specify in the code which function maps to the rte_acl_create
 symbol at which versions.  First, at the site of the initial symbol definition,
 we need to update the function so that it is uniquely named, and not in conflict
 with the public symbol name
@@ -289,7 +289,7 @@ with the public symbol name
 
 Note that the base name of the symbol was kept intact, as this is conducive to
 the macros used for versioning symbols and we have annotated the function as an
-implementation of versioned symbol.  That is our next step, mapping this new
+implementation of a versioned symbol.  That is our next step, mapping this new
 symbol name to the initial symbol name at version node 20.  Immediately after
 the function, we add this line of code
 
@@ -305,7 +305,7 @@ mapped the original rte_acl_create symbol to the original function (but with a
 new name).
 
 Next, we need to create the 21 version of the symbol. We create a new function
-name, with a different suffix, and implement it appropriately
+name, with the ``v21`` suffix, and implement it appropriately
 
 .. code-block:: c
 
@@ -320,27 +320,32 @@ name, with a different suffix, and implement it appropriately
    }
 
 This code serves as our new API call. Its the same as our old call, but adds the
-new parameter in place. Next we need to map this function to the symbol
-``rte_acl_create@DPDK_21``. To do this, we modify the public prototype of the
-call in the header file, adding the macro there to inform all including
-applications, that on re-link, the default rte_acl_create symbol should point to
-this function. Note that we could do this by simply naming the function above
-rte_acl_create, and the linker would chose the most recent version tag to apply
-in the version script, but we can also do this in the header file
+new parameter in place. Next we need to map this function to the default symbol
+``rte_acl_create@DPDK_21``. To do this, immediately after the function, we add
+this line of code
+
+.. code-block:: c
+
+   BIND_DEFAULT_SYMBOL(rte_acl_create, _v21, 21);
+
+Again remembering to also add the rte_function_versioning.h header to the
+requisite c file. The above macro instructs the linker to create the new default
+symbol ``rte_acl_create@DPDK_21``, which points to the above newly named
+function.
+
+We finally modify the prototype of the call in the public header file,
+such that it contains both versions of the symbol and the public api.
 
 .. code-block:: c
 
    struct rte_acl_ctx *
-   -rte_acl_create(const struct rte_acl_param *param);
-   +rte_acl_create_v21(const struct rte_acl_param *param, int debug);
-   +BIND_DEFAULT_SYMBOL(rte_acl_create, _v21, 21);
-
-The BIND_DEFAULT_SYMBOL macro explicitly tells applications that include this
-header, to link to the rte_acl_create_v21 function and apply the DPDK_21
-version node to it.  This method is more explicit and flexible than just
-re-implementing the exact symbol name, and allows for other features (such as
-linking to the old symbol version by default, when the new ABI is to be opt-in
-for a period.
+   rte_acl_create(const struct rte_acl_param *param);
+
+   struct rte_acl_ctx * __vsym
+   rte_acl_create_v20(const struct rte_acl_param *param)
+
+   struct rte_acl_ctx *
+   rte_acl_create_v21(const struct rte_acl_param *param, int debug);
 
 One last thing we need to do.  Note that we've taken what was a public symbol,
 and duplicated it into two uniquely and differently named symbols.  We've then
-- 
2.7.4


^ permalink raw reply	[relevance 5%]

* Re: [dpdk-dev] [PATCH 1/7] common/dpaax: move internal symbols into INTERNAL section
  2020-05-05 14:08  3% [dpdk-dev] [PATCH 1/7] common/dpaax: move internal symbols into INTERNAL section Hemant Agrawal
                   ` (5 preceding siblings ...)
  2020-05-05 14:08  3% ` [dpdk-dev] [PATCH 7/7] net/dpaa: " Hemant Agrawal
@ 2020-05-05 17:07  4% ` David Marchand
  2020-05-07  6:20  0%   ` Hemant Agrawal
  2020-05-12 14:00  3% ` [dpdk-dev] [PATCH v2 01/12] " Hemant Agrawal
  7 siblings, 1 reply; 200+ results
From: David Marchand @ 2020-05-05 17:07 UTC (permalink / raw)
  To: Hemant Agrawal; +Cc: dev, Ray Kinsella

Cc: Ray.

On Tue, May 5, 2020 at 4:10 PM Hemant Agrawal <hemant.agrawal@nxp.com> wrote:
>
> This patch moves the internal symbols to INTERNAL sections
> so that any change in them is not reported as ABI breakage.

Talking about the series (not just this patch as I did not look at the
details), travis reported a build issue:
https://travis-ci.com/github/ovsrobot/dpdk/builds/163985766

It looks like there is a versioned symbol for a static function of one
of those drivers.
$ git grep dpaa2_get_qbman_swp origin/master
origin/master:drivers/bus/fslmc/portal/dpaa2_hw_dpio.c:static struct
dpaa2_dpio_dev *dpaa2_get_qbman_swp(int lcoreid)
origin/master:drivers/bus/fslmc/portal/dpaa2_hw_dpio.c:
dpaa2_io_portal[lcore_id].dpio_dev = dpaa2_get_qbman_swp(lcore_id);
origin/master:drivers/bus/fslmc/portal/dpaa2_hw_dpio.c:
dpaa2_get_qbman_swp(lcore_id);
origin/master:drivers/bus/fslmc/rte_bus_fslmc_version.map:
dpaa2_get_qbman_swp;


Once fixed, I don't understand how you chose to move some symbols to
INTERNAL and not others.
Can you explain the differences?


Finally, I would still expect a failure in the ABI check even if using
__rte_internal marking.
Marking them internal will make you free of changing those symbols in
the future.
The problem is the transient state we are in.

In 20.02 (and I suppose 19.11 too), those symbols were exported and
versioned as stable DPDK_20.
So with the current ABI check script, this move will still be seen as a removal.


-- 
David Marchand


^ permalink raw reply	[relevance 4%]

* Re: [dpdk-dev] [PATCH v1 1/3] devtools: create internal ignore file for libabigail
  2020-05-05 14:53  0% ` David Marchand
@ 2020-05-05 15:02  0%   ` Ray Kinsella
  0 siblings, 0 replies; 200+ results
From: Ray Kinsella @ 2020-05-05 15:02 UTC (permalink / raw)
  To: David Marchand, Ophir Munk
  Cc: dev, Raslan Darawsheh, Matan Azrad, Neil Horman



On 05/05/2020 15:53, David Marchand wrote:
> Don't forget to Cc: Ray.
> 
> On Tue, May 5, 2020 at 1:21 PM Ophir Munk <ophirmu@mellanox.com> wrote:
>>
>> Create file libabigail.internalignore where it is specified to ignore
>> all symbols in library file librte_pmd_mlx.* during an ABI check.
> 
> I don't like the separate file, having rules with comments in a single
> place is easier to maintain.

agreed, it would become confusing which file should be updated?

> 
> Why waive all changes in all mlx drivers?
> There is a single issue with 20.02, see below.
isn't this exactly what rte_internal was created for right?

> 
> 
> Besides, looking at next patches, why keep experimental symbols?
> If all symbols in common/mlx5 are for internal use, mark them _all_ as such.
> 
> 
>>
>> Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
>> ---
>>  devtools/check-abi.sh              | 4 +++-
>>  devtools/libabigail.internalignore | 4 ++++
>>  2 files changed, 7 insertions(+), 1 deletion(-)
>>  create mode 100644 devtools/libabigail.internalignore
>>
>> diff --git a/devtools/check-abi.sh b/devtools/check-abi.sh
>> index dd9120e..3bad19a 100755
>> --- a/devtools/check-abi.sh
>> +++ b/devtools/check-abi.sh
>> @@ -10,7 +10,9 @@ fi
>>  refdir=$1
>>  newdir=$2
>>  warnonly=${3:-}
>> -ABIDIFF_OPTIONS="--suppr $(dirname $0)/libabigail.abignore --no-added-syms"
>> +ABIDIFF_OPTIONS="--suppr $(dirname $0))/libabigail.abignore" \
>> +               " --suppr $(dirname $0))/libabigail.internalignore" \
>> +               " --no-added-syms"
>>
>>  if [ ! -d $refdir ]; then
>>         echo "Error: reference directory '$refdir' does not exist."
>> diff --git a/devtools/libabigail.internalignore b/devtools/libabigail.internalignore
>> new file mode 100644
>> index 0000000..55df5b1
>> --- /dev/null
>> +++ b/devtools/libabigail.internalignore
>> @@ -0,0 +1,4 @@
>> +; These functions were moved from stable to internal.
>> +; This is a temporary exception till DPDK 20.11.
> 
> This is not until 20.11 if we merge this patch now.
> It is only when comparing 20.02 to 20.05.
> After this, symbols will be marked INTERNAL and will be skipped by the
> generic rule, so we can remove this exception in 20.08-rc0.
> 
> 
>> +[suppress_file]
>> +        file_name_regexp = librte*mlx5*
>> --
>> 2.8.4
> 
> A stricter rule is enough, can you try something like:
> 
> +[suppress_file]
> +       file_name_regexp = ^librte_common_mlx5\.
> 
> 

^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [PATCH v1 1/3] devtools: create internal ignore file for libabigail
  2020-05-05 11:20 10% [dpdk-dev] [PATCH v1 1/3] devtools: create internal ignore file for libabigail Ophir Munk
  2020-05-05 11:45  0% ` Matan Azrad
@ 2020-05-05 14:53  0% ` David Marchand
  2020-05-05 15:02  0%   ` Ray Kinsella
    2 siblings, 1 reply; 200+ results
From: David Marchand @ 2020-05-05 14:53 UTC (permalink / raw)
  To: Ophir Munk; +Cc: dev, Raslan Darawsheh, Matan Azrad, Neil Horman, Ray Kinsella

Don't forget to Cc: Ray.

On Tue, May 5, 2020 at 1:21 PM Ophir Munk <ophirmu@mellanox.com> wrote:
>
> Create file libabigail.internalignore where it is specified to ignore
> all symbols in library file librte_pmd_mlx.* during an ABI check.

I don't like the separate file, having rules with comments in a single
place is easier to maintain.

Why waive all changes in all mlx drivers?
There is a single issue with 20.02, see below.


Besides, looking at next patches, why keep experimental symbols?
If all symbols in common/mlx5 are for internal use, mark them _all_ as such.


>
> Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
> ---
>  devtools/check-abi.sh              | 4 +++-
>  devtools/libabigail.internalignore | 4 ++++
>  2 files changed, 7 insertions(+), 1 deletion(-)
>  create mode 100644 devtools/libabigail.internalignore
>
> diff --git a/devtools/check-abi.sh b/devtools/check-abi.sh
> index dd9120e..3bad19a 100755
> --- a/devtools/check-abi.sh
> +++ b/devtools/check-abi.sh
> @@ -10,7 +10,9 @@ fi
>  refdir=$1
>  newdir=$2
>  warnonly=${3:-}
> -ABIDIFF_OPTIONS="--suppr $(dirname $0)/libabigail.abignore --no-added-syms"
> +ABIDIFF_OPTIONS="--suppr $(dirname $0))/libabigail.abignore" \
> +               " --suppr $(dirname $0))/libabigail.internalignore" \
> +               " --no-added-syms"
>
>  if [ ! -d $refdir ]; then
>         echo "Error: reference directory '$refdir' does not exist."
> diff --git a/devtools/libabigail.internalignore b/devtools/libabigail.internalignore
> new file mode 100644
> index 0000000..55df5b1
> --- /dev/null
> +++ b/devtools/libabigail.internalignore
> @@ -0,0 +1,4 @@
> +; These functions were moved from stable to internal.
> +; This is a temporary exception till DPDK 20.11.

This is not until 20.11 if we merge this patch now.
It is only when comparing 20.02 to 20.05.
After this, symbols will be marked INTERNAL and will be skipped by the
generic rule, so we can remove this exception in 20.08-rc0.


> +[suppress_file]
> +        file_name_regexp = librte*mlx5*
> --
> 2.8.4

A stricter rule is enough, can you try something like:

+[suppress_file]
+       file_name_regexp = ^librte_common_mlx5\.


-- 
David Marchand


^ permalink raw reply	[relevance 0%]

* [dpdk-dev] [PATCH 7/7] net/dpaa: move internal symbols into INTERNAL section
  2020-05-05 14:08  3% [dpdk-dev] [PATCH 1/7] common/dpaax: move internal symbols into INTERNAL section Hemant Agrawal
                   ` (4 preceding siblings ...)
  2020-05-05 14:08  3% ` [dpdk-dev] [PATCH 6/7] net/dpaa2: " Hemant Agrawal
@ 2020-05-05 14:08  3% ` Hemant Agrawal
  2020-05-05 17:07  4% ` [dpdk-dev] [PATCH 1/7] common/dpaax: " David Marchand
  2020-05-12 14:00  3% ` [dpdk-dev] [PATCH v2 01/12] " Hemant Agrawal
  7 siblings, 0 replies; 200+ results
From: Hemant Agrawal @ 2020-05-05 14:08 UTC (permalink / raw)
  To: dev, david.marchand; +Cc: Hemant Agrawal

This patch moves the internal symbols to INTERNAL sections
so that any change in them is not reported as ABI breakage.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 devtools/libabigail.abignore              | 1 +
 drivers/net/dpaa/dpaa_ethdev.h            | 2 ++
 drivers/net/dpaa/rte_pmd_dpaa_version.map | 9 ++++++++-
 3 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/devtools/libabigail.abignore b/devtools/libabigail.abignore
index 986a527715..0db7f5e0b9 100644
--- a/devtools/libabigail.abignore
+++ b/devtools/libabigail.abignore
@@ -29,3 +29,4 @@
         type_kind = enum
         name = rte_eth_event_type
         changed_enumerators = RTE_ETH_EVENT_MAX
+
diff --git a/drivers/net/dpaa/dpaa_ethdev.h b/drivers/net/dpaa/dpaa_ethdev.h
index af9fc2105d..7393a9df05 100644
--- a/drivers/net/dpaa/dpaa_ethdev.h
+++ b/drivers/net/dpaa/dpaa_ethdev.h
@@ -160,12 +160,14 @@ struct dpaa_if_stats {
 	uint64_t tund;		/**<Tx Undersized */
 };
 
+__rte_internal
 int
 dpaa_eth_eventq_attach(const struct rte_eth_dev *dev,
 		int eth_rx_queue_id,
 		u16 ch_id,
 		const struct rte_event_eth_rx_adapter_queue_conf *queue_conf);
 
+__rte_internal
 int
 dpaa_eth_eventq_detach(const struct rte_eth_dev *dev,
 			   int eth_rx_queue_id);
diff --git a/drivers/net/dpaa/rte_pmd_dpaa_version.map b/drivers/net/dpaa/rte_pmd_dpaa_version.map
index f403a1526d..3df144dc8d 100644
--- a/drivers/net/dpaa/rte_pmd_dpaa_version.map
+++ b/drivers/net/dpaa/rte_pmd_dpaa_version.map
@@ -1,9 +1,16 @@
 DPDK_20.0 {
 	global:
 
+	rte_pmd_dpaa_set_tx_loopback;
+
+	local: *;
+};
+
+INTERNAL {
+	global:
+
 	dpaa_eth_eventq_attach;
 	dpaa_eth_eventq_detach;
-	rte_pmd_dpaa_set_tx_loopback;
 
 	local: *;
 };
-- 
2.17.1


^ permalink raw reply	[relevance 3%]

* [dpdk-dev] [PATCH 6/7] net/dpaa2: move internal symbols into INTERNAL section
  2020-05-05 14:08  3% [dpdk-dev] [PATCH 1/7] common/dpaax: move internal symbols into INTERNAL section Hemant Agrawal
                   ` (3 preceding siblings ...)
  2020-05-05 14:08  3% ` [dpdk-dev] [PATCH 5/7] crypto: " Hemant Agrawal
@ 2020-05-05 14:08  3% ` Hemant Agrawal
  2020-05-05 14:08  3% ` [dpdk-dev] [PATCH 7/7] net/dpaa: " Hemant Agrawal
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 200+ results
From: Hemant Agrawal @ 2020-05-05 14:08 UTC (permalink / raw)
  To: dev, david.marchand; +Cc: Hemant Agrawal

This patch moves the internal symbols to INTERNAL sections
so that any change in them is not reported as ABI breakage.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/net/dpaa2/dpaa2_ethdev.h            | 2 ++
 drivers/net/dpaa2/rte_pmd_dpaa2_version.map | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/dpaa2/dpaa2_ethdev.h b/drivers/net/dpaa2/dpaa2_ethdev.h
index 2c49a7f01f..c7fb6539ff 100644
--- a/drivers/net/dpaa2/dpaa2_ethdev.h
+++ b/drivers/net/dpaa2/dpaa2_ethdev.h
@@ -164,11 +164,13 @@ int dpaa2_remove_flow_dist(struct rte_eth_dev *eth_dev,
 
 int dpaa2_attach_bp_list(struct dpaa2_dev_priv *priv, void *blist);
 
+__rte_internal
 int dpaa2_eth_eventq_attach(const struct rte_eth_dev *dev,
 		int eth_rx_queue_id,
 		struct dpaa2_dpcon_dev *dpcon,
 		const struct rte_event_eth_rx_adapter_queue_conf *queue_conf);
 
+__rte_internal
 int dpaa2_eth_eventq_detach(const struct rte_eth_dev *dev,
 		int eth_rx_queue_id);
 
diff --git a/drivers/net/dpaa2/rte_pmd_dpaa2_version.map b/drivers/net/dpaa2/rte_pmd_dpaa2_version.map
index f2bb793319..78ea74e058 100644
--- a/drivers/net/dpaa2/rte_pmd_dpaa2_version.map
+++ b/drivers/net/dpaa2/rte_pmd_dpaa2_version.map
@@ -1,4 +1,4 @@
-DPDK_20.0 {
+INTERNAL {
 	global:
 
 	dpaa2_eth_eventq_attach;
-- 
2.17.1


^ permalink raw reply	[relevance 3%]

* [dpdk-dev] [PATCH 5/7] crypto: move internal symbols into INTERNAL section
  2020-05-05 14:08  3% [dpdk-dev] [PATCH 1/7] common/dpaax: move internal symbols into INTERNAL section Hemant Agrawal
                   ` (2 preceding siblings ...)
  2020-05-05 14:08  1% ` [dpdk-dev] [PATCH 4/7] bus/dpaa: " Hemant Agrawal
@ 2020-05-05 14:08  3% ` Hemant Agrawal
  2020-05-05 14:08  3% ` [dpdk-dev] [PATCH 6/7] net/dpaa2: " Hemant Agrawal
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 200+ results
From: Hemant Agrawal @ 2020-05-05 14:08 UTC (permalink / raw)
  To: dev, david.marchand; +Cc: Hemant Agrawal

This patch moves the internal symbols to INTERNAL sections
so that any change in them is not reported as ABI breakage.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/crypto/dpaa2_sec/dpaa2_sec_event.h             | 5 +++--
 drivers/crypto/dpaa2_sec/rte_pmd_dpaa2_sec_version.map | 2 +-
 drivers/crypto/dpaa_sec/dpaa_sec_event.h               | 8 ++++----
 drivers/crypto/dpaa_sec/rte_pmd_dpaa_sec_version.map   | 4 +---
 4 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_event.h b/drivers/crypto/dpaa2_sec/dpaa2_sec_event.h
index c779d5d837..675cbbb81d 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_event.h
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_event.h
@@ -6,12 +6,13 @@
 #ifndef _DPAA2_SEC_EVENT_H_
 #define _DPAA2_SEC_EVENT_H_
 
-int
-dpaa2_sec_eventq_attach(const struct rte_cryptodev *dev,
+__rte_internal
+int dpaa2_sec_eventq_attach(const struct rte_cryptodev *dev,
 		int qp_id,
 		struct dpaa2_dpcon_dev *dpcon,
 		const struct rte_event *event);
 
+__rte_internal
 int dpaa2_sec_eventq_detach(const struct rte_cryptodev *dev,
 		int qp_id);
 
diff --git a/drivers/crypto/dpaa2_sec/rte_pmd_dpaa2_sec_version.map b/drivers/crypto/dpaa2_sec/rte_pmd_dpaa2_sec_version.map
index 5952d645fd..1352f576e5 100644
--- a/drivers/crypto/dpaa2_sec/rte_pmd_dpaa2_sec_version.map
+++ b/drivers/crypto/dpaa2_sec/rte_pmd_dpaa2_sec_version.map
@@ -1,4 +1,4 @@
-DPDK_20.0 {
+INTERNAL {
 	global:
 
 	dpaa2_sec_eventq_attach;
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec_event.h b/drivers/crypto/dpaa_sec/dpaa_sec_event.h
index 8d1a018096..0b09fa8f75 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec_event.h
+++ b/drivers/crypto/dpaa_sec/dpaa_sec_event.h
@@ -6,14 +6,14 @@
 #ifndef _DPAA_SEC_EVENT_H_
 #define _DPAA_SEC_EVENT_H_
 
-int
-dpaa_sec_eventq_attach(const struct rte_cryptodev *dev,
+__rte_internal
+int dpaa_sec_eventq_attach(const struct rte_cryptodev *dev,
 		int qp_id,
 		uint16_t ch_id,
 		const struct rte_event *event);
 
-int
-dpaa_sec_eventq_detach(const struct rte_cryptodev *dev,
+__rte_internal
+int dpaa_sec_eventq_detach(const struct rte_cryptodev *dev,
 		int qp_id);
 
 #endif /* _DPAA_SEC_EVENT_H_ */
diff --git a/drivers/crypto/dpaa_sec/rte_pmd_dpaa_sec_version.map b/drivers/crypto/dpaa_sec/rte_pmd_dpaa_sec_version.map
index 8580fa13db..aed07fb371 100644
--- a/drivers/crypto/dpaa_sec/rte_pmd_dpaa_sec_version.map
+++ b/drivers/crypto/dpaa_sec/rte_pmd_dpaa_sec_version.map
@@ -1,8 +1,6 @@
-DPDK_20.0 {
+INTERNAL {
 	global:
 
 	dpaa_sec_eventq_attach;
 	dpaa_sec_eventq_detach;
-
-	local: *;
 };
-- 
2.17.1


^ permalink raw reply	[relevance 3%]

* [dpdk-dev] [PATCH 4/7] bus/dpaa: move internal symbols into INTERNAL section
  2020-05-05 14:08  3% [dpdk-dev] [PATCH 1/7] common/dpaax: move internal symbols into INTERNAL section Hemant Agrawal
  2020-05-05 14:08  3% ` [dpdk-dev] [PATCH 2/7] mempool/dpaa2: " Hemant Agrawal
  2020-05-05 14:08  1% ` [dpdk-dev] [PATCH 3/7] bus/fslmc: " Hemant Agrawal
@ 2020-05-05 14:08  1% ` Hemant Agrawal
  2020-05-05 14:08  3% ` [dpdk-dev] [PATCH 5/7] crypto: " Hemant Agrawal
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 200+ results
From: Hemant Agrawal @ 2020-05-05 14:08 UTC (permalink / raw)
  To: dev, david.marchand; +Cc: Hemant Agrawal

This patch moves the internal symbols to INTERNAL sections
so that any change in them is not reported as ABI breakage.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/bus/dpaa/include/fsl_bman.h       |  6 +++++
 drivers/bus/dpaa/include/fsl_fman.h       | 27 +++++++++++++++++++
 drivers/bus/dpaa/include/fsl_qman.h       | 32 +++++++++++++++++++++++
 drivers/bus/dpaa/include/fsl_usd.h        |  6 +++++
 drivers/bus/dpaa/include/netcfg.h         |  2 ++
 drivers/bus/dpaa/rte_bus_dpaa_version.map |  7 +----
 drivers/bus/dpaa/rte_dpaa_bus.h           |  5 ++++
 7 files changed, 79 insertions(+), 6 deletions(-)

diff --git a/drivers/bus/dpaa/include/fsl_bman.h b/drivers/bus/dpaa/include/fsl_bman.h
index f9cd972153..82da2fcfe0 100644
--- a/drivers/bus/dpaa/include/fsl_bman.h
+++ b/drivers/bus/dpaa/include/fsl_bman.h
@@ -264,12 +264,14 @@ int bman_shutdown_pool(u32 bpid);
  * the structure provided by the caller can be released or reused after the
  * function returns.
  */
+__rte_internal
 struct bman_pool *bman_new_pool(const struct bman_pool_params *params);
 
 /**
  * bman_free_pool - Deallocates a Buffer Pool object
  * @pool: the pool object to release
  */
+__rte_internal
 void bman_free_pool(struct bman_pool *pool);
 
 /**
@@ -279,6 +281,7 @@ void bman_free_pool(struct bman_pool *pool);
  * The returned pointer refers to state within the pool object so must not be
  * modified and can no longer be read once the pool object is destroyed.
  */
+__rte_internal
 const struct bman_pool_params *bman_get_params(const struct bman_pool *pool);
 
 /**
@@ -289,6 +292,7 @@ const struct bman_pool_params *bman_get_params(const struct bman_pool *pool);
  * @flags: bit-mask of BMAN_RELEASE_FLAG_*** options
  *
  */
+__rte_internal
 int bman_release(struct bman_pool *pool, const struct bm_buffer *bufs, u8 num,
 		 u32 flags);
 
@@ -302,6 +306,7 @@ int bman_release(struct bman_pool *pool, const struct bm_buffer *bufs, u8 num,
  * The return value will be the number of buffers obtained from the pool, or a
  * negative error code if a h/w error or pool starvation was encountered.
  */
+__rte_internal
 int bman_acquire(struct bman_pool *pool, struct bm_buffer *bufs, u8 num,
 		 u32 flags);
 
@@ -317,6 +322,7 @@ int bman_query_pools(struct bm_pool_state *state);
  *
  * Return the number of the free buffers
  */
+__rte_internal
 u32 bman_query_free_buffers(struct bman_pool *pool);
 
 /**
diff --git a/drivers/bus/dpaa/include/fsl_fman.h b/drivers/bus/dpaa/include/fsl_fman.h
index 5705ebfdce..6c87c8db0d 100644
--- a/drivers/bus/dpaa/include/fsl_fman.h
+++ b/drivers/bus/dpaa/include/fsl_fman.h
@@ -7,6 +7,8 @@
 #ifndef __FSL_FMAN_H
 #define __FSL_FMAN_H
 
+#include <rte_compat.h>
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -43,18 +45,23 @@ struct fm_status_t {
 } __rte_packed;
 
 /* Set MAC address for a particular interface */
+__rte_internal
 int fman_if_add_mac_addr(struct fman_if *p, uint8_t *eth, uint8_t addr_num);
 
 /* Remove a MAC address for a particular interface */
+__rte_internal
 void fman_if_clear_mac_addr(struct fman_if *p, uint8_t addr_num);
 
 /* Get the FMAN statistics */
+__rte_internal
 void fman_if_stats_get(struct fman_if *p, struct rte_eth_stats *stats);
 
 /* Reset the FMAN statistics */
+__rte_internal
 void fman_if_stats_reset(struct fman_if *p);
 
 /* Get all of the FMAN statistics */
+__rte_internal
 void fman_if_stats_get_all(struct fman_if *p, uint64_t *value, int n);
 
 /* Set ignore pause option for a specific interface */
@@ -64,32 +71,43 @@ void fman_if_set_rx_ignore_pause_frames(struct fman_if *p, bool enable);
 void fman_if_conf_max_frame_len(struct fman_if *p, unsigned int max_frame_len);
 
 /* Enable/disable Rx promiscuous mode on specified interface */
+__rte_internal
 void fman_if_promiscuous_enable(struct fman_if *p);
+__rte_internal
 void fman_if_promiscuous_disable(struct fman_if *p);
 
 /* Enable/disable Rx on specific interfaces */
+__rte_internal
 void fman_if_enable_rx(struct fman_if *p);
+__rte_internal
 void fman_if_disable_rx(struct fman_if *p);
 
 /* Enable/disable loopback on specific interfaces */
+__rte_internal
 void fman_if_loopback_enable(struct fman_if *p);
+__rte_internal
 void fman_if_loopback_disable(struct fman_if *p);
 
 /* Set buffer pool on specific interface */
+__rte_internal
 void fman_if_set_bp(struct fman_if *fm_if, unsigned int num, int bpid,
 		    size_t bufsize);
 
 /* Get Flow Control threshold parameters on specific interface */
+__rte_internal
 int fman_if_get_fc_threshold(struct fman_if *fm_if);
 
 /* Enable and Set Flow Control threshold parameters on specific interface */
+__rte_internal
 int fman_if_set_fc_threshold(struct fman_if *fm_if,
 			u32 high_water, u32 low_water, u32 bpid);
 
 /* Get Flow Control pause quanta on specific interface */
+__rte_internal
 int fman_if_get_fc_quanta(struct fman_if *fm_if);
 
 /* Set Flow Control pause quanta on specific interface */
+__rte_internal
 int fman_if_set_fc_quanta(struct fman_if *fm_if, u16 pause_quanta);
 
 /* Set default error fqid on specific interface */
@@ -99,35 +117,44 @@ void fman_if_set_err_fqid(struct fman_if *fm_if, uint32_t err_fqid);
 int fman_if_get_ic_params(struct fman_if *fm_if, struct fman_if_ic_params *icp);
 
 /* Set IC transfer params */
+__rte_internal
 int fman_if_set_ic_params(struct fman_if *fm_if,
 			  const struct fman_if_ic_params *icp);
 
 /* Get interface fd->offset value */
+__rte_internal
 int fman_if_get_fdoff(struct fman_if *fm_if);
 
 /* Set interface fd->offset value */
+__rte_internal
 void fman_if_set_fdoff(struct fman_if *fm_if, uint32_t fd_offset);
 
 /* Get interface SG enable status value */
+__rte_internal
 int fman_if_get_sg_enable(struct fman_if *fm_if);
 
 /* Set interface SG support mode */
+__rte_internal
 void fman_if_set_sg(struct fman_if *fm_if, int enable);
 
 /* Get interface Max Frame length (MTU) */
 uint16_t fman_if_get_maxfrm(struct fman_if *fm_if);
 
 /* Set interface  Max Frame length (MTU) */
+__rte_internal
 void fman_if_set_maxfrm(struct fman_if *fm_if, uint16_t max_frm);
 
 /* Set interface next invoked action for dequeue operation */
 void fman_if_set_dnia(struct fman_if *fm_if, uint32_t nia);
 
 /* discard error packets on rx */
+__rte_internal
 void fman_if_discard_rx_errors(struct fman_if *fm_if);
 
+__rte_internal
 void fman_if_set_mcast_filter_table(struct fman_if *p);
 
+__rte_internal
 void fman_if_reset_mcast_filter_table(struct fman_if *p);
 
 int fman_if_add_hash_mac_addr(struct fman_if *p, uint8_t *eth);
diff --git a/drivers/bus/dpaa/include/fsl_qman.h b/drivers/bus/dpaa/include/fsl_qman.h
index 1b3342e7e6..4411bb0a79 100644
--- a/drivers/bus/dpaa/include/fsl_qman.h
+++ b/drivers/bus/dpaa/include/fsl_qman.h
@@ -1314,6 +1314,7 @@ struct qman_cgr {
 #define QMAN_CGR_MODE_FRAME          0x00000001
 
 #ifdef CONFIG_FSL_QMAN_FQ_LOOKUP
+__rte_internal
 void qman_set_fq_lookup_table(void **table);
 #endif
 
@@ -1322,6 +1323,7 @@ void qman_set_fq_lookup_table(void **table);
  */
 int qman_get_portal_index(void);
 
+__rte_internal
 u32 qman_portal_dequeue(struct rte_event ev[], unsigned int poll_limit,
 			void **bufs);
 
@@ -1333,6 +1335,7 @@ u32 qman_portal_dequeue(struct rte_event ev[], unsigned int poll_limit,
  * processed via qman_poll_***() functions). Returns zero for success, or
  * -EINVAL if the current CPU is sharing a portal hosted on another CPU.
  */
+__rte_internal
 int qman_irqsource_add(u32 bits);
 
 /**
@@ -1340,6 +1343,7 @@ int qman_irqsource_add(u32 bits);
  * takes portal (fq specific) as input rather than using the thread affined
  * portal.
  */
+__rte_internal
 int qman_fq_portal_irqsource_add(struct qman_portal *p, u32 bits);
 
 /**
@@ -1350,6 +1354,7 @@ int qman_fq_portal_irqsource_add(struct qman_portal *p, u32 bits);
  * instead be processed via qman_poll_***() functions. Returns zero for success,
  * or -EINVAL if the current CPU is sharing a portal hosted on another CPU.
  */
+__rte_internal
 int qman_irqsource_remove(u32 bits);
 
 /**
@@ -1357,6 +1362,7 @@ int qman_irqsource_remove(u32 bits);
  * takes portal (fq specific) as input rather than using the thread affined
  * portal.
  */
+__rte_internal
 int qman_fq_portal_irqsource_remove(struct qman_portal *p, u32 bits);
 
 /**
@@ -1369,6 +1375,7 @@ int qman_fq_portal_irqsource_remove(struct qman_portal *p, u32 bits);
  */
 u16 qman_affine_channel(int cpu);
 
+__rte_internal
 unsigned int qman_portal_poll_rx(unsigned int poll_limit,
 				 void **bufs, struct qman_portal *q);
 
@@ -1380,6 +1387,7 @@ unsigned int qman_portal_poll_rx(unsigned int poll_limit,
  *
  * This function will issue a volatile dequeue command to the QMAN.
  */
+__rte_internal
 int qman_set_vdq(struct qman_fq *fq, u16 num, uint32_t vdqcr_flags);
 
 /**
@@ -1390,6 +1398,7 @@ int qman_set_vdq(struct qman_fq *fq, u16 num, uint32_t vdqcr_flags);
  * is issued. It will keep returning NULL until there is no packet available on
  * the DQRR.
  */
+__rte_internal
 struct qm_dqrr_entry *qman_dequeue(struct qman_fq *fq);
 
 /**
@@ -1401,6 +1410,7 @@ struct qm_dqrr_entry *qman_dequeue(struct qman_fq *fq);
  * This will consume the DQRR enrey and make it available for next volatile
  * dequeue.
  */
+__rte_internal
 void qman_dqrr_consume(struct qman_fq *fq,
 		       struct qm_dqrr_entry *dq);
 
@@ -1414,6 +1424,7 @@ void qman_dqrr_consume(struct qman_fq *fq,
  * this function will return -EINVAL, otherwise the return value is >=0 and
  * represents the number of DQRR entries processed.
  */
+__rte_internal
 int qman_poll_dqrr(unsigned int limit);
 
 /**
@@ -1460,6 +1471,7 @@ void qman_start_dequeues(void);
  * (SDQCR). The requested pools are limited to those the portal has dequeue
  * access to.
  */
+__rte_internal
 void qman_static_dequeue_add(u32 pools, struct qman_portal *qm);
 
 /**
@@ -1507,6 +1519,7 @@ void qman_dca(const struct qm_dqrr_entry *dq, int park_request);
  * function must be called from the same CPU as that which processed the DQRR
  * entry in the first place.
  */
+__rte_internal
 void qman_dca_index(u8 index, int park_request);
 
 /**
@@ -1564,6 +1577,7 @@ void qman_set_dc_ern(qman_cb_dc_ern handler, int affine);
  * a frame queue object based on that, rather than assuming/requiring that it be
  * Out of Service.
  */
+__rte_internal
 int qman_create_fq(u32 fqid, u32 flags, struct qman_fq *fq);
 
 /**
@@ -1582,6 +1596,7 @@ void qman_destroy_fq(struct qman_fq *fq, u32 flags);
  * qman_fq_fqid - Queries the frame queue ID of a FQ object
  * @fq: the frame queue object to query
  */
+__rte_internal
 u32 qman_fq_fqid(struct qman_fq *fq);
 
 /**
@@ -1594,6 +1609,7 @@ u32 qman_fq_fqid(struct qman_fq *fq);
  * This captures the state, as seen by the driver, at the time the function
  * executes.
  */
+__rte_internal
 void qman_fq_state(struct qman_fq *fq, enum qman_fq_state *state, u32 *flags);
 
 /**
@@ -1630,6 +1646,7 @@ void qman_fq_state(struct qman_fq *fq, enum qman_fq_state *state, u32 *flags);
  * context_a.address fields and will leave the stashing fields provided by the
  * user alone, otherwise it will zero out the context_a.stashing fields.
  */
+__rte_internal
 int qman_init_fq(struct qman_fq *fq, u32 flags, struct qm_mcc_initfq *opts);
 
 /**
@@ -1659,6 +1676,7 @@ int qman_schedule_fq(struct qman_fq *fq);
  * caller should be prepared to accept the callback as the function is called,
  * not only once it has returned.
  */
+__rte_internal
 int qman_retire_fq(struct qman_fq *fq, u32 *flags);
 
 /**
@@ -1668,6 +1686,7 @@ int qman_retire_fq(struct qman_fq *fq, u32 *flags);
  * The frame queue must be retired and empty, and if any order restoration list
  * was released as ERNs at the time of retirement, they must all be consumed.
  */
+__rte_internal
 int qman_oos_fq(struct qman_fq *fq);
 
 /**
@@ -1701,6 +1720,7 @@ int qman_query_fq_has_pkts(struct qman_fq *fq);
  * @fq: the frame queue object to be queried
  * @np: storage for the queried FQD fields
  */
+__rte_internal
 int qman_query_fq_np(struct qman_fq *fq, struct qm_mcr_queryfq_np *np);
 
 /**
@@ -1708,6 +1728,7 @@ int qman_query_fq_np(struct qman_fq *fq, struct qm_mcr_queryfq_np *np);
  * @fq: the frame queue object to be queried
  * @frm_cnt: number of frames in the queue
  */
+__rte_internal
 int qman_query_fq_frm_cnt(struct qman_fq *fq, u32 *frm_cnt);
 
 /**
@@ -1738,6 +1759,7 @@ int qman_query_wq(u8 query_dedicated, struct qm_mcr_querywq *wq);
  * callback, or by waiting for the QMAN_FQ_STATE_VDQCR bit to disappear from the
  * "flags" retrieved from qman_fq_state().
  */
+__rte_internal
 int qman_volatile_dequeue(struct qman_fq *fq, u32 flags, u32 vdqcr);
 
 /**
@@ -1773,8 +1795,10 @@ int qman_volatile_dequeue(struct qman_fq *fq, u32 flags, u32 vdqcr);
  * of an already busy hardware resource by throttling many of the to-be-dropped
  * enqueues "at the source".
  */
+__rte_internal
 int qman_enqueue(struct qman_fq *fq, const struct qm_fd *fd, u32 flags);
 
+__rte_internal
 int qman_enqueue_multi(struct qman_fq *fq, const struct qm_fd *fd, u32 *flags,
 		       int frames_to_send);
 
@@ -1788,6 +1812,7 @@ int qman_enqueue_multi(struct qman_fq *fq, const struct qm_fd *fd, u32 *flags,
  * This API is similar to qman_enqueue_multi(), but it takes fd which needs
  * to be processed by different frame queues.
  */
+__rte_internal
 int
 qman_enqueue_multi_fq(struct qman_fq *fq[], const struct qm_fd *fd,
 		      u32 *flags, int frames_to_send);
@@ -1876,6 +1901,7 @@ int qman_shutdown_fq(u32 fqid);
  * @fqid: the base FQID of the range to deallocate
  * @count: the number of FQIDs in the range
  */
+__rte_internal
 int qman_reserve_fqid_range(u32 fqid, unsigned int count);
 static inline int qman_reserve_fqid(u32 fqid)
 {
@@ -1895,6 +1921,7 @@ static inline int qman_reserve_fqid(u32 fqid)
  * than requested (though alignment will be as requested). If @partial is zero,
  * the return value will either be 'count' or negative.
  */
+__rte_internal
 int qman_alloc_pool_range(u32 *result, u32 count, u32 align, int partial);
 static inline int qman_alloc_pool(u32 *result)
 {
@@ -1942,6 +1969,7 @@ void qman_seed_pool_range(u32 id, unsigned int count);
  * any unspecified parameters) will be used rather than a modify hw hardware
  * (which only modifies the specified parameters).
  */
+__rte_internal
 int qman_create_cgr(struct qman_cgr *cgr, u32 flags,
 		    struct qm_mcc_initcgr *opts);
 
@@ -1964,6 +1992,7 @@ int qman_create_cgr_to_dcp(struct qman_cgr *cgr, u32 flags, u16 dcp_portal,
  * is executed. This must be excuted on the same affine portal on which it was
  * created.
  */
+__rte_internal
 int qman_delete_cgr(struct qman_cgr *cgr);
 
 /**
@@ -1980,6 +2009,7 @@ int qman_delete_cgr(struct qman_cgr *cgr);
  * unspecified parameters) will be used rather than a modify hw hardware (which
  * only modifies the specified parameters).
  */
+__rte_internal
 int qman_modify_cgr(struct qman_cgr *cgr, u32 flags,
 		    struct qm_mcc_initcgr *opts);
 
@@ -2008,6 +2038,7 @@ int qman_query_congestion(struct qm_mcr_querycongestion *congestion);
  * than requested (though alignment will be as requested). If @partial is zero,
  * the return value will either be 'count' or negative.
  */
+__rte_internal
 int qman_alloc_cgrid_range(u32 *result, u32 count, u32 align, int partial);
 static inline int qman_alloc_cgrid(u32 *result)
 {
@@ -2021,6 +2052,7 @@ static inline int qman_alloc_cgrid(u32 *result)
  * @id: the base CGR ID of the range to deallocate
  * @count: the number of CGR IDs in the range
  */
+__rte_internal
 void qman_release_cgrid_range(u32 id, unsigned int count);
 static inline void qman_release_cgrid(u32 id)
 {
diff --git a/drivers/bus/dpaa/include/fsl_usd.h b/drivers/bus/dpaa/include/fsl_usd.h
index 263d9bb976..30ec63a09d 100644
--- a/drivers/bus/dpaa/include/fsl_usd.h
+++ b/drivers/bus/dpaa/include/fsl_usd.h
@@ -58,6 +58,7 @@ int bman_allocate_raw_portal(struct dpaa_raw_portal *portal);
 int bman_free_raw_portal(struct dpaa_raw_portal *portal);
 
 /* Obtain thread-local UIO file-descriptors */
+__rte_internal
 int qman_thread_fd(void);
 int bman_thread_fd(void);
 
@@ -66,8 +67,12 @@ int bman_thread_fd(void);
  * processing is complete. As such, it is essential to call this before going
  * into another blocking read/select/poll.
  */
+__rte_internal
 void qman_thread_irq(void);
+
+__rte_internal
 void bman_thread_irq(void);
+__rte_internal
 void qman_fq_portal_thread_irq(struct qman_portal *qp);
 
 void qman_clear_irq(void);
@@ -77,6 +82,7 @@ int qman_global_init(void);
 int bman_global_init(void);
 
 /* Direct portal create and destroy */
+__rte_internal
 struct qman_portal *fsl_qman_fq_portal_create(int *fd);
 int fsl_qman_fq_portal_destroy(struct qman_portal *qp);
 int fsl_qman_fq_portal_init(struct qman_portal *qp);
diff --git a/drivers/bus/dpaa/include/netcfg.h b/drivers/bus/dpaa/include/netcfg.h
index bf7bfae8cb..d7d1befd24 100644
--- a/drivers/bus/dpaa/include/netcfg.h
+++ b/drivers/bus/dpaa/include/netcfg.h
@@ -46,11 +46,13 @@ struct netcfg_interface {
  * cfg_file: FMC config XML file
  * Returns the configuration information in newly allocated memory.
  */
+__rte_internal
 struct netcfg_info *netcfg_acquire(void);
 
 /* cfg_ptr: configuration information pointer.
  * Frees the resources allocated by the configuration layer.
  */
+__rte_internal
 void netcfg_release(struct netcfg_info *cfg_ptr);
 
 #ifdef RTE_LIBRTE_DPAA_DEBUG_DRIVER
diff --git a/drivers/bus/dpaa/rte_bus_dpaa_version.map b/drivers/bus/dpaa/rte_bus_dpaa_version.map
index e6ca4361e0..f4947fac41 100644
--- a/drivers/bus/dpaa/rte_bus_dpaa_version.map
+++ b/drivers/bus/dpaa/rte_bus_dpaa_version.map
@@ -1,4 +1,4 @@
-DPDK_20.0 {
+INTERNAL {
 	global:
 
 	bman_acquire;
@@ -13,7 +13,6 @@ DPDK_20.0 {
 	dpaa_logtype_pmd;
 	dpaa_netcfg;
 	dpaa_svr_family;
-	fman_ccsr_map_fd;
 	fman_dealloc_bufs_mask_hi;
 	fman_dealloc_bufs_mask_lo;
 	fman_if_add_mac_addr;
@@ -51,7 +50,6 @@ DPDK_20.0 {
 	qm_channel_pool1;
 	qman_alloc_cgrid_range;
 	qman_alloc_pool_range;
-	qman_clear_irq;
 	qman_create_cgr;
 	qman_create_fq;
 	qman_dca_index;
@@ -87,10 +85,7 @@ DPDK_20.0 {
 	qman_volatile_dequeue;
 	rte_dpaa_driver_register;
 	rte_dpaa_driver_unregister;
-	rte_dpaa_mem_ptov;
 	rte_dpaa_portal_fq_close;
 	rte_dpaa_portal_fq_init;
 	rte_dpaa_portal_init;
-
-	local: *;
 };
diff --git a/drivers/bus/dpaa/rte_dpaa_bus.h b/drivers/bus/dpaa/rte_dpaa_bus.h
index 373aca9785..d4aee132ef 100644
--- a/drivers/bus/dpaa/rte_dpaa_bus.h
+++ b/drivers/bus/dpaa/rte_dpaa_bus.h
@@ -158,6 +158,7 @@ rte_dpaa_mem_vtop(void *vaddr)
  *   A pointer to a rte_dpaa_driver structure describing the driver
  *   to be registered.
  */
+__rte_internal
 void rte_dpaa_driver_register(struct rte_dpaa_driver *driver);
 
 /**
@@ -167,6 +168,7 @@ void rte_dpaa_driver_register(struct rte_dpaa_driver *driver);
  *	A pointer to a rte_dpaa_driver structure describing the driver
  *	to be unregistered.
  */
+__rte_internal
 void rte_dpaa_driver_unregister(struct rte_dpaa_driver *driver);
 
 /**
@@ -178,10 +180,13 @@ void rte_dpaa_driver_unregister(struct rte_dpaa_driver *driver);
  * @return
  *	0 in case of success, error otherwise
  */
+__rte_internal
 int rte_dpaa_portal_init(void *arg);
 
+__rte_internal
 int rte_dpaa_portal_fq_init(void *arg, struct qman_fq *fq);
 
+__rte_internal
 int rte_dpaa_portal_fq_close(struct qman_fq *fq);
 
 /**
-- 
2.17.1


^ permalink raw reply	[relevance 1%]

* [dpdk-dev] [PATCH 3/7] bus/fslmc: move internal symbols into INTERNAL section
  2020-05-05 14:08  3% [dpdk-dev] [PATCH 1/7] common/dpaax: move internal symbols into INTERNAL section Hemant Agrawal
  2020-05-05 14:08  3% ` [dpdk-dev] [PATCH 2/7] mempool/dpaa2: " Hemant Agrawal
@ 2020-05-05 14:08  1% ` Hemant Agrawal
  2020-05-05 14:08  1% ` [dpdk-dev] [PATCH 4/7] bus/dpaa: " Hemant Agrawal
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 200+ results
From: Hemant Agrawal @ 2020-05-05 14:08 UTC (permalink / raw)
  To: dev, david.marchand; +Cc: Hemant Agrawal

This patch moves the internal symbols to INTERNAL sections
so that any change in them is not reported as ABI breakage.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/bus/fslmc/fslmc_vfio.h                |  4 ++
 drivers/bus/fslmc/mc/fsl_dpbp.h               |  6 +++
 drivers/bus/fslmc/mc/fsl_dpci.h               |  3 ++
 drivers/bus/fslmc/mc/fsl_dpcon.h              |  2 +
 drivers/bus/fslmc/mc/fsl_dpdmai.h             |  8 ++++
 drivers/bus/fslmc/mc/fsl_dpio.h               |  9 ++++
 drivers/bus/fslmc/mc/fsl_dpmng.h              |  2 +
 drivers/bus/fslmc/mc/fsl_mc_cmd.h             |  1 +
 drivers/bus/fslmc/portal/dpaa2_hw_dpio.h      |  5 +++
 drivers/bus/fslmc/portal/dpaa2_hw_pvt.h       |  8 ++++
 .../bus/fslmc/qbman/include/fsl_qbman_debug.h |  3 ++
 .../fslmc/qbman/include/fsl_qbman_portal.h    | 41 +++++++++++++++++++
 drivers/bus/fslmc/rte_bus_fslmc_version.map   |  3 +-
 drivers/bus/fslmc/rte_fslmc.h                 |  4 ++
 14 files changed, 97 insertions(+), 2 deletions(-)

diff --git a/drivers/bus/fslmc/fslmc_vfio.h b/drivers/bus/fslmc/fslmc_vfio.h
index c988121294..609e48aea3 100644
--- a/drivers/bus/fslmc/fslmc_vfio.h
+++ b/drivers/bus/fslmc/fslmc_vfio.h
@@ -41,7 +41,11 @@ typedef struct fslmc_vfio_container {
 } fslmc_vfio_container;
 
 extern char *fslmc_container;
+
+__rte_internal
 int rte_dpaa2_intr_enable(struct rte_intr_handle *intr_handle, int index);
+
+__rte_internal
 int rte_dpaa2_intr_disable(struct rte_intr_handle *intr_handle, int index);
 
 int rte_dpaa2_vfio_setup_intr(struct rte_intr_handle *intr_handle,
diff --git a/drivers/bus/fslmc/mc/fsl_dpbp.h b/drivers/bus/fslmc/mc/fsl_dpbp.h
index 9d405b42c4..7b537a21be 100644
--- a/drivers/bus/fslmc/mc/fsl_dpbp.h
+++ b/drivers/bus/fslmc/mc/fsl_dpbp.h
@@ -14,6 +14,7 @@
 
 struct fsl_mc_io;
 
+__rte_internal
 int dpbp_open(struct fsl_mc_io *mc_io,
 	      uint32_t cmd_flags,
 	      int dpbp_id,
@@ -42,10 +43,12 @@ int dpbp_destroy(struct fsl_mc_io *mc_io,
 		 uint32_t cmd_flags,
 		 uint32_t obj_id);
 
+__rte_internal
 int dpbp_enable(struct fsl_mc_io *mc_io,
 		uint32_t cmd_flags,
 		uint16_t token);
 
+__rte_internal
 int dpbp_disable(struct fsl_mc_io *mc_io,
 		 uint32_t cmd_flags,
 		 uint16_t token);
@@ -55,6 +58,7 @@ int dpbp_is_enabled(struct fsl_mc_io *mc_io,
 		    uint16_t token,
 		    int *en);
 
+__rte_internal
 int dpbp_reset(struct fsl_mc_io *mc_io,
 	       uint32_t cmd_flags,
 	       uint16_t token);
@@ -70,6 +74,7 @@ struct dpbp_attr {
 	uint16_t bpid;
 };
 
+__rte_internal
 int dpbp_get_attributes(struct fsl_mc_io *mc_io,
 			uint32_t cmd_flags,
 			uint16_t token,
@@ -88,6 +93,7 @@ int dpbp_get_api_version(struct fsl_mc_io *mc_io,
 			 uint16_t *major_ver,
 			 uint16_t *minor_ver);
 
+__rte_internal
 int dpbp_get_num_free_bufs(struct fsl_mc_io *mc_io,
 			   uint32_t cmd_flags,
 			   uint16_t token,
diff --git a/drivers/bus/fslmc/mc/fsl_dpci.h b/drivers/bus/fslmc/mc/fsl_dpci.h
index a0ee5bfe69..81fd3438aa 100644
--- a/drivers/bus/fslmc/mc/fsl_dpci.h
+++ b/drivers/bus/fslmc/mc/fsl_dpci.h
@@ -181,6 +181,7 @@ struct dpci_rx_queue_cfg {
 	int order_preservation_en;
 };
 
+__rte_internal
 int dpci_set_rx_queue(struct fsl_mc_io *mc_io,
 		      uint32_t cmd_flags,
 		      uint16_t token,
@@ -228,6 +229,7 @@ int dpci_get_api_version(struct fsl_mc_io *mc_io,
 			 uint16_t *major_ver,
 			 uint16_t *minor_ver);
 
+__rte_internal
 int dpci_set_opr(struct fsl_mc_io *mc_io,
 		 uint32_t cmd_flags,
 		 uint16_t token,
@@ -235,6 +237,7 @@ int dpci_set_opr(struct fsl_mc_io *mc_io,
 		 uint8_t options,
 		 struct opr_cfg *cfg);
 
+__rte_internal
 int dpci_get_opr(struct fsl_mc_io *mc_io,
 		 uint32_t cmd_flags,
 		 uint16_t token,
diff --git a/drivers/bus/fslmc/mc/fsl_dpcon.h b/drivers/bus/fslmc/mc/fsl_dpcon.h
index af81d51195..7caa6c68a1 100644
--- a/drivers/bus/fslmc/mc/fsl_dpcon.h
+++ b/drivers/bus/fslmc/mc/fsl_dpcon.h
@@ -20,6 +20,7 @@ struct fsl_mc_io;
  */
 #define DPCON_INVALID_DPIO_ID		(int)(-1)
 
+__rte_internal
 int dpcon_open(struct fsl_mc_io *mc_io,
 	       uint32_t cmd_flags,
 	       int dpcon_id,
@@ -77,6 +78,7 @@ struct dpcon_attr {
 	uint8_t num_priorities;
 };
 
+__rte_internal
 int dpcon_get_attributes(struct fsl_mc_io *mc_io,
 			 uint32_t cmd_flags,
 			 uint16_t token,
diff --git a/drivers/bus/fslmc/mc/fsl_dpdmai.h b/drivers/bus/fslmc/mc/fsl_dpdmai.h
index 40469cc139..e7e8a5dda9 100644
--- a/drivers/bus/fslmc/mc/fsl_dpdmai.h
+++ b/drivers/bus/fslmc/mc/fsl_dpdmai.h
@@ -23,11 +23,13 @@ struct fsl_mc_io;
  */
 #define DPDMAI_ALL_QUEUES	(uint8_t)(-1)
 
+__rte_internal
 int dpdmai_open(struct fsl_mc_io *mc_io,
 		uint32_t cmd_flags,
 		int dpdmai_id,
 		uint16_t *token);
 
+__rte_internal
 int dpdmai_close(struct fsl_mc_io *mc_io,
 		 uint32_t cmd_flags,
 		 uint16_t token);
@@ -54,10 +56,12 @@ int dpdmai_destroy(struct fsl_mc_io *mc_io,
 		   uint32_t cmd_flags,
 		   uint32_t object_id);
 
+__rte_internal
 int dpdmai_enable(struct fsl_mc_io *mc_io,
 		  uint32_t cmd_flags,
 		  uint16_t token);
 
+__rte_internal
 int dpdmai_disable(struct fsl_mc_io *mc_io,
 		   uint32_t cmd_flags,
 		   uint16_t token);
@@ -82,6 +86,7 @@ struct dpdmai_attr {
 	uint8_t num_of_queues;
 };
 
+__rte_internal
 int dpdmai_get_attributes(struct fsl_mc_io *mc_io,
 			  uint32_t cmd_flags,
 			  uint16_t token,
@@ -148,6 +153,7 @@ struct dpdmai_rx_queue_cfg {
 
 };
 
+__rte_internal
 int dpdmai_set_rx_queue(struct fsl_mc_io *mc_io,
 			uint32_t cmd_flags,
 			uint16_t token,
@@ -168,6 +174,7 @@ struct dpdmai_rx_queue_attr {
 	uint32_t fqid;
 };
 
+__rte_internal
 int dpdmai_get_rx_queue(struct fsl_mc_io *mc_io,
 			uint32_t cmd_flags,
 			uint16_t token,
@@ -184,6 +191,7 @@ struct dpdmai_tx_queue_attr {
 	uint32_t fqid;
 };
 
+__rte_internal
 int dpdmai_get_tx_queue(struct fsl_mc_io *mc_io,
 			uint32_t cmd_flags,
 			uint16_t token,
diff --git a/drivers/bus/fslmc/mc/fsl_dpio.h b/drivers/bus/fslmc/mc/fsl_dpio.h
index 3158f53191..92e97db94b 100644
--- a/drivers/bus/fslmc/mc/fsl_dpio.h
+++ b/drivers/bus/fslmc/mc/fsl_dpio.h
@@ -13,11 +13,13 @@
 
 struct fsl_mc_io;
 
+__rte_internal
 int dpio_open(struct fsl_mc_io *mc_io,
 	      uint32_t cmd_flags,
 	      int dpio_id,
 	      uint16_t *token);
 
+__rte_internal
 int dpio_close(struct fsl_mc_io *mc_io,
 	       uint32_t cmd_flags,
 	       uint16_t token);
@@ -57,10 +59,12 @@ int dpio_destroy(struct fsl_mc_io *mc_io,
 		 uint32_t cmd_flags,
 		 uint32_t object_id);
 
+__rte_internal
 int dpio_enable(struct fsl_mc_io *mc_io,
 		uint32_t cmd_flags,
 		uint16_t token);
 
+__rte_internal
 int dpio_disable(struct fsl_mc_io *mc_io,
 		 uint32_t cmd_flags,
 		 uint16_t token);
@@ -70,10 +74,12 @@ int dpio_is_enabled(struct fsl_mc_io *mc_io,
 		    uint16_t token,
 		    int *en);
 
+__rte_internal
 int dpio_reset(struct fsl_mc_io *mc_io,
 	       uint32_t cmd_flags,
 	       uint16_t token);
 
+__rte_internal
 int dpio_set_stashing_destination(struct fsl_mc_io *mc_io,
 				  uint32_t cmd_flags,
 				  uint16_t token,
@@ -84,12 +90,14 @@ int dpio_get_stashing_destination(struct fsl_mc_io *mc_io,
 				  uint16_t token,
 				  uint8_t *sdest);
 
+__rte_internal
 int dpio_add_static_dequeue_channel(struct fsl_mc_io *mc_io,
 				    uint32_t cmd_flags,
 				    uint16_t token,
 				    int dpcon_id,
 				    uint8_t *channel_index);
 
+__rte_internal
 int dpio_remove_static_dequeue_channel(struct fsl_mc_io *mc_io,
 				       uint32_t cmd_flags,
 				       uint16_t token,
@@ -119,6 +127,7 @@ struct dpio_attr {
 	uint32_t clk;
 };
 
+__rte_internal
 int dpio_get_attributes(struct fsl_mc_io *mc_io,
 			uint32_t cmd_flags,
 			uint16_t token,
diff --git a/drivers/bus/fslmc/mc/fsl_dpmng.h b/drivers/bus/fslmc/mc/fsl_dpmng.h
index 36c387af27..cdd8506625 100644
--- a/drivers/bus/fslmc/mc/fsl_dpmng.h
+++ b/drivers/bus/fslmc/mc/fsl_dpmng.h
@@ -34,6 +34,7 @@ struct mc_version {
 	uint32_t revision;
 };
 
+__rte_internal
 int mc_get_version(struct fsl_mc_io *mc_io,
 		   uint32_t cmd_flags,
 		   struct mc_version *mc_ver_info);
@@ -48,6 +49,7 @@ struct mc_soc_version {
 	uint32_t pvr;
 };
 
+__rte_internal
 int mc_get_soc_version(struct fsl_mc_io *mc_io,
 		       uint32_t cmd_flags,
 		       struct mc_soc_version *mc_platform_info);
diff --git a/drivers/bus/fslmc/mc/fsl_mc_cmd.h b/drivers/bus/fslmc/mc/fsl_mc_cmd.h
index ac919610cf..06ea41a3b2 100644
--- a/drivers/bus/fslmc/mc/fsl_mc_cmd.h
+++ b/drivers/bus/fslmc/mc/fsl_mc_cmd.h
@@ -80,6 +80,7 @@ enum mc_cmd_status {
 
 #define MC_CMD_HDR_FLAGS_MASK	0xFF00FF00
 
+__rte_internal
 int mc_send_command(struct fsl_mc_io *mc_io, struct mc_command *cmd);
 
 static inline uint64_t mc_encode_cmd_header(uint16_t cmd_id,
diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.h b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.h
index 2829c93806..7c5966241a 100644
--- a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.h
+++ b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.h
@@ -36,20 +36,25 @@ extern uint8_t dpaa2_eqcr_size;
 extern struct dpaa2_io_portal_t dpaa2_io_portal[RTE_MAX_LCORE];
 
 /* Affine a DPIO portal to current processing thread */
+__rte_internal
 int dpaa2_affine_qbman_swp(void);
 
 /* Affine additional DPIO portal to current crypto processing thread */
+__rte_internal
 int dpaa2_affine_qbman_ethrx_swp(void);
 
 /* allocate memory for FQ - dq storage */
+__rte_internal
 int
 dpaa2_alloc_dq_storage(struct queue_storage_info_t *q_storage);
 
 /* free memory for FQ- dq storage */
+__rte_internal
 void
 dpaa2_free_dq_storage(struct queue_storage_info_t *q_storage);
 
 /* free the enqueue response descriptors */
+__rte_internal
 uint32_t
 dpaa2_free_eq_descriptors(void);
 
diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h
index 368fe7c688..33b191f823 100644
--- a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h
+++ b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h
@@ -426,11 +426,19 @@ void set_swp_active_dqs(uint16_t dpio_index, struct qbman_result *dqs)
 {
 	rte_global_active_dqs_list[dpio_index].global_active_dqs = dqs;
 }
+__rte_internal
 struct dpaa2_dpbp_dev *dpaa2_alloc_dpbp_dev(void);
+
+__rte_internal
 void dpaa2_free_dpbp_dev(struct dpaa2_dpbp_dev *dpbp);
+
+__rte_internal
 int dpaa2_dpbp_supported(void);
 
+__rte_internal
 struct dpaa2_dpci_dev *rte_dpaa2_alloc_dpci_dev(void);
+
+__rte_internal
 void rte_dpaa2_free_dpci_dev(struct dpaa2_dpci_dev *dpci);
 
 #endif
diff --git a/drivers/bus/fslmc/qbman/include/fsl_qbman_debug.h b/drivers/bus/fslmc/qbman/include/fsl_qbman_debug.h
index e010b1b6ae..328f2022fc 100644
--- a/drivers/bus/fslmc/qbman/include/fsl_qbman_debug.h
+++ b/drivers/bus/fslmc/qbman/include/fsl_qbman_debug.h
@@ -24,7 +24,10 @@ uint8_t verb;
 	uint8_t reserved2[29];
 };
 
+__rte_internal
 int qbman_fq_query_state(struct qbman_swp *s, uint32_t fqid,
 			 struct qbman_fq_query_np_rslt *r);
+
+__rte_internal
 uint32_t qbman_fq_state_frame_count(const struct qbman_fq_query_np_rslt *r);
 uint32_t qbman_fq_state_byte_count(const struct qbman_fq_query_np_rslt *r);
diff --git a/drivers/bus/fslmc/qbman/include/fsl_qbman_portal.h b/drivers/bus/fslmc/qbman/include/fsl_qbman_portal.h
index 88f0a99686..7ac0f82106 100644
--- a/drivers/bus/fslmc/qbman/include/fsl_qbman_portal.h
+++ b/drivers/bus/fslmc/qbman/include/fsl_qbman_portal.h
@@ -117,6 +117,7 @@ uint32_t qbman_swp_interrupt_read_status(struct qbman_swp *p);
  * @p: the given software portal object.
  * @mask: The value to set in SWP_ISR register.
  */
+__rte_internal
 void qbman_swp_interrupt_clear_status(struct qbman_swp *p, uint32_t mask);
 
 /**
@@ -286,6 +287,7 @@ void qbman_swp_push_get(struct qbman_swp *s, uint8_t channel_idx, int *enabled);
  * rather by specifying the index (from 0 to 15) that has been mapped to the
  * desired channel.
  */
+__rte_internal
 void qbman_swp_push_set(struct qbman_swp *s, uint8_t channel_idx, int enable);
 
 /* ------------------- */
@@ -325,6 +327,7 @@ enum qbman_pull_type_e {
  * default/starting state.
  * @d: the pull dequeue descriptor to be cleared.
  */
+__rte_internal
 void qbman_pull_desc_clear(struct qbman_pull_desc *d);
 
 /**
@@ -340,6 +343,7 @@ void qbman_pull_desc_clear(struct qbman_pull_desc *d);
  * the caller provides in 'storage_phys'), and 'stash' controls whether or not
  * those writes to main-memory express a cache-warming attribute.
  */
+__rte_internal
 void qbman_pull_desc_set_storage(struct qbman_pull_desc *d,
 				 struct qbman_result *storage,
 				 uint64_t storage_phys,
@@ -349,6 +353,7 @@ void qbman_pull_desc_set_storage(struct qbman_pull_desc *d,
  * @d: the pull dequeue descriptor to be set.
  * @numframes: number of frames to be set, must be between 1 and 16, inclusive.
  */
+__rte_internal
 void qbman_pull_desc_set_numframes(struct qbman_pull_desc *d,
 				   uint8_t numframes);
 /**
@@ -372,6 +377,7 @@ void qbman_pull_desc_set_token(struct qbman_pull_desc *d, uint8_t token);
  * qbman_pull_desc_set_fq() - Set fqid from which the dequeue command dequeues.
  * @fqid: the frame queue index of the given FQ.
  */
+__rte_internal
 void qbman_pull_desc_set_fq(struct qbman_pull_desc *d, uint32_t fqid);
 
 /**
@@ -407,6 +413,7 @@ void qbman_pull_desc_set_rad(struct qbman_pull_desc *d, int rad);
  * Return 0 for success, and -EBUSY if the software portal is not ready
  * to do pull dequeue.
  */
+__rte_internal
 int qbman_swp_pull(struct qbman_swp *s, struct qbman_pull_desc *d);
 
 /* -------------------------------- */
@@ -421,12 +428,14 @@ int qbman_swp_pull(struct qbman_swp *s, struct qbman_pull_desc *d);
  * only once, so repeated calls can return a sequence of DQRR entries, without
  * requiring they be consumed immediately or in any particular order.
  */
+__rte_internal
 const struct qbman_result *qbman_swp_dqrr_next(struct qbman_swp *p);
 
 /**
  * qbman_swp_prefetch_dqrr_next() - prefetch the next DQRR entry.
  * @s: the software portal object.
  */
+__rte_internal
 void qbman_swp_prefetch_dqrr_next(struct qbman_swp *s);
 
 /**
@@ -435,6 +444,7 @@ void qbman_swp_prefetch_dqrr_next(struct qbman_swp *s);
  * @s: the software portal object.
  * @dq: the DQRR entry to be consumed.
  */
+__rte_internal
 void qbman_swp_dqrr_consume(struct qbman_swp *s, const struct qbman_result *dq);
 
 /**
@@ -442,6 +452,7 @@ void qbman_swp_dqrr_consume(struct qbman_swp *s, const struct qbman_result *dq);
  * @s: the software portal object.
  * @dqrr_index: the DQRR index entry to be consumed.
  */
+__rte_internal
 void qbman_swp_dqrr_idx_consume(struct qbman_swp *s, uint8_t dqrr_index);
 
 /**
@@ -450,6 +461,7 @@ void qbman_swp_dqrr_idx_consume(struct qbman_swp *s, uint8_t dqrr_index);
  *
  * Return dqrr index.
  */
+__rte_internal
 uint8_t qbman_get_dqrr_idx(const struct qbman_result *dqrr);
 
 /**
@@ -460,6 +472,7 @@ uint8_t qbman_get_dqrr_idx(const struct qbman_result *dqrr);
  *
  * Return dqrr entry object.
  */
+__rte_internal
 struct qbman_result *qbman_get_dqrr_from_idx(struct qbman_swp *s, uint8_t idx);
 
 /* ------------------------------------------------- */
@@ -485,6 +498,7 @@ struct qbman_result *qbman_get_dqrr_from_idx(struct qbman_swp *s, uint8_t idx);
  * Return 1 for getting a valid dequeue result, or 0 for not getting a valid
  * dequeue result.
  */
+__rte_internal
 int qbman_result_has_new_result(struct qbman_swp *s,
 				struct qbman_result *dq);
 
@@ -497,8 +511,10 @@ int qbman_result_has_new_result(struct qbman_swp *s,
  * Return 1 for getting a valid dequeue result, or 0 for not getting a valid
  * dequeue result.
  */
+__rte_internal
 int qbman_check_command_complete(struct qbman_result *dq);
 
+__rte_internal
 int qbman_check_new_result(struct qbman_result *dq);
 
 /* -------------------------------------------------------- */
@@ -624,6 +640,7 @@ int qbman_result_is_FQPN(const struct qbman_result *dq);
  *
  * Return the state field.
  */
+__rte_internal
 uint8_t qbman_result_DQ_flags(const struct qbman_result *dq);
 
 /**
@@ -658,6 +675,7 @@ static inline int qbman_result_DQ_is_pull_complete(
  *
  * Return seqnum.
  */
+__rte_internal
 uint16_t qbman_result_DQ_seqnum(const struct qbman_result *dq);
 
 /**
@@ -667,6 +685,7 @@ uint16_t qbman_result_DQ_seqnum(const struct qbman_result *dq);
  *
  * Return odpid.
  */
+__rte_internal
 uint16_t qbman_result_DQ_odpid(const struct qbman_result *dq);
 
 /**
@@ -699,6 +718,7 @@ uint32_t qbman_result_DQ_frame_count(const struct qbman_result *dq);
  *
  * Return the frame queue context.
  */
+__rte_internal
 uint64_t qbman_result_DQ_fqd_ctx(const struct qbman_result *dq);
 
 /**
@@ -707,6 +727,7 @@ uint64_t qbman_result_DQ_fqd_ctx(const struct qbman_result *dq);
  *
  * Return the frame descriptor.
  */
+__rte_internal
 const struct qbman_fd *qbman_result_DQ_fd(const struct qbman_result *dq);
 
 /* State-change notifications (FQDAN/CDAN/CSCN/...). */
@@ -717,6 +738,7 @@ const struct qbman_fd *qbman_result_DQ_fd(const struct qbman_result *dq);
  *
  * Return the state in the notifiation.
  */
+__rte_internal
 uint8_t qbman_result_SCN_state(const struct qbman_result *scn);
 
 /**
@@ -850,6 +872,7 @@ struct qbman_eq_response {
  * default/starting state.
  * @d: the given enqueue descriptor.
  */
+__rte_internal
 void qbman_eq_desc_clear(struct qbman_eq_desc *d);
 
 /* Exactly one of the following descriptor "actions" should be set. (Calling
@@ -870,6 +893,7 @@ void qbman_eq_desc_clear(struct qbman_eq_desc *d);
  * @response_success: 1 = enqueue with response always; 0 = enqueue with
  * rejections returned on a FQ.
  */
+__rte_internal
 void qbman_eq_desc_set_no_orp(struct qbman_eq_desc *d, int respond_success);
 /**
  * qbman_eq_desc_set_orp() - Set order-resotration in the enqueue descriptor
@@ -881,6 +905,7 @@ void qbman_eq_desc_set_no_orp(struct qbman_eq_desc *d, int respond_success);
  * @incomplete: indiates whether this is the last fragments using the same
  * sequeue number.
  */
+__rte_internal
 void qbman_eq_desc_set_orp(struct qbman_eq_desc *d, int respond_success,
 			   uint16_t opr_id, uint16_t seqnum, int incomplete);
 
@@ -915,6 +940,7 @@ void qbman_eq_desc_set_orp_nesn(struct qbman_eq_desc *d, uint16_t opr_id,
  * data structure.) 'stash' controls whether or not the write to main-memory
  * expresses a cache-warming attribute.
  */
+__rte_internal
 void qbman_eq_desc_set_response(struct qbman_eq_desc *d,
 				uint64_t storage_phys,
 				int stash);
@@ -929,6 +955,7 @@ void qbman_eq_desc_set_response(struct qbman_eq_desc *d,
  * result "storage" before issuing an enqueue, and use any non-zero 'token'
  * value.
  */
+__rte_internal
 void qbman_eq_desc_set_token(struct qbman_eq_desc *d, uint8_t token);
 
 /**
@@ -944,6 +971,7 @@ void qbman_eq_desc_set_token(struct qbman_eq_desc *d, uint8_t token);
  * @d: the enqueue descriptor
  * @fqid: the id of the frame queue to be enqueued.
  */
+__rte_internal
 void qbman_eq_desc_set_fq(struct qbman_eq_desc *d, uint32_t fqid);
 
 /**
@@ -953,6 +981,7 @@ void qbman_eq_desc_set_fq(struct qbman_eq_desc *d, uint32_t fqid);
  * @qd_bin: the queuing destination bin
  * @qd_prio: the queuing destination priority.
  */
+__rte_internal
 void qbman_eq_desc_set_qd(struct qbman_eq_desc *d, uint32_t qdid,
 			  uint16_t qd_bin, uint8_t qd_prio);
 
@@ -978,6 +1007,7 @@ void qbman_eq_desc_set_eqdi(struct qbman_eq_desc *d, int enable);
  * held-active (order-preserving) FQ, whether the FQ should be parked instead of
  * being rescheduled.)
  */
+__rte_internal
 void qbman_eq_desc_set_dca(struct qbman_eq_desc *d, int enable,
 			   uint8_t dqrr_idx, int park);
 
@@ -987,6 +1017,7 @@ void qbman_eq_desc_set_dca(struct qbman_eq_desc *d, int enable,
  *
  * Return the fd pointer.
  */
+__rte_internal
 struct qbman_fd *qbman_result_eqresp_fd(struct qbman_result *eqresp);
 
 /**
@@ -997,6 +1028,7 @@ struct qbman_fd *qbman_result_eqresp_fd(struct qbman_result *eqresp);
  * This value is set into the response id before the enqueue command, which,
  * get overwritten by qbman once the enqueue command is complete.
  */
+__rte_internal
 void qbman_result_eqresp_set_rspid(struct qbman_result *eqresp, uint8_t val);
 
 /**
@@ -1009,6 +1041,7 @@ void qbman_result_eqresp_set_rspid(struct qbman_result *eqresp, uint8_t val);
  * copied into the enqueue response to determine if the command has been
  * completed, and response has been updated.
  */
+__rte_internal
 uint8_t qbman_result_eqresp_rspid(struct qbman_result *eqresp);
 
 /**
@@ -1017,6 +1050,7 @@ uint8_t qbman_result_eqresp_rspid(struct qbman_result *eqresp);
  *
  * Return 0 when command is sucessful.
  */
+__rte_internal
 uint8_t qbman_result_eqresp_rc(struct qbman_result *eqresp);
 
 /**
@@ -1043,6 +1077,7 @@ int qbman_swp_enqueue(struct qbman_swp *s, const struct qbman_eq_desc *d,
  *
  * Return the number of enqueued frames, -EBUSY if the EQCR is not ready.
  */
+__rte_internal
 int qbman_swp_enqueue_multiple(struct qbman_swp *s,
 			       const struct qbman_eq_desc *d,
 			       const struct qbman_fd *fd,
@@ -1060,6 +1095,7 @@ int qbman_swp_enqueue_multiple(struct qbman_swp *s,
  *
  * Return the number of enqueued frames, -EBUSY if the EQCR is not ready.
  */
+__rte_internal
 int qbman_swp_enqueue_multiple_fd(struct qbman_swp *s,
 				  const struct qbman_eq_desc *d,
 				  struct qbman_fd **fd,
@@ -1076,6 +1112,7 @@ int qbman_swp_enqueue_multiple_fd(struct qbman_swp *s,
  *
  * Return the number of enqueued frames, -EBUSY if the EQCR is not ready.
  */
+__rte_internal
 int qbman_swp_enqueue_multiple_desc(struct qbman_swp *s,
 				    const struct qbman_eq_desc *d,
 				    const struct qbman_fd *fd,
@@ -1117,12 +1154,14 @@ struct qbman_release_desc {
  * default/starting state.
  * @d: the qbman release descriptor.
  */
+__rte_internal
 void qbman_release_desc_clear(struct qbman_release_desc *d);
 
 /**
  * qbman_release_desc_set_bpid() - Set the ID of the buffer pool to release to
  * @d: the qbman release descriptor.
  */
+__rte_internal
 void qbman_release_desc_set_bpid(struct qbman_release_desc *d, uint16_t bpid);
 
 /**
@@ -1141,6 +1180,7 @@ void qbman_release_desc_set_rcdi(struct qbman_release_desc *d, int enable);
  *
  * Return 0 for success, -EBUSY if the release command ring is not ready.
  */
+__rte_internal
 int qbman_swp_release(struct qbman_swp *s, const struct qbman_release_desc *d,
 		      const uint64_t *buffers, unsigned int num_buffers);
 
@@ -1166,6 +1206,7 @@ int qbman_swp_release_thresh(struct qbman_swp *s, unsigned int thresh);
  * Return 0 for success, or negative error code if the acquire command
  * fails.
  */
+__rte_internal
 int qbman_swp_acquire(struct qbman_swp *s, uint16_t bpid, uint64_t *buffers,
 		      unsigned int num_buffers);
 
diff --git a/drivers/bus/fslmc/rte_bus_fslmc_version.map b/drivers/bus/fslmc/rte_bus_fslmc_version.map
index fe45575046..0eb40d39eb 100644
--- a/drivers/bus/fslmc/rte_bus_fslmc_version.map
+++ b/drivers/bus/fslmc/rte_bus_fslmc_version.map
@@ -1,4 +1,4 @@
-DPDK_20.0 {
+INTERNAL {
 	global:
 
 	dpaa2_affine_qbman_ethrx_swp;
@@ -101,7 +101,6 @@ DPDK_20.0 {
 	rte_fslmc_driver_unregister;
 	rte_fslmc_get_device_count;
 	rte_fslmc_object_register;
-	rte_fslmc_vfio_dmamap;
 	rte_global_active_dqs_list;
 	rte_mcp_ptr_list;
 
diff --git a/drivers/bus/fslmc/rte_fslmc.h b/drivers/bus/fslmc/rte_fslmc.h
index 96ba8dc259..5078b48ee1 100644
--- a/drivers/bus/fslmc/rte_fslmc.h
+++ b/drivers/bus/fslmc/rte_fslmc.h
@@ -162,6 +162,7 @@ RTE_DECLARE_PER_LCORE(struct dpaa2_portal_dqrr, dpaa2_held_bufs);
  *   A pointer to a rte_dpaa2_driver structure describing the driver
  *   to be registered.
  */
+__rte_internal
 void rte_fslmc_driver_register(struct rte_dpaa2_driver *driver);
 
 /**
@@ -171,6 +172,7 @@ void rte_fslmc_driver_register(struct rte_dpaa2_driver *driver);
  *   A pointer to a rte_dpaa2_driver structure describing the driver
  *   to be unregistered.
  */
+__rte_internal
 void rte_fslmc_driver_unregister(struct rte_dpaa2_driver *driver);
 
 /** Helper for DPAA2 device registration from driver (eth, crypto) instance */
@@ -189,6 +191,7 @@ RTE_PMD_EXPORT_NAME(nm, __COUNTER__)
  *   A pointer to a rte_dpaa_object structure describing the mc object
  *   to be registered.
  */
+__rte_internal
 void rte_fslmc_object_register(struct rte_dpaa2_object *object);
 
 /**
@@ -200,6 +203,7 @@ void rte_fslmc_object_register(struct rte_dpaa2_object *object);
  *   >=0 for count; 0 indicates either no device of the said type scanned or
  *   invalid device type.
  */
+__rte_internal
 uint32_t rte_fslmc_get_device_count(enum rte_dpaa2_dev_type device_type);
 
 /** Helper for DPAA2 object registration */
-- 
2.17.1


^ permalink raw reply	[relevance 1%]

* [dpdk-dev] [PATCH 2/7] mempool/dpaa2: move internal symbols into INTERNAL section
  2020-05-05 14:08  3% [dpdk-dev] [PATCH 1/7] common/dpaax: move internal symbols into INTERNAL section Hemant Agrawal
@ 2020-05-05 14:08  3% ` Hemant Agrawal
  2020-05-05 14:08  1% ` [dpdk-dev] [PATCH 3/7] bus/fslmc: " Hemant Agrawal
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 200+ results
From: Hemant Agrawal @ 2020-05-05 14:08 UTC (permalink / raw)
  To: dev, david.marchand; +Cc: Hemant Agrawal

This patch moves the internal symbols to INTERNAL sections
so that any change in them is not reported as ABI breakage.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/mempool/dpaa/rte_mempool_dpaa_version.map   | 2 +-
 drivers/mempool/dpaa2/dpaa2_hw_mempool.h            | 1 +
 drivers/mempool/dpaa2/rte_mempool_dpaa2_version.map | 9 +++++++--
 3 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/drivers/mempool/dpaa/rte_mempool_dpaa_version.map b/drivers/mempool/dpaa/rte_mempool_dpaa_version.map
index 9eebaf7ffd..142547ee38 100644
--- a/drivers/mempool/dpaa/rte_mempool_dpaa_version.map
+++ b/drivers/mempool/dpaa/rte_mempool_dpaa_version.map
@@ -1,4 +1,4 @@
-DPDK_20.0 {
+INTERNAL {
 	global:
 
 	rte_dpaa_bpid_info;
diff --git a/drivers/mempool/dpaa2/dpaa2_hw_mempool.h b/drivers/mempool/dpaa2/dpaa2_hw_mempool.h
index fa0f2280d5..53fa1552d1 100644
--- a/drivers/mempool/dpaa2/dpaa2_hw_mempool.h
+++ b/drivers/mempool/dpaa2/dpaa2_hw_mempool.h
@@ -61,6 +61,7 @@ struct dpaa2_bp_info {
 
 extern struct dpaa2_bp_info *rte_dpaa2_bpid_info;
 
+__rte_internal
 int rte_dpaa2_mbuf_alloc_bulk(struct rte_mempool *pool,
 		       void **obj_table, unsigned int count);
 
diff --git a/drivers/mempool/dpaa2/rte_mempool_dpaa2_version.map b/drivers/mempool/dpaa2/rte_mempool_dpaa2_version.map
index cd4bc88273..686b024624 100644
--- a/drivers/mempool/dpaa2/rte_mempool_dpaa2_version.map
+++ b/drivers/mempool/dpaa2/rte_mempool_dpaa2_version.map
@@ -1,10 +1,15 @@
 DPDK_20.0 {
 	global:
 
-	rte_dpaa2_bpid_info;
-	rte_dpaa2_mbuf_alloc_bulk;
 	rte_dpaa2_mbuf_from_buf_addr;
 	rte_dpaa2_mbuf_pool_bpid;
 
 	local: *;
 };
+
+INTERNAL {
+	global:
+
+	rte_dpaa2_bpid_info;
+	rte_dpaa2_mbuf_alloc_bulk;
+};
-- 
2.17.1


^ permalink raw reply	[relevance 3%]

* [dpdk-dev] [PATCH 1/7] common/dpaax: move internal symbols into INTERNAL section
@ 2020-05-05 14:08  3% Hemant Agrawal
  2020-05-05 14:08  3% ` [dpdk-dev] [PATCH 2/7] mempool/dpaa2: " Hemant Agrawal
                   ` (7 more replies)
  0 siblings, 8 replies; 200+ results
From: Hemant Agrawal @ 2020-05-05 14:08 UTC (permalink / raw)
  To: dev, david.marchand; +Cc: Hemant Agrawal

This patch moves the internal symbols to INTERNAL sections
so that any change in them is not reported as ABI breakage.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/common/dpaax/dpaa_of.h                    | 15 +++++++++++++++
 drivers/common/dpaax/dpaax_iova_table.h           |  4 ++++
 drivers/common/dpaax/rte_common_dpaax_version.map |  2 +-
 3 files changed, 20 insertions(+), 1 deletion(-)

diff --git a/drivers/common/dpaax/dpaa_of.h b/drivers/common/dpaax/dpaa_of.h
index 960b421766..38d91a1afe 100644
--- a/drivers/common/dpaax/dpaa_of.h
+++ b/drivers/common/dpaax/dpaa_of.h
@@ -24,6 +24,7 @@
 #include <limits.h>
 #include <rte_common.h>
 #include <dpaa_list.h>
+#include <rte_compat.h>
 
 #ifndef OF_INIT_DEFAULT_PATH
 #define OF_INIT_DEFAULT_PATH "/proc/device-tree"
@@ -102,6 +103,7 @@ struct dt_file {
 	uint64_t buf[OF_FILE_BUF_MAX >> 3];
 };
 
+__rte_internal
 const struct device_node *of_find_compatible_node(
 					const struct device_node *from,
 					const char *type __rte_unused,
@@ -113,32 +115,44 @@ const struct device_node *of_find_compatible_node(
 		dev_node != NULL; \
 		dev_node = of_find_compatible_node(dev_node, type, compatible))
 
+__rte_internal
 const void *of_get_property(const struct device_node *from, const char *name,
 			    size_t *lenp) __attribute__((nonnull(2)));
+__rte_internal
 bool of_device_is_available(const struct device_node *dev_node);
 
+
+__rte_internal
 const struct device_node *of_find_node_by_phandle(uint64_t ph);
 
+__rte_internal
 const struct device_node *of_get_parent(const struct device_node *dev_node);
 
+__rte_internal
 const struct device_node *of_get_next_child(const struct device_node *dev_node,
 					    const struct device_node *prev);
 
+__rte_internal
 const void *of_get_mac_address(const struct device_node *np);
 
 #define for_each_child_node(parent, child) \
 	for (child = of_get_next_child(parent, NULL); child != NULL; \
 			child = of_get_next_child(parent, child))
 
+
+__rte_internal
 uint32_t of_n_addr_cells(const struct device_node *dev_node);
 uint32_t of_n_size_cells(const struct device_node *dev_node);
 
+__rte_internal
 const uint32_t *of_get_address(const struct device_node *dev_node, size_t idx,
 			       uint64_t *size, uint32_t *flags);
 
+__rte_internal
 uint64_t of_translate_address(const struct device_node *dev_node,
 			      const uint32_t *addr) __attribute__((nonnull));
 
+__rte_internal
 bool of_device_is_compatible(const struct device_node *dev_node,
 			     const char *compatible);
 
@@ -146,6 +160,7 @@ bool of_device_is_compatible(const struct device_node *dev_node,
  * subsystem that is device-tree-dependent. Eg. Qman/Bman, config layers, etc.
  * The path should usually be "/proc/device-tree".
  */
+__rte_internal
 int of_init_path(const char *dt_path);
 
 /* of_finish() allows a controlled tear-down of the device-tree layer, eg. if a
diff --git a/drivers/common/dpaax/dpaax_iova_table.h b/drivers/common/dpaax/dpaax_iova_table.h
index fc3b9e7a8f..230fba8ba0 100644
--- a/drivers/common/dpaax/dpaax_iova_table.h
+++ b/drivers/common/dpaax/dpaax_iova_table.h
@@ -61,9 +61,13 @@ extern struct dpaax_iova_table *dpaax_iova_table_p;
 #define DPAAX_MEM_SPLIT_MASK_OFF (DPAAX_MEM_SPLIT - 1) /**< Offset */
 
 /* APIs exposed */
+__rte_internal
 int dpaax_iova_table_populate(void);
+__rte_internal
 void dpaax_iova_table_depopulate(void);
+__rte_internal
 int dpaax_iova_table_update(phys_addr_t paddr, void *vaddr, size_t length);
+__rte_internal
 void dpaax_iova_table_dump(void);
 
 static inline void *dpaax_iova_table_get_va(phys_addr_t paddr) __rte_hot;
diff --git a/drivers/common/dpaax/rte_common_dpaax_version.map b/drivers/common/dpaax/rte_common_dpaax_version.map
index f72eba761d..ad2b2b3fec 100644
--- a/drivers/common/dpaax/rte_common_dpaax_version.map
+++ b/drivers/common/dpaax/rte_common_dpaax_version.map
@@ -1,4 +1,4 @@
-DPDK_20.0 {
+INTERNAL {
 	global:
 
 	dpaax_iova_table_depopulate;
-- 
2.17.1


^ permalink raw reply	[relevance 3%]

* Re: [dpdk-dev] [PATCH v1 1/3] devtools: create internal ignore file for libabigail
  2020-05-05 11:20 10% [dpdk-dev] [PATCH v1 1/3] devtools: create internal ignore file for libabigail Ophir Munk
@ 2020-05-05 11:45  0% ` Matan Azrad
  2020-05-05 14:53  0% ` David Marchand
    2 siblings, 0 replies; 200+ results
From: Matan Azrad @ 2020-05-05 11:45 UTC (permalink / raw)
  To: Ophir Munk, dev; +Cc: Ophir Munk, Raslan Darawsheh, Neil Horman



From: Ophir Munk
> Create file libabigail.internalignore where it is specified to ignore all symbols
> in library file librte_pmd_mlx.* during an ABI check.
> 
> Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>

^ permalink raw reply	[relevance 0%]

* [dpdk-dev] [PATCH v1 1/3] devtools: create internal ignore file for libabigail
@ 2020-05-05 11:20 10% Ophir Munk
  2020-05-05 11:45  0% ` Matan Azrad
                   ` (2 more replies)
  0 siblings, 3 replies; 200+ results
From: Ophir Munk @ 2020-05-05 11:20 UTC (permalink / raw)
  To: dev; +Cc: Ophir Munk, Raslan Darawsheh, Matan Azrad, Neil Horman

Create file libabigail.internalignore where it is specified to ignore
all symbols in library file librte_pmd_mlx.* during an ABI check.

Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
---
 devtools/check-abi.sh              | 4 +++-
 devtools/libabigail.internalignore | 4 ++++
 2 files changed, 7 insertions(+), 1 deletion(-)
 create mode 100644 devtools/libabigail.internalignore

diff --git a/devtools/check-abi.sh b/devtools/check-abi.sh
index dd9120e..3bad19a 100755
--- a/devtools/check-abi.sh
+++ b/devtools/check-abi.sh
@@ -10,7 +10,9 @@ fi
 refdir=$1
 newdir=$2
 warnonly=${3:-}
-ABIDIFF_OPTIONS="--suppr $(dirname $0)/libabigail.abignore --no-added-syms"
+ABIDIFF_OPTIONS="--suppr $(dirname $0))/libabigail.abignore" \
+		" --suppr $(dirname $0))/libabigail.internalignore" \
+		" --no-added-syms"
 
 if [ ! -d $refdir ]; then
 	echo "Error: reference directory '$refdir' does not exist."
diff --git a/devtools/libabigail.internalignore b/devtools/libabigail.internalignore
new file mode 100644
index 0000000..55df5b1
--- /dev/null
+++ b/devtools/libabigail.internalignore
@@ -0,0 +1,4 @@
+; These functions were moved from stable to internal.
+; This is a temporary exception till DPDK 20.11.
+[suppress_file]
+        file_name_regexp = librte*mlx5*
-- 
2.8.4


^ permalink raw reply	[relevance 10%]

* [dpdk-dev] [PATCH v12 0/2] support for VFIO-PCI VF token interface
    2020-05-05  7:46  4% ` [dpdk-dev] [PATCH v11 0/2] support for VFIO-PCI VF token interface Haiyue Wang
@ 2020-05-05 10:34  4% ` Haiyue Wang
  2020-05-06 11:35  4% ` [dpdk-dev] [PATCH v13 " Haiyue Wang
  2 siblings, 0 replies; 200+ results
From: Haiyue Wang @ 2020-05-05 10:34 UTC (permalink / raw)
  To: dev, anatoly.burakov, thomas, jerinj, david.marchand; +Cc: Haiyue Wang

v12: support to vfio devices with VF token and no token.

v11: Use the eal parameter to pass the VF token, then not every PCI
     device needs to be specified with this token. Also no ABI issue
     now.

v10: Use the __rte_internal to mark the internal API changing.

v9: Rewrite the document.

v8: Update the document.

v7: Add the Fixes tag in uuid, the release note and help
    document.

v6: Drop the Fixes tag in uuid, since the file has been
    moved to another place, not suitable to apply on stable.
    And this is not a bug, just some kind of enhancement.

v5: 1. Add the VF token parse error handling.
    2. Split into two patches for different logic module.
    3. Add more comments into the code for explaining the design.
    4. Drop the ABI change workaround, this patch set focuses on code review.

v4: 1. Ignore rte_vfio_setup_device ABI check since it is
       for Linux driver use.

v3: Fix the Travis build failed:
           (1). rte_uuid.h:97:55: error: unknown type name ‘size_t’
           (2). rte_uuid.h:58:2: error: implicit declaration of function ‘memcpy’

v2: Fix the FreeBSD build error.

v1: Update the commit message.

RFC v2:
         Based on Vamsi's RFC v1, and Alex's patch for Qemu
        [https://lore.kernel.org/lkml/20200204161737.34696b91@w520.home/]: 
       Use the devarg to pass-down the VF token.

RFC v1: https://patchwork.dpdk.org/patch/66281/ by Vamsi.

Haiyue Wang (2):
  eal: add uuid dependent header files explicitly
  eal: support for VFIO-PCI VF token

 doc/guides/linux_gsg/linux_drivers.rst        | 35 ++++++++++++++++++-
 doc/guides/linux_gsg/linux_eal_parameters.rst |  4 +++
 doc/guides/rel_notes/release_20_05.rst        |  6 ++++
 lib/librte_eal/common/eal_common_options.c    |  2 ++
 lib/librte_eal/common/eal_internal_cfg.h      |  2 ++
 lib/librte_eal/common/eal_options.h           |  2 ++
 lib/librte_eal/freebsd/eal.c                  |  5 +++
 lib/librte_eal/include/rte_eal.h              | 12 +++++++
 lib/librte_eal/include/rte_uuid.h             |  2 ++
 lib/librte_eal/linux/eal.c                    | 29 +++++++++++++++
 lib/librte_eal/linux/eal_vfio.c               | 19 ++++++++++
 lib/librte_eal/rte_eal_version.map            |  1 +
 12 files changed, 118 insertions(+), 1 deletion(-)

-- 
2.26.2


^ permalink raw reply	[relevance 4%]

* Re: [dpdk-dev] [dpdk-stable] [PATCH] common/octeontx: fix GCC 9.1 ABI break
  2020-05-04  9:17  4% ` Harman Kalra
@ 2020-05-05 10:33  4%   ` Ferruh Yigit
  2020-05-06 21:51  4%     ` Thomas Monjalon
  0 siblings, 1 reply; 200+ results
From: Ferruh Yigit @ 2020-05-05 10:33 UTC (permalink / raw)
  To: Harman Kalra, pbhagavatula; +Cc: jerinj, thomas, dev, stable

On 5/4/2020 10:17 AM, Harman Kalra wrote:
> On Sat, May 02, 2020 at 09:40:31PM +0530, pbhagavatula@marvell.com wrote:
>> From: Pavan Nikhilesh <pbhagavatula@marvell.com>
>>
>> GCC 9.1 fixes a bug with passing bitfields as pass by value in function
>> parameters and generates a warning for the same as below:
>>
>> drivers/common/octeontx/octeontx_mbox.c:282:1: note: parameter passing
>> for argument of type ‘struct mbox_intf_ver’ changed in GCC 9.1
>>
>> Fix the warning generated by passing bitfield as pass by reference.
>>
>> Fixes: b4134b2d31cc ("common/octeontx: update mbox to version 1.1.3")
>> Cc: stable@dpdk.org
>>
>> Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
> 
> Acked-by: Harman Kalra <hkalra@marvell.com>
> 

Tested-by: Ferruh Yigit <ferruh.yigit@intel.com>

^ permalink raw reply	[relevance 4%]

* [dpdk-dev] [PATCH v2] abi: document reasons behind the three part versioning
    2020-05-04 21:46  4% ` Thomas Monjalon
@ 2020-05-05  8:56 19% ` Ray Kinsella
  1 sibling, 0 replies; 200+ results
From: Ray Kinsella @ 2020-05-05  8:56 UTC (permalink / raw)
  To: dev
  Cc: stable, thomas, Ray Kinsella, Bruce Richardson, Neil Horman,
	John McNamara, Marko Kovacevic

Clarify the reasons behind the three part version numbering scheme.
Documents the fixes made in f26c2b3.

Fixes: f26c2b39b271 ("build: fix soname info for 19.11 compatibility")

Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
v2:
* Added "fixes" to commit message.

 doc/guides/contributing/abi_policy.rst |  3 ++-
 doc/guides/rel_notes/release_20_05.rst | 12 ++++++++++++
 2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/doc/guides/contributing/abi_policy.rst b/doc/guides/contributing/abi_policy.rst
index 05ca959..86e7dd9 100644
--- a/doc/guides/contributing/abi_policy.rst
+++ b/doc/guides/contributing/abi_policy.rst
@@ -39,7 +39,8 @@ General Guidelines
    releases, over a number of release cycles. This change begins with
    maintaining ABI stability through one year of DPDK releases starting from
    DPDK 19.11. This policy will be reviewed in 2020, with intention of
-   lengthening the stability period.
+   lengthening the stability period. Additional implementation detail can be
+   found in the :ref:`release notes <20_05_abi_changes>`.

 What is an ABI?
 ~~~~~~~~~~~~~~~
diff --git a/doc/guides/rel_notes/release_20_05.rst b/doc/guides/rel_notes/release_20_05.rst
index ab20a7d..b2839dc 100644
--- a/doc/guides/rel_notes/release_20_05.rst
+++ b/doc/guides/rel_notes/release_20_05.rst
@@ -245,6 +245,7 @@ API Changes
   ``rte_mempool_populate_virt()`` changed to return 0 instead of -EINVAL
   when there is not enough room to store one object.

+.. _20_05_abi_changes:

 ABI Changes
 -----------
@@ -261,6 +262,17 @@ ABI Changes
    Also, make sure to start the actual text at the margin.
    =========================================================

+* The soname for each stable ABI version should be just the ABI version major
+  number without the minor number. Unfortunately both major and minor were used
+  in the v19.11 release, causing version v20.x releases to be incompatible with
+  ABI v20.0.
+
+  The `commit f26c2b3
+  <https://git.dpdk.org/dpdk/commit/?id=f26c2b39b271cdcd857ba518c5e48c78cb1c30af>`_
+  fixed the issue by switching from 2-part to 3-part ABI version numbers so that
+  we can keep v20.0 as soname and using the final digits to identify the DPDK
+  20.x releases which are ABI compatible.
+
 * No ABI change that would break compatibility with DPDK 20.02 and 19.11.


--
2.7.4

^ permalink raw reply	[relevance 19%]

* Re: [dpdk-dev] [PATCH v2] doc: deprication notice to mark tm spec as experimental
  2020-05-05  8:07  5% ` [dpdk-dev] [PATCH v2] " Nithin Dabilpuram
  2020-05-05  8:10  0%   ` Ray Kinsella
@ 2020-05-05  8:55  0%   ` Dumitrescu, Cristian
  1 sibling, 0 replies; 200+ results
From: Dumitrescu, Cristian @ 2020-05-05  8:55 UTC (permalink / raw)
  To: Nithin Dabilpuram, Yigit, Ferruh, Richardson, Bruce, thomas,
	bluca, Singh, Jasvinder, arybchenko, Kinsella, Ray, nhorman,
	ktraynor, david.marchand, Mcnamara, John, Kovacevic, Marko
  Cc: dev, jerinj, kkanas, Nithin Dabilpuram



> -----Original Message-----
> From: Nithin Dabilpuram <nithind1988@gmail.com>
> Sent: Tuesday, May 5, 2020 9:08 AM
> To: Yigit, Ferruh <ferruh.yigit@intel.com>; Richardson, Bruce
> <bruce.richardson@intel.com>; Dumitrescu, Cristian
> <cristian.dumitrescu@intel.com>; thomas@monjalon.net;
> bluca@debian.org; Singh, Jasvinder <jasvinder.singh@intel.com>;
> arybchenko@solarflare.com; Kinsella, Ray <ray.kinsella@intel.com>;
> nhorman@tuxdriver.com; ktraynor@redhat.com;
> david.marchand@redhat.com; Mcnamara, John
> <john.mcnamara@intel.com>; Kovacevic, Marko
> <marko.kovacevic@intel.com>
> Cc: dev@dpdk.org; jerinj@marvell.com; kkanas@marvell.com; Nithin
> Dabilpuram <ndabilpuram@marvell.com>
> Subject: [PATCH v2] doc: deprication notice to mark tm spec as experimental
> 
> From: Nithin Dabilpuram <ndabilpuram@marvell.com>
> 
> Based on the discussion in mail thread, it is concluded that
> all traffic manager API's (rte_tm.h) need to be marked experimental
> till few more releases to support further improvements to spec.
> 
> https://mails.dpdk.org/archives/dev/2020-April/164970.html
> 
> Adding deprication notice for the same in advance.
> 
> Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
> ---
>  doc/guides/rel_notes/deprecation.rst | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/doc/guides/rel_notes/deprecation.rst
> b/doc/guides/rel_notes/deprecation.rst
> index 1339f54..2c76f36 100644
> --- a/doc/guides/rel_notes/deprecation.rst
> +++ b/doc/guides/rel_notes/deprecation.rst
> @@ -118,3 +118,10 @@ Deprecation Notices
>    Python 2 support will be completely removed in 20.11.
>    In 20.08, explicit deprecation warnings will be displayed when running
>    scripts with Python 2.
> +
> +* traffic manager: All traffic manager API's in ``rte_tm.h`` were mistakenly
> made
> +  abi stable in the v19.11 release. The TM maintainer and other contributor's
> have
> +  agreed to keep the TM API's as experimental in expectation of additional
> spec
> +  improvements. Therefore, all API's in ``rte_tm.h`` will be marked back as
> +  experimental in v20.11 DPDK release. For more details, please see `the
> thread
> +  <https://mails.dpdk.org/archives/dev/2020-April/164970.html>`_.
> --
> 2.8.4

Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>


^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [PATCH v1] abi: document reasons behind the three part versioning
  2020-05-05  8:07  4%   ` Ray Kinsella
@ 2020-05-05  8:31  4%     ` Thomas Monjalon
  0 siblings, 0 replies; 200+ results
From: Thomas Monjalon @ 2020-05-05  8:31 UTC (permalink / raw)
  To: Ray Kinsella
  Cc: dev, ferruh.yigit, Bruce Richardson, John McNamara, Marko Kovacevic

05/05/2020 10:07, Ray Kinsella:
> On 04/05/2020 22:46, Thomas Monjalon wrote:
> > 23/04/2020 12:12, Ray Kinsella:
> >> Clarify the reasons behind the three part version numbering scheme.
> >> Documents the fixes made in f26c2b3.
> > 
> > Please add these lines:
> > Fixes: f26c2b39b271 ("build: fix soname info for 19.11 compatibility")
> > Cc: stable@dpdk.org
> > 
> > 
> >> Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
> >> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> >> ---
> >> --- a/doc/guides/contributing/abi_policy.rst
> >> +++ b/doc/guides/contributing/abi_policy.rst
> >> +   lengthening the stability period. Additional implementation detail can be
> >> +   found in the :ref:`release notes <20_05_abi_changes>`.
> > 
> > The three part version was done in 20.02.
> > I think you should update the 20.02 release notes instead of 20.05.
> > 
> 
> I agreed, 
> However I didn't think that was possible on a quarterly, after the release was formally complete.
> Wouldn't that involve either a respin or a .1 ?

Yes please respin a v2




^ permalink raw reply	[relevance 4%]

* Re: [dpdk-dev] [PATCH v2] doc: deprication notice to mark tm spec as experimental
  2020-05-05  8:07  5% ` [dpdk-dev] [PATCH v2] " Nithin Dabilpuram
@ 2020-05-05  8:10  0%   ` Ray Kinsella
  2020-05-05  8:55  0%   ` Dumitrescu, Cristian
  1 sibling, 0 replies; 200+ results
From: Ray Kinsella @ 2020-05-05  8:10 UTC (permalink / raw)
  To: Nithin Dabilpuram, ferruh.yigit, bruce.richardson,
	cristian.dumitrescu, thomas, bluca, jasvinder.singh, arybchenko,
	ray.kinsella, nhorman, ktraynor, david.marchand, John McNamara,
	Marko Kovacevic
  Cc: dev, jerinj, kkanas, Nithin Dabilpuram



On 05/05/2020 09:07, Nithin Dabilpuram wrote:
> From: Nithin Dabilpuram <ndabilpuram@marvell.com>
> 
> Based on the discussion in mail thread, it is concluded that
> all traffic manager API's (rte_tm.h) need to be marked experimental
> till few more releases to support further improvements to spec.
> 
> https://mails.dpdk.org/archives/dev/2020-April/164970.html
> 
> Adding deprication notice for the same in advance.
> 
> Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
> ---
>  doc/guides/rel_notes/deprecation.rst | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
> index 1339f54..2c76f36 100644
> --- a/doc/guides/rel_notes/deprecation.rst
> +++ b/doc/guides/rel_notes/deprecation.rst
> @@ -118,3 +118,10 @@ Deprecation Notices
>    Python 2 support will be completely removed in 20.11.
>    In 20.08, explicit deprecation warnings will be displayed when running
>    scripts with Python 2.
> +
> +* traffic manager: All traffic manager API's in ``rte_tm.h`` were mistakenly made
> +  abi stable in the v19.11 release. The TM maintainer and other contributor's have
> +  agreed to keep the TM API's as experimental in expectation of additional spec
> +  improvements. Therefore, all API's in ``rte_tm.h`` will be marked back as
> +  experimental in v20.11 DPDK release. For more details, please see `the thread
> +  <https://mails.dpdk.org/archives/dev/2020-April/164970.html>`_.
> 

Acked-by: Ray Kinsella <mdr@ashroe.eu>

^ permalink raw reply	[relevance 0%]

* [dpdk-dev] [PATCH v2] doc: deprication notice to mark tm spec as experimental
    2020-05-05  6:47  3% ` Ray Kinsella
@ 2020-05-05  8:07  5% ` Nithin Dabilpuram
  2020-05-05  8:10  0%   ` Ray Kinsella
  2020-05-05  8:55  0%   ` Dumitrescu, Cristian
  1 sibling, 2 replies; 200+ results
From: Nithin Dabilpuram @ 2020-05-05  8:07 UTC (permalink / raw)
  To: ferruh.yigit, bruce.richardson, cristian.dumitrescu, thomas,
	bluca, jasvinder.singh, arybchenko, ray.kinsella, nhorman,
	ktraynor, david.marchand, John McNamara, Marko Kovacevic
  Cc: dev, jerinj, kkanas, Nithin Dabilpuram

From: Nithin Dabilpuram <ndabilpuram@marvell.com>

Based on the discussion in mail thread, it is concluded that
all traffic manager API's (rte_tm.h) need to be marked experimental
till few more releases to support further improvements to spec.

https://mails.dpdk.org/archives/dev/2020-April/164970.html

Adding deprication notice for the same in advance.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
---
 doc/guides/rel_notes/deprecation.rst | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 1339f54..2c76f36 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -118,3 +118,10 @@ Deprecation Notices
   Python 2 support will be completely removed in 20.11.
   In 20.08, explicit deprecation warnings will be displayed when running
   scripts with Python 2.
+
+* traffic manager: All traffic manager API's in ``rte_tm.h`` were mistakenly made
+  abi stable in the v19.11 release. The TM maintainer and other contributor's have
+  agreed to keep the TM API's as experimental in expectation of additional spec
+  improvements. Therefore, all API's in ``rte_tm.h`` will be marked back as
+  experimental in v20.11 DPDK release. For more details, please see `the thread
+  <https://mails.dpdk.org/archives/dev/2020-April/164970.html>`_.
-- 
2.8.4


^ permalink raw reply	[relevance 5%]

* Re: [dpdk-dev] [PATCH v1] abi: document reasons behind the three part versioning
  2020-05-04 21:46  4% ` Thomas Monjalon
@ 2020-05-05  8:07  4%   ` Ray Kinsella
  2020-05-05  8:31  4%     ` Thomas Monjalon
  0 siblings, 1 reply; 200+ results
From: Ray Kinsella @ 2020-05-05  8:07 UTC (permalink / raw)
  To: Thomas Monjalon
  Cc: dev, ferruh.yigit, Bruce Richardson, John McNamara, Marko Kovacevic



On 04/05/2020 22:46, Thomas Monjalon wrote:
> 23/04/2020 12:12, Ray Kinsella:
>> Clarify the reasons behind the three part version numbering scheme.
>> Documents the fixes made in f26c2b3.
> 
> Please add these lines:
> Fixes: f26c2b39b271 ("build: fix soname info for 19.11 compatibility")
> Cc: stable@dpdk.org
> 
> 
>> Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
>> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
>> ---
>> --- a/doc/guides/contributing/abi_policy.rst
>> +++ b/doc/guides/contributing/abi_policy.rst
>> +   lengthening the stability period. Additional implementation detail can be
>> +   found in the :ref:`release notes <20_05_abi_changes>`.
> 
> The three part version was done in 20.02.
> I think you should update the 20.02 release notes instead of 20.05.
> 

I agreed, 
However I didn't think that was possible on a quarterly, after the release was formally complete.
Wouldn't that involve either a respin or a .1 ?

Ray K

^ permalink raw reply	[relevance 4%]

* [dpdk-dev] [PATCH v11 0/2] support for VFIO-PCI VF token interface
  @ 2020-05-05  7:46  4% ` Haiyue Wang
  2020-05-05 10:34  4% ` [dpdk-dev] [PATCH v12 " Haiyue Wang
  2020-05-06 11:35  4% ` [dpdk-dev] [PATCH v13 " Haiyue Wang
  2 siblings, 0 replies; 200+ results
From: Haiyue Wang @ 2020-05-05  7:46 UTC (permalink / raw)
  To: dev, anatoly.burakov, thomas, jerinj, david.marchand; +Cc: Haiyue Wang

v11: Use the eal parameter to pass the VF token, then not every PCI
     device needs to be specified with this token. Also no ABI issue
     now.

v10: Use the __rte_internal to mark the internal API changing.

v9: Rewrite the document.

v8: Update the document.

v7: Add the Fixes tag in uuid, the release note and help
    document.

v6: Drop the Fixes tag in uuid, since the file has been
    moved to another place, not suitable to apply on stable.
    And this is not a bug, just some kind of enhancement.

v5: 1. Add the VF token parse error handling.
    2. Split into two patches for different logic module.
    3. Add more comments into the code for explaining the design.
    4. Drop the ABI change workaround, this patch set focuses on code review.

v4: 1. Ignore rte_vfio_setup_device ABI check since it is
       for Linux driver use.

v3: Fix the Travis build failed:
           (1). rte_uuid.h:97:55: error: unknown type name ‘size_t’
           (2). rte_uuid.h:58:2: error: implicit declaration of function ‘memcpy’

v2: Fix the FreeBSD build error.

v1: Update the commit message.

RFC v2:
         Based on Vamsi's RFC v1, and Alex's patch for Qemu
        [https://lore.kernel.org/lkml/20200204161737.34696b91@w520.home/]: 
       Use the devarg to pass-down the VF token.

RFC v1: https://patchwork.dpdk.org/patch/66281/ by Vamsi.

Haiyue Wang (2):
  eal: add uuid dependent header files explicitly
  eal: support for VFIO-PCI VF token

 doc/guides/linux_gsg/linux_drivers.rst        | 35 ++++++++++++++++++-
 doc/guides/linux_gsg/linux_eal_parameters.rst |  4 +++
 doc/guides/rel_notes/release_20_05.rst        |  6 ++++
 lib/librte_eal/common/eal_common_options.c    |  2 ++
 lib/librte_eal/common/eal_internal_cfg.h      |  2 ++
 lib/librte_eal/common/eal_options.h           |  2 ++
 lib/librte_eal/freebsd/eal.c                  |  5 +++
 lib/librte_eal/include/rte_eal.h              | 12 +++++++
 lib/librte_eal/include/rte_uuid.h             |  2 ++
 lib/librte_eal/linux/eal.c                    | 29 +++++++++++++++
 lib/librte_eal/linux/eal_vfio.c               | 16 ++++++++-
 lib/librte_eal/rte_eal_version.map            |  1 +
 12 files changed, 114 insertions(+), 2 deletions(-)

-- 
2.26.2


^ permalink raw reply	[relevance 4%]

* Re: [dpdk-dev] [PATCH v4 1/4] ethdev: add tm support for shaper config in pkt mode
  2020-05-01 13:18  3%                         ` [dpdk-dev] " Jerin Jacob
@ 2020-05-05  8:01  0%                           ` Ray Kinsella
  0 siblings, 0 replies; 200+ results
From: Ray Kinsella @ 2020-05-05  8:01 UTC (permalink / raw)
  To: Jerin Jacob, Thomas Monjalon
  Cc: Dumitrescu, Cristian, Bruce Richardson, Ferruh Yigit,
	Luca Boccassi, Nithin Dabilpuram, Singh, Jasvinder,
	Andrew Rybchenko, dev, jerinj, kkanas, Nithin Dabilpuram,
	Kinsella, Ray, Neil Horman, Kevin Traynor, David Marchand



On 01/05/2020 14:18, Jerin Jacob wrote:
> On Tue, Apr 28, 2020 at 9:24 PM Thomas Monjalon <thomas@monjalon.net> wrote:
>>
>> 28/04/2020 17:04, Luca Boccassi:
>>> On Tue, 2020-04-28 at 15:45 +0100, Bruce Richardson wrote:
>>>> On Tue, Apr 28, 2020 at 03:06:20PM +0100, Ferruh Yigit wrote:
>>>>> On 4/27/2020 5:59 PM, Jerin Jacob wrote:
>>>>>> On Mon, Apr 27, 2020 at 10:19 PM Ferruh Yigit <ferruh.yigit@intel.com> wrote:
>>>>>>> On 4/27/2020 5:29 PM, Jerin Jacob wrote:
>>>>>>>> On Mon, Apr 27, 2020 at 9:42 PM Ferruh Yigit <ferruh.yigit@intel.com> wrote:
>>>>>>>>> On 4/27/2020 10:19 AM, Dumitrescu, Cristian wrote:
>>>>>>>>>> From: Yigit, Ferruh <ferruh.yigit@intel.com>
>>>>>>>>>>> On 4/24/2020 11:28 AM, Dumitrescu, Cristian wrote:
>>>>>>>>>>>> From: Nithin Dabilpuram <nithind1988@gmail.com>
>>>>>>>>>>>>> This patch also updates tm port/level/node capability structures with
>>>>>>>>>>>>> exiting features of scheduler wfq packet mode, scheduler wfq byte mode
>>>>>>>>>>>>> and private/shared shaper byte mode.
>>>>>>>>>>>>>
>>>>>>>>>>>>> SoftNIC PMD is also updated with new capabilities.
>> [...]
>>>>>>>>>>> Hi Nithin,
>>>>>>>>>>>
>>>>>>>>>>> It looks like patch is causing ABI break, I am getting following warning [1],
>>>>>>>>>>> can you please check?
>>>>>>>>>>>
>>>>>>>>>>> [1]
>>>>>>>>>>> https://pastebin.com/XYNFg14u
>>>>>>>>>>
>>>>>>>>>> Hi Ferruh,
>>>>>>>>>>
>>>>>>>>>> The RTE_TM API is marked as experimental,
>>>>>>>>>> but it looks that this was not correctly marked
>>>>>>>>>> when __rte_experimental ABI checker was introduced.
>>>>>>>>>>
>>>>>>>>>> It is marked as experimental at the top of the rte_tm.h,
>>>>>>>>>> similarly to other APIs introduced around same time,
>>>>>>>>>> but it was not correctly picked up by the ABI check procedure
>>>>>>>>>> when later introduced, so __rte_experimental was not added to every function.
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>> :(
>>>>>>>>>
>>>>>>>>> Is it time to mature them?
>>>>>>>>>
>>>>>>>>> As you said they are not marked as experimental both in header file (function
>>>>>>>>> declarations) and .map file.
>>>>>>>>>
>>>>>>>>> The problem is, they are not marked as experimental in DPDK_20.0 ABI (v19.11),
>>>>>>>>> so marking them as experimental now will break the ABI. Not sure what to do,
>>>>>>>>> cc'ed a few ABI related names for comment.
>>>>>>>>>
>>>>>>>>> For me, we need to proceed as the experimental tag removed and APIs become
>>>>>>>>> mature starting from v19.11, since this is what happened in practice, and remove
>>>>>>>>> a few existing being experimental references in the doxygen comments.
>>>>>>>>
>>>>>>>> I think, accidentally we can not make a library as NON-experimental.
>>>>>>>> TM never went through experimental to mature transition(see git log
>>>>>>>> lib/librte_ethdev/rte_tm.h)
>>>>>>>> It was a bug to not mark as experimental in each function in the ABI process.
>>>>>>>> Some of the features like packet marking are not even implemented by any HW.
>>>>>>>> I think, we can make API stable only all the features are implemented
>>>>>>>> by one or two HW.
>>
>> Yes this is what was decided one or two years ago I think.
>> But rte_tm API was introduced 3 years ago and is implemented by 6 PMDs.
> 
> None of the 6 PMDS covers all the features.
> 
>>
>>>>> Existing experimental marks are text only for human parsing.
>>>>>
>>>>> The compiler attribute and build time checks are missing, and the symbol in the
>>>>> binary doesn't have experimental tag. Our scripts and automated checks won't
>>>>> detect it as experimental.
>>>>>
>>>>> My point is just having experimental comment in header file is not enough to
>>>>> qualify the APIs as experimental.
>>>>>
>>>>>> Anyway, we need to break the ABI to make it work on various HW.
>>
>> Yes this is why I was asking in 19.11 to check our API,
>> in order to avoid such situation.
>>
>>
>>>>>> I am not sure what to do?
>>
>> Either manage ABI versioning, or wait 20.11.
> 
> ABI change are in structures. So the function versioning does not
> help. So we will wait for 20.11 then :-(
> 

yes - I spent some time looking at this also, and came to same conclusion.

Ray K

^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [EXT] Re: [PATCH] doc: deprication notice to mark tm spec as experimental
  2020-05-05  6:47  3% ` Ray Kinsella
@ 2020-05-05  7:45  0%   ` Nithin Dabilpuram
  0 siblings, 0 replies; 200+ results
From: Nithin Dabilpuram @ 2020-05-05  7:45 UTC (permalink / raw)
  To: Ray Kinsella
  Cc: Nithin Dabilpuram, ferruh.yigit, bruce.richardson,
	cristian.dumitrescu, thomas, bluca, jasvinder.singh, arybchenko,
	ray.kinsella, nhorman, ktraynor, david.marchand, John McNamara,
	Marko Kovacevic, dev, jerinj, kkanas

On Tue, May 05, 2020 at 07:47:43AM +0100, Ray Kinsella wrote:
> External Email
> 
> ----------------------------------------------------------------------
> 
> 
> On 01/05/2020 18:16, Nithin Dabilpuram wrote:
> > From: Nithin Dabilpuram <ndabilpuram@marvell.com>
> > 
> > Based on the discussion in below mail thread, it is concluded that
> > all traffic manager API's (rte_tm.h) need to be marked experimental
> > till few more releases to support further improvements to spec.
> > 
> > https://urldefense.proofpoint.com/v2/url?u=https-3A__mails.dpdk.org_archives_dev_2020-2DApril_164970.html&d=DwIDaQ&c=nKjWec2b6R0mOyPaz7xtfQ&r=FZ_tPCbgFOh18zwRPO9H0yDx8VW38vuapifdDfc8SFQ&m=fMY2AL-_MFowqy_OpcWEwioupC8kxy4GNU6R3LZP_2A&s=WCnFYbXTODzmkAWYDdBurNyAJ8Hxti2qkxXNnuoBic4&e= 
> > 
> > Adding deprication notice for the same in advance.
> > 
> > Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
> > ---
> >  doc/guides/rel_notes/deprecation.rst | 9 +++++++++
> >  1 file changed, 9 insertions(+)
> > 
> > diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
> > index 1339f54..8c90ec9 100644
> > --- a/doc/guides/rel_notes/deprecation.rst
> > +++ b/doc/guides/rel_notes/deprecation.rst
> > @@ -118,3 +118,12 @@ Deprecation Notices
> >    Python 2 support will be completely removed in 20.11.
> >    In 20.08, explicit deprecation warnings will be displayed when running
> >    scripts with Python 2.
> > +
> > +* traffic manager: Based on the discussion in the thread
> > +  https://urldefense.proofpoint.com/v2/url?u=https-3A__mails.dpdk.org_archives_dev_2020-2DApril_164970.html&d=DwIDaQ&c=nKjWec2b6R0mOyPaz7xtfQ&r=FZ_tPCbgFOh18zwRPO9H0yDx8VW38vuapifdDfc8SFQ&m=fMY2AL-_MFowqy_OpcWEwioupC8kxy4GNU6R3LZP_2A&s=WCnFYbXTODzmkAWYDdBurNyAJ8Hxti2qkxXNnuoBic4&e=  it turns out that
> > +  all traffic manager API's in ``rte_tm.h`` were mistakenly made stable even
> > +  though the MAINTAINER's file and header file text mentions it to be still
> > +  experimental. Given that even now, both the maintainer and other contributor's
> > +  are inclined towards keeping those API's in experimental state till some more
> > +  releases in support of spec improvements, it is decided that all API's in
> > +  ``rte_tm.h`` will be marked back as experimental in v20.11 DPDK release.
> > 
> 
> Slightly wordy - suggest making it a small bit more concise as follows. 
> 
> * traffic manager: All traffic manager API's in ``rte_tm.h`` were mistakenly made 
>  abi stable in the v19.11 release. The TM maintainer and other contributor's have 
>  agreed to keep the TM API's as experimental in expectation of additional spec 
>  improvements. Therefore, all API's in ``rte_tm.h`` will be marked back as 
>  experimental in v20.11 DPDK release. For more detail, please see `the thread
>  <https://urldefense.proofpoint.com/v2/url?u=https-3A__mails.dpdk.org_archives_dev_2020-2DApril_164970.html&d=DwIDaQ&c=nKjWec2b6R0mOyPaz7xtfQ&r=FZ_tPCbgFOh18zwRPO9H0yDx8VW38vuapifdDfc8SFQ&m=fMY2AL-_MFowqy_OpcWEwioupC8kxy4GNU6R3LZP_2A&s=WCnFYbXTODzmkAWYDdBurNyAJ8Hxti2qkxXNnuoBic4&e= >`_.

Ack, will send v2.
> 
> Ray K

^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [PATCH] doc: deprication notice to mark tm spec as experimental
  @ 2020-05-05  6:47  3% ` Ray Kinsella
  2020-05-05  7:45  0%   ` [dpdk-dev] [EXT] " Nithin Dabilpuram
  2020-05-05  8:07  5% ` [dpdk-dev] [PATCH v2] " Nithin Dabilpuram
  1 sibling, 1 reply; 200+ results
From: Ray Kinsella @ 2020-05-05  6:47 UTC (permalink / raw)
  To: Nithin Dabilpuram, ferruh.yigit, bruce.richardson,
	cristian.dumitrescu, thomas, bluca, jasvinder.singh, arybchenko,
	ray.kinsella, nhorman, ktraynor, david.marchand, John McNamara,
	Marko Kovacevic
  Cc: dev, jerinj, kkanas, Nithin Dabilpuram



On 01/05/2020 18:16, Nithin Dabilpuram wrote:
> From: Nithin Dabilpuram <ndabilpuram@marvell.com>
> 
> Based on the discussion in below mail thread, it is concluded that
> all traffic manager API's (rte_tm.h) need to be marked experimental
> till few more releases to support further improvements to spec.
> 
> https://mails.dpdk.org/archives/dev/2020-April/164970.html
> 
> Adding deprication notice for the same in advance.
> 
> Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
> ---
>  doc/guides/rel_notes/deprecation.rst | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
> index 1339f54..8c90ec9 100644
> --- a/doc/guides/rel_notes/deprecation.rst
> +++ b/doc/guides/rel_notes/deprecation.rst
> @@ -118,3 +118,12 @@ Deprecation Notices
>    Python 2 support will be completely removed in 20.11.
>    In 20.08, explicit deprecation warnings will be displayed when running
>    scripts with Python 2.
> +
> +* traffic manager: Based on the discussion in the thread
> +  https://mails.dpdk.org/archives/dev/2020-April/164970.html it turns out that
> +  all traffic manager API's in ``rte_tm.h`` were mistakenly made stable even
> +  though the MAINTAINER's file and header file text mentions it to be still
> +  experimental. Given that even now, both the maintainer and other contributor's
> +  are inclined towards keeping those API's in experimental state till some more
> +  releases in support of spec improvements, it is decided that all API's in
> +  ``rte_tm.h`` will be marked back as experimental in v20.11 DPDK release.
> 

Slightly wordy - suggest making it a small bit more concise as follows. 

* traffic manager: All traffic manager API's in ``rte_tm.h`` were mistakenly made 
 abi stable in the v19.11 release. The TM maintainer and other contributor's have 
 agreed to keep the TM API's as experimental in expectation of additional spec 
 improvements. Therefore, all API's in ``rte_tm.h`` will be marked back as 
 experimental in v20.11 DPDK release. For more detail, please see `the thread
 <https://mails.dpdk.org/archives/dev/2020-April/164970.html>`_.

Ray K

^ permalink raw reply	[relevance 3%]

* Re: [dpdk-dev] [PATCH v5] mempool: return 0 if area is too small on populate
  2020-05-04 15:47  0%     ` Lukasz Wojciechowski
@ 2020-05-04 22:30  0%       ` Thomas Monjalon
  0 siblings, 0 replies; 200+ results
From: Thomas Monjalon @ 2020-05-04 22:30 UTC (permalink / raw)
  To: Olivier Matz
  Cc: Andrew Rybchenko, dev, david.marchand, jingjing.wu,
	john.mcnamara, marko.kovacevic, mdr, nhorman, xiaoyun.li,
	Lukasz Wojciechowski

04/05/2020 17:47, Lukasz Wojciechowski:
> W dniu 04.05.2020 o 14:54, Andrew Rybchenko pisze:
> > On 5/4/20 3:49 PM, Olivier Matz wrote:
> >> Change rte_mempool_populate_iova() and rte_mempool_populate_virt() to
> >> return 0 instead of -EINVAL when there is not enough room to store one
> >> object, as it can be helpful for applications to distinguish this
> >> specific case.
> >>
> >> As this is an ABI change, use symbol versioning to preserve old
> >> behavior for binary applications.
> >>
> >> Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
> >> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> > Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
> Acked-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>

Applied, thanks




^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [PATCH v6 1/1] abi: change references to abi 20.0.1 to abi v21
  2020-04-30 10:27 31%   ` Ray Kinsella
@ 2020-05-04 22:23  6%     ` Thomas Monjalon
  0 siblings, 0 replies; 200+ results
From: Thomas Monjalon @ 2020-05-04 22:23 UTC (permalink / raw)
  To: Ray Kinsella
  Cc: dev, david.marchand, Neil Horman, Jingjing Wu, Beilei Xing,
	Matan Azrad, Shahaf Shuler, Viacheslav Ovsiienko, Jerin Jacob,
	Nithin Dabilpuram, Alfredo Cardigliano, Mahipal Challa,
	Cristian Dumitrescu, Ray Kinsella

30/04/2020 12:27, Ray Kinsella:
> Change references to abi 20.0.1 to use abi v21, see
> https://doc.dpdk.org/guides/contributing/abi_policy.html#general-guidelines
> 
> "Major ABI versions are declared no more frequently than yearly.
> Compatibility with the major ABI version is mandatory in subsequent
> releases until a new major ABI version is declared."
> 
> Combined abi policy and versioning in maintainers, add map files to the
> filter to more closely monitor future abi changes.
> 
> Signed-off-by: Ray Kinsella <mdr@ashroe.eu>

Applied with added change for recent igc PMD:

--- a/drivers/net/igc/rte_pmd_igc_version.map
+++ b/drivers/net/igc/rte_pmd_igc_version.map
@@ -1,3 +1,3 @@
-DPDK_20.0.2 {
+DPDK_21 {
        local: *;
 };



^ permalink raw reply	[relevance 6%]

* Re: [dpdk-dev] [PATCH v6 1/1] abi: change references to abi 20.0.1 to abi v21
  2020-04-30 10:27 10% ` [dpdk-dev] [PATCH v6 1/1] " Ray Kinsella
  2020-04-30 10:27 31%   ` Ray Kinsella
@ 2020-05-04 22:05  6%   ` Thomas Monjalon
  1 sibling, 0 replies; 200+ results
From: Thomas Monjalon @ 2020-05-04 22:05 UTC (permalink / raw)
  To: Ray Kinsella
  Cc: dev, david.marchand, Ray Kinsella, Neil Horman, Jingjing Wu,
	Beilei Xing, Matan Azrad, Shahaf Shuler, Viacheslav Ovsiienko,
	Jerin Jacob, Nithin Dabilpuram, Alfredo Cardigliano,
	Mahipal Challa, Cristian Dumitrescu

30/04/2020 12:27, Ray Kinsella:
> Sending again, as I missed the cover letter last time.

You don't need a cover letter for a single patch.
The changelog can be added below --- in a patch.




^ permalink raw reply	[relevance 6%]

* Re: [dpdk-dev] [PATCH v1] abi: document reasons behind the three part versioning
  @ 2020-05-04 21:46  4% ` Thomas Monjalon
  2020-05-05  8:07  4%   ` Ray Kinsella
  2020-05-05  8:56 19% ` [dpdk-dev] [PATCH v2] " Ray Kinsella
  1 sibling, 1 reply; 200+ results
From: Thomas Monjalon @ 2020-05-04 21:46 UTC (permalink / raw)
  To: Ray Kinsella
  Cc: dev, ferruh.yigit, Bruce Richardson, John McNamara, Marko Kovacevic

23/04/2020 12:12, Ray Kinsella:
> Clarify the reasons behind the three part version numbering scheme.
> Documents the fixes made in f26c2b3.

Please add these lines:
Fixes: f26c2b39b271 ("build: fix soname info for 19.11 compatibility")
Cc: stable@dpdk.org


> Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
> --- a/doc/guides/contributing/abi_policy.rst
> +++ b/doc/guides/contributing/abi_policy.rst
> +   lengthening the stability period. Additional implementation detail can be
> +   found in the :ref:`release notes <20_05_abi_changes>`.

The three part version was done in 20.02.
I think you should update the 20.02 release notes instead of 20.05.




^ permalink raw reply	[relevance 4%]

* Re: [dpdk-dev] [PATCH v4] eal/cpuflags: add x86 based cpu flags
  @ 2020-04-27  9:22  4%     ` Kinsella, Ray
    1 sibling, 0 replies; 200+ results
From: Kinsella, Ray @ 2020-04-27  9:22 UTC (permalink / raw)
  To: Thomas Monjalon, nhorman, Laatz, Kevin
  Cc: dev, Richardson, Bruce, Van Haaren, Harry, david.marchand,
	Ray Kinsella, Trahe, Fiona



> -----Original Message-----
> From: Thomas Monjalon <thomas@monjalon.net>
> Sent: Saturday 25 April 2020 17:04
> To: Kinsella, Ray <ray.kinsella@intel.com>; nhorman@tuxdriver.com;
> Laatz, Kevin <kevin.laatz@intel.com>
> Cc: dev@dpdk.org; Richardson, Bruce <bruce.richardson@intel.com>; Van
> Haaren, Harry <harry.van.haaren@intel.com>; david.marchand@redhat.com
> Subject: Re: [dpdk-dev] [PATCH v4] eal/cpuflags: add x86 based cpu
> flags
> 
> 16/04/2020 13:00, Kevin Laatz:
> > This patch adds CPU flags which will enable the detection of ISA
> > features available on more recent x86 based CPUs.
> [...]
> > --- a/devtools/libabigail.abignore
> > +++ b/devtools/libabigail.abignore
> > +; Ignore this enum update as it should not be allocated by the
> > +application [suppress_type]
> > +	type_kind = enum
> > +	name = rte_cpu_flag_t
> > +	changed_enumerators = RTE_CPUFLAG_NUMFLAGS
> 
> The justification is not correct.
> The application is allowed to use RTE_CPUFLAG_NUMFLAGS in array
> allocation.
> But no API is returning a CPU flag, so the new flags will remain
> unknown to the application.
> 
> However, there is a behaviour change:
> The functions rte_cpu_get_flag_name() and rte_cpu_get_flag_enabled()
> will now accept new values, which were previously considered as an
> error.
> Is it an ABI breakage? I would say no.

We saw something similar with the Cryptodev's rte_crypto_sym_xform_type also.
Libabigail appears to be particularly sensitive to changes to enumerations. 
Leaving it to the user to decide if there is a problem. 

I am seeing a bit of weirdness though between versions of libabigail.
1.7.1 seems to fine with the change, however 1.2 is reporting an issue. 

Kevin - what version are you using?

> 
> PS: Who is REALLY maintaining the ABI?
> We really miss someone who carefully check all these things, and take
> care of the doc and tooling.

I would say that I am missing these changes to libabigail.ignore, which would be useful. 
Should we consolidate the ABI Policy and ABI Versioning sections of the MAINTAINERS file?


^ permalink raw reply	[relevance 4%]

* Re: [dpdk-dev] [PATCH v5] mempool: return 0 if area is too small on populate
  2020-05-04 12:54  0%   ` Andrew Rybchenko
@ 2020-05-04 15:47  0%     ` Lukasz Wojciechowski
  2020-05-04 22:30  0%       ` Thomas Monjalon
  0 siblings, 1 reply; 200+ results
From: Lukasz Wojciechowski @ 2020-05-04 15:47 UTC (permalink / raw)
  To: Andrew Rybchenko, Olivier Matz, thomas
  Cc: david.marchand, dev, jingjing.wu, john.mcnamara, marko.kovacevic,
	mdr, nhorman, xiaoyun.li


W dniu 04.05.2020 o 14:54, Andrew Rybchenko pisze:
> On 5/4/20 3:49 PM, Olivier Matz wrote:
>> Change rte_mempool_populate_iova() and rte_mempool_populate_virt() to
>> return 0 instead of -EINVAL when there is not enough room to store one
>> object, as it can be helpful for applications to distinguish this
>> specific case.
>>
>> As this is an ABI change, use symbol versioning to preserve old
>> behavior for binary applications.
>>
>> Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
>> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>

-- 

Lukasz Wojciechowski
Principal Software Engineer

Samsung R&D Institute Poland
Samsung Electronics
Office +48 22 377 88 25
l.wojciechow@partner.samsung.com


^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [PATCH v5] mempool: return 0 if area is too small on populate
  2020-05-04 12:49 11% ` [dpdk-dev] [PATCH v5] " Olivier Matz
@ 2020-05-04 12:54  0%   ` Andrew Rybchenko
  2020-05-04 15:47  0%     ` Lukasz Wojciechowski
  0 siblings, 1 reply; 200+ results
From: Andrew Rybchenko @ 2020-05-04 12:54 UTC (permalink / raw)
  To: Olivier Matz, thomas
  Cc: david.marchand, dev, jingjing.wu, john.mcnamara, marko.kovacevic,
	mdr, nhorman, xiaoyun.li, Lukasz Wojciechowski

On 5/4/20 3:49 PM, Olivier Matz wrote:
> Change rte_mempool_populate_iova() and rte_mempool_populate_virt() to
> return 0 instead of -EINVAL when there is not enough room to store one
> object, as it can be helpful for applications to distinguish this
> specific case.
> 
> As this is an ABI change, use symbol versioning to preserve old
> behavior for binary applications.
> 
> Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>

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

^ permalink raw reply	[relevance 0%]

* [dpdk-dev] [PATCH v5] mempool: return 0 if area is too small on populate
  @ 2020-05-04 12:49 11% ` Olivier Matz
  2020-05-04 12:54  0%   ` Andrew Rybchenko
  0 siblings, 1 reply; 200+ results
From: Olivier Matz @ 2020-05-04 12:49 UTC (permalink / raw)
  To: thomas
  Cc: arybchenko, david.marchand, dev, jingjing.wu, john.mcnamara,
	marko.kovacevic, mdr, nhorman, olivier.matz, xiaoyun.li,
	Lukasz Wojciechowski

Change rte_mempool_populate_iova() and rte_mempool_populate_virt() to
return 0 instead of -EINVAL when there is not enough room to store one
object, as it can be helpful for applications to distinguish this
specific case.

As this is an ABI change, use symbol versioning to preserve old
behavior for binary applications.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---

changes in v5:
    - fix version: 20.0.2 -> 21
    - fix commit log: populate_iova -> populate_virt

changes in v4:
    - move populate_iova trace in v20_0_2 base function

changes in v3:
    - rebase
    - remove deprecation notice
    - notify API change in release notes
    - fix ABI version from 20.0.1 to 20.0.2 (should be 21 maybe)


 doc/guides/rel_notes/deprecation.rst       |  5 --
 doc/guides/rel_notes/release_20_05.rst     |  4 ++
 examples/ntb/ntb_fwd.c                     |  2 +-
 lib/librte_mempool/meson.build             |  2 +
 lib/librte_mempool/rte_mempool.c           | 80 ++++++++++++++++++----
 lib/librte_mempool/rte_mempool.h           | 14 ++--
 lib/librte_mempool/rte_mempool_version.map |  7 ++
 7 files changed, 92 insertions(+), 22 deletions(-)

diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 1339f54f5..20aa745b7 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -65,11 +65,6 @@ Deprecation Notices
   structure would be made internal (or removed if all dependencies are cleared)
   in future releases.
 
-* mempool: starting from v20.05, the API of rte_mempool_populate_iova()
-  and rte_mempool_populate_virt() will change to return 0 instead
-  of -EINVAL when there is not enough room to store one object. The ABI
-  will be preserved until 20.11.
-
 * ethdev: the legacy filter API, including
   ``rte_eth_dev_filter_supported()``, ``rte_eth_dev_filter_ctrl()`` as well
   as filter types MACVLAN, ETHERTYPE, FLEXIBLE, SYN, NTUPLE, TUNNEL, FDIR,
diff --git a/doc/guides/rel_notes/release_20_05.rst b/doc/guides/rel_notes/release_20_05.rst
index b124c3f28..ab20a7d02 100644
--- a/doc/guides/rel_notes/release_20_05.rst
+++ b/doc/guides/rel_notes/release_20_05.rst
@@ -241,6 +241,10 @@ API Changes
    Also, make sure to start the actual text at the margin.
    =========================================================
 
+* mempool: The API of ``rte_mempool_populate_iova()`` and
+  ``rte_mempool_populate_virt()`` changed to return 0 instead of -EINVAL
+  when there is not enough room to store one object.
+
 
 ABI Changes
 -----------
diff --git a/examples/ntb/ntb_fwd.c b/examples/ntb/ntb_fwd.c
index d49189e17..eba8ebf9f 100644
--- a/examples/ntb/ntb_fwd.c
+++ b/examples/ntb/ntb_fwd.c
@@ -1319,7 +1319,7 @@ ntb_mbuf_pool_create(uint16_t mbuf_seg_size, uint32_t nb_mbuf,
 					mz->len - ntb_info.ntb_hdr_size,
 					ntb_mempool_mz_free,
 					(void *)(uintptr_t)mz);
-		if (ret < 0) {
+		if (ret <= 0) {
 			rte_memzone_free(mz);
 			rte_mempool_free(mp);
 			return NULL;
diff --git a/lib/librte_mempool/meson.build b/lib/librte_mempool/meson.build
index a6e861cbf..7dbe6b9be 100644
--- a/lib/librte_mempool/meson.build
+++ b/lib/librte_mempool/meson.build
@@ -9,6 +9,8 @@ foreach flag: extra_flags
 	endif
 endforeach
 
+use_function_versioning = true
+
 sources = files('rte_mempool.c', 'rte_mempool_ops.c',
 		'rte_mempool_ops_default.c', 'mempool_trace_points.c')
 headers = files('rte_mempool.h', 'rte_mempool_trace.h',
diff --git a/lib/librte_mempool/rte_mempool.c b/lib/librte_mempool/rte_mempool.c
index 0be8f9f59..0bde995b5 100644
--- a/lib/librte_mempool/rte_mempool.c
+++ b/lib/librte_mempool/rte_mempool.c
@@ -31,6 +31,7 @@
 #include <rte_string_fns.h>
 #include <rte_spinlock.h>
 #include <rte_tailq.h>
+#include <rte_function_versioning.h>
 
 #include "rte_mempool.h"
 #include "rte_mempool_trace.h"
@@ -303,12 +304,17 @@ mempool_ops_alloc_once(struct rte_mempool *mp)
 	return 0;
 }
 
+__vsym int
+rte_mempool_populate_iova_v21(struct rte_mempool *mp, char *vaddr,
+	rte_iova_t iova, size_t len, rte_mempool_memchunk_free_cb_t *free_cb,
+	void *opaque);
+
 /* Add objects in the pool, using a physically contiguous memory
  * zone. Return the number of objects added, or a negative value
  * on error.
  */
-static int
-__rte_mempool_populate_iova(struct rte_mempool *mp, char *vaddr,
+__vsym int
+rte_mempool_populate_iova_v21(struct rte_mempool *mp, char *vaddr,
 	rte_iova_t iova, size_t len, rte_mempool_memchunk_free_cb_t *free_cb,
 	void *opaque)
 {
@@ -359,6 +365,8 @@ __rte_mempool_populate_iova(struct rte_mempool *mp, char *vaddr,
 
 	STAILQ_INSERT_TAIL(&mp->mem_list, memhdr, next);
 	mp->nb_mem_chunks++;
+
+	rte_mempool_trace_populate_iova(mp, vaddr, iova, len, free_cb, opaque);
 	return i;
 
 fail:
@@ -366,21 +374,34 @@ __rte_mempool_populate_iova(struct rte_mempool *mp, char *vaddr,
 	return ret;
 }
 
-int
-rte_mempool_populate_iova(struct rte_mempool *mp, char *vaddr,
+BIND_DEFAULT_SYMBOL(rte_mempool_populate_iova, _v21, 21);
+MAP_STATIC_SYMBOL(
+	int rte_mempool_populate_iova(struct rte_mempool *mp, char *vaddr,
+				rte_iova_t iova, size_t len,
+				rte_mempool_memchunk_free_cb_t *free_cb,
+				void *opaque),
+	rte_mempool_populate_iova_v21);
+
+__vsym int
+rte_mempool_populate_iova_v20(struct rte_mempool *mp, char *vaddr,
+	rte_iova_t iova, size_t len, rte_mempool_memchunk_free_cb_t *free_cb,
+	void *opaque);
+
+__vsym int
+rte_mempool_populate_iova_v20(struct rte_mempool *mp, char *vaddr,
 	rte_iova_t iova, size_t len, rte_mempool_memchunk_free_cb_t *free_cb,
 	void *opaque)
 {
 	int ret;
 
-	ret = __rte_mempool_populate_iova(mp, vaddr, iova, len, free_cb,
+	ret = rte_mempool_populate_iova_v21(mp, vaddr, iova, len, free_cb,
 					opaque);
 	if (ret == 0)
 		ret = -EINVAL;
 
-	rte_mempool_trace_populate_iova(mp, vaddr, iova, len, free_cb, opaque);
 	return ret;
 }
+VERSION_SYMBOL(rte_mempool_populate_iova, _v20, 20.0);
 
 static rte_iova_t
 get_iova(void *addr)
@@ -395,11 +416,16 @@ get_iova(void *addr)
 	return ms->iova + RTE_PTR_DIFF(addr, ms->addr);
 }
 
+__vsym int
+rte_mempool_populate_virt_v21(struct rte_mempool *mp, char *addr,
+	size_t len, size_t pg_sz, rte_mempool_memchunk_free_cb_t *free_cb,
+	void *opaque);
+
 /* Populate the mempool with a virtual area. Return the number of
  * objects added, or a negative value on error.
  */
-int
-rte_mempool_populate_virt(struct rte_mempool *mp, char *addr,
+__vsym int
+rte_mempool_populate_virt_v21(struct rte_mempool *mp, char *addr,
 	size_t len, size_t pg_sz, rte_mempool_memchunk_free_cb_t *free_cb,
 	void *opaque)
 {
@@ -432,7 +458,7 @@ rte_mempool_populate_virt(struct rte_mempool *mp, char *addr,
 				break;
 		}
 
-		ret = __rte_mempool_populate_iova(mp, addr + off, iova,
+		ret = rte_mempool_populate_iova_v21(mp, addr + off, iova,
 			phys_len, free_cb, opaque);
 		if (ret == 0)
 			continue;
@@ -443,9 +469,6 @@ rte_mempool_populate_virt(struct rte_mempool *mp, char *addr,
 		cnt += ret;
 	}
 
-	if (cnt == 0)
-		return -EINVAL;
-
 	rte_mempool_trace_populate_virt(mp, addr, len, pg_sz, free_cb, opaque);
 	return cnt;
 
@@ -453,6 +476,35 @@ rte_mempool_populate_virt(struct rte_mempool *mp, char *addr,
 	rte_mempool_free_memchunks(mp);
 	return ret;
 }
+BIND_DEFAULT_SYMBOL(rte_mempool_populate_virt, _v21, 21);
+MAP_STATIC_SYMBOL(
+	int rte_mempool_populate_virt(struct rte_mempool *mp,
+				char *addr, size_t len, size_t pg_sz,
+				rte_mempool_memchunk_free_cb_t *free_cb,
+				void *opaque),
+	rte_mempool_populate_virt_v21);
+
+__vsym int
+rte_mempool_populate_virt_v20(struct rte_mempool *mp, char *addr,
+	size_t len, size_t pg_sz, rte_mempool_memchunk_free_cb_t *free_cb,
+	void *opaque);
+
+__vsym int
+rte_mempool_populate_virt_v20(struct rte_mempool *mp, char *addr,
+	size_t len, size_t pg_sz, rte_mempool_memchunk_free_cb_t *free_cb,
+	void *opaque)
+{
+	int ret;
+
+	ret = rte_mempool_populate_virt_v21(mp, addr, len, pg_sz,
+						free_cb, opaque);
+
+	if (ret == 0)
+		ret = -EINVAL;
+
+	return ret;
+}
+VERSION_SYMBOL(rte_mempool_populate_virt, _v20, 20.0);
 
 /* Get the minimal page size used in a mempool before populating it. */
 int
@@ -609,6 +661,8 @@ rte_mempool_populate_default(struct rte_mempool *mp)
 				mz->len, pg_sz,
 				rte_mempool_memchunk_mz_free,
 				(void *)(uintptr_t)mz);
+		if (ret == 0) /* should not happen */
+			ret = -ENOBUFS;
 		if (ret < 0) {
 			rte_memzone_free(mz);
 			goto fail;
@@ -701,6 +755,8 @@ rte_mempool_populate_anon(struct rte_mempool *mp)
 
 	ret = rte_mempool_populate_virt(mp, addr, size, getpagesize(),
 		rte_mempool_memchunk_anon_free, addr);
+	if (ret == 0) /* should not happen */
+		ret = -ENOBUFS;
 	if (ret < 0) {
 		rte_errno = -ret;
 		goto fail;
diff --git a/lib/librte_mempool/rte_mempool.h b/lib/librte_mempool/rte_mempool.h
index 6e0573ea4..652d19f9f 100644
--- a/lib/librte_mempool/rte_mempool.h
+++ b/lib/librte_mempool/rte_mempool.h
@@ -1112,9 +1112,12 @@ rte_mempool_free(struct rte_mempool *mp);
  * @param opaque
  *   An opaque argument passed to free_cb.
  * @return
- *   The number of objects added on success.
+ *   The number of objects added on success (strictly positive).
  *   On error, the chunk is not added in the memory list of the
- *   mempool and a negative errno is returned.
+ *   mempool the following code is returned:
+ *     (0): not enough room in chunk for one object.
+ *     (-ENOSPC): mempool is already populated.
+ *     (-ENOMEM): allocation failure.
  */
 int rte_mempool_populate_iova(struct rte_mempool *mp, char *vaddr,
 	rte_iova_t iova, size_t len, rte_mempool_memchunk_free_cb_t *free_cb,
@@ -1139,9 +1142,12 @@ int rte_mempool_populate_iova(struct rte_mempool *mp, char *vaddr,
  * @param opaque
  *   An opaque argument passed to free_cb.
  * @return
- *   The number of objects added on success.
+ *   The number of objects added on success (strictly positive).
  *   On error, the chunk is not added in the memory list of the
- *   mempool and a negative errno is returned.
+ *   mempool the following code is returned:
+ *     (0): not enough room in chunk for one object.
+ *     (-ENOSPC): mempool is already populated.
+ *     (-ENOMEM): allocation failure.
  */
 int
 rte_mempool_populate_virt(struct rte_mempool *mp, char *addr,
diff --git a/lib/librte_mempool/rte_mempool_version.map b/lib/librte_mempool/rte_mempool_version.map
index 695dd6e04..826a0b882 100644
--- a/lib/librte_mempool/rte_mempool_version.map
+++ b/lib/librte_mempool/rte_mempool_version.map
@@ -31,6 +31,13 @@ DPDK_20.0 {
 	local: *;
 };
 
+DPDK_21 {
+	global:
+
+	rte_mempool_populate_iova;
+	rte_mempool_populate_virt;
+} DPDK_20.0;
+
 EXPERIMENTAL {
 	global:
 
-- 
2.25.1


^ permalink raw reply	[relevance 11%]

* [dpdk-dev] [PATCH v3 0/8] NXP DPAAx fixes and enhancements
  @ 2020-05-04 12:41  3% ` Hemant Agrawal
  2020-05-07 10:46  3%   ` [dpdk-dev] [PATCH v4 0/9] " Hemant Agrawal
  0 siblings, 1 reply; 200+ results
From: Hemant Agrawal @ 2020-05-04 12:41 UTC (permalink / raw)
  To: dev, ferruh.yigit

v3: Limiting the patches to avoid ABI breakage.


Apeksha Gupta (1):
  bus/fslmc: fix dereferencing null pointer

Hemant Agrawal (2):
  net/dpaa2: add default Rx params in devinfo
  net/dpaa2: reduce prints in queue count functions

Jun Yang (1):
  net/dpaa2: use cong group id for multiple tcs

Nipun Gupta (3):
  net/dpaa2: do not prefetch annotaion for physical mode
  drivers: dpaa2 enhance portal alloc failure log
  net/dpaa2: support UDP dst port based muxing

Rohit Raj (1):
  net/dpaa2: fix 10g port negotiation issue

 drivers/bus/fslmc/portal/dpaa2_hw_pvt.h     |  6 +--
 drivers/bus/fslmc/qbman/qbman_debug.c       |  9 ++--
 drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c |  8 ++-
 drivers/event/dpaa2/dpaa2_eventdev.c        |  8 ++-
 drivers/mempool/dpaa2/dpaa2_hw_mempool.c    | 12 +++--
 drivers/net/dpaa/dpaa_ethdev.c              |  4 ++
 drivers/net/dpaa/dpaa_ethdev.h              |  1 +
 drivers/net/dpaa2/dpaa2_ethdev.c            | 32 ++++++++----
 drivers/net/dpaa2/dpaa2_ethdev.h            |  2 +
 drivers/net/dpaa2/dpaa2_mux.c               | 24 ++++++++-
 drivers/net/dpaa2/dpaa2_rxtx.c              | 56 ++++++++++++++-------
 drivers/raw/dpaa2_cmdif/dpaa2_cmdif.c       |  8 ++-
 drivers/raw/dpaa2_qdma/dpaa2_qdma.c         | 12 +++--
 13 files changed, 134 insertions(+), 48 deletions(-)

-- 
2.17.1


^ permalink raw reply	[relevance 3%]

* Re: [dpdk-dev] [PATCH] common/octeontx: fix GCC 9.1 ABI break
  2020-05-02 16:10  4% [dpdk-dev] [PATCH] common/octeontx: fix GCC 9.1 ABI break pbhagavatula
@ 2020-05-04  9:17  4% ` Harman Kalra
  2020-05-05 10:33  4%   ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
  0 siblings, 1 reply; 200+ results
From: Harman Kalra @ 2020-05-04  9:17 UTC (permalink / raw)
  To: pbhagavatula; +Cc: jerinj, ferruh.yigit, thomas, dev, stable

On Sat, May 02, 2020 at 09:40:31PM +0530, pbhagavatula@marvell.com wrote:
> From: Pavan Nikhilesh <pbhagavatula@marvell.com>
> 
> GCC 9.1 fixes a bug with passing bitfields as pass by value in function
> parameters and generates a warning for the same as below:
> 
> drivers/common/octeontx/octeontx_mbox.c:282:1: note: parameter passing
> for argument of type ‘struct mbox_intf_ver’ changed in GCC 9.1
> 
> Fix the warning generated by passing bitfield as pass by reference.
> 
> Fixes: b4134b2d31cc ("common/octeontx: update mbox to version 1.1.3")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>

Acked-by: Harman Kalra <hkalra@marvell.com>

> ---
> More info on GCC bug
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88469
> https://gcc.gnu.org/git/?p=gcc.git&a=commit;h=c590597c45948c6e6fa282878198fd226da95998
> 
>  drivers/common/octeontx/octeontx_mbox.c | 17 +++++++++--------
>  1 file changed, 9 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/common/octeontx/octeontx_mbox.c b/drivers/common/octeontx/octeontx_mbox.c
> index 2fd253107..effe0b267 100644
> --- a/drivers/common/octeontx/octeontx_mbox.c
> +++ b/drivers/common/octeontx/octeontx_mbox.c
> @@ -279,7 +279,7 @@ octeontx_start_domain(void)
>  }
> 
>  static int
> -octeontx_check_mbox_version(struct mbox_intf_ver app_intf_ver,
> +octeontx_check_mbox_version(struct mbox_intf_ver *app_intf_ver,
>  			    struct mbox_intf_ver *intf_ver)
>  {
>  	struct mbox_intf_ver kernel_intf_ver = {0};
> @@ -290,8 +290,9 @@ octeontx_check_mbox_version(struct mbox_intf_ver app_intf_ver,
>  	hdr.coproc = NO_COPROC;
>  	hdr.msg = RM_INTERFACE_VERSION;
> 
> -	result = octeontx_mbox_send(&hdr, &app_intf_ver, sizeof(app_intf_ver),
> -			&kernel_intf_ver, sizeof(kernel_intf_ver));
> +	result = octeontx_mbox_send(&hdr, app_intf_ver,
> +				    sizeof(struct mbox_intf_ver),
> +				    &kernel_intf_ver, sizeof(kernel_intf_ver));
>  	if (result != sizeof(kernel_intf_ver)) {
>  		mbox_log_err("Could not send interface version. Err=%d. FuncErr=%d\n",
>  			     result, hdr.res_code);
> @@ -301,9 +302,9 @@ octeontx_check_mbox_version(struct mbox_intf_ver app_intf_ver,
>  	if (intf_ver)
>  		*intf_ver = kernel_intf_ver;
> 
> -	if (app_intf_ver.platform != kernel_intf_ver.platform ||
> -			app_intf_ver.major != kernel_intf_ver.major ||
> -			app_intf_ver.minor != kernel_intf_ver.minor)
> +	if (app_intf_ver->platform != kernel_intf_ver.platform ||
> +			app_intf_ver->major != kernel_intf_ver.major ||
> +			app_intf_ver->minor != kernel_intf_ver.minor)
>  		result = -EINVAL;
> 
>  	return result;
> @@ -312,7 +313,7 @@ octeontx_check_mbox_version(struct mbox_intf_ver app_intf_ver,
>  int
>  octeontx_mbox_init(void)
>  {
> -	const struct mbox_intf_ver MBOX_INTERFACE_VERSION = {
> +	struct mbox_intf_ver MBOX_INTERFACE_VERSION = {
>  		.platform = 0x01,
>  		.major = 0x01,
>  		.minor = 0x03
> @@ -330,7 +331,7 @@ octeontx_mbox_init(void)
>  		return ret;
>  	}
> 
> -	ret = octeontx_check_mbox_version(MBOX_INTERFACE_VERSION,
> +	ret = octeontx_check_mbox_version(&MBOX_INTERFACE_VERSION,
>  					  &rm_intf_ver);
>  	if (ret < 0) {
>  		mbox_log_err("MBOX version: Kernel(%d.%d.%d) != DPDK(%d.%d.%d)",
> --
> 2.26.2
> 

^ permalink raw reply	[relevance 4%]

* [dpdk-dev] [PATCH v3 1/4] lib: introduce IF Proxy library
  2020-05-04  8:53  2% ` [dpdk-dev] [PATCH v3 " Andrzej Ostruszka
@ 2020-05-04  8:53  1%   ` Andrzej Ostruszka
  0 siblings, 0 replies; 200+ results
From: Andrzej Ostruszka @ 2020-05-04  8:53 UTC (permalink / raw)
  To: dev, Thomas Monjalon

This library allows to designate ports visible to the system (such as
Tun/Tap or KNI) as port representors serving as proxies for other DPDK
ports.  When such a proxy is configured this library initially queries
network configuration from the system and later monitors its changes.

The information gathered is passed to the application either via a set
of user registered callbacks or as an event added to the configured
notification queue (or a combination of these two mechanisms).  This way
user can use normal network utilities (like those from the iproute2
suite) to configure DPDK ports.

Signed-off-by: Andrzej Ostruszka <aostruszka@marvell.com>
---
 MAINTAINERS                                  |   3 +
 config/common_base                           |   5 +
 config/common_linux                          |   1 +
 lib/Makefile                                 |   2 +
 lib/librte_eal/include/rte_eal_interrupts.h  |   2 +
 lib/librte_eal/linux/eal_interrupts.c        |  14 +-
 lib/librte_if_proxy/Makefile                 |  29 +
 lib/librte_if_proxy/if_proxy_common.c        | 564 ++++++++++++++++++
 lib/librte_if_proxy/if_proxy_priv.h          |  97 +++
 lib/librte_if_proxy/linux/Makefile           |   4 +
 lib/librte_if_proxy/linux/if_proxy.c         | 563 ++++++++++++++++++
 lib/librte_if_proxy/meson.build              |  19 +
 lib/librte_if_proxy/rte_if_proxy.h           | 585 +++++++++++++++++++
 lib/librte_if_proxy/rte_if_proxy_version.map |  20 +
 lib/meson.build                              |   2 +-
 15 files changed, 1905 insertions(+), 5 deletions(-)
 create mode 100644 lib/librte_if_proxy/Makefile
 create mode 100644 lib/librte_if_proxy/if_proxy_common.c
 create mode 100644 lib/librte_if_proxy/if_proxy_priv.h
 create mode 100644 lib/librte_if_proxy/linux/Makefile
 create mode 100644 lib/librte_if_proxy/linux/if_proxy.c
 create mode 100644 lib/librte_if_proxy/meson.build
 create mode 100644 lib/librte_if_proxy/rte_if_proxy.h
 create mode 100644 lib/librte_if_proxy/rte_if_proxy_version.map

diff --git a/MAINTAINERS b/MAINTAINERS
index e05c80504..1013745ce 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1472,6 +1472,9 @@ F: examples/bpf/
 F: app/test/test_bpf.c
 F: doc/guides/prog_guide/bpf_lib.rst
 
+IF Proxy - EXPERIMENTAL
+M: Andrzej Ostruszka <aostruszka@marvell.com>
+F: lib/librte_if_proxy/
 
 Test Applications
 -----------------
diff --git a/config/common_base b/config/common_base
index 14000ba07..95ca8dbf6 100644
--- a/config/common_base
+++ b/config/common_base
@@ -1087,6 +1087,11 @@ CONFIG_RTE_LIBRTE_BPF_ELF=n
 #
 CONFIG_RTE_LIBRTE_IPSEC=y
 
+#
+# Compile librte_if_proxy
+#
+CONFIG_RTE_LIBRTE_IF_PROXY=n
+
 #
 # Compile the test application
 #
diff --git a/config/common_linux b/config/common_linux
index 816810671..1244eb0ae 100644
--- a/config/common_linux
+++ b/config/common_linux
@@ -16,6 +16,7 @@ CONFIG_RTE_LIBRTE_VHOST_NUMA=y
 CONFIG_RTE_LIBRTE_VHOST_POSTCOPY=n
 CONFIG_RTE_LIBRTE_PMD_VHOST=y
 CONFIG_RTE_LIBRTE_IFC_PMD=y
+CONFIG_RTE_LIBRTE_IF_PROXY=y
 CONFIG_RTE_LIBRTE_PMD_AF_PACKET=y
 CONFIG_RTE_LIBRTE_PMD_MEMIF=y
 CONFIG_RTE_LIBRTE_PMD_SOFTNIC=y
diff --git a/lib/Makefile b/lib/Makefile
index d0ec3919b..1e7d78183 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -118,6 +118,8 @@ DIRS-$(CONFIG_RTE_LIBRTE_TELEMETRY) += librte_telemetry
 DEPDIRS-librte_telemetry := librte_eal librte_metrics librte_ethdev
 DIRS-$(CONFIG_RTE_LIBRTE_RCU) += librte_rcu
 DEPDIRS-librte_rcu := librte_eal librte_ring
+DIRS-$(CONFIG_RTE_LIBRTE_IF_PROXY) += librte_if_proxy
+DEPDIRS-librte_if_proxy := librte_eal librte_ethdev
 
 ifeq ($(CONFIG_RTE_EXEC_ENV_LINUX),y)
 DIRS-$(CONFIG_RTE_LIBRTE_KNI) += librte_kni
diff --git a/lib/librte_eal/include/rte_eal_interrupts.h b/lib/librte_eal/include/rte_eal_interrupts.h
index 773a34a42..296a3853d 100644
--- a/lib/librte_eal/include/rte_eal_interrupts.h
+++ b/lib/librte_eal/include/rte_eal_interrupts.h
@@ -36,6 +36,8 @@ enum rte_intr_handle_type {
 	RTE_INTR_HANDLE_VDEV,         /**< virtual device */
 	RTE_INTR_HANDLE_DEV_EVENT,    /**< device event handle */
 	RTE_INTR_HANDLE_VFIO_REQ,     /**< VFIO request handle */
+	RTE_INTR_HANDLE_NETLINK,      /**< netlink notification handle */
+
 	RTE_INTR_HANDLE_MAX           /**< count of elements */
 };
 
diff --git a/lib/librte_eal/linux/eal_interrupts.c b/lib/librte_eal/linux/eal_interrupts.c
index 16e7a7d51..91ddafc59 100644
--- a/lib/librte_eal/linux/eal_interrupts.c
+++ b/lib/librte_eal/linux/eal_interrupts.c
@@ -691,6 +691,9 @@ rte_intr_enable(const struct rte_intr_handle *intr_handle)
 		break;
 	/* not used at this moment */
 	case RTE_INTR_HANDLE_ALARM:
+#if RTE_LIBRTE_IF_PROXY
+	case RTE_INTR_HANDLE_NETLINK:
+#endif
 		rc = -1;
 		break;
 #ifdef VFIO_PRESENT
@@ -818,6 +821,9 @@ rte_intr_disable(const struct rte_intr_handle *intr_handle)
 		break;
 	/* not used at this moment */
 	case RTE_INTR_HANDLE_ALARM:
+#if RTE_LIBRTE_IF_PROXY
+	case RTE_INTR_HANDLE_NETLINK:
+#endif
 		rc = -1;
 		break;
 #ifdef VFIO_PRESENT
@@ -915,12 +921,12 @@ eal_intr_process_interrupts(struct epoll_event *events, int nfds)
 			break;
 #endif
 #endif
-		case RTE_INTR_HANDLE_VDEV:
 		case RTE_INTR_HANDLE_EXT:
-			bytes_read = 0;
-			call = true;
-			break;
+		case RTE_INTR_HANDLE_VDEV:
 		case RTE_INTR_HANDLE_DEV_EVENT:
+#if RTE_LIBRTE_IF_PROXY
+		case RTE_INTR_HANDLE_NETLINK:
+#endif
 			bytes_read = 0;
 			call = true;
 			break;
diff --git a/lib/librte_if_proxy/Makefile b/lib/librte_if_proxy/Makefile
new file mode 100644
index 000000000..43cb702a2
--- /dev/null
+++ b/lib/librte_if_proxy/Makefile
@@ -0,0 +1,29 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(C) 2020 Marvell International Ltd.
+
+include $(RTE_SDK)/mk/rte.vars.mk
+
+# library name
+LIB = librte_if_proxy.a
+
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+CFLAGS += -O3
+CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR)
+LDLIBS += -lrte_eal -lrte_ethdev
+
+EXPORT_MAP := rte_if_proxy_version.map
+
+LIBABIVER := 1
+
+# all source are stored in SRCS-y
+SRCS-$(CONFIG_RTE_LIBRTE_IF_PROXY) := if_proxy_common.c
+
+SYSDIR := $(patsubst "%app",%,$(CONFIG_RTE_EXEC_ENV))
+include $(SRCDIR)/$(SYSDIR)/Makefile
+
+SRCS-$(CONFIG_RTE_LIBRTE_IF_PROXY) += $(addprefix $(SYSDIR)/,$(SRCS))
+
+# install this header file
+SYMLINK-$(CONFIG_RTE_LIBRTE_IF_PROXY)-include := rte_if_proxy.h
+
+include $(RTE_SDK)/mk/rte.lib.mk
diff --git a/lib/librte_if_proxy/if_proxy_common.c b/lib/librte_if_proxy/if_proxy_common.c
new file mode 100644
index 000000000..6f72511f4
--- /dev/null
+++ b/lib/librte_if_proxy/if_proxy_common.c
@@ -0,0 +1,564 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(C) 2020 Marvell International Ltd.
+ */
+
+#include "if_proxy_priv.h"
+#include <rte_string_fns.h>
+
+/* Definitions of data mentioned in if_proxy_priv.h and local ones. */
+int ifpx_log_type;
+
+/* Table keeping mapping between port and their proxies. */
+static
+uint16_t ifpx_ports[RTE_MAX_ETHPORTS];
+
+rte_spinlock_t ifpx_lock = RTE_SPINLOCK_INITIALIZER;
+
+struct ifpx_proxies_head ifpx_proxies = TAILQ_HEAD_INITIALIZER(ifpx_proxies);
+
+struct ifpx_queue_node {
+	TAILQ_ENTRY(ifpx_queue_node) elem;
+	uint16_t state;
+	struct rte_ring *r;
+};
+static
+TAILQ_HEAD(ifpx_queues_head, ifpx_queue_node) ifpx_queues =
+		TAILQ_HEAD_INITIALIZER(ifpx_queues);
+
+/* All callbacks have similar signature (taking pointer to some event) so we'll
+ * use this f_ptr to typecast and invoke them in a generic way.  There is one
+ * exception though - notification about completed initial configuration - and
+ * it is handled separately.
+ */
+union ifpx_cb_ptr {
+	int (*f_ptr)(void *ev); /* type for normal event notification */
+	union rte_ifpx_cb_ptr cb;
+} ifpx_callbacks[RTE_IFPX_NUM_EVENTS];
+
+uint64_t rte_ifpx_events_available(void)
+{
+	if (ifpx_platform.events)
+		return ifpx_platform.events();
+
+	/* If callback is not provided then all events are supported. */
+	return (1ULL << RTE_IFPX_NUM_EVENTS) - 1;
+}
+
+uint16_t rte_ifpx_proxy_create(enum rte_ifpx_proxy_type type)
+{
+	char devargs[16] = { '\0' };
+	int dev_cnt = 0, nlen;
+	uint16_t port_id;
+
+	switch (type) {
+	case RTE_IFPX_DEFAULT:
+	case RTE_IFPX_TAP:
+		nlen = strlcpy(devargs, "net_tap", sizeof(devargs));
+		break;
+	case RTE_IFPX_KNI:
+		nlen = strlcpy(devargs, "net_kni", sizeof(devargs));
+		break;
+	default:
+		IFPX_LOG(ERR, "Unknown proxy type: %d", type);
+		return RTE_MAX_ETHPORTS;
+	}
+
+	RTE_ETH_FOREACH_DEV(port_id) {
+		if (strcmp(rte_eth_devices[port_id].device->driver->name,
+			   devargs) == 0)
+			++dev_cnt;
+	}
+	snprintf(devargs+nlen, sizeof(devargs)-nlen, "%d", dev_cnt);
+
+	return rte_ifpx_proxy_create_by_devarg(devargs);
+}
+
+uint16_t rte_ifpx_proxy_create_by_devarg(const char *devarg)
+{
+	uint16_t port_id = RTE_MAX_ETHPORTS;
+	struct rte_dev_iterator iter;
+
+	if (rte_dev_probe(devarg) < 0) {
+		IFPX_LOG(ERR, "Failed to create proxy port %s\n", devarg);
+		return RTE_MAX_ETHPORTS;
+	}
+
+	if (rte_eth_iterator_init(&iter, devarg) == 0) {
+		port_id = rte_eth_iterator_next(&iter);
+		if (port_id != RTE_MAX_ETHPORTS)
+			rte_eth_iterator_cleanup(&iter);
+	}
+
+	return port_id;
+}
+
+int ifpx_proxy_destroy(struct ifpx_proxy_node *px)
+{
+	unsigned int i;
+	uint16_t proxy_id = px->proxy_id;
+
+	/* This function is expected to be called with a lock held. */
+	RTE_ASSERT(rte_spinlock_trylock(&ifpx_lock) == 0);
+
+	if (px->state & IN_USE) {
+		px->state |= DEL_PENDING;
+		return 0;
+	}
+
+	TAILQ_REMOVE(&ifpx_proxies, px, elem);
+	free(px);
+
+	/* Clear any bindings for this proxy. */
+	for (i = 0; i < RTE_DIM(ifpx_ports); ++i) {
+		if (ifpx_ports[i] == proxy_id)
+			ifpx_ports[i] = RTE_MAX_ETHPORTS;
+	}
+
+	return rte_dev_remove(rte_eth_devices[proxy_id].device);
+}
+
+int rte_ifpx_proxy_destroy(uint16_t proxy_id)
+{
+	struct ifpx_proxy_node *px;
+	int ec;
+
+	rte_spinlock_lock(&ifpx_lock);
+	TAILQ_FOREACH(px, &ifpx_proxies, elem) {
+		if (px->proxy_id == proxy_id)
+			break;
+	}
+	if (!px) {
+		ec = -EINVAL;
+		goto exit;
+	}
+
+	ec = ifpx_proxy_destroy(px);
+exit:
+	rte_spinlock_unlock(&ifpx_lock);
+	return ec;
+}
+
+int rte_ifpx_queue_add(struct rte_ring *r)
+{
+	struct ifpx_queue_node *node;
+	int ec = 0;
+
+	if (!r)
+		return -EINVAL;
+
+	rte_spinlock_lock(&ifpx_lock);
+	TAILQ_FOREACH(node, &ifpx_queues, elem) {
+		if (node->r == r) {
+			ec = -EEXIST;
+			goto exit;
+		}
+	}
+
+	node = malloc(sizeof(*node));
+	if (!node) {
+		ec = -ENOMEM;
+		goto exit;
+	}
+
+	node->r = r;
+	TAILQ_INSERT_TAIL(&ifpx_queues, node, elem);
+exit:
+	rte_spinlock_unlock(&ifpx_lock);
+
+	return ec;
+}
+
+int rte_ifpx_queue_remove(struct rte_ring *r)
+{
+	struct ifpx_queue_node *node, *next;
+	int ec = -EINVAL;
+
+	if (!r)
+		return ec;
+
+	rte_spinlock_lock(&ifpx_lock);
+	for (node = TAILQ_FIRST(&ifpx_queues); node; node = next) {
+		next = TAILQ_NEXT(node, elem);
+		if (node->r != r)
+			continue;
+		TAILQ_REMOVE(&ifpx_queues, node, elem);
+		free(node);
+		ec = 0;
+		break;
+	}
+	rte_spinlock_unlock(&ifpx_lock);
+
+	return ec;
+}
+
+int rte_ifpx_port_bind(uint16_t port_id, uint16_t proxy_id)
+{
+	struct rte_eth_dev_info proxy_eth_info;
+	struct ifpx_proxy_node *px;
+	int ec;
+
+	rte_spinlock_lock(&ifpx_lock);
+
+	if (port_id >= RTE_MAX_ETHPORTS || proxy_id >= RTE_MAX_ETHPORTS ||
+	    /* port is a proxy */
+	    ifpx_ports[port_id] == port_id) {
+		IFPX_LOG(ERR, "Invalid port_id: %d", port_id);
+		ec = -EINVAL;
+		goto error;
+	}
+
+	/* Do automatic rebinding but issue a warning since this is not
+	 * considered to be a valid behaviour.
+	 */
+	if (ifpx_ports[port_id] != RTE_MAX_ETHPORTS) {
+		IFPX_LOG(WARNING, "Port already bound: %d -> %d", port_id,
+			 ifpx_ports[port_id]);
+	}
+
+	/* Search for existing proxy - if not found add one to the list. */
+	TAILQ_FOREACH(px, &ifpx_proxies, elem) {
+		if (px->proxy_id == proxy_id)
+			break;
+	}
+	if (!px) {
+		ec = rte_eth_dev_info_get(proxy_id, &proxy_eth_info);
+		if (ec < 0 || proxy_eth_info.if_index == 0) {
+			IFPX_LOG(ERR, "Invalid proxy: %d", proxy_id);
+			if (ec >= 0)
+				ec = -EINVAL;
+			goto error;
+		}
+		px = malloc(sizeof(*px));
+		if (!px) {
+			ec = -ENOMEM;
+			goto error;
+		}
+		px->proxy_id = proxy_id;
+		px->info.if_index = proxy_eth_info.if_index;
+		rte_eth_dev_get_mtu(proxy_id, &px->info.mtu);
+		rte_eth_macaddr_get(proxy_id, &px->info.mac);
+		memset(px->info.if_name, 0, sizeof(px->info.if_name));
+		TAILQ_INSERT_TAIL(&ifpx_proxies, px, elem);
+	}
+	ifpx_ports[port_id] = proxy_id;
+	rte_spinlock_unlock(&ifpx_lock);
+
+	/* Add proxy MAC to the port - since port will often just forward
+	 * packets from the proxy/system they will be sent with proxy MAC as
+	 * src.  In order to pass communication in other direction we should be
+	 * accepting packets with proxy MAC as dst.
+	 */
+	rte_eth_dev_mac_addr_add(port_id, &px->info.mac, 0);
+
+	if (ifpx_platform.get_info)
+		ifpx_platform.get_info(px->info.if_index);
+
+	return 0;
+
+error:
+	rte_spinlock_unlock(&ifpx_lock);
+	return ec;
+}
+
+int rte_ifpx_port_unbind(uint16_t port_id)
+{
+	unsigned int i, cnt;
+	uint16_t proxy_id;
+	struct ifpx_proxy_node *px;
+	int ec = 0;
+
+	rte_spinlock_lock(&ifpx_lock);
+	if (port_id >= RTE_MAX_ETHPORTS ||
+	    ifpx_ports[port_id] == RTE_MAX_ETHPORTS ||
+	    /* port is a proxy */
+	    ifpx_ports[port_id] == port_id) {
+		ec = -EINVAL;
+		goto exit;
+	}
+
+	proxy_id = ifpx_ports[port_id];
+	ifpx_ports[port_id] = RTE_MAX_ETHPORTS;
+
+	for (i = 0, cnt = 0; i < RTE_DIM(ifpx_ports); ++i) {
+		if (ifpx_ports[i] == proxy_id)
+			++cnt;
+	}
+
+	/* If there is no port bound to this proxy then remove it. */
+	if (cnt == 0) {
+		TAILQ_FOREACH(px, &ifpx_proxies, elem) {
+			if (px->proxy_id == proxy_id)
+				break;
+		}
+		RTE_ASSERT(px);
+		ec = ifpx_proxy_destroy(px);
+	}
+exit:
+	rte_spinlock_unlock(&ifpx_lock);
+	return ec;
+}
+
+int rte_ifpx_callbacks_register(unsigned int len,
+				const struct rte_ifpx_callback cbs[])
+{
+	unsigned int i;
+
+	if (!cbs || len == 0)
+		return -EINVAL;
+
+	rte_spinlock_lock(&ifpx_lock);
+
+	for (i = 0; i < len; ++i) {
+		if (cbs[i].type < 0 || cbs[i].type > RTE_IFPX_LAST_EVENT) {
+			IFPX_LOG(WARNING, "Invalid event type: %d",
+				 cbs[i].type);
+			continue;
+		}
+		ifpx_callbacks[i].cb = cbs[i].callback;
+	}
+
+	rte_spinlock_unlock(&ifpx_lock);
+
+	return 0;
+}
+
+void rte_ifpx_callbacks_unregister_all(void)
+{
+	rte_spinlock_lock(&ifpx_lock);
+	memset(&ifpx_callbacks, 0, sizeof(ifpx_callbacks));
+	rte_spinlock_unlock(&ifpx_lock);
+}
+
+int rte_ifpx_callbacks_unregister(enum rte_ifpx_event_type ev)
+{
+	if (ev < 0 || ev > RTE_IFPX_CFG_DONE)
+		return -EINVAL;
+
+	rte_spinlock_lock(&ifpx_lock);
+	ifpx_callbacks[ev].f_ptr = NULL;
+	rte_spinlock_unlock(&ifpx_lock);
+
+	return 0;
+}
+
+uint16_t rte_ifpx_proxy_get(uint16_t port_id)
+{
+	uint16_t p = RTE_MAX_ETHPORTS;
+
+	if (port_id < RTE_MAX_ETHPORTS) {
+		rte_spinlock_lock(&ifpx_lock);
+		p = ifpx_ports[port_id];
+		rte_spinlock_unlock(&ifpx_lock);
+	}
+
+	return p;
+}
+
+unsigned int rte_ifpx_port_get(uint16_t proxy_id,
+			       uint16_t *ports, unsigned int num)
+{
+	unsigned int p, cnt = 0;
+
+	rte_spinlock_lock(&ifpx_lock);
+	for (p = 0; p < RTE_DIM(ifpx_ports); ++p) {
+		if (ifpx_ports[p] == proxy_id && ifpx_ports[p] != p) {
+			++cnt;
+			if (ports && num > 0) {
+				*ports++ = p;
+				--num;
+			}
+		}
+	}
+	rte_spinlock_unlock(&ifpx_lock);
+
+	return cnt;
+}
+
+const struct rte_ifpx_info *rte_ifpx_info_get(uint16_t port_id)
+{
+	struct ifpx_proxy_node *px;
+
+	rte_spinlock_lock(&ifpx_lock);
+
+	if (port_id >= RTE_MAX_ETHPORTS ||
+	    ifpx_ports[port_id] == RTE_MAX_ETHPORTS) {
+		rte_spinlock_unlock(&ifpx_lock);
+		return NULL;
+	}
+
+	TAILQ_FOREACH(px, &ifpx_proxies, elem) {
+		if (px->proxy_id == ifpx_ports[port_id])
+			break;
+	}
+	rte_spinlock_unlock(&ifpx_lock);
+	RTE_ASSERT(px && "Internal IF Proxy library error");
+
+	return &px->info;
+}
+
+static
+void queue_event(const struct rte_ifpx_event *ev, struct rte_ring *r)
+{
+	struct rte_ifpx_event *e = malloc(sizeof(*ev));
+
+	if (!e) {
+		IFPX_LOG(ERR, "Failed to allocate event!");
+		return;
+	}
+	RTE_ASSERT(r);
+
+	*e = *ev;
+	rte_ring_sp_enqueue(r, e);
+}
+
+void ifpx_notify_event(struct rte_ifpx_event *ev, struct ifpx_proxy_node *px)
+{
+	struct ifpx_queue_node *q;
+	int done = 0;
+	uint16_t p, proxy_id;
+
+	if (px) {
+		if (px->state & DEL_PENDING)
+			return;
+		proxy_id = px->proxy_id;
+		RTE_ASSERT(proxy_id != RTE_MAX_ETHPORTS);
+		px->state |= IN_USE;
+	} else
+		proxy_id = RTE_MAX_ETHPORTS;
+
+	RTE_ASSERT(ev && ev->type >= 0 && ev->type <= RTE_IFPX_LAST_EVENT);
+	/* This function is expected to be called with a lock held. */
+	RTE_ASSERT(rte_spinlock_trylock(&ifpx_lock) == 0);
+
+	if (ifpx_callbacks[ev->type].f_ptr) {
+		union ifpx_cb_ptr fun = ifpx_callbacks[ev->type];
+
+		/* Below we drop the lock for the time of callback call to allow
+		 * for calling of IF Proxy API.
+		 */
+		if (px) {
+			for (p = 0; p < RTE_DIM(ifpx_ports); ++p) {
+				if (ifpx_ports[p] != proxy_id ||
+				    ifpx_ports[p] == p)
+					continue;
+				ev->data.port_id = p;
+				rte_spinlock_unlock(&ifpx_lock);
+				done = fun.f_ptr(&ev->data) || done;
+				rte_spinlock_lock(&ifpx_lock);
+			}
+		} else {
+			RTE_ASSERT(ev->type == RTE_IFPX_CFG_DONE);
+			rte_spinlock_unlock(&ifpx_lock);
+			done = fun.cb.cfg_done();
+			rte_spinlock_lock(&ifpx_lock);
+		}
+	}
+	if (done)
+		goto exit;
+
+	/* Event not "consumed" yet so try to notify via queues. */
+	TAILQ_FOREACH(q, &ifpx_queues, elem) {
+		if (px) {
+			for (p = 0; p < RTE_DIM(ifpx_ports); ++p) {
+				if (ifpx_ports[p] != proxy_id ||
+				    ifpx_ports[p] == p)
+					continue;
+				/* Set the port_id - the remaining params should
+				 * be filled before calling this function.
+				 */
+				ev->data.port_id = p;
+				queue_event(ev, q->r);
+			}
+		} else
+			queue_event(ev, q->r);
+	}
+exit:
+	if (px)
+		px->state &= ~IN_USE;
+}
+
+void ifpx_cleanup_proxies(void)
+{
+	struct ifpx_proxy_node *px, *next;
+	for (px = TAILQ_FIRST(&ifpx_proxies); px; px = next) {
+		next = TAILQ_NEXT(px, elem);
+		if (px->state & DEL_PENDING)
+			ifpx_proxy_destroy(px);
+	}
+}
+
+int rte_ifpx_listen(void)
+{
+	int ec;
+
+	if (!ifpx_platform.listen)
+		return -ENOTSUP;
+
+	ec = ifpx_platform.listen();
+	if (ec == 0 && ifpx_platform.get_info)
+		ifpx_platform.get_info(0);
+
+	return ec;
+}
+
+int rte_ifpx_close(void)
+{
+	struct ifpx_proxy_node *px;
+	struct ifpx_queue_node *q;
+	unsigned int p;
+	int ec = 0;
+
+	rte_spinlock_lock(&ifpx_lock);
+
+	if (ifpx_platform.close) {
+		ec = ifpx_platform.close();
+		if (ec != 0)
+			IFPX_LOG(ERR, "Platform 'close' calback failed.");
+	}
+
+	/* Remove queues. */
+	while (!TAILQ_EMPTY(&ifpx_queues)) {
+		q = TAILQ_FIRST(&ifpx_queues);
+		TAILQ_REMOVE(&ifpx_queues, q, elem);
+		free(q);
+	}
+
+	/* Clear callbacks. */
+	memset(&ifpx_callbacks, 0, sizeof(ifpx_callbacks));
+
+	/* Unbind ports. */
+	for (p = 0; p < RTE_DIM(ifpx_ports); ++p) {
+		if (ifpx_ports[p] == RTE_MAX_ETHPORTS)
+			continue;
+		/* We don't need to call rte_ifpx_port_unbind() here since we
+		 * clear proxies below anyway, just clearing the mapping is
+		 * enough (and besides it would deadlock :)).
+		 */
+		ifpx_ports[p] = RTE_MAX_ETHPORTS;
+	}
+
+	/* Clear proxies. */
+	while (!TAILQ_EMPTY(&ifpx_proxies)) {
+		px = TAILQ_FIRST(&ifpx_proxies);
+		TAILQ_REMOVE(&ifpx_proxies, px, elem);
+		free(px);
+	}
+
+	rte_spinlock_unlock(&ifpx_lock);
+
+	return ec;
+}
+
+RTE_INIT(if_proxy_init)
+{
+	unsigned int i;
+	for (i = 0; i < RTE_DIM(ifpx_ports); ++i)
+		ifpx_ports[i] = RTE_MAX_ETHPORTS;
+
+	ifpx_log_type = rte_log_register("lib.if_proxy");
+	if (ifpx_log_type >= 0)
+		rte_log_set_level(ifpx_log_type, RTE_LOG_WARNING);
+
+	if (ifpx_platform.init)
+		ifpx_platform.init();
+}
diff --git a/lib/librte_if_proxy/if_proxy_priv.h b/lib/librte_if_proxy/if_proxy_priv.h
new file mode 100644
index 000000000..7691494be
--- /dev/null
+++ b/lib/librte_if_proxy/if_proxy_priv.h
@@ -0,0 +1,97 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(C) 2020 Marvell International Ltd.
+ */
+#ifndef _IF_PROXY_PRIV_H_
+#define _IF_PROXY_PRIV_H_
+
+#include "rte_if_proxy.h"
+#include <rte_spinlock.h>
+
+#define RTE_IFPX_LAST_EVENT     RTE_IFPX_CFG_DONE
+#define RTE_IFPX_NUM_EVENTS     (RTE_IFPX_LAST_EVENT+1)
+#define RTE_IFPX_EVENT_INVALID  RTE_IFPX_NUM_EVENTS
+
+extern int ifpx_log_type;
+#define IFPX_LOG(level, fmt, args...) \
+	rte_log(RTE_LOG_ ## level, ifpx_log_type, "%s(): " fmt "\n", \
+		__func__, ##args)
+
+/* Since this library is really a slow/config path we guard all internal data
+ * with a lock - and only one for all of them should be enough.
+ */
+extern rte_spinlock_t ifpx_lock;
+
+enum ifpx_node_status {
+	IN_USE		= 1U << 0,
+	DEL_PENDING	= 1U << 1,
+};
+
+/* List of configured proxies */
+struct ifpx_proxy_node {
+	TAILQ_ENTRY(ifpx_proxy_node) elem;
+	uint16_t proxy_id;
+	uint16_t state;
+	struct rte_ifpx_info info;
+};
+extern
+TAILQ_HEAD(ifpx_proxies_head, ifpx_proxy_node) ifpx_proxies;
+
+/* This function should be called by the implementation whenever it notices
+ * change in the network configuration.  The arguments are:
+ * - ev : pointer to filled event data structure (all fields are expected to be
+ *     filled, with the exception of 'port_id' for all proxy/port related
+ *     events: this function clones the event notification for each bound port
+ *     and fills 'port_id' appropriately).
+ * - px : proxy node when given event is proxy/port related, otherwise pass NULL
+ */
+void ifpx_notify_event(struct rte_ifpx_event *ev, struct ifpx_proxy_node *px);
+
+/* This function should be called by the implementation whenever it is done with
+ * notification about network configuration change.  It is only really needed
+ * for the case of callback based API since from the callback user might attempt
+ * to remove proxies.  Only implementation really knows when notification for
+ * given proxy is finished so it is a duty of it to call this function to
+ * cleanup all proxies that has been marked for deletion.
+ */
+void ifpx_cleanup_proxies(void);
+
+/* This is the internal function removing the proxy from the list.  It is
+ * related to the notification function above and intended to be used by the
+ * platform implementation for the case of callback based API.
+ * During notification via callback the internal lock is released so that
+ * operation would not deadlock on an attempt to take a lock.  However
+ * modification (destruction) is not really performed - instead the
+ * callbacks/proxies are marked as "to be deleted".
+ * Handling of callbacks that are "to be deleted" is done by the
+ * ifpx_notify_event() function itself however it cannot delete the proxies (in
+ * particular the proxy passed as an argument) since they might still be
+ * referred by the calling function.  So it is a responsibility of the platform
+ * implementation to check after calling notification function if there are any
+ * proxies to be removed and use ifpx_proxy_destroy() to actually release them.
+ */
+int ifpx_proxy_destroy(struct ifpx_proxy_node *px);
+
+/* Every implementation should provide definition of this structure:
+ * - init : called during library initialization (NULL when not needed)
+ * - events : this should return bitmask of supported events (can be NULL if all
+ *     defined events are supported by the implementation)
+ * - listen : this function should start service listening to the network
+ *     configuration events/changes,
+ * - close : this function should close the service started by listen()
+ * - get_info : this function should query system for current configuration of
+ *     interface with index 'if_index'.  After successful initialization of
+ *     listening service this function is called with 0 as an argument.  In that
+ *     case configuration of all ports should be obtained - and when this
+ *     procedure completes a RTE_IFPX_CFG_DONE event should be signaled via
+ *     ifpx_notify_event().
+ */
+extern
+struct ifpx_platform_callbacks {
+	void (*init)(void);
+	uint64_t (*events)(void);
+	int (*listen)(void);
+	int (*close)(void);
+	void (*get_info)(int if_index);
+} ifpx_platform;
+
+#endif /* _IF_PROXY_PRIV_H_ */
diff --git a/lib/librte_if_proxy/linux/Makefile b/lib/librte_if_proxy/linux/Makefile
new file mode 100644
index 000000000..275b7e1e3
--- /dev/null
+++ b/lib/librte_if_proxy/linux/Makefile
@@ -0,0 +1,4 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(C) 2020 Marvell International Ltd.
+
+SRCS += if_proxy.c
diff --git a/lib/librte_if_proxy/linux/if_proxy.c b/lib/librte_if_proxy/linux/if_proxy.c
new file mode 100644
index 000000000..618631b01
--- /dev/null
+++ b/lib/librte_if_proxy/linux/if_proxy.c
@@ -0,0 +1,563 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(C) 2020 Marvell International Ltd.
+ */
+#include <if_proxy_priv.h>
+#include <rte_interrupts.h>
+#include <rte_string_fns.h>
+
+#include <stdbool.h>
+#include <unistd.h>
+#include <errno.h>
+#include <sys/socket.h>
+#include <linux/rtnetlink.h>
+#include <linux/if.h>
+
+static
+struct rte_intr_handle ifpx_irq = {
+	.type = RTE_INTR_HANDLE_NETLINK,
+	.fd = -1,
+};
+
+static
+unsigned int ifpx_pid;
+
+static
+int request_info(int type, int index)
+{
+	static rte_spinlock_t send_lock = RTE_SPINLOCK_INITIALIZER;
+	struct info_get {
+		struct nlmsghdr h;
+		union {
+			struct ifinfomsg ifm;
+			struct ifaddrmsg ifa;
+			struct rtmsg rtm;
+			struct ndmsg ndm;
+		} __rte_aligned(NLMSG_ALIGNTO);
+	} info_req;
+	int ret;
+
+	memset(&info_req, 0, sizeof(info_req));
+	/* First byte of these messages is family, so just make sure that this
+	 * memset is enough to get all families.
+	 */
+	RTE_ASSERT(AF_UNSPEC == 0);
+
+	info_req.h.nlmsg_pid = ifpx_pid;
+	info_req.h.nlmsg_type = type;
+	info_req.h.nlmsg_flags = NLM_F_REQUEST | NLM_F_DUMP;
+	info_req.h.nlmsg_len = offsetof(struct info_get, ifm);
+
+	switch (type) {
+	case RTM_GETLINK:
+		info_req.h.nlmsg_len += sizeof(info_req.ifm);
+		info_req.ifm.ifi_index = index;
+		break;
+	case RTM_GETADDR:
+		info_req.h.nlmsg_len += sizeof(info_req.ifa);
+		info_req.ifa.ifa_index = index;
+		break;
+	case RTM_GETROUTE:
+		info_req.h.nlmsg_len += sizeof(info_req.rtm);
+		break;
+	case RTM_GETNEIGH:
+		info_req.h.nlmsg_len += sizeof(info_req.ndm);
+		break;
+	default:
+		IFPX_LOG(WARNING, "Unhandled message type: %d", type);
+		return -EINVAL;
+	}
+	/* Store request type (and if it is global or link specific) in 'seq'.
+	 * Later it is used during handling of reply to continue requesting of
+	 * information dump from system - if needed.
+	 */
+	info_req.h.nlmsg_seq = index << 8 | type;
+
+	IFPX_LOG(DEBUG, "\tRequesting msg %d for: %u", type, index);
+
+	rte_spinlock_lock(&send_lock);
+retry:
+	ret = send(ifpx_irq.fd, &info_req, info_req.h.nlmsg_len, 0);
+	if (ret < 0) {
+		if (errno == EINTR) {
+			IFPX_LOG(DEBUG, "send() interrupted");
+			goto retry;
+		}
+		IFPX_LOG(ERR, "Failed to send netlink msg: %d", errno);
+		rte_errno = errno;
+	}
+	rte_spinlock_unlock(&send_lock);
+
+	return ret;
+}
+
+static
+void handle_link(const struct nlmsghdr *h)
+{
+	const struct ifinfomsg *ifi = NLMSG_DATA(h);
+	int alen = h->nlmsg_len - NLMSG_LENGTH(sizeof(*ifi));
+	const struct rtattr *attrs[IFLA_MAX+1] = { NULL };
+	const struct rtattr *attr;
+	struct ifpx_proxy_node *px;
+	struct rte_ifpx_event ev;
+
+	IFPX_LOG(DEBUG, "\tLink action (%u): %u, 0x%x/0x%x (flags/changed)",
+		 ifi->ifi_index, h->nlmsg_type, ifi->ifi_flags,
+		 ifi->ifi_change);
+
+	rte_spinlock_lock(&ifpx_lock);
+	TAILQ_FOREACH(px, &ifpx_proxies, elem) {
+		if (px->info.if_index == (unsigned int)ifi->ifi_index)
+			break;
+	}
+
+	/* Drop messages that are not associated with any proxy */
+	if (!px)
+		goto exit;
+	/* When message is a reply to request for specific interface then keep
+	 * it only when it contains info for this interface.
+	 */
+	if (h->nlmsg_pid == ifpx_pid && h->nlmsg_seq >> 8 &&
+	    (h->nlmsg_seq >> 8) != (unsigned int)ifi->ifi_index)
+		goto exit;
+
+	for (attr = IFLA_RTA(ifi); RTA_OK(attr, alen);
+				   attr = RTA_NEXT(attr, alen)) {
+		if (attr->rta_type > IFLA_MAX)
+			continue;
+		attrs[attr->rta_type] = attr;
+	}
+
+	if (ifi->ifi_change & IFF_UP) {
+		ev.type = RTE_IFPX_LINK_CHANGE;
+		ev.link_change.is_up = ifi->ifi_flags & IFF_UP;
+		ifpx_notify_event(&ev, px);
+	}
+	if (attrs[IFLA_MTU]) {
+		uint16_t mtu = *(const int *)RTA_DATA(attrs[IFLA_MTU]);
+		if (mtu != px->info.mtu) {
+			px->info.mtu = mtu;
+			ev.type = RTE_IFPX_MTU_CHANGE;
+			ev.mtu_change.mtu = mtu;
+			ifpx_notify_event(&ev, px);
+		}
+	}
+	if (attrs[IFLA_ADDRESS]) {
+		const struct rte_ether_addr *mac =
+				RTA_DATA(attrs[IFLA_ADDRESS]);
+
+		RTE_ASSERT(RTA_PAYLOAD(attrs[IFLA_ADDRESS]) ==
+			   RTE_ETHER_ADDR_LEN);
+		if (memcmp(mac, &px->info.mac, RTE_ETHER_ADDR_LEN) != 0) {
+			rte_ether_addr_copy(mac, &px->info.mac);
+			ev.type = RTE_IFPX_MAC_CHANGE;
+			rte_ether_addr_copy(mac, &ev.mac_change.mac);
+			ifpx_notify_event(&ev, px);
+		}
+	}
+	if (h->nlmsg_pid == ifpx_pid) {
+		RTE_ASSERT((h->nlmsg_seq & 0xFF) == RTM_GETLINK);
+		/* If this is reply for specific link request (not initial
+		 * global dump) then follow up with address request, otherwise
+		 * just store the interface name.
+		 */
+		if (h->nlmsg_seq >> 8)
+			request_info(RTM_GETADDR, ifi->ifi_index);
+		else if (!px->info.if_name[0] && attrs[IFLA_IFNAME])
+			strlcpy(px->info.if_name, RTA_DATA(attrs[IFLA_IFNAME]),
+				sizeof(px->info.if_name));
+	}
+
+	ifpx_cleanup_proxies();
+exit:
+	rte_spinlock_unlock(&ifpx_lock);
+}
+
+static
+void handle_addr(const struct nlmsghdr *h, bool needs_del)
+{
+	const struct ifaddrmsg *ifa = NLMSG_DATA(h);
+	int alen = h->nlmsg_len - NLMSG_LENGTH(sizeof(*ifa));
+	const struct rtattr *attrs[IFA_MAX+1] = { NULL };
+	const struct rtattr *attr;
+	struct ifpx_proxy_node *px;
+	struct rte_ifpx_event ev;
+	const uint8_t *ip;
+
+	IFPX_LOG(DEBUG, "\tAddr action (%u): %u, family: %u",
+		 ifa->ifa_index, h->nlmsg_type, ifa->ifa_family);
+
+	rte_spinlock_lock(&ifpx_lock);
+	TAILQ_FOREACH(px, &ifpx_proxies, elem) {
+		if (px->info.if_index == ifa->ifa_index)
+			break;
+	}
+
+	/* Drop messages that are not associated with any proxy */
+	if (!px)
+		goto exit;
+	/* When message is a reply to request for specific interface then keep
+	 * it only when it contains info for this interface.
+	 */
+	if (h->nlmsg_pid == ifpx_pid && h->nlmsg_seq >> 8 &&
+	    (h->nlmsg_seq >> 8) != ifa->ifa_index)
+		goto exit;
+
+	for (attr = IFA_RTA(ifa); RTA_OK(attr, alen);
+				  attr = RTA_NEXT(attr, alen)) {
+		if (attr->rta_type > IFA_MAX)
+			continue;
+		attrs[attr->rta_type] = attr;
+	}
+
+	if (attrs[IFA_ADDRESS]) {
+		ip = RTA_DATA(attrs[IFA_ADDRESS]);
+		if (ifa->ifa_family == AF_INET) {
+			ev.type = needs_del ? RTE_IFPX_ADDR_DEL
+					    : RTE_IFPX_ADDR_ADD;
+			ev.addr_change.ip =
+					RTE_IPV4(ip[0], ip[1], ip[2], ip[3]);
+		} else {
+			ev.type = needs_del ? RTE_IFPX_ADDR6_DEL
+					    : RTE_IFPX_ADDR6_ADD;
+			memcpy(ev.addr6_change.ip, ip, 16);
+		}
+		ifpx_notify_event(&ev, px);
+		ifpx_cleanup_proxies();
+	}
+exit:
+	rte_spinlock_unlock(&ifpx_lock);
+}
+
+static
+void handle_route(const struct nlmsghdr *h, bool needs_del)
+{
+	const struct rtmsg *r = NLMSG_DATA(h);
+	int alen = h->nlmsg_len - NLMSG_LENGTH(sizeof(*r));
+	const struct rtattr *attrs[RTA_MAX+1] = { NULL };
+	const struct rtattr *attr;
+	struct rte_ifpx_event ev;
+	struct ifpx_proxy_node *px = NULL;
+	const uint8_t *ip;
+
+	IFPX_LOG(DEBUG, "\tRoute action: %u, family: %u",
+		 h->nlmsg_type, r->rtm_family);
+
+	for (attr = RTM_RTA(r); RTA_OK(attr, alen);
+				attr = RTA_NEXT(attr, alen)) {
+		if (attr->rta_type > RTA_MAX)
+			continue;
+		attrs[attr->rta_type] = attr;
+	}
+
+	memset(&ev, 0, sizeof(ev));
+	ev.type = RTE_IFPX_EVENT_INVALID;
+
+	rte_spinlock_lock(&ifpx_lock);
+	if (attrs[RTA_OIF]) {
+		int if_index = *((int32_t *)RTA_DATA(attrs[RTA_OIF]));
+
+		if (if_index > 0) {
+			TAILQ_FOREACH(px, &ifpx_proxies, elem) {
+				if (px->info.if_index == (uint32_t)if_index)
+					break;
+			}
+		}
+	}
+	/* We are only interested in routes related to the proxy interfaces and
+	 * we need to have dst - otherwise skip the message.
+	 */
+	if (!px || !attrs[RTA_DST])
+		goto exit;
+
+	ip = RTA_DATA(attrs[RTA_DST]);
+	/* This is common to both IPv4/6. */
+	ev.route_change.depth = r->rtm_dst_len;
+	if (r->rtm_family == AF_INET) {
+		ev.type = needs_del ? RTE_IFPX_ROUTE_DEL
+				    : RTE_IFPX_ROUTE_ADD;
+		ev.route_change.ip = RTE_IPV4(ip[0], ip[1], ip[2], ip[3]);
+	} else {
+		ev.type = needs_del ? RTE_IFPX_ROUTE6_DEL
+				    : RTE_IFPX_ROUTE6_ADD;
+		memcpy(ev.route6_change.ip, ip, 16);
+	}
+	if (attrs[RTA_GATEWAY]) {
+		ip = RTA_DATA(attrs[RTA_GATEWAY]);
+		if (r->rtm_family == AF_INET)
+			ev.route_change.gateway =
+					RTE_IPV4(ip[0], ip[1], ip[2], ip[3]);
+		else
+			memcpy(ev.route6_change.gateway, ip, 16);
+	}
+
+	ifpx_notify_event(&ev, px);
+	/* Let's check for proxies to remove here too - just in case somebody
+	 * removed the non-proxy related callback.
+	 */
+	ifpx_cleanup_proxies();
+exit:
+	rte_spinlock_unlock(&ifpx_lock);
+}
+
+/* Link, addr and route related messages seem to have this macro defined but not
+ * neighbour one.  Define one if it is missing - const qualifiers added just to
+ * silence compiler - for some reason it is not needed in equivalent macros for
+ * other messages and here compiler is complaining about (char*) cast on pointer
+ * to const.
+ */
+#ifndef NDA_RTA
+#define NDA_RTA(r) ((const struct rtattr *)(((const char *)(r)) + \
+			NLMSG_ALIGN(sizeof(struct ndmsg))))
+#endif
+
+static
+void handle_neigh(const struct nlmsghdr *h, bool needs_del)
+{
+	const struct ndmsg *n = NLMSG_DATA(h);
+	int alen = h->nlmsg_len - NLMSG_LENGTH(sizeof(*n));
+	const struct rtattr *attrs[NDA_MAX+1] = { NULL };
+	const struct rtattr *attr;
+	struct ifpx_proxy_node *px;
+	struct rte_ifpx_event ev;
+	const uint8_t *ip;
+
+	IFPX_LOG(DEBUG, "\tNeighbour action: %u, family: %u, state: %u, if: %d",
+		 h->nlmsg_type, n->ndm_family, n->ndm_state, n->ndm_ifindex);
+
+	for (attr = NDA_RTA(n); RTA_OK(attr, alen);
+				attr = RTA_NEXT(attr, alen)) {
+		if (attr->rta_type > NDA_MAX)
+			continue;
+		attrs[attr->rta_type] = attr;
+	}
+
+	memset(&ev, 0, sizeof(ev));
+	ev.type = RTE_IFPX_EVENT_INVALID;
+
+	rte_spinlock_lock(&ifpx_lock);
+	TAILQ_FOREACH(px, &ifpx_proxies, elem) {
+		if (px->info.if_index == (unsigned int)n->ndm_ifindex)
+			break;
+	}
+	/* We need only subset of neighbourhood related to proxy interfaces.
+	 * lladdr seems to be needed only for adding new entry - modifications
+	 * (also reported via RTM_NEWLINK) and deletion include only dst.
+	 */
+	if (!px || !attrs[NDA_DST] || (!needs_del && !attrs[NDA_LLADDR]))
+		goto exit;
+
+	ip = RTA_DATA(attrs[NDA_DST]);
+	if (n->ndm_family == AF_INET) {
+		ev.type = needs_del ? RTE_IFPX_NEIGH_DEL
+				    : RTE_IFPX_NEIGH_ADD;
+		ev.neigh_change.ip = RTE_IPV4(ip[0], ip[1], ip[2], ip[3]);
+	} else {
+		ev.type = needs_del ? RTE_IFPX_NEIGH6_DEL
+				    : RTE_IFPX_NEIGH6_ADD;
+		memcpy(ev.neigh6_change.ip, ip, 16);
+	}
+	if (attrs[NDA_LLADDR])
+		rte_ether_addr_copy(RTA_DATA(attrs[NDA_LLADDR]),
+				    &ev.neigh_change.mac);
+
+	ifpx_notify_event(&ev, px);
+	/* Let's check for proxies to remove here too - just in case somebody
+	 * removed the non-proxy related callback.
+	 */
+	ifpx_cleanup_proxies();
+exit:
+	rte_spinlock_unlock(&ifpx_lock);
+}
+
+static
+void if_proxy_intr_callback(void *arg __rte_unused)
+{
+	struct nlmsghdr *h;
+	struct sockaddr_nl addr;
+	socklen_t addr_len;
+	char buf[8192];
+	ssize_t len;
+
+restart:
+	len = recvfrom(ifpx_irq.fd, buf, sizeof(buf), 0,
+		       (struct sockaddr *)&addr, &addr_len);
+	if (len < 0) {
+		if (errno == EINTR) {
+			IFPX_LOG(DEBUG, "recvfrom() interrupted");
+			goto restart;
+		}
+		IFPX_LOG(ERR, "Failed to read netlink msg: %ld (errno %d)",
+			 len, errno);
+		return;
+	}
+	if (addr_len != sizeof(addr)) {
+		IFPX_LOG(ERR, "Invalid netlink addr size: %d", addr_len);
+		return;
+	}
+	IFPX_LOG(DEBUG, "Read %lu bytes (buf %lu) from %u/%u", len,
+		 sizeof(buf), addr.nl_pid, addr.nl_groups);
+
+	for (h = (struct nlmsghdr *)buf; NLMSG_OK(h, len);
+					 h = NLMSG_NEXT(h, len)) {
+		IFPX_LOG(DEBUG, "Recv msg: %u (%u/%u/%u seq/flags/pid)",
+			 h->nlmsg_type, h->nlmsg_seq, h->nlmsg_flags,
+			 h->nlmsg_pid);
+
+		switch (h->nlmsg_type) {
+		case RTM_NEWLINK:
+		case RTM_DELLINK:
+			handle_link(h);
+			break;
+		case RTM_NEWADDR:
+		case RTM_DELADDR:
+			handle_addr(h, h->nlmsg_type == RTM_DELADDR);
+			break;
+		case RTM_NEWROUTE:
+		case RTM_DELROUTE:
+			handle_route(h, h->nlmsg_type == RTM_DELROUTE);
+			break;
+		case RTM_NEWNEIGH:
+		case RTM_DELNEIGH:
+			handle_neigh(h, h->nlmsg_type == RTM_DELNEIGH);
+			break;
+		}
+
+		/* If this is a reply for global request then follow up with
+		 * additional requests and notify about finish.
+		 */
+		if (h->nlmsg_pid == ifpx_pid && (h->nlmsg_seq >> 8) == 0 &&
+		    h->nlmsg_type == NLMSG_DONE) {
+			if ((h->nlmsg_seq & 0xFF) == RTM_GETLINK)
+				request_info(RTM_GETADDR, 0);
+			else if ((h->nlmsg_seq & 0xFF) == RTM_GETADDR)
+				request_info(RTM_GETROUTE, 0);
+			else if ((h->nlmsg_seq & 0xFF) == RTM_GETROUTE)
+				request_info(RTM_GETNEIGH, 0);
+			else {
+				struct rte_ifpx_event ev = {
+					.type = RTE_IFPX_CFG_DONE
+				};
+
+				RTE_ASSERT((h->nlmsg_seq & 0xFF) ==
+						RTM_GETNEIGH);
+				rte_spinlock_lock(&ifpx_lock);
+				ifpx_notify_event(&ev, NULL);
+				rte_spinlock_unlock(&ifpx_lock);
+			}
+		}
+	}
+	IFPX_LOG(DEBUG, "Finished msg loop: %ld bytes left", len);
+}
+
+static
+int nlink_listen(void)
+{
+	struct sockaddr_nl addr = {
+		.nl_family = AF_NETLINK,
+		.nl_pid = 0,
+	};
+	socklen_t addr_len = sizeof(addr);
+	int ret;
+
+	if (ifpx_irq.fd != -1) {
+		rte_errno = EBUSY;
+		return -1;
+	}
+
+	addr.nl_groups = 1 << (RTNLGRP_LINK-1)
+			| 1 << (RTNLGRP_NEIGH-1)
+			| 1 << (RTNLGRP_IPV4_IFADDR-1)
+			| 1 << (RTNLGRP_IPV6_IFADDR-1)
+			| 1 << (RTNLGRP_IPV4_ROUTE-1)
+			| 1 << (RTNLGRP_IPV6_ROUTE-1);
+
+	ifpx_irq.fd = socket(AF_NETLINK, SOCK_RAW | SOCK_CLOEXEC,
+				 NETLINK_ROUTE);
+	if (ifpx_irq.fd == -1) {
+		IFPX_LOG(ERR, "Failed to create netlink socket: %d", errno);
+		goto error;
+	}
+	/* Starting with kernel 4.19 you can request dump for a specific
+	 * interface and kernel will filter out and send only relevant info.
+	 * Otherwise NLM_F_DUMP will generate info for all interfaces and you
+	 * need to filter them yourself.
+	 */
+#ifdef NETLINK_DUMP_STRICT_CHK
+	ret = 1; /* use this var also as an input param */
+	ret = setsockopt(ifpx_irq.fd, SOL_SOCKET, NETLINK_DUMP_STRICT_CHK,
+			 &ret, sizeof(ret));
+	if (ret < 0) {
+		IFPX_LOG(ERR, "Failed to set socket option: %d", errno);
+		goto error;
+	}
+#endif
+
+	ret = bind(ifpx_irq.fd, (struct sockaddr *)&addr, addr_len);
+	if (ret < 0) {
+		IFPX_LOG(ERR, "Failed to bind socket: %d", errno);
+		goto error;
+	}
+	ret = getsockname(ifpx_irq.fd, (struct sockaddr *)&addr, &addr_len);
+	if (ret < 0) {
+		IFPX_LOG(ERR, "Failed to get socket addr: %d", errno);
+		goto error;
+	} else {
+		ifpx_pid = addr.nl_pid;
+		IFPX_LOG(DEBUG, "Assigned port ID: %u", addr.nl_pid);
+	}
+
+	ret = rte_intr_callback_register(&ifpx_irq, if_proxy_intr_callback,
+					 NULL);
+	if (ret == 0)
+		return 0;
+
+error:
+	rte_errno = errno;
+	if (ifpx_irq.fd != -1) {
+		close(ifpx_irq.fd);
+		ifpx_irq.fd = -1;
+	}
+	return -1;
+}
+
+static
+int nlink_close(void)
+{
+	int ec;
+
+	if (ifpx_irq.fd < 0)
+		return -EBADFD;
+
+	/* Drop the lock for the time of unregistering - otherwise we might dead
+	 * lock e.g. we take a lock here and try to unregister and wait for the
+	 * interrupt lock but it is taken already because notification comes
+	 * and executes proxy callback which will try to take a lock.
+	 */
+	rte_spinlock_unlock(&ifpx_lock);
+	do
+		ec = rte_intr_callback_unregister(&ifpx_irq,
+						  if_proxy_intr_callback, NULL);
+	while (ec == -EAGAIN); /* unlikely but possible - at least I think so */
+	rte_spinlock_lock(&ifpx_lock);
+
+	close(ifpx_irq.fd);
+	ifpx_irq.fd = -1;
+	ifpx_pid = 0;
+
+	return 0;
+}
+
+static
+void nlink_get_info(int if_index)
+{
+	if (ifpx_irq.fd != -1)
+		request_info(RTM_GETLINK, if_index);
+}
+
+struct ifpx_platform_callbacks ifpx_platform = {
+	.init = NULL,
+	.events = NULL,
+	.listen = nlink_listen,
+	.close = nlink_close,
+	.get_info = nlink_get_info,
+};
diff --git a/lib/librte_if_proxy/meson.build b/lib/librte_if_proxy/meson.build
new file mode 100644
index 000000000..f0c1a6e15
--- /dev/null
+++ b/lib/librte_if_proxy/meson.build
@@ -0,0 +1,19 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(C) 2020 Marvell International Ltd.
+
+# Currently only implemented on Linux
+if not is_linux
+	build = false
+	reason = 'only supported on linux'
+endif
+
+version = 1
+allow_experimental_apis = true
+
+deps += ['ethdev']
+sources = files('if_proxy_common.c')
+headers = files('rte_if_proxy.h')
+
+if is_linux
+	sources += files('linux/if_proxy.c')
+endif
diff --git a/lib/librte_if_proxy/rte_if_proxy.h b/lib/librte_if_proxy/rte_if_proxy.h
new file mode 100644
index 000000000..2378b4424
--- /dev/null
+++ b/lib/librte_if_proxy/rte_if_proxy.h
@@ -0,0 +1,585 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(C) 2020 Marvell International Ltd.
+ */
+
+#ifndef _RTE_IF_PROXY_H_
+#define _RTE_IF_PROXY_H_
+
+/**
+ * @file
+ * RTE IF Proxy library
+ *
+ * The IF Proxy library allows for monitoring of system network configuration
+ * and configuration of DPDK ports by using usual system utilities (like the
+ * ones from iproute2 package).
+ *
+ * It is based on the notion of "proxy interface" which actually can be any DPDK
+ * port which is also visible to the system - that is it has non-zero 'if_index'
+ * field in 'rte_eth_dev_info' structure.
+ *
+ * If application doesn't have any such port (or doesn't want to use it for
+ * proxy) it can create one by calling:
+ *
+ *   proxy_id = rte_ifpx_create(RTE_IFPX_DEFAULT);
+ *
+ * This function is just a wrapper that constructs valid 'devargs' string based
+ * on the proxy type chosen (currently Tap or KNI) and creates the interface by
+ * calling rte_ifpx_dev_create().
+ *
+ * Once one has DPDK port capable of being proxy one can bind target DPDK port
+ * to it by calling.
+ *
+ *   rte_ifpx_port_bind(port_id, proxy_id);
+ *
+ * This binding is a logical one - there is no automatic packet forwarding
+ * between port and it's proxy since the library doesn't know the structure of
+ * application's packet processing.  It remains application responsibility to
+ * forward the packets from/to proxy port (by calling the usual DPDK RX/TX burst
+ * API).  However when the library notes some change to the proxy interface it
+ * will simply call appropriate callback with 'port_id' of the DPDK port that is
+ * bound to this proxy interface.  The binding can be 1 to many - that is many
+ * ports can point to one proxy - in that case registered callbacks will be
+ * called for every bound port.
+ *
+ * The callbacks that are used for notifications are described by the
+ * 'rte_ifpx_callback' structure and they are registered by calling:
+ *
+ *   rte_ifpx_callbacks_register(len, cbs);
+ *
+ * where cbs is an array of callback pointers.
+ * @see rte_ifpx_callbacks_register()
+ *
+ * Finally the application should call:
+ *
+ *   rte_ifpx_listen();
+ *
+ * which will query system for present network configuration and start listening
+ * to its changes.
+ */
+
+#include <rte_eal.h>
+#include <rte_ethdev.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Enum naming the type of proxy to create.
+ *
+ * @see rte_ifpx_create()
+ */
+enum rte_ifpx_proxy_type {
+	RTE_IFPX_DEFAULT,	/**< Use default proxy type for given arch. */
+	RTE_IFPX_TAP,		/**< Use Tap based port for proxy. */
+	RTE_IFPX_KNI		/**< Use KNI based port for proxy. */
+};
+
+/**
+ * Create DPDK port that can serve as an interface proxy.
+ *
+ * This function is just a wrapper around rte_ifpx_create_by_devarg() that
+ * constructs its 'devarg' argument based on type of proxy requested.
+ *
+ * @param type
+ *   A type of proxy to create.
+ *
+ * @return
+ *   DPDK port id on success, RTE_MAX_ETHPORTS otherwise.
+ *
+ * @see enum rte_ifpx_type
+ * @see rte_ifpx_create_by_devarg()
+ */
+__rte_experimental
+uint16_t rte_ifpx_proxy_create(enum rte_ifpx_proxy_type type);
+
+/**
+ * Create DPDK port that can serve as an interface proxy.
+ *
+ * @param devarg
+ *   A string passed to rte_dev_probe() to create proxy port.
+ *
+ * @return
+ *   DPDK port id on success, RTE_MAX_ETHPORTS otherwise.
+ */
+__rte_experimental
+uint16_t rte_ifpx_proxy_create_by_devarg(const char *devarg);
+
+/**
+ * Remove DPDK proxy port.
+ *
+ * In addition to removing the proxy port the bindings (if any) are cleared.
+ *
+ * @param proxy_id
+ *   Port id of the proxy that should be removed.
+ *
+ * @return
+ *   0 on success, negative on error.
+ */
+__rte_experimental
+int rte_ifpx_proxy_destroy(uint16_t proxy_id);
+
+/**
+ * The rte_ifpx_event_type enum lists all possible event types that can be
+ * signaled by this library.  To learn what events are supported on your
+ * platform call rte_ifpx_events_available().
+ *
+ * NOTE - in order to keep ABI stable do not reorder these enums freely.
+ */
+enum rte_ifpx_event_type {
+	RTE_IFPX_MAC_CHANGE,  /**< @see struct rte_ifpx_mac_change */
+	RTE_IFPX_MTU_CHANGE,  /**< @see struct rte_ifpx_mtu_change */
+	RTE_IFPX_LINK_CHANGE, /**< @see struct rte_ifpx_link_change */
+	RTE_IFPX_ADDR_ADD,    /**< @see struct rte_ifpx_addr_change */
+	RTE_IFPX_ADDR_DEL,    /**< @see struct rte_ifpx_addr_change */
+	RTE_IFPX_ADDR6_ADD,   /**< @see struct rte_ifpx_addr6_change */
+	RTE_IFPX_ADDR6_DEL,   /**< @see struct rte_ifpx_addr6_change */
+	RTE_IFPX_ROUTE_ADD,   /**< @see struct rte_ifpx_route_change */
+	RTE_IFPX_ROUTE_DEL,   /**< @see struct rte_ifpx_route_change */
+	RTE_IFPX_ROUTE6_ADD,  /**< @see struct rte_ifpx_route6_change */
+	RTE_IFPX_ROUTE6_DEL,  /**< @see struct rte_ifpx_route6_change */
+	RTE_IFPX_NEIGH_ADD,   /**< @see struct rte_ifpx_neigh_change */
+	RTE_IFPX_NEIGH_DEL,   /**< @see struct rte_ifpx_neigh_change */
+	RTE_IFPX_NEIGH6_ADD,  /**< @see struct rte_ifpx_neigh6_change */
+	RTE_IFPX_NEIGH6_DEL,  /**< @see struct rte_ifpx_neigh6_change */
+	RTE_IFPX_CFG_DONE,    /**< This event is a lib specific event - it is
+			       * signaled when initial network configuration
+			       * query is finished and has no event data.
+			       */
+};
+
+/**
+ * Get the bit mask of implemented events/callbacks for this platform.
+ *
+ * @return
+ *   Bit mask of events/callbacks implemented: each event type can be tested by
+ *   checking bit (1 << ev) where 'ev' is one of the rte_ifpx_event_type enum
+ *   values.
+ * @see enum rte_ifpx_event_type
+ */
+__rte_experimental
+uint64_t rte_ifpx_events_available(void);
+
+/**
+ * The rte_ifpx_event defines structure used to pass notification event to
+ * application.  Each event type has its own dedicated inner structure - these
+ * structures are also used when using callbacks notifications.
+ */
+struct rte_ifpx_event {
+	enum rte_ifpx_event_type type;
+	union {
+		/** Structure used to pass notification about MAC change of the
+		 * proxy interface.
+		 * @see RTE_IFPX_MAC_CHANGE
+		 */
+		struct rte_ifpx_mac_change {
+			uint16_t port_id;
+			struct rte_ether_addr mac;
+		} mac_change;
+		/** Structure used to pass notification about MTU change.
+		 * @see RTE_IFPX_MTU_CHANGE
+		 */
+		struct rte_ifpx_mtu_change {
+			uint16_t port_id;
+			uint16_t mtu;
+		} mtu_change;
+		/** Structure used to pass notification about link going
+		 * up/down.
+		 * @see RTE_IFPX_LINK_CHANGE
+		 */
+		struct rte_ifpx_link_change {
+			uint16_t port_id;
+			int is_up;
+		} link_change;
+		/** Structure used to pass notification about IPv4 address being
+		 * added/removed.  All IPv4 addresses reported by this library
+		 * are in host order.
+		 * @see RTE_IFPX_ADDR_ADD
+		 * @see RTE_IFPX_ADDR_DEL
+		 */
+		struct rte_ifpx_addr_change {
+			uint16_t port_id;
+			uint32_t ip;
+		} addr_change;
+		/** Structure used to pass notification about IPv6 address being
+		 * added/removed.
+		 * @see RTE_IFPX_ADDR6_ADD
+		 * @see RTE_IFPX_ADDR6_DEL
+		 */
+		struct rte_ifpx_addr6_change {
+			uint16_t port_id;
+			uint8_t ip[16];
+		} addr6_change;
+		/** Structure used to pass notification about IPv4 route being
+		 * added/removed.
+		 * @see RTE_IFPX_ROUTE_ADD
+		 * @see RTE_IFPX_ROUTE_DEL
+		 */
+		struct rte_ifpx_route_change {
+			uint16_t port_id;
+			uint8_t depth;
+			uint32_t ip;
+			uint32_t gateway;
+		} route_change;
+		/** Structure used to pass notification about IPv6 route being
+		 * added/removed.
+		 * @see RTE_IFPX_ROUTE6_ADD
+		 * @see RTE_IFPX_ROUTE6_DEL
+		 */
+		struct rte_ifpx_route6_change {
+			uint16_t port_id;
+			uint8_t depth;
+			uint8_t ip[16];
+			uint8_t gateway[16];
+		} route6_change;
+		/** Structure used to pass notification about IPv4 neighbour
+		 * info changes.
+		 * @see RTE_IFPX_NEIGH_ADD
+		 * @see RTE_IFPX_NEIGH_DEL
+		 */
+		struct rte_ifpx_neigh_change {
+			uint16_t port_id;
+			struct rte_ether_addr mac;
+			uint32_t ip;
+		} neigh_change;
+		/** Structure used to pass notification about IPv6 neighbour
+		 * info changes.
+		 * @see RTE_IFPX_NEIGH6_ADD
+		 * @see RTE_IFPX_NEIGH6_DEL
+		 */
+		struct rte_ifpx_neigh6_change {
+			uint16_t port_id;
+			struct rte_ether_addr mac;
+			uint8_t ip[16];
+		} neigh6_change;
+		/* This structure is used internally - to abstract common parts
+		 * of proxy/port related events and to be able to refer to this
+		 * union without giving it a name.
+		 */
+		struct {
+			uint16_t port_id;
+		} data;
+	};
+};
+
+/**
+ * This library can deliver notification about network configuration changes
+ * either by the use of registered callbacks and/or by queueing change events to
+ * configured notification queues.  The logic used is:
+ * 1. If there is callback registered for given event type it is called.  In
+ *   case of many ports to one proxy binding, this callback is called for every
+ *   port bound.
+ * 2. If this callback returns non-zero value (for any of ports in case of
+ *   many-1 bindings) the handling of an event is considered as complete.
+ * 3. Otherwise the event is added to each configured event queue.  The event is
+ *   allocated with malloc() so after dequeueing and handling the application
+ *   should deallocate it with free().
+ *
+ * This dual notification mechanism is meant to provide some flexibility to
+ * application writer.  For example, if you store your data in a single writer/
+ * many readers coherent data structure you could just update this structure
+ * from the callback.  If you keep separate copy per lcore/port you could make
+ * some common preparations (if applicable) in the callback, return 0 and use
+ * notification queues to pick up the change and update data structures.  Or you
+ * could skip the callbacks altogether and just use notification queues - and
+ * configure them at the level appropriate for your application design (one
+ * global / one per lcore / one per port ...).
+ */
+
+/**
+ * Add notification queue to the list of queues.
+ *
+ * @param r
+ *   Ring used for queueing of notification events - application can assume that
+ *   there is only one producer.
+ * @return
+ *   0 on success, negative otherwise.
+ */
+int rte_ifpx_queue_add(struct rte_ring *r);
+
+/**
+ * Remove notification queue from the list of queues.
+ *
+ * @param r
+ *   Notification ring used for queueing of notification events (previously
+ *   added via rte_ifpx_queue_add()).
+ * @return
+ *   0 on success, negative otherwise.
+ */
+int rte_ifpx_queue_remove(struct rte_ring *r);
+
+/**
+ * This union groups the callback types that might be called as a notification
+ * events for changing network configuration.  Not every platform might
+ * implement all of them and you can query the availability with
+ * rte_ifpx_events_available() function.
+ * @see rte_ifpx_events_available()
+ * @see rte_ifpx_callbacks_register()
+ */
+union rte_ifpx_cb_ptr {
+	int (*mac_change)(const struct rte_ifpx_mac_change *event);
+	/**< Callback for notification about MAC change of the proxy interface.
+	 * This callback (as all other port related callbacks) is called for
+	 * each port (with its port_id as a first argument) bound to the proxy
+	 * interface for which change has been observed.
+	 * @see struct rte_ifpx_mac_change
+	 * @return non-zero if event handling is finished
+	 */
+	int (*mtu_change)(const struct rte_ifpx_mtu_change *event);
+	/**< Callback for notification about MTU change.
+	 * @see struct rte_ifpx_mtu_change
+	 * @return non-zero if event handling is finished
+	 */
+	int (*link_change)(const struct rte_ifpx_link_change *event);
+	/**< Callback for notification about link going up/down.
+	 * @see struct rte_ifpx_link_change
+	 * @return non-zero if event handling is finished
+	 */
+	int (*addr_add)(const struct rte_ifpx_addr_change *event);
+	/**< Callback for notification about IPv4 address being added.
+	 * @see struct rte_ifpx_addr_change
+	 * @return non-zero if event handling is finished
+	 */
+	int (*addr_del)(const struct rte_ifpx_addr_change *event);
+	/**< Callback for notification about IPv4 address removal.
+	 * @see struct rte_ifpx_addr_change
+	 * @return non-zero if event handling is finished
+	 */
+	int (*addr6_add)(const struct rte_ifpx_addr6_change *event);
+	/**< Callback for notification about IPv6 address being added.
+	 * @see struct rte_ifpx_addr6_change
+	 */
+	int (*addr6_del)(const struct rte_ifpx_addr6_change *event);
+	/**< Callback for notification about IPv4 address removal.
+	 * @see struct rte_ifpx_addr6_change
+	 * @return non-zero if event handling is finished
+	 */
+	/* Please note that "route" callbacks might be also called when user
+	 * adds address to the interface (that is in addition to address related
+	 * callbacks).
+	 */
+	int (*route_add)(const struct rte_ifpx_route_change *event);
+	/**< Callback for notification about IPv4 route being added.
+	 * @see struct rte_ifpx_route_change
+	 * @return non-zero if event handling is finished
+	 */
+	int (*route_del)(const struct rte_ifpx_route_change *event);
+	/**< Callback for notification about IPv4 route removal.
+	 * @see struct rte_ifpx_route_change
+	 * @return non-zero if event handling is finished
+	 */
+	int (*route6_add)(const struct rte_ifpx_route6_change *event);
+	/**< Callback for notification about IPv6 route being added.
+	 * @see struct rte_ifpx_route6_change
+	 * @return non-zero if event handling is finished
+	 */
+	int (*route6_del)(const struct rte_ifpx_route6_change *event);
+	/**< Callback for notification about IPv6 route removal.
+	 * @see struct rte_ifpx_route6_change
+	 * @return non-zero if event handling is finished
+	 */
+	int (*neigh_add)(const struct rte_ifpx_neigh_change *event);
+	/**< Callback for notification about IPv4 neighbour being added.
+	 * @see struct rte_ifpx_neigh_change
+	 * @return non-zero if event handling is finished
+	 */
+	int (*neigh_del)(const struct rte_ifpx_neigh_change *event);
+	/**< Callback for notification about IPv4 neighbour removal.
+	 * @see struct rte_ifpx_neigh_change
+	 * @return non-zero if event handling is finished
+	 */
+	int (*neigh6_add)(const struct rte_ifpx_neigh6_change *event);
+	/**< Callback for notification about IPv6 neighbour being added.
+	 * @see struct rte_ifpx_neigh_change
+	 */
+	int (*neigh6_del)(const struct rte_ifpx_neigh6_change *event);
+	/**< Callback for notification about IPv6 neighbour removal.
+	 * @see struct rte_ifpx_neigh_change
+	 * @return non-zero if event handling is finished
+	 */
+	int (*cfg_done)(void);
+	/**< Lib specific callback - called when initial network configuration
+	 * query is finished.
+	 * @return non-zero if event handling is finished
+	 */
+};
+
+/**
+ * This structure is a "tagged union" used to pass the callback for
+ * registration.
+ *
+ * @see union rte_ifpx_cb_ptr
+ * @see rte_ifpx_events_available()
+ * @see rte_ifpx_callbacks_register()
+ */
+struct rte_ifpx_callback {
+	enum rte_ifpx_event_type type;
+	union rte_ifpx_cb_ptr callback;
+};
+
+/**
+ * Register proxy callbacks.
+ *
+ * This function registers callbacks to be called upon appropriate network
+ * event notification.
+ *
+ * @param cbs
+ *   Set of callbacks that will be called.  The library does not take any
+ *   ownership of the pointer passed - the callbacks are stored internally.
+ *
+ * @return
+ *   0 on success, negative otherwise.
+ */
+__rte_experimental
+int rte_ifpx_callbacks_register(unsigned int len,
+				const struct rte_ifpx_callback cbs[]);
+
+/**
+ * Unregister proxy callbacks.
+ *
+ * This function unregisters all callbacks previously registered with
+ * rte_ifpx_callbacks_register().
+ */
+__rte_experimental
+void rte_ifpx_callbacks_unregister_all(void);
+
+/**
+ * Unregister proxy callback.
+ *
+ * This function unregisters one callback previously registered with
+ * rte_ifpx_callbacks_register().
+ *
+ * @param ev
+ *   Type of event for which callback should be removed.
+ *
+ * @return
+ *   0 on success, negative otherwise.
+ */
+__rte_experimental
+int rte_ifpx_callbacks_unregister(enum rte_ifpx_event_type ev);
+
+/**
+ * Bind the port to its proxy.
+ *
+ * After calling this function all network configuration of the proxy (and it's
+ * changes) will be passed to given port by calling registered callbacks with
+ * 'port_id' as an argument.
+ *
+ * Note: since both arguments are of the same type in order to not mix them and
+ * ease remembering the order the first one is kept the same for bind/unbind.
+ *
+ * @param port_id
+ *   Id of the port to be bound.
+ * @param proxy_id
+ *   Id of the proxy the port needs to be bound to.
+ * @return
+ *   0 on success, negative on error.
+ */
+__rte_experimental
+int rte_ifpx_port_bind(uint16_t port_id, uint16_t proxy_id);
+
+/**
+ * Unbind the port from its proxy.
+ *
+ * After calling this function registered callbacks will no longer be called for
+ * this port (but they might be called for other ports in one to many binding
+ * scenario).
+ *
+ * @param port_id
+ *   Id of the port to unbind.
+ * @return
+ *   0 on success, negative on error.
+ */
+__rte_experimental
+int rte_ifpx_port_unbind(uint16_t port_id);
+
+/**
+ * Get the system network configuration and start listening to its changes.
+ *
+ * @return
+ *   0 on success, negative otherwise.
+ */
+__rte_experimental
+int rte_ifpx_listen(void);
+
+/**
+ * Remove all bindings/callbacks and stop listening to network configuration.
+ *
+ * @return
+ *   0 on success, negative otherwise.
+ */
+__rte_experimental
+int rte_ifpx_close(void);
+
+/**
+ * Get the id of the proxy the port is bound to.
+ *
+ * @param port_id
+ *   Id of the port for which to get proxy.
+ * @return
+ *   Port id of the proxy on success, RTE_MAX_ETHPORTS on error.
+ */
+__rte_experimental
+uint16_t rte_ifpx_proxy_get(uint16_t port_id);
+
+/**
+ * Test for port acting as a proxy.
+ *
+ * @param port_id
+ *   Id of the port.
+ * @return
+ *   1 if port acts as a proxy, 0 otherwise.
+ */
+static inline
+int rte_ifpx_is_proxy(uint16_t port_id)
+{
+	return rte_ifpx_proxy_get(port_id) == port_id;
+}
+
+/**
+ * Get the ids of the ports bound to the proxy.
+ *
+ * @param proxy_id
+ *   Id of the proxy for which to get ports.
+ * @param ports
+ *   Array where to store the port ids.
+ * @param num
+ *   Size of the 'ports' array.
+ * @return
+ *   The number of ports bound to given proxy.  Note that bound ports are filled
+ *   in 'ports' array up to its size but the return value is always the total
+ *   number of ports bound - so you can make call first with NULL/0 to query for
+ *   the size of the buffer to create or call it with the buffer you have and
+ *   later check if it was large enough.
+ */
+__rte_experimental
+unsigned int rte_ifpx_port_get(uint16_t proxy_id,
+			       uint16_t *ports, unsigned int num);
+
+/**
+ * The structure containing some properties of the proxy interface.
+ */
+struct rte_ifpx_info {
+	unsigned int if_index; /* entry valid iff if_index != 0 */
+	uint16_t mtu;
+	struct rte_ether_addr mac;
+	char if_name[RTE_ETH_NAME_MAX_LEN];
+};
+
+/**
+ * Get the properties of the proxy interface.  Argument can be either id of the
+ * proxy or an id of a port that is bound to it.
+ *
+ * @param port_id
+ *   Id of the port (or proxy) for which to get proxy properties.
+ * @return
+ *   Pointer to the proxy information structure.
+ */
+__rte_experimental
+const struct rte_ifpx_info *rte_ifpx_info_get(uint16_t port_id);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _RTE_IF_PROXY_H_ */
diff --git a/lib/librte_if_proxy/rte_if_proxy_version.map b/lib/librte_if_proxy/rte_if_proxy_version.map
new file mode 100644
index 000000000..6da35d096
--- /dev/null
+++ b/lib/librte_if_proxy/rte_if_proxy_version.map
@@ -0,0 +1,20 @@
+EXPERIMENTAL {
+	global:
+
+	rte_ifpx_callbacks_register;
+	rte_ifpx_callbacks_unregister;
+	rte_ifpx_callbacks_unregister_all;
+	rte_ifpx_close;
+	rte_ifpx_events_available;
+	rte_ifpx_info_get;
+	rte_ifpx_listen;
+	rte_ifpx_port_bind;
+	rte_ifpx_port_get;
+	rte_ifpx_port_unbind;
+	rte_ifpx_proxy_create;
+	rte_ifpx_proxy_create_by_devarg;
+	rte_ifpx_proxy_destroy;
+	rte_ifpx_proxy_get;
+
+	local: *;
+};
diff --git a/lib/meson.build b/lib/meson.build
index 07a65a625..caa54f7b5 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -21,7 +21,7 @@ libraries = [
 	'acl', 'bbdev', 'bitratestats', 'cfgfile',
 	'compressdev', 'cryptodev',
 	'distributor', 'efd', 'eventdev',
-	'gro', 'gso', 'ip_frag', 'jobstats',
+	'gro', 'gso', 'if_proxy', 'ip_frag', 'jobstats',
 	'kni', 'latencystats', 'lpm', 'member',
 	'power', 'pdump', 'rawdev',
 	'rib', 'reorder', 'sched', 'security', 'stack', 'vhost',
-- 
2.17.1


^ permalink raw reply	[relevance 1%]

* [dpdk-dev] [PATCH v3 0/4] Introduce IF proxy library
  @ 2020-05-04  8:53  2% ` Andrzej Ostruszka
  2020-05-04  8:53  1%   ` [dpdk-dev] [PATCH v3 1/4] lib: introduce IF Proxy library Andrzej Ostruszka
  0 siblings, 1 reply; 200+ results
From: Andrzej Ostruszka @ 2020-05-04  8:53 UTC (permalink / raw)
  To: dev

All

Please find in this patch set updated version of IF Proxy library.  This
version addresses comments received so far with some additional minor
improvements/changes.  This version does not change the notification
scheme yet since discussion about general DPDK messaging/notification
scheme has has not started so please expect yet another version when
this will crystallize.  I also have received some performance
improvements for the example application from Harman (thank you) but
decided to hold them.  This is because in future the example application
might either be merged into the regular l3fwd or be kept separate
- depending on the outcome of the discussion.

Changes in V3
=============
- Changed callback registration scheme to make the ABI more robust
- Added new platform callback to provide mask with events available
- All library data access is guarded with a lock
- When port is unbound and proxy has no more ports then it is
  automatically released

Changes in V2
=============
- Cleaned up checkpatch warnings
- Removed dead/unused code and added gateway clearing in l3fwd-ifpx

What is this useful for
=======================

Usually, when an ethernet port is assigned to DPDK it vanishes from the
system and user looses ability to control it via normal configuration
utilities (e.g. those from iproute2 package).  Moreover by default DPDK
application is not aware of the network configuration of the system.

To address both of these issues application needs to:
- add some command line interface (or other mechanism) allowing for
  control of the port and its configuration
- query the status of network configuration and monitor its changes

The purpose of this library is to help with both of these tasks (as long
as they remain in domain of configuration available to the system).  In
other words, if DPDK application has some special needs, that cannot be
addressed by the normal system configuration utilities, then they need
to be solved by the application itself.

The connection between DPDK and system is based on the existence of
ports that are visible to both DPDK and system (like Tap, KNI and
possibly some other drivers).  These ports serve as an interface
proxies.

Let's visualize the action of the library by the following example:

              Linux             |            DPDK
==============================================================
                                |
                                |   +-------+       +-------+
                                |   | Port1 |       | Port2 |
"ip link set dev tap1 mtu 1600" |   +-------+       +-------+
                          |     |       ^              ^ ^
                          |  +------+   | mtu_change   | |
                          `->| Tap1 |---' callback     | |
                             +------+                  | |
"ip addr add 198.51.100.14 \    |                      | |
                  dev tap2"     |                      | |
                          |  +------+                  | |
                          +->| Tap2 |------------------' |
                          |  +------+  addr_add callback |
"ip route add 198.0.2.0/24 \    |  |                     |
                  dev tap2"     |  | route_add callback  |
                                |  `---------------------'

So we have two ports Port1 and Port2 that are not visible to the system.
We create two proxy interfaces (here based on Tap driver) and bind the
ports to their proxies.  When user issues a command changing MTU for
Tap1 interface the library notes this and calls "mtu_change" callback
for the Port1.  Similarly when user adds an IPv4 address to the Tap2
interface "addr_add" callback is called for the Port2 and the same
happens for configuration of routing rule pointing to Tap2.  Apart from
callbacks this library can notify about changes via adding events to
notification queues.  See below for more inforamtion about that and
a complete list of available callbacks.

Please note that nothing has been mentioned about forwarding of the
packets between system and DPDK.  Since the proxies are normal DPDK
ports you can receive/send to them via usual RX/TX burst API.  However
since the library is not aware of the structure of packet processing
used by the application it cannot automatically forward the packets - it
is responsibility of the application to include proxy ports into its
packet processing engine.

As mentioned above the intention of the library is to:
- provide information about network configuration that would allow
  application to decide what to do with the packets received on DPDK
  ports,
- allow for control of the ports via standard configuration utilities

Although the library only helps you to identify proxy for given port
(and vice versa) and calls appropriate callbacks it does open some
interesting possibilities.  For example you can use the proxy ports to
forward packets for protocols that you do not wish to handle in DPDK
application to the system protocol stack and just listen to the
configuration changes - so that way you can "offload" handling of those
protocols to the system.

How to use it
=============

Usage of this library is rather simple.  You have to:
1. Create proxy (if you don't have port suitable for being proxy or you
  have one but do not wish to use it as a proxy).
2. Bind port to proxy.
3. Register callbacks and/or event queues.
4. Start listening to the network configuration.

The only mandatory requirement for DPDK port to be able to act as
a proxy is that it is visible in the system - this is checked during
port to proxy binding by calling rte_eth_dev_info_get() on proxy port
and inspecting 'if_index' field (it has to be non-zero).
One can create such port in the application by calling:

  proxy_id = rte_ifpx_create(RTE_IFPX_DEFAULT);

Upon success this returns id of DPDK proxy port created
(RTE_MAX_ETHPORTS on failure).  The argument selects type of proxy port
to create (currently Tap/KNI only).  This function actually is just
a wrapper around:

  uint16_t rte_ifpx_create_by_devarg(const char *devarg);

creating valid 'devarg' string for the chosen type of proxy.  If you have
other driver capable of acting as a proxy you can call
rte_ifpx_create_by_devarg() directly passing appropriate argument.

Once you have id of both port and proxy you can bind the two via:

  rte_ifpx_port_bind(port_id, proxy_id);

This creates logical binding - as mentioned above there is no automatic
packet forwarding.  With this binding whenever user changes the state of
proxy interface in the system (link up/down, change mac/mtu, add/remove
IPv4/IPv6) you get appropriate notification for the bound port.

So far we've mentioned several times that the library calls callbacks.
They are grouped in 'struct rte_ifpx_callbacks' and user provides them
to the library via:

  rte_ifpx_callbacks_register(len, cbs);

It is worth mentioning that the context (lcore/thread) in which these
callbacks are called is implementation defined.  It might differ between
different platforms, so the application needs to assume that some kind
of inter lcore/thread synchronization/communication is required.

Apart from notification via callbacks this library also supports
notifying about the changes via adding events to the configured
notification queues.  The queues are registered via:

  int rte_ifpx_queue_add(struct rte_ring *r);

and the actual logic used is: if there is callback registered then it is
called, if it returns non-zero then event is considered completed,
otherwise event is added to each configured notification queue.
That way application can update data structures that are safe to be
modified by single writer from within callback or do the common
preprocessing steps (if any needed) in callback and data that is
replicated can be updated during handling of queued events.

Once we have bindings in place and notification configured, the only
essential part that remains is to get the current network configuration
and start listening to its changes.  This is accomplished via a call to:

  rte_ifpx_listen();

And basically this is all one needs to understand how to use this
library.  Other less essential parts include:
- ability to query what events are available for given platform
- getting mapping between proxy and port
- unbinding the ports from proxy
- destroying proxy port
- closing the listening service
- getting basic information about proxy


Currently available features and implementation
===============================================

The library's API is system independent but it obviously needs some
system dependent parts.  We provide exemplary Linux implementation
(based on netlink sockets).  Very similar implementation is possible for
FreeBSD (with the usage of PF_ROUTE sockets).  Windows implementation
would need to differ much (probably IP Helper library would be of some
help).

Here is the list of currently implemented callbacks:

  int (*mac_change)(const struct rte_ifpx_mac_change *event);
  int (*mtu_change)(const struct rte_ifpx_mtu_change *event);
  int (*link_change)(const struct rte_ifpx_link_change *event);
  int (*addr_add)(const struct rte_ifpx_addr_change *event);
  int (*addr_del)(const struct rte_ifpx_addr_change *event);
  int (*addr6_add)(const struct rte_ifpx_addr6_change *event);
  int (*addr6_del)(const struct rte_ifpx_addr6_change *event);
  int (*route_add)(const struct rte_ifpx_route_change *event);
  int (*route_del)(const struct rte_ifpx_route_change *event);
  int (*route6_add)(const struct rte_ifpx_route6_change *event);
  int (*route6_del)(const struct rte_ifpx_route6_change *event);
  int (*neigh_add)(const struct rte_ifpx_neigh_change *event);
  int (*neigh_del)(const struct rte_ifpx_neigh_change *event);
  int (*neigh6_add)(const struct rte_ifpx_neigh6_change *event);
  int (*neigh6_del)(const struct rte_ifpx_neigh6_change *event);
  int (*cfg_done)(void);

They are all rather self-descriptive with the exception of the last one.
When the user calls rte_ifpx_listen() the library first queries the
system for its current configuration.  That might require several
request/reply exchanges between DPDK and system and once it is finished
this callback is called to let application know that all info has been
gathered.

It is worth to mention also that while typical case would be a 1-to-1
mapping between port and proxy, the 1-to-many mapping is also supported.
In that case related callbacks will be called for each port bound to
given proxy interface - it is application responsibility to define
semantic of such mapping (e.g. all changes apply to all ports, or link
changes apply to all but other are accepted in "round robin" fashion, or
some other logic).

As mentioned above Linux implementation is based on netlink socket.
This socket is registered as file descriptor in EAL interrupts
(similarly to how EAL alarms are implemented).

With regards
Andrzej Ostruszka

Andrzej Ostruszka (4):
  lib: introduce IF Proxy library
  if_proxy: add library documentation
  if_proxy: add simple functionality test
  if_proxy: add example application

 MAINTAINERS                                  |    6 +
 app/test/Makefile                            |    5 +
 app/test/meson.build                         |    4 +
 app/test/test_if_proxy.c                     |  707 +++++++++++
 config/common_base                           |    5 +
 config/common_linux                          |    1 +
 doc/guides/prog_guide/if_proxy_lib.rst       |  142 +++
 doc/guides/prog_guide/index.rst              |    1 +
 examples/Makefile                            |    1 +
 examples/l3fwd-ifpx/Makefile                 |   60 +
 examples/l3fwd-ifpx/l3fwd.c                  | 1128 ++++++++++++++++++
 examples/l3fwd-ifpx/l3fwd.h                  |   98 ++
 examples/l3fwd-ifpx/main.c                   |  740 ++++++++++++
 examples/l3fwd-ifpx/meson.build              |   11 +
 examples/meson.build                         |    2 +-
 lib/Makefile                                 |    2 +
 lib/librte_eal/include/rte_eal_interrupts.h  |    2 +
 lib/librte_eal/linux/eal_interrupts.c        |   14 +-
 lib/librte_if_proxy/Makefile                 |   29 +
 lib/librte_if_proxy/if_proxy_common.c        |  564 +++++++++
 lib/librte_if_proxy/if_proxy_priv.h          |   97 ++
 lib/librte_if_proxy/linux/Makefile           |    4 +
 lib/librte_if_proxy/linux/if_proxy.c         |  563 +++++++++
 lib/librte_if_proxy/meson.build              |   19 +
 lib/librte_if_proxy/rte_if_proxy.h           |  585 +++++++++
 lib/librte_if_proxy/rte_if_proxy_version.map |   20 +
 lib/meson.build                              |    2 +-
 27 files changed, 4806 insertions(+), 6 deletions(-)
 create mode 100644 app/test/test_if_proxy.c
 create mode 100644 doc/guides/prog_guide/if_proxy_lib.rst
 create mode 100644 examples/l3fwd-ifpx/Makefile
 create mode 100644 examples/l3fwd-ifpx/l3fwd.c
 create mode 100644 examples/l3fwd-ifpx/l3fwd.h
 create mode 100644 examples/l3fwd-ifpx/main.c
 create mode 100644 examples/l3fwd-ifpx/meson.build
 create mode 100644 lib/librte_if_proxy/Makefile
 create mode 100644 lib/librte_if_proxy/if_proxy_common.c
 create mode 100644 lib/librte_if_proxy/if_proxy_priv.h
 create mode 100644 lib/librte_if_proxy/linux/Makefile
 create mode 100644 lib/librte_if_proxy/linux/if_proxy.c
 create mode 100644 lib/librte_if_proxy/meson.build
 create mode 100644 lib/librte_if_proxy/rte_if_proxy.h
 create mode 100644 lib/librte_if_proxy/rte_if_proxy_version.map

-- 
2.17.1


^ permalink raw reply	[relevance 2%]

* Re: [dpdk-dev] [PATCH v3 0/8] eal: cleanup resources on shutdown
  2020-04-28 23:58  3% ` [dpdk-dev] [PATCH v3 0/8] " Stephen Hemminger
@ 2020-05-03 17:21  0%   ` David Marchand
  0 siblings, 0 replies; 200+ results
From: David Marchand @ 2020-05-03 17:21 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: dev

On Wed, Apr 29, 2020 at 1:58 AM Stephen Hemminger
<stephen@networkplumber.org> wrote:
>
> Started using valgrind with DPDK, and there are lots of leftover
> memory and file descriptors. This makes it hard to find application
> leaks versus DPDK leaks.
>
> The DPDK has a function that applications can use to tell it
> to cleanup resources on shutdown (rte_eal_cleanup). But the
> current coverage of that API is spotty. Many internal parts of
> DPDK leave files and allocated memory behind.
>
> This patch set is a first step at getting the sub-parts of
> DPDK to cleanup after themselves. These are the easier ones,
> the harder and more critical ones are in the drivers
> and the memory subsystem.
>
> There are no new exposed API or ABI changes here.
>
> v3
>  - fix a couple of minor checkpatch complaints
>
> v2
>  - rebase after 20.05 file renames
>  - incorporate review comment feedback
>  - hold off some of the more involved patches for later

Same segfault as v1.

$ ./devtools/test-null.sh ./build/app/dpdk-testpmd 0x3 --plop
./build/app/dpdk-testpmd: unrecognized option '--plop'
EAL: Detected 8 lcore(s)
EAL: Detected 1 NUMA nodes

Usage: ./build/app/dpdk-testpmd [options]

(snip)

EAL: FATAL: Invalid 'command line' arguments.
EAL: Invalid 'command line' arguments.
EAL: Error - exiting with code: 1
  Cause: Cannot init EAL: Invalid argument
./devtools/test-null.sh: line 32: 23134 Broken pipe             (
sleep 1 && echo stop )
     23135 Segmentation fault      (core dumped) | $testpmd -c
$coremask --no-huge -m 20 $libs -w 0:0.0 --vdev net_null1 --vdev
net_null2 $eal_options -- --no-mlockall --total-num-mbufs=2048
$testpmd_options -ia


-- 
David Marchand


^ permalink raw reply	[relevance 0%]

* [dpdk-dev]  [PATCH] common/octeontx: fix GCC 9.1 ABI break
@ 2020-05-02 16:10  4% pbhagavatula
  2020-05-04  9:17  4% ` Harman Kalra
  0 siblings, 1 reply; 200+ results
From: pbhagavatula @ 2020-05-02 16:10 UTC (permalink / raw)
  To: jerinj, ferruh.yigit, Harman Kalra; +Cc: thomas, dev, Pavan Nikhilesh, stable

From: Pavan Nikhilesh <pbhagavatula@marvell.com>

GCC 9.1 fixes a bug with passing bitfields as pass by value in function
parameters and generates a warning for the same as below:

drivers/common/octeontx/octeontx_mbox.c:282:1: note: parameter passing
for argument of type ‘struct mbox_intf_ver’ changed in GCC 9.1

Fix the warning generated by passing bitfield as pass by reference.

Fixes: b4134b2d31cc ("common/octeontx: update mbox to version 1.1.3")
Cc: stable@dpdk.org

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
More info on GCC bug
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88469
https://gcc.gnu.org/git/?p=gcc.git&a=commit;h=c590597c45948c6e6fa282878198fd226da95998

 drivers/common/octeontx/octeontx_mbox.c | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/drivers/common/octeontx/octeontx_mbox.c b/drivers/common/octeontx/octeontx_mbox.c
index 2fd253107..effe0b267 100644
--- a/drivers/common/octeontx/octeontx_mbox.c
+++ b/drivers/common/octeontx/octeontx_mbox.c
@@ -279,7 +279,7 @@ octeontx_start_domain(void)
 }

 static int
-octeontx_check_mbox_version(struct mbox_intf_ver app_intf_ver,
+octeontx_check_mbox_version(struct mbox_intf_ver *app_intf_ver,
 			    struct mbox_intf_ver *intf_ver)
 {
 	struct mbox_intf_ver kernel_intf_ver = {0};
@@ -290,8 +290,9 @@ octeontx_check_mbox_version(struct mbox_intf_ver app_intf_ver,
 	hdr.coproc = NO_COPROC;
 	hdr.msg = RM_INTERFACE_VERSION;

-	result = octeontx_mbox_send(&hdr, &app_intf_ver, sizeof(app_intf_ver),
-			&kernel_intf_ver, sizeof(kernel_intf_ver));
+	result = octeontx_mbox_send(&hdr, app_intf_ver,
+				    sizeof(struct mbox_intf_ver),
+				    &kernel_intf_ver, sizeof(kernel_intf_ver));
 	if (result != sizeof(kernel_intf_ver)) {
 		mbox_log_err("Could not send interface version. Err=%d. FuncErr=%d\n",
 			     result, hdr.res_code);
@@ -301,9 +302,9 @@ octeontx_check_mbox_version(struct mbox_intf_ver app_intf_ver,
 	if (intf_ver)
 		*intf_ver = kernel_intf_ver;

-	if (app_intf_ver.platform != kernel_intf_ver.platform ||
-			app_intf_ver.major != kernel_intf_ver.major ||
-			app_intf_ver.minor != kernel_intf_ver.minor)
+	if (app_intf_ver->platform != kernel_intf_ver.platform ||
+			app_intf_ver->major != kernel_intf_ver.major ||
+			app_intf_ver->minor != kernel_intf_ver.minor)
 		result = -EINVAL;

 	return result;
@@ -312,7 +313,7 @@ octeontx_check_mbox_version(struct mbox_intf_ver app_intf_ver,
 int
 octeontx_mbox_init(void)
 {
-	const struct mbox_intf_ver MBOX_INTERFACE_VERSION = {
+	struct mbox_intf_ver MBOX_INTERFACE_VERSION = {
 		.platform = 0x01,
 		.major = 0x01,
 		.minor = 0x03
@@ -330,7 +331,7 @@ octeontx_mbox_init(void)
 		return ret;
 	}

-	ret = octeontx_check_mbox_version(MBOX_INTERFACE_VERSION,
+	ret = octeontx_check_mbox_version(&MBOX_INTERFACE_VERSION,
 					  &rm_intf_ver);
 	if (ret < 0) {
 		mbox_log_err("MBOX version: Kernel(%d.%d.%d) != DPDK(%d.%d.%d)",
--
2.26.2


^ permalink raw reply	[relevance 4%]

* Re: [dpdk-dev] [PATCH v3 3/4] stack: check flags on creation
  2020-04-27 23:16  3%   ` [dpdk-dev] [PATCH v3 3/4] stack: " Stephen Hemminger
@ 2020-05-02  2:36  0%     ` Eads, Gage
  0 siblings, 0 replies; 200+ results
From: Eads, Gage @ 2020-05-02  2:36 UTC (permalink / raw)
  To: Stephen Hemminger, dev; +Cc: Olivier Matz

> -----Original Message-----
> From: Stephen Hemminger <stephen@networkplumber.org>
> Sent: Monday, April 27, 2020 6:16 PM
> To: dev@dpdk.org
> Cc: Stephen Hemminger <stephen@networkplumber.org>; Eads, Gage
> <gage.eads@intel.com>; Olivier Matz <olivier.matz@6wind.com>
> Subject: [PATCH v3 3/4] stack: check flags on creation
> 
> All API's should check that they support the flag values passed. If an application
> passes an invalid flag it could cause problems in later ABI.
> 
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> ---
Acked-by: Gage Eads <gage.eads@intel.com>

^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [PATCH v4 1/4] ethdev: add tm support for shaper config in pkt mode
  2020-04-28 15:54  5%                       ` Thomas Monjalon
  2020-04-29  8:45  0%                         ` Dumitrescu, Cristian
@ 2020-05-01 13:18  3%                         ` Jerin Jacob
  2020-05-05  8:01  0%                           ` Ray Kinsella
  1 sibling, 1 reply; 200+ results
From: Jerin Jacob @ 2020-05-01 13:18 UTC (permalink / raw)
  To: Thomas Monjalon
  Cc: Dumitrescu, Cristian, Bruce Richardson, Ferruh Yigit,
	Luca Boccassi, Nithin Dabilpuram, Singh, Jasvinder,
	Andrew Rybchenko, dev, jerinj, kkanas, Nithin Dabilpuram,
	Kinsella, Ray, Neil Horman, Kevin Traynor, David Marchand

On Tue, Apr 28, 2020 at 9:24 PM Thomas Monjalon <thomas@monjalon.net> wrote:
>
> 28/04/2020 17:04, Luca Boccassi:
> > On Tue, 2020-04-28 at 15:45 +0100, Bruce Richardson wrote:
> > > On Tue, Apr 28, 2020 at 03:06:20PM +0100, Ferruh Yigit wrote:
> > > > On 4/27/2020 5:59 PM, Jerin Jacob wrote:
> > > > > On Mon, Apr 27, 2020 at 10:19 PM Ferruh Yigit <ferruh.yigit@intel.com> wrote:
> > > > > > On 4/27/2020 5:29 PM, Jerin Jacob wrote:
> > > > > > > On Mon, Apr 27, 2020 at 9:42 PM Ferruh Yigit <ferruh.yigit@intel.com> wrote:
> > > > > > > > On 4/27/2020 10:19 AM, Dumitrescu, Cristian wrote:
> > > > > > > > > From: Yigit, Ferruh <ferruh.yigit@intel.com>
> > > > > > > > > > On 4/24/2020 11:28 AM, Dumitrescu, Cristian wrote:
> > > > > > > > > > > From: Nithin Dabilpuram <nithind1988@gmail.com>
> > > > > > > > > > > > This patch also updates tm port/level/node capability structures with
> > > > > > > > > > > > exiting features of scheduler wfq packet mode, scheduler wfq byte mode
> > > > > > > > > > > > and private/shared shaper byte mode.
> > > > > > > > > > > >
> > > > > > > > > > > > SoftNIC PMD is also updated with new capabilities.
> [...]
> > > > > > > > > > Hi Nithin,
> > > > > > > > > >
> > > > > > > > > > It looks like patch is causing ABI break, I am getting following warning [1],
> > > > > > > > > > can you please check?
> > > > > > > > > >
> > > > > > > > > > [1]
> > > > > > > > > > https://pastebin.com/XYNFg14u
> > > > > > > > >
> > > > > > > > > Hi Ferruh,
> > > > > > > > >
> > > > > > > > > The RTE_TM API is marked as experimental,
> > > > > > > > > but it looks that this was not correctly marked
> > > > > > > > > when __rte_experimental ABI checker was introduced.
> > > > > > > > >
> > > > > > > > > It is marked as experimental at the top of the rte_tm.h,
> > > > > > > > > similarly to other APIs introduced around same time,
> > > > > > > > > but it was not correctly picked up by the ABI check procedure
> > > > > > > > > when later introduced, so __rte_experimental was not added to every function.
> > > > > > > > >
> > > > > > > >
> > > > > > > > :(
> > > > > > > >
> > > > > > > > Is it time to mature them?
> > > > > > > >
> > > > > > > > As you said they are not marked as experimental both in header file (function
> > > > > > > > declarations) and .map file.
> > > > > > > >
> > > > > > > > The problem is, they are not marked as experimental in DPDK_20.0 ABI (v19.11),
> > > > > > > > so marking them as experimental now will break the ABI. Not sure what to do,
> > > > > > > > cc'ed a few ABI related names for comment.
> > > > > > > >
> > > > > > > > For me, we need to proceed as the experimental tag removed and APIs become
> > > > > > > > mature starting from v19.11, since this is what happened in practice, and remove
> > > > > > > > a few existing being experimental references in the doxygen comments.
> > > > > > >
> > > > > > > I think, accidentally we can not make a library as NON-experimental.
> > > > > > > TM never went through experimental to mature transition(see git log
> > > > > > > lib/librte_ethdev/rte_tm.h)
> > > > > > > It was a bug to not mark as experimental in each function in the ABI process.
> > > > > > > Some of the features like packet marking are not even implemented by any HW.
> > > > > > > I think, we can make API stable only all the features are implemented
> > > > > > > by one or two HW.
>
> Yes this is what was decided one or two years ago I think.
> But rte_tm API was introduced 3 years ago and is implemented by 6 PMDs.

None of the 6 PMDS covers all the features.

>
> > > > Existing experimental marks are text only for human parsing.
> > > >
> > > > The compiler attribute and build time checks are missing, and the symbol in the
> > > > binary doesn't have experimental tag. Our scripts and automated checks won't
> > > > detect it as experimental.
> > > >
> > > > My point is just having experimental comment in header file is not enough to
> > > > qualify the APIs as experimental.
> > > >
> > > > > Anyway, we need to break the ABI to make it work on various HW.
>
> Yes this is why I was asking in 19.11 to check our API,
> in order to avoid such situation.
>
>
> > > > > I am not sure what to do?
>
> Either manage ABI versioning, or wait 20.11.

ABI change are in structures. So the function versioning does not
help. So we will wait for 20.11 then :-(

^ permalink raw reply	[relevance 3%]

* Re: [dpdk-dev] [PATCH v3 0/4] add AESNI-MB rawdev for multi-function processing
  @ 2020-05-01 13:18  0%                 ` Zhang, Roy Fan
  2020-05-12 17:32  0%                   ` Coyle, David
  0 siblings, 1 reply; 200+ results
From: Zhang, Roy Fan @ 2020-05-01 13:18 UTC (permalink / raw)
  To: Akhil Goyal, Coyle, David, Doherty, Declan, Thomas Monjalon,
	Yigit, Ferruh, Trahe, Fiona
  Cc: techboard, dev, De Lara Guarch, Pablo, Ryan, Brendan,
	Hemant Agrawal, Anoob Joseph, Ruifeng Wang, Liron Himi,
	Nagadheeraj Rottela, Srikanth Jampala, Gagandeep Singh, Jay Zhou,
	Ravi Kumar, Richardson, Bruce, olivier.matz,
	honnappa.nagarahalli, Stephen Hemminger, alexr

Hi Akhil,

> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Akhil Goyal
> Sent: Wednesday, April 22, 2020 2:44 PM
> To: Coyle, David <david.coyle@intel.com>; Doherty, Declan
> <declan.doherty@intel.com>; Thomas Monjalon <thomas@monjalon.net>;
> Yigit, Ferruh <ferruh.yigit@intel.com>; Trahe, Fiona <fiona.trahe@intel.com>
> Cc: techboard@dpdk.org; dev@dpdk.org; De Lara Guarch, Pablo
> <pablo.de.lara.guarch@intel.com>; Ryan, Brendan
> <brendan.ryan@intel.com>; Hemant Agrawal <hemant.agrawal@nxp.com>;
> Anoob Joseph <anoobj@marvell.com>; Ruifeng Wang
> <ruifeng.wang@arm.com>; Liron Himi <lironh@marvell.com>; Nagadheeraj
> Rottela <rnagadheeraj@marvell.com>; Srikanth Jampala
> <jsrikanth@marvell.com>; Gagandeep Singh <G.Singh@nxp.com>; Jay Zhou
> <jianjay.zhou@huawei.com>; Ravi Kumar <ravi1.kumar@amd.com>;
> Richardson, Bruce <bruce.richardson@intel.com>; olivier.matz@6wind.com;
> honnappa.nagarahalli@arm.com; Stephen Hemminger
> <stephen@networkplumber.org>; alexr@mellanox.com
> Subject: Re: [dpdk-dev] [PATCH v3 0/4] add AESNI-MB rawdev for multi-
> function processing
...
> Yes, it is preferred, but it should be a union to
> rte_crypto_sym_op/rte_crypto_asym_op.
> Crypto_op->type as RTE_CRYPTO_OP_TYPE_SECURITY and sess_type as
> RTE_CRYPTO_OP_SECURITY_SESSION
> The size of rte_crypto_op will remain as is and there will be no ABI breakage I
> guess.
> 
[Fan: with this way the PMD will have to do rte_crypto_op.type check, and then look into rte_security_op field, only when it find the security_op type is crypto_crc, it will process the security_op data. Would that being too many reads and checking for a single op? Can we create a new API for rte_security to process rte_security_ops for Crypto_CRC or future needs?]
...
 
Regards,
Fan

^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [EXT] Re: [PATCH v4 1/4] ethdev: add tm support for shaper config in pkt mode
  2020-05-01 10:27  0%                             ` Ferruh Yigit
@ 2020-05-01 13:16  0%                               ` Nithin Dabilpuram
  0 siblings, 0 replies; 200+ results
From: Nithin Dabilpuram @ 2020-05-01 13:16 UTC (permalink / raw)
  To: Ferruh Yigit
  Cc: Bruce Richardson, Dumitrescu, Cristian, Thomas Monjalon,
	Jerin Jacob, Luca Boccassi, Nithin Dabilpuram, Singh, Jasvinder,
	Andrew Rybchenko, dev, jerinj, kkanas, Kinsella, Ray,
	Neil Horman, Kevin Traynor, David Marchand

On Fri, May 01, 2020 at 11:27:02AM +0100, Ferruh Yigit wrote:
> External Email
> 
> ----------------------------------------------------------------------
> On 4/29/2020 10:03 AM, Bruce Richardson wrote:
> > On Wed, Apr 29, 2020 at 09:45:44AM +0100, Dumitrescu, Cristian wrote:
> >>
> >>
> >>> -----Original Message-----
> >>> From: Thomas Monjalon <thomas@monjalon.net>
> >>> Sent: Tuesday, April 28, 2020 4:54 PM
> >>> To: Jerin Jacob <jerinjacobk@gmail.com>; Dumitrescu, Cristian
> >>> <cristian.dumitrescu@intel.com>
> >>> Cc: Richardson, Bruce <bruce.richardson@intel.com>; Yigit, Ferruh
> >>> <ferruh.yigit@intel.com>; Luca Boccassi <bluca@debian.org>; Nithin
> >>> Dabilpuram <nithind1988@gmail.com>; Singh, Jasvinder
> >>> <jasvinder.singh@intel.com>; Andrew Rybchenko
> >>> <arybchenko@solarflare.com>; dev@dpdk.org; jerinj@marvell.com;
> >>> kkanas@marvell.com; Nithin Dabilpuram <ndabilpuram@marvell.com>;
> >>> Kinsella, Ray <ray.kinsella@intel.com>; Neil Horman
> >>> <nhorman@tuxdriver.com>; Kevin Traynor <ktraynor@redhat.com>; David
> >>> Marchand <david.marchand@redhat.com>
> >>> Subject: Re: [dpdk-dev] [PATCH v4 1/4] ethdev: add tm support for shaper
> >>> config in pkt mode
> >>>
> >>> 28/04/2020 17:04, Luca Boccassi:
> >>>> On Tue, 2020-04-28 at 15:45 +0100, Bruce Richardson wrote:
> >>>>> On Tue, Apr 28, 2020 at 03:06:20PM +0100, Ferruh Yigit wrote:
> >>>>>> On 4/27/2020 5:59 PM, Jerin Jacob wrote:
> >>>>>>> On Mon, Apr 27, 2020 at 10:19 PM Ferruh Yigit
> >>> <ferruh.yigit@intel.com> wrote:
> >>>>>>>> On 4/27/2020 5:29 PM, Jerin Jacob wrote:
> >>>>>>>>> On Mon, Apr 27, 2020 at 9:42 PM Ferruh Yigit
> >>> <ferruh.yigit@intel.com> wrote:
> >>>>>>>>>> On 4/27/2020 10:19 AM, Dumitrescu, Cristian wrote:
> >>>>>>>>>>> From: Yigit, Ferruh <ferruh.yigit@intel.com>
> >>>>>>>>>>>> On 4/24/2020 11:28 AM, Dumitrescu, Cristian wrote:
> >>>>>>>>>>>>> From: Nithin Dabilpuram <nithind1988@gmail.com>
> >>>>>>>>>>>>>> This patch also updates tm port/level/node capability
> >>> structures with
> >>>>>>>>>>>>>> exiting features of scheduler wfq packet mode,
> >>> scheduler wfq byte mode
> >>>>>>>>>>>>>> and private/shared shaper byte mode.
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>> SoftNIC PMD is also updated with new capabilities.
> >>> [...]
> >>>>>>>>>>>> Hi Nithin,
> >>>>>>>>>>>>
> >>>>>>>>>>>> It looks like patch is causing ABI break, I am getting following
> >>> warning [1],
> >>>>>>>>>>>> can you please check?
> >>>>>>>>>>>>
> >>>>>>>>>>>> [1]
> >>>>>>>>>>>> https://urldefense.proofpoint.com/v2/url?u=https-3A__pastebin.com_XYNFg14u&d=DwIDaQ&c=nKjWec2b6R0mOyPaz7xtfQ&r=FZ_tPCbgFOh18zwRPO9H0yDx8VW38vuapifdDfc8SFQ&m=ej5sP3-cEhEoCTZOia-QivXqgljtzBcMLtZGs-5c-Uc&s=B8z_5mQ2xO3C1izjmRe2zBApMrCUcW6KcAN-adglhJQ&e= 
> >>>>>>>>>>>
> >>>>>>>>>>> Hi Ferruh,
> >>>>>>>>>>>
> >>>>>>>>>>> The RTE_TM API is marked as experimental,
> >>>>>>>>>>> but it looks that this was not correctly marked
> >>>>>>>>>>> when __rte_experimental ABI checker was introduced.
> >>>>>>>>>>>
> >>>>>>>>>>> It is marked as experimental at the top of the rte_tm.h,
> >>>>>>>>>>> similarly to other APIs introduced around same time,
> >>>>>>>>>>> but it was not correctly picked up by the ABI check procedure
> >>>>>>>>>>> when later introduced, so __rte_experimental was not added
> >>> to every function.
> >>>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>> :(
> >>>>>>>>>>
> >>>>>>>>>> Is it time to mature them?
> >>>>>>>>>>
> >>>>>>>>>> As you said they are not marked as experimental both in header
> >>> file (function
> >>>>>>>>>> declarations) and .map file.
> >>>>>>>>>>
> >>>>>>>>>> The problem is, they are not marked as experimental in
> >>> DPDK_20.0 ABI (v19.11),
> >>>>>>>>>> so marking them as experimental now will break the ABI. Not
> >>> sure what to do,
> >>>>>>>>>> cc'ed a few ABI related names for comment.
> >>>>>>>>>>
> >>>>>>>>>> For me, we need to proceed as the experimental tag removed
> >>> and APIs become
> >>>>>>>>>> mature starting from v19.11, since this is what happened in
> >>> practice, and remove
> >>>>>>>>>> a few existing being experimental references in the doxygen
> >>> comments.
> >>>>>>>>>
> >>>>>>>>> I think, accidentally we can not make a library as NON-
> >>> experimental.
> >>>>>>>>> TM never went through experimental to mature transition(see git
> >>> log
> >>>>>>>>> lib/librte_ethdev/rte_tm.h)
> >>>>>>>>> It was a bug to not mark as experimental in each function in the
> >>> ABI process.
> >>>>>>>>> Some of the features like packet marking are not even
> >>> implemented by any HW.
> >>>>>>>>> I think, we can make API stable only all the features are
> >>> implemented
> >>>>>>>>> by one or two HW.
> >>>
> >>> Yes this is what was decided one or two years ago I think.
> >>> But rte_tm API was introduced 3 years ago and is implemented by 6 PMDs.
> >>>
> >>>
> >>>
> >>>>>>>> Fair enough, specially if the API is not ready yet.
> >>>>>>>>
> >>>>>>>> But they were part of stable ABI, and marking them as experimental
> >>> now will
> >>>>>>>> break the old applications using these APIs.
> >>>>>>>
> >>>>>>> it is still marked as EXPERIMENTAL everywhere and API is not ready
> >>> yet.
> >>>
> >>> rte_tm is implemented in 6 PMDs.
> >>>
> >>>
> >>>>>> Existing experimental marks are text only for human parsing.
> >>>>>>
> >>>>>> The compiler attribute and build time checks are missing, and the
> >>> symbol in the
> >>>>>> binary doesn't have experimental tag. Our scripts and automated
> >>> checks won't
> >>>>>> detect it as experimental.
> >>>>>>
> >>>>>> My point is just having experimental comment in header file is not
> >>> enough to
> >>>>>> qualify the APIs as experimental.
> >>>>>>
> >>>>>>> Anyway, we need to break the ABI to make it work on various HW.
> >>>
> >>> Yes this is why I was asking in 19.11 to check our API,
> >>> in order to avoid such situation.
> >>>
> >>>
> >>>>>>> I am not sure what to do?
> >>>
> >>> Either manage ABI versioning, or wait 20.11.
> >>>
> >>>
> >>>>>>> IMO, We need to send a patch as Fixes: for the bug of not adding
> >>>>>>> __rte_experimental in each function.
> >>>
> >>> No, this is wrong.
> >>>
> >>
> >> Why exactly is this wrong? This is the gap that caused the current discussion, right?
> >>
> > It's wrong for this release, since we can't change things from stable back
> > to experimental. Any such patch will have to wait for 20.11, as agreed in
> > the discussion.
> > 
> 
> Deferring the patchet for this release.
> 
> Reminder that if the option "to mark rte_tm_* as experimental in v20.11"
> selected, requires deprecation notice before v20.11.

Thanks Ferruh for reminder. I'll send a deprecation notice patch for the same.

^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [PATCH v4 1/4] ethdev: add tm support for shaper config in pkt mode
  2020-04-29  9:03  0%                           ` Bruce Richardson
@ 2020-05-01 10:27  0%                             ` Ferruh Yigit
  2020-05-01 13:16  0%                               ` [dpdk-dev] [EXT] " Nithin Dabilpuram
  0 siblings, 1 reply; 200+ results
From: Ferruh Yigit @ 2020-05-01 10:27 UTC (permalink / raw)
  To: Bruce Richardson, Dumitrescu, Cristian
  Cc: Thomas Monjalon, Jerin Jacob, Luca Boccassi, Nithin Dabilpuram,
	Singh, Jasvinder, Andrew Rybchenko, dev, jerinj, kkanas,
	Nithin Dabilpuram, Kinsella, Ray, Neil Horman, Kevin Traynor,
	David Marchand

On 4/29/2020 10:03 AM, Bruce Richardson wrote:
> On Wed, Apr 29, 2020 at 09:45:44AM +0100, Dumitrescu, Cristian wrote:
>>
>>
>>> -----Original Message-----
>>> From: Thomas Monjalon <thomas@monjalon.net>
>>> Sent: Tuesday, April 28, 2020 4:54 PM
>>> To: Jerin Jacob <jerinjacobk@gmail.com>; Dumitrescu, Cristian
>>> <cristian.dumitrescu@intel.com>
>>> Cc: Richardson, Bruce <bruce.richardson@intel.com>; Yigit, Ferruh
>>> <ferruh.yigit@intel.com>; Luca Boccassi <bluca@debian.org>; Nithin
>>> Dabilpuram <nithind1988@gmail.com>; Singh, Jasvinder
>>> <jasvinder.singh@intel.com>; Andrew Rybchenko
>>> <arybchenko@solarflare.com>; dev@dpdk.org; jerinj@marvell.com;
>>> kkanas@marvell.com; Nithin Dabilpuram <ndabilpuram@marvell.com>;
>>> Kinsella, Ray <ray.kinsella@intel.com>; Neil Horman
>>> <nhorman@tuxdriver.com>; Kevin Traynor <ktraynor@redhat.com>; David
>>> Marchand <david.marchand@redhat.com>
>>> Subject: Re: [dpdk-dev] [PATCH v4 1/4] ethdev: add tm support for shaper
>>> config in pkt mode
>>>
>>> 28/04/2020 17:04, Luca Boccassi:
>>>> On Tue, 2020-04-28 at 15:45 +0100, Bruce Richardson wrote:
>>>>> On Tue, Apr 28, 2020 at 03:06:20PM +0100, Ferruh Yigit wrote:
>>>>>> On 4/27/2020 5:59 PM, Jerin Jacob wrote:
>>>>>>> On Mon, Apr 27, 2020 at 10:19 PM Ferruh Yigit
>>> <ferruh.yigit@intel.com> wrote:
>>>>>>>> On 4/27/2020 5:29 PM, Jerin Jacob wrote:
>>>>>>>>> On Mon, Apr 27, 2020 at 9:42 PM Ferruh Yigit
>>> <ferruh.yigit@intel.com> wrote:
>>>>>>>>>> On 4/27/2020 10:19 AM, Dumitrescu, Cristian wrote:
>>>>>>>>>>> From: Yigit, Ferruh <ferruh.yigit@intel.com>
>>>>>>>>>>>> On 4/24/2020 11:28 AM, Dumitrescu, Cristian wrote:
>>>>>>>>>>>>> From: Nithin Dabilpuram <nithind1988@gmail.com>
>>>>>>>>>>>>>> This patch also updates tm port/level/node capability
>>> structures with
>>>>>>>>>>>>>> exiting features of scheduler wfq packet mode,
>>> scheduler wfq byte mode
>>>>>>>>>>>>>> and private/shared shaper byte mode.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> SoftNIC PMD is also updated with new capabilities.
>>> [...]
>>>>>>>>>>>> Hi Nithin,
>>>>>>>>>>>>
>>>>>>>>>>>> It looks like patch is causing ABI break, I am getting following
>>> warning [1],
>>>>>>>>>>>> can you please check?
>>>>>>>>>>>>
>>>>>>>>>>>> [1]
>>>>>>>>>>>> https://pastebin.com/XYNFg14u
>>>>>>>>>>>
>>>>>>>>>>> Hi Ferruh,
>>>>>>>>>>>
>>>>>>>>>>> The RTE_TM API is marked as experimental,
>>>>>>>>>>> but it looks that this was not correctly marked
>>>>>>>>>>> when __rte_experimental ABI checker was introduced.
>>>>>>>>>>>
>>>>>>>>>>> It is marked as experimental at the top of the rte_tm.h,
>>>>>>>>>>> similarly to other APIs introduced around same time,
>>>>>>>>>>> but it was not correctly picked up by the ABI check procedure
>>>>>>>>>>> when later introduced, so __rte_experimental was not added
>>> to every function.
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> :(
>>>>>>>>>>
>>>>>>>>>> Is it time to mature them?
>>>>>>>>>>
>>>>>>>>>> As you said they are not marked as experimental both in header
>>> file (function
>>>>>>>>>> declarations) and .map file.
>>>>>>>>>>
>>>>>>>>>> The problem is, they are not marked as experimental in
>>> DPDK_20.0 ABI (v19.11),
>>>>>>>>>> so marking them as experimental now will break the ABI. Not
>>> sure what to do,
>>>>>>>>>> cc'ed a few ABI related names for comment.
>>>>>>>>>>
>>>>>>>>>> For me, we need to proceed as the experimental tag removed
>>> and APIs become
>>>>>>>>>> mature starting from v19.11, since this is what happened in
>>> practice, and remove
>>>>>>>>>> a few existing being experimental references in the doxygen
>>> comments.
>>>>>>>>>
>>>>>>>>> I think, accidentally we can not make a library as NON-
>>> experimental.
>>>>>>>>> TM never went through experimental to mature transition(see git
>>> log
>>>>>>>>> lib/librte_ethdev/rte_tm.h)
>>>>>>>>> It was a bug to not mark as experimental in each function in the
>>> ABI process.
>>>>>>>>> Some of the features like packet marking are not even
>>> implemented by any HW.
>>>>>>>>> I think, we can make API stable only all the features are
>>> implemented
>>>>>>>>> by one or two HW.
>>>
>>> Yes this is what was decided one or two years ago I think.
>>> But rte_tm API was introduced 3 years ago and is implemented by 6 PMDs.
>>>
>>>
>>>
>>>>>>>> Fair enough, specially if the API is not ready yet.
>>>>>>>>
>>>>>>>> But they were part of stable ABI, and marking them as experimental
>>> now will
>>>>>>>> break the old applications using these APIs.
>>>>>>>
>>>>>>> it is still marked as EXPERIMENTAL everywhere and API is not ready
>>> yet.
>>>
>>> rte_tm is implemented in 6 PMDs.
>>>
>>>
>>>>>> Existing experimental marks are text only for human parsing.
>>>>>>
>>>>>> The compiler attribute and build time checks are missing, and the
>>> symbol in the
>>>>>> binary doesn't have experimental tag. Our scripts and automated
>>> checks won't
>>>>>> detect it as experimental.
>>>>>>
>>>>>> My point is just having experimental comment in header file is not
>>> enough to
>>>>>> qualify the APIs as experimental.
>>>>>>
>>>>>>> Anyway, we need to break the ABI to make it work on various HW.
>>>
>>> Yes this is why I was asking in 19.11 to check our API,
>>> in order to avoid such situation.
>>>
>>>
>>>>>>> I am not sure what to do?
>>>
>>> Either manage ABI versioning, or wait 20.11.
>>>
>>>
>>>>>>> IMO, We need to send a patch as Fixes: for the bug of not adding
>>>>>>> __rte_experimental in each function.
>>>
>>> No, this is wrong.
>>>
>>
>> Why exactly is this wrong? This is the gap that caused the current discussion, right?
>>
> It's wrong for this release, since we can't change things from stable back
> to experimental. Any such patch will have to wait for 20.11, as agreed in
> the discussion.
> 

Deferring the patchet for this release.

Reminder that if the option "to mark rte_tm_* as experimental in v20.11"
selected, requires deprecation notice before v20.11.

^ permalink raw reply	[relevance 0%]

* [dpdk-dev] [PATCH v4 2/2] cryptodev: version cryptodev info get function
  @ 2020-04-30 15:52 10% ` Arek Kusztal
  0 siblings, 0 replies; 200+ results
From: Arek Kusztal @ 2020-04-30 15:52 UTC (permalink / raw)
  To: dev; +Cc: fiona.trahe, ray.kinsella, akhil.goyal, Arek Kusztal

This patch adds versioned function rte_cryptodev_info_get()
to prevent some issues with ABI policy.
Node v21 works in same way as before, returning driver capabilities
directly to the API caller. These capabilities may include new elements
not part of the v20 ABI.
Node v20 function maintains compatibility with v20 ABI releases
by stripping out elements not supported in v20 ABI. Because
rte_cryptodev_info_get is called by other API functions,
rte_cryptodev_sym_capability_get function is versioned the same way.

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
---
v2:
- changed version numbers of symbols to 20.0.2
v3:
- added v2/v3 informations
- changed version numbers of symbols to 21
v4:
- fixed clang build by movind binding default symbol
- implemented mailing list comments
- added abidiff tool suppression entries

 devtools/libabigail.abignore                   |   8 ++
 lib/librte_cryptodev/rte_cryptodev.c           | 147 ++++++++++++++++++++++++-
 lib/librte_cryptodev/rte_cryptodev.h           |  36 +++++-
 lib/librte_cryptodev/rte_cryptodev_version.map |   7 ++
 4 files changed, 192 insertions(+), 6 deletions(-)

diff --git a/devtools/libabigail.abignore b/devtools/libabigail.abignore
index 1911890..e479e20 100644
--- a/devtools/libabigail.abignore
+++ b/devtools/libabigail.abignore
@@ -24,3 +24,11 @@
         type_kind = enum
         name = rte_eth_event_type
         changed_enumerators = RTE_ETH_EVENT_MAX
+; Ignore Cryptodev AEAD xform enum and AEAD xform strings change
+; due to addition of Chacha20-Poly1305
+[suppress_type]
+        type_kind = enum
+        name = rte_crypto_aead_algorithm
+        changed_enumerators = RTE_CRYPTO_AEAD_LIST_END
+[suppress_variable]
+        name = rte_crypto_aead_algorithm_strings
diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index a499c47..e4a7b71 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -36,6 +36,8 @@
 #include <rte_errno.h>
 #include <rte_spinlock.h>
 #include <rte_string_fns.h>
+#include <rte_compat.h>
+#include <rte_function_versioning.h>
 
 #include "rte_crypto.h"
 #include "rte_cryptodev.h"
@@ -57,6 +59,14 @@ static struct rte_cryptodev_global cryptodev_globals = {
 /* spinlock for crypto device callbacks */
 static rte_spinlock_t rte_cryptodev_cb_lock = RTE_SPINLOCK_INITIALIZER;
 
+static const struct rte_cryptodev_capabilities
+		cryptodev_undefined_capabilities[] = {
+		RTE_CRYPTODEV_END_OF_CAPABILITIES_LIST()
+};
+
+static struct rte_cryptodev_capabilities
+		*capability_copy[RTE_CRYPTO_MAX_DEVS];
+static uint8_t is_capability_checked[RTE_CRYPTO_MAX_DEVS];
 
 /**
  * The user application callback description.
@@ -281,15 +291,15 @@ rte_crypto_auth_operation_strings[] = {
 		[RTE_CRYPTO_AUTH_OP_GENERATE]	= "generate"
 };
 
-const struct rte_cryptodev_symmetric_capability *
-rte_cryptodev_sym_capability_get(uint8_t dev_id,
+const struct rte_cryptodev_symmetric_capability __vsym *
+rte_cryptodev_sym_capability_get_v20(uint8_t dev_id,
 		const struct rte_cryptodev_sym_capability_idx *idx)
 {
 	const struct rte_cryptodev_capabilities *capability;
 	struct rte_cryptodev_info dev_info;
 	int i = 0;
 
-	rte_cryptodev_info_get(dev_id, &dev_info);
+	rte_cryptodev_info_get_v20(dev_id, &dev_info);
 
 	while ((capability = &dev_info.capabilities[i++])->op !=
 			RTE_CRYPTO_OP_TYPE_UNDEFINED) {
@@ -313,8 +323,47 @@ rte_cryptodev_sym_capability_get(uint8_t dev_id,
 	}
 
 	return NULL;
+}
+VERSION_SYMBOL(rte_cryptodev_sym_capability_get, _v20, 20.0);
+
+const struct rte_cryptodev_symmetric_capability __vsym *
+rte_cryptodev_sym_capability_get_v21(uint8_t dev_id,
+		const struct rte_cryptodev_sym_capability_idx *idx)
+{
+	const struct rte_cryptodev_capabilities *capability;
+	struct rte_cryptodev_info dev_info;
+	int i = 0;
+
+	rte_cryptodev_info_get(dev_id, &dev_info);
+
+	while ((capability = &dev_info.capabilities[i++])->op !=
+			RTE_CRYPTO_OP_TYPE_UNDEFINED) {
+		if (capability->op != RTE_CRYPTO_OP_TYPE_SYMMETRIC)
+			continue;
 
+		if (capability->sym.xform_type != idx->type)
+			continue;
+
+		if (idx->type == RTE_CRYPTO_SYM_XFORM_AUTH &&
+			capability->sym.auth.algo == idx->algo.auth)
+			return &capability->sym;
+
+		if (idx->type == RTE_CRYPTO_SYM_XFORM_CIPHER &&
+			capability->sym.cipher.algo == idx->algo.cipher)
+			return &capability->sym;
+
+		if (idx->type == RTE_CRYPTO_SYM_XFORM_AEAD &&
+				capability->sym.aead.algo == idx->algo.aead)
+			return &capability->sym;
+	}
+
+	return NULL;
 }
+MAP_STATIC_SYMBOL(const struct rte_cryptodev_symmetric_capability *
+		rte_cryptodev_sym_capability_get(uint8_t dev_id,
+		const struct rte_cryptodev_sym_capability_idx *idx),
+		rte_cryptodev_sym_capability_get_v21);
+BIND_DEFAULT_SYMBOL(rte_cryptodev_sym_capability_get, _v21, 21);
 
 static int
 param_range_check(uint16_t size, const struct rte_crypto_param_range *range)
@@ -1016,6 +1065,12 @@ rte_cryptodev_close(uint8_t dev_id)
 	retval = (*dev->dev_ops->dev_close)(dev);
 	rte_cryptodev_trace_close(dev_id, retval);
 
+	if (capability_copy[dev_id]) {
+		free(capability_copy[dev_id]);
+		capability_copy[dev_id] = NULL;
+	}
+	is_capability_checked[dev_id] = 0;
+
 	if (retval < 0)
 		return retval;
 
@@ -1129,9 +1184,61 @@ rte_cryptodev_stats_reset(uint8_t dev_id)
 	(*dev->dev_ops->stats_reset)(dev);
 }
 
+static void
+get_v20_capabilities(uint8_t dev_id, struct rte_cryptodev_info *dev_info)
+{
+	const struct rte_cryptodev_capabilities *capability;
+	uint8_t found_invalid_capa = 0;
+	uint8_t counter = 0;
+
+	for (capability = dev_info->capabilities;
+			capability->op != RTE_CRYPTO_OP_TYPE_UNDEFINED;
+			++capability, ++counter) {
+		if (capability->op == RTE_CRYPTO_OP_TYPE_SYMMETRIC &&
+				capability->sym.xform_type ==
+					RTE_CRYPTO_SYM_XFORM_AEAD
+				&& capability->sym.aead.algo >=
+				RTE_CRYPTO_AEAD_CHACHA20_POLY1305) {
+			found_invalid_capa = 1;
+			counter--;
+		}
+	}
+	is_capability_checked[dev_id] = 1;
+	if (!found_invalid_capa)
+		return;
+	capability_copy[dev_id] = malloc(counter *
+		sizeof(struct rte_cryptodev_capabilities));
+	if (capability_copy[dev_id] == NULL) {
+		 /*
+		  * error case - no memory to store the trimmed
+		  * list, so have to return an empty list
+		  */
+		dev_info->capabilities =
+			cryptodev_undefined_capabilities;
+		is_capability_checked[dev_id] = 0;
+	} else {
+		counter = 0;
+		for (capability = dev_info->capabilities;
+				capability->op !=
+				RTE_CRYPTO_OP_TYPE_UNDEFINED;
+				capability++) {
+			if (!(capability->op ==
+				RTE_CRYPTO_OP_TYPE_SYMMETRIC
+				&& capability->sym.xform_type ==
+				RTE_CRYPTO_SYM_XFORM_AEAD
+				&& capability->sym.aead.algo >=
+				RTE_CRYPTO_AEAD_CHACHA20_POLY1305)) {
+				capability_copy[dev_id][counter++] =
+						*capability;
+			}
+		}
+		dev_info->capabilities =
+				capability_copy[dev_id];
+	}
+}
 
-void
-rte_cryptodev_info_get(uint8_t dev_id, struct rte_cryptodev_info *dev_info)
+void __vsym
+rte_cryptodev_info_get_v20(uint8_t dev_id, struct rte_cryptodev_info *dev_info)
 {
 	struct rte_cryptodev *dev;
 
@@ -1147,10 +1254,40 @@ rte_cryptodev_info_get(uint8_t dev_id, struct rte_cryptodev_info *dev_info)
 	RTE_FUNC_PTR_OR_RET(*dev->dev_ops->dev_infos_get);
 	(*dev->dev_ops->dev_infos_get)(dev, dev_info);
 
+	if (capability_copy[dev_id] == NULL) {
+		if (!is_capability_checked[dev_id])
+			get_v20_capabilities(dev_id, dev_info);
+	} else
+		dev_info->capabilities = capability_copy[dev_id];
+
 	dev_info->driver_name = dev->device->driver->name;
 	dev_info->device = dev->device;
 }
+VERSION_SYMBOL(rte_cryptodev_info_get, _v20, 20.0);
 
+void __vsym
+rte_cryptodev_info_get_v21(uint8_t dev_id, struct rte_cryptodev_info *dev_info)
+{
+	struct rte_cryptodev *dev;
+
+	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
+		CDEV_LOG_ERR("Invalid dev_id=%d", dev_id);
+		return;
+	}
+
+	dev = &rte_crypto_devices[dev_id];
+
+	memset(dev_info, 0, sizeof(struct rte_cryptodev_info));
+
+	RTE_FUNC_PTR_OR_RET(*dev->dev_ops->dev_infos_get);
+	(*dev->dev_ops->dev_infos_get)(dev, dev_info);
+
+	dev_info->driver_name = dev->device->driver->name;
+	dev_info->device = dev->device;
+}
+MAP_STATIC_SYMBOL(void rte_cryptodev_info_get(uint8_t dev_id,
+	struct rte_cryptodev_info *dev_info), rte_cryptodev_info_get_v21);
+BIND_DEFAULT_SYMBOL(rte_cryptodev_info_get, _v21, 21);
 
 int
 rte_cryptodev_callback_register(uint8_t dev_id,
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index 3dbb5ce..f58cedf 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -23,6 +23,8 @@ extern "C" {
 #include "rte_dev.h"
 #include <rte_common.h>
 #include <rte_config.h>
+#include <rte_compat.h>
+#include <rte_function_versioning.h>
 
 #include "rte_cryptodev_trace_fp.h"
 
@@ -219,6 +221,14 @@ struct rte_cryptodev_asym_capability_idx {
  *   - Return NULL if the capability not exist.
  */
 const struct rte_cryptodev_symmetric_capability *
+rte_cryptodev_sym_capability_get_v20(uint8_t dev_id,
+		const struct rte_cryptodev_sym_capability_idx *idx);
+
+const struct rte_cryptodev_symmetric_capability *
+rte_cryptodev_sym_capability_get_v21(uint8_t dev_id,
+		const struct rte_cryptodev_sym_capability_idx *idx);
+
+const struct rte_cryptodev_symmetric_capability *
 rte_cryptodev_sym_capability_get(uint8_t dev_id,
 		const struct rte_cryptodev_sym_capability_idx *idx);
 
@@ -762,9 +772,33 @@ rte_cryptodev_stats_reset(uint8_t dev_id);
  * the last valid element has it's op field set to
  * RTE_CRYPTO_OP_TYPE_UNDEFINED.
  */
-extern void
+
+void
 rte_cryptodev_info_get(uint8_t dev_id, struct rte_cryptodev_info *dev_info);
 
+/* An extra element RTE_CRYPTO_AEAD_CHACHA20_POLY1305 is added
+ * to enum rte_crypto_aead_algorithm, also changing the value of
+ *  RTE_CRYPTO_AEAD_LIST_END. To maintain ABI compatibility with applications
+ * which linked against earlier versions, preventing them, for example, from
+ * picking up the new value and using it to index into an array sized too small
+ * for it, it is necessary to have two versions of rte_cryptodev_info_get()
+ * The latest version just returns directly the capabilities retrieved from
+ * the device. The compatible version inspects the capabilities retrieved
+ * from the device, but only returns them directly if the new value
+ * is not included. If the new value is included, it allocates space
+ * for a copy of the device capabilities, trims the new value from this
+ * and returns this copy. It only needs to do this once per device.
+ * For the corner case of a corner case when the alloc may fail,
+ * an empty capability list is returned, as there is no mechanism to return
+ * an error and adding such a mechanism would itself be an ABI breakage.
+ * The compatible version can be removed after the next major ABI release.
+ */
+
+void
+rte_cryptodev_info_get_v20(uint8_t dev_id, struct rte_cryptodev_info *dev_info);
+
+void
+rte_cryptodev_info_get_v21(uint8_t dev_id, struct rte_cryptodev_info *dev_info);
 
 /**
  * Register a callback function for specific device id.
diff --git a/lib/librte_cryptodev/rte_cryptodev_version.map b/lib/librte_cryptodev/rte_cryptodev_version.map
index 87f5cd1..07a2d2f 100644
--- a/lib/librte_cryptodev/rte_cryptodev_version.map
+++ b/lib/librte_cryptodev/rte_cryptodev_version.map
@@ -58,6 +58,13 @@ DPDK_20.0 {
 	local: *;
 };
 
+DPDK_21 {
+	global:
+	rte_cryptodev_info_get;
+	rte_cryptodev_sym_capability_get;
+} DPDK_20.0;
+
+
 EXPERIMENTAL {
 	global:
 
-- 
2.1.0


^ permalink raw reply	[relevance 10%]

* [dpdk-dev] DPDK Release Status Meeting 30/04/2020
@ 2020-04-30 13:55  4% Ferruh Yigit
  0 siblings, 0 replies; 200+ results
From: Ferruh Yigit @ 2020-04-30 13:55 UTC (permalink / raw)
  To: dpdk-dev; +Cc: Thomas Monjalon

Minutes 30 April 2020
---------------------

Agenda:
* Release Dates
* -rc1 status
* Subtrees
* OvS
* Opens

Participants:
* Arm
* Debian/Microsoft
* Intel
* Marvell
* Mellanox
* Red Hat


Release Dates
-------------

* v20.05 dates:
  * -rc1 is released on Monday, 27 April
    * http://inbox.dpdk.org/dev/2138318.D4D8VRik6i@thomas/
  * -rc2				Friday 8 May 2020
  * Release:				Wednesday 20 May 2020

* v20.08 proposal dates, please comment:
  * Proposal/V1:		Tuesday, 16 June 2020
  * Integration/Merge/RC1:	Tuesday, 14 July 2020
  * Release:			Friday, 7 August 2020

  * Please send roadmap for the release


-rc1 status
-----------

* Intel completed majority of tests, no major issue found so far
  * Test report will be sent when ready

* Marvel test report also doesn't show any major issue


Subtrees
--------

* main
  * Mainly fixes at this moment
  * gcc10 fixes
    * still not all fixed, should be fixed for -rc2
  * eal and ABI patches
    * __rte_internal
  * working on merging rte_graph and rte_telemetry for -rc2
  * bitops is cleanup patch, would be good to have it in -rc1
    at this stage it may not make this release
  * meson patches from Bruce to fix static linking
    May be postponed to next release
  * Rawdev for compress+crc multi function, short-term
    solution needs to be decided in mail list

* next-net
  * Started to merge patches, no big patchset for -rc2
  * ethdev patch not accepted because of ABI break, it will need to wait 20.11
    * http://inbox.dpdk.org/dev/1923738.gORTcIGjah@thomas/
  * ~60 patches in backlog for -rc2

* next-crypto
  * no update

* next-eventdev
  * Only a few patches for -rc2 to be reviewed

* next-virtio
  * Good progress this week, some patches already merged for -rc2
    * mlx5 vdpa, packet ring vector path, zero copy optimizations, etc...
  * Only a few remaining, PR almost ready

* next-net-intel
  * Some fixes for -rc2 has been merged and pulled to next-net

* next-net-mrvl
  * ~10 patches to be reviewed for -rc2


OvS
---

* Finished validating stable trees
  * OvS 2.11 & 2.12 validated with DPDK 18.11.7
  * OvS 2.13 & master branch validated with DPDK 19.11.1


Opens
-----

* Latest coverity scan showed 120 new defects, some of them from old code base,
  this may be related to the coverity backend changes
  * Need more support to resolve all new issues



DPDK Release Status Meetings
============================

The DPDK Release Status Meeting is intended for DPDK Committers to discuss
the status of the master tree and sub-trees, and for project managers to
track progress or milestone dates.

The meeting occurs on Thursdays at 8:30 UTC. If you wish to attend just
send an email to "John McNamara <john.mcnamara@intel.com>" for the invite.

^ permalink raw reply	[relevance 4%]

* [dpdk-dev] [PATCH v6 1/1] abi: change references to abi 20.0.1 to abi v21
      2020-04-30 10:21 31% ` [dpdk-dev] [PATCH v5] " Ray Kinsella
@ 2020-04-30 10:27 10% ` Ray Kinsella
  2020-04-30 10:27 31%   ` Ray Kinsella
  2020-05-04 22:05  6%   ` Thomas Monjalon
  2 siblings, 2 replies; 200+ results
From: Ray Kinsella @ 2020-04-30 10:27 UTC (permalink / raw)
  To: dev
  Cc: david.marchand, Ray Kinsella, Thomas Monjalon, Neil Horman,
	Jingjing Wu, Beilei Xing, Matan Azrad, Shahaf Shuler,
	Viacheslav Ovsiienko, Jerin Jacob, Nithin Dabilpuram,
	Alfredo Cardigliano, Mahipal Challa, Cristian Dumitrescu

Sending again, as I missed the cover letter last time.

v6:
 * combined policy and versioning in the maintainers file.

Ray Kinsella (1):
  abi: change references to abi 20.0.1 to abi v21

 MAINTAINERS                                            | 10 +++++-----
 devtools/libabigail.abignore                           |  5 +++++
 drivers/common/iavf/rte_common_iavf_version.map        |  2 +-
 drivers/common/mlx5/rte_common_mlx5_version.map        |  2 +-
 .../common/octeontx2/rte_common_octeontx2_version.map  |  2 +-
 drivers/net/ionic/rte_pmd_ionic_version.map            |  2 +-
 .../octeontx2_ep/rte_rawdev_octeontx2_ep_version.map   |  2 +-
 drivers/vdpa/mlx5/rte_pmd_mlx5_vdpa_version.map        |  2 +-
 lib/librte_meter/rte_meter_version.map                 |  2 +-
 9 files changed, 17 insertions(+), 12 deletions(-)

--
2.23.0

^ permalink raw reply	[relevance 10%]

* [dpdk-dev] [PATCH v6 1/1] abi: change references to abi 20.0.1 to abi v21
  2020-04-30 10:27 10% ` [dpdk-dev] [PATCH v6 1/1] " Ray Kinsella
@ 2020-04-30 10:27 31%   ` Ray Kinsella
  2020-05-04 22:23  6%     ` Thomas Monjalon
  2020-05-04 22:05  6%   ` Thomas Monjalon
  1 sibling, 1 reply; 200+ results
From: Ray Kinsella @ 2020-04-30 10:27 UTC (permalink / raw)
  To: dev
  Cc: david.marchand, Ray Kinsella, Thomas Monjalon, Neil Horman,
	Jingjing Wu, Beilei Xing, Matan Azrad, Shahaf Shuler,
	Viacheslav Ovsiienko, Jerin Jacob, Nithin Dabilpuram,
	Alfredo Cardigliano, Mahipal Challa, Cristian Dumitrescu

Change references to abi 20.0.1 to use abi v21, see
https://doc.dpdk.org/guides/contributing/abi_policy.html#general-guidelines

"Major ABI versions are declared no more frequently than yearly.
Compatibility with the major ABI version is mandatory in subsequent
releases until a new major ABI version is declared."

Combined abi policy and versioning in maintainers, add map files to the
filter to more closely monitor future abi changes.

Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
---
 MAINTAINERS                                            | 10 +++++-----
 devtools/libabigail.abignore                           |  5 +++++
 drivers/common/iavf/rte_common_iavf_version.map        |  2 +-
 drivers/common/mlx5/rte_common_mlx5_version.map        |  2 +-
 .../common/octeontx2/rte_common_octeontx2_version.map  |  2 +-
 drivers/net/ionic/rte_pmd_ionic_version.map            |  2 +-
 .../octeontx2_ep/rte_rawdev_octeontx2_ep_version.map   |  2 +-
 drivers/vdpa/mlx5/rte_pmd_mlx5_vdpa_version.map        |  2 +-
 lib/librte_meter/rte_meter_version.map                 |  2 +-
 9 files changed, 17 insertions(+), 12 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index e05c80504..9756cb752 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -83,10 +83,6 @@ M: Marko Kovacevic <marko.kovacevic@intel.com>
 F: README
 F: doc/
 
-ABI Policy
-M: Ray Kinsella <mdr@ashroe.eu>
-F: doc/guides/contributing/abi_*.rst
-
 Developers and Maintainers Tools
 M: Thomas Monjalon <thomas@monjalon.net>
 F: MAINTAINERS
@@ -140,10 +136,12 @@ M: Michael Santana <maicolgabriel@hotmail.com>
 F: .travis.yml
 F: .ci/
 
-ABI versioning
+ABI policy & versioning
+M: Ray Kinsella <mdr@ashroe.eu>
 M: Neil Horman <nhorman@tuxdriver.com>
 F: lib/librte_eal/include/rte_compat.h
 F: lib/librte_eal/include/rte_function_versioning.h
+F: doc/guides/contributing/abi_*.rst
 F: doc/guides/rel_notes/deprecation.rst
 F: devtools/check-abi.sh
 F: devtools/check-abi-version.sh
@@ -155,6 +153,8 @@ F: devtools/update_version_map_abi.py
 F: devtools/validate-abi.sh
 F: buildtools/check-symbols.sh
 F: buildtools/map-list-symbol.sh
+F: drivers/*/*/*.map
+F: lib/*/*.map
 
 Driver information
 M: Neil Horman <nhorman@tuxdriver.com>
diff --git a/devtools/libabigail.abignore b/devtools/libabigail.abignore
index 986a52771..b0147fde6 100644
--- a/devtools/libabigail.abignore
+++ b/devtools/libabigail.abignore
@@ -29,3 +29,8 @@
         type_kind = enum
         name = rte_eth_event_type
         changed_enumerators = RTE_ETH_EVENT_MAX
+; Explicit ignore ABI 20.0.1
+[suppress_function]
+        symbol_version = DPDK_20.0.1
+[suppress_variable]
+        symbol_version = DPDK_20.0.1
diff --git a/drivers/common/iavf/rte_common_iavf_version.map b/drivers/common/iavf/rte_common_iavf_version.map
index 2f11d67c0..92ceac108 100644
--- a/drivers/common/iavf/rte_common_iavf_version.map
+++ b/drivers/common/iavf/rte_common_iavf_version.map
@@ -1,4 +1,4 @@
-DPDK_20.0.1 {
+DPDK_21 {
 	global:
 
 	iavf_init_adminq;
diff --git a/drivers/common/mlx5/rte_common_mlx5_version.map b/drivers/common/mlx5/rte_common_mlx5_version.map
index b58a37827..564a9a7fb 100644
--- a/drivers/common/mlx5/rte_common_mlx5_version.map
+++ b/drivers/common/mlx5/rte_common_mlx5_version.map
@@ -1,4 +1,4 @@
-DPDK_20.0.1 {
+DPDK_21 {
 	global:
 
 	mlx5_class_get;
diff --git a/drivers/common/octeontx2/rte_common_octeontx2_version.map b/drivers/common/octeontx2/rte_common_octeontx2_version.map
index 8f2404bd9..01279c339 100644
--- a/drivers/common/octeontx2/rte_common_octeontx2_version.map
+++ b/drivers/common/octeontx2/rte_common_octeontx2_version.map
@@ -34,7 +34,7 @@ DPDK_20.0 {
 	local: *;
 };
 
-DPDK_20.0.1 {
+DPDK_21 {
 	global:
 
 	otx2_eth_dev_is_sec_capable;
diff --git a/drivers/net/ionic/rte_pmd_ionic_version.map b/drivers/net/ionic/rte_pmd_ionic_version.map
index bc8fd6d4d..acdaf587d 100644
--- a/drivers/net/ionic/rte_pmd_ionic_version.map
+++ b/drivers/net/ionic/rte_pmd_ionic_version.map
@@ -1,4 +1,4 @@
-DPDK_20.0.1 {
+DPDK_21 {
 
 	local: *;
 };
diff --git a/drivers/raw/octeontx2_ep/rte_rawdev_octeontx2_ep_version.map b/drivers/raw/octeontx2_ep/rte_rawdev_octeontx2_ep_version.map
index bc8fd6d4d..acdaf587d 100644
--- a/drivers/raw/octeontx2_ep/rte_rawdev_octeontx2_ep_version.map
+++ b/drivers/raw/octeontx2_ep/rte_rawdev_octeontx2_ep_version.map
@@ -1,4 +1,4 @@
-DPDK_20.0.1 {
+DPDK_21 {
 
 	local: *;
 };
diff --git a/drivers/vdpa/mlx5/rte_pmd_mlx5_vdpa_version.map b/drivers/vdpa/mlx5/rte_pmd_mlx5_vdpa_version.map
index 179f7f1ae..4a76d1d52 100644
--- a/drivers/vdpa/mlx5/rte_pmd_mlx5_vdpa_version.map
+++ b/drivers/vdpa/mlx5/rte_pmd_mlx5_vdpa_version.map
@@ -1,3 +1,3 @@
-DPDK_20.0.1 {
+DPDK_21 {
 	local: *;
 };
diff --git a/lib/librte_meter/rte_meter_version.map b/lib/librte_meter/rte_meter_version.map
index fc12cc0bf..2c7dadbca 100644
--- a/lib/librte_meter/rte_meter_version.map
+++ b/lib/librte_meter/rte_meter_version.map
@@ -13,7 +13,7 @@ DPDK_20.0 {
 	local: *;
 };
 
-DPDK_20.0.1 {
+DPDK_21 {
 	global:
 
 	rte_meter_trtcm_rfc4115_color_aware_check;
-- 
2.23.0


^ permalink raw reply	[relevance 31%]

* [dpdk-dev] [PATCH v5] abi: change references to abi 20.0.1 to abi v21
    @ 2020-04-30 10:21 31% ` Ray Kinsella
  2020-04-30 10:27 10% ` [dpdk-dev] [PATCH v6 1/1] " Ray Kinsella
  2 siblings, 0 replies; 200+ results
From: Ray Kinsella @ 2020-04-30 10:21 UTC (permalink / raw)
  To: dev
  Cc: david.marchand, Ray Kinsella, Thomas Monjalon, Neil Horman,
	Jingjing Wu, Beilei Xing, Matan Azrad, Shahaf Shuler,
	Viacheslav Ovsiienko, Jerin Jacob, Nithin Dabilpuram,
	Alfredo Cardigliano, Mahipal Challa, Cristian Dumitrescu

Change references to abi 20.0.1 to use abi v21, see
https://doc.dpdk.org/guides/contributing/abi_policy.html#general-guidelines

"Major ABI versions are declared no more frequently than yearly.
Compatibility with the major ABI version is mandatory in subsequent
releases until a new major ABI version is declared."

Combined abi policy and versioning in maintainers, add map files to the
filter to more closely monitor future abi changes.

Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
---
 MAINTAINERS                                            | 10 +++++-----
 devtools/libabigail.abignore                           |  5 +++++
 drivers/common/iavf/rte_common_iavf_version.map        |  2 +-
 drivers/common/mlx5/rte_common_mlx5_version.map        |  2 +-
 .../common/octeontx2/rte_common_octeontx2_version.map  |  2 +-
 drivers/net/ionic/rte_pmd_ionic_version.map            |  2 +-
 .../octeontx2_ep/rte_rawdev_octeontx2_ep_version.map   |  2 +-
 drivers/vdpa/mlx5/rte_pmd_mlx5_vdpa_version.map        |  2 +-
 lib/librte_meter/rte_meter_version.map                 |  2 +-
 9 files changed, 17 insertions(+), 12 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index e05c80504..9756cb752 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -83,10 +83,6 @@ M: Marko Kovacevic <marko.kovacevic@intel.com>
 F: README
 F: doc/
 
-ABI Policy
-M: Ray Kinsella <mdr@ashroe.eu>
-F: doc/guides/contributing/abi_*.rst
-
 Developers and Maintainers Tools
 M: Thomas Monjalon <thomas@monjalon.net>
 F: MAINTAINERS
@@ -140,10 +136,12 @@ M: Michael Santana <maicolgabriel@hotmail.com>
 F: .travis.yml
 F: .ci/
 
-ABI versioning
+ABI policy & versioning
+M: Ray Kinsella <mdr@ashroe.eu>
 M: Neil Horman <nhorman@tuxdriver.com>
 F: lib/librte_eal/include/rte_compat.h
 F: lib/librte_eal/include/rte_function_versioning.h
+F: doc/guides/contributing/abi_*.rst
 F: doc/guides/rel_notes/deprecation.rst
 F: devtools/check-abi.sh
 F: devtools/check-abi-version.sh
@@ -155,6 +153,8 @@ F: devtools/update_version_map_abi.py
 F: devtools/validate-abi.sh
 F: buildtools/check-symbols.sh
 F: buildtools/map-list-symbol.sh
+F: drivers/*/*/*.map
+F: lib/*/*.map
 
 Driver information
 M: Neil Horman <nhorman@tuxdriver.com>
diff --git a/devtools/libabigail.abignore b/devtools/libabigail.abignore
index 986a52771..b0147fde6 100644
--- a/devtools/libabigail.abignore
+++ b/devtools/libabigail.abignore
@@ -29,3 +29,8 @@
         type_kind = enum
         name = rte_eth_event_type
         changed_enumerators = RTE_ETH_EVENT_MAX
+; Explicit ignore ABI 20.0.1
+[suppress_function]
+        symbol_version = DPDK_20.0.1
+[suppress_variable]
+        symbol_version = DPDK_20.0.1
diff --git a/drivers/common/iavf/rte_common_iavf_version.map b/drivers/common/iavf/rte_common_iavf_version.map
index 2f11d67c0..92ceac108 100644
--- a/drivers/common/iavf/rte_common_iavf_version.map
+++ b/drivers/common/iavf/rte_common_iavf_version.map
@@ -1,4 +1,4 @@
-DPDK_20.0.1 {
+DPDK_21 {
 	global:
 
 	iavf_init_adminq;
diff --git a/drivers/common/mlx5/rte_common_mlx5_version.map b/drivers/common/mlx5/rte_common_mlx5_version.map
index b58a37827..564a9a7fb 100644
--- a/drivers/common/mlx5/rte_common_mlx5_version.map
+++ b/drivers/common/mlx5/rte_common_mlx5_version.map
@@ -1,4 +1,4 @@
-DPDK_20.0.1 {
+DPDK_21 {
 	global:
 
 	mlx5_class_get;
diff --git a/drivers/common/octeontx2/rte_common_octeontx2_version.map b/drivers/common/octeontx2/rte_common_octeontx2_version.map
index 8f2404bd9..01279c339 100644
--- a/drivers/common/octeontx2/rte_common_octeontx2_version.map
+++ b/drivers/common/octeontx2/rte_common_octeontx2_version.map
@@ -34,7 +34,7 @@ DPDK_20.0 {
 	local: *;
 };
 
-DPDK_20.0.1 {
+DPDK_21 {
 	global:
 
 	otx2_eth_dev_is_sec_capable;
diff --git a/drivers/net/ionic/rte_pmd_ionic_version.map b/drivers/net/ionic/rte_pmd_ionic_version.map
index bc8fd6d4d..acdaf587d 100644
--- a/drivers/net/ionic/rte_pmd_ionic_version.map
+++ b/drivers/net/ionic/rte_pmd_ionic_version.map
@@ -1,4 +1,4 @@
-DPDK_20.0.1 {
+DPDK_21 {
 
 	local: *;
 };
diff --git a/drivers/raw/octeontx2_ep/rte_rawdev_octeontx2_ep_version.map b/drivers/raw/octeontx2_ep/rte_rawdev_octeontx2_ep_version.map
index bc8fd6d4d..acdaf587d 100644
--- a/drivers/raw/octeontx2_ep/rte_rawdev_octeontx2_ep_version.map
+++ b/drivers/raw/octeontx2_ep/rte_rawdev_octeontx2_ep_version.map
@@ -1,4 +1,4 @@
-DPDK_20.0.1 {
+DPDK_21 {
 
 	local: *;
 };
diff --git a/drivers/vdpa/mlx5/rte_pmd_mlx5_vdpa_version.map b/drivers/vdpa/mlx5/rte_pmd_mlx5_vdpa_version.map
index 179f7f1ae..4a76d1d52 100644
--- a/drivers/vdpa/mlx5/rte_pmd_mlx5_vdpa_version.map
+++ b/drivers/vdpa/mlx5/rte_pmd_mlx5_vdpa_version.map
@@ -1,3 +1,3 @@
-DPDK_20.0.1 {
+DPDK_21 {
 	local: *;
 };
diff --git a/lib/librte_meter/rte_meter_version.map b/lib/librte_meter/rte_meter_version.map
index fc12cc0bf..2c7dadbca 100644
--- a/lib/librte_meter/rte_meter_version.map
+++ b/lib/librte_meter/rte_meter_version.map
@@ -13,7 +13,7 @@ DPDK_20.0 {
 	local: *;
 };
 
-DPDK_20.0.1 {
+DPDK_21 {
 	global:
 
 	rte_meter_trtcm_rfc4115_color_aware_check;
-- 
2.23.0


^ permalink raw reply	[relevance 31%]

* Re: [dpdk-dev] [PATCH v5] eal/cpuflags: add x86 based cpu flags
  2020-04-29 11:39  3%       ` David Marchand
@ 2020-04-30 10:02  0%         ` Ray Kinsella
  0 siblings, 0 replies; 200+ results
From: Ray Kinsella @ 2020-04-30 10:02 UTC (permalink / raw)
  To: David Marchand
  Cc: Kevin Laatz, dev, Bruce Richardson, Van Haaren Harry,
	Thomas Monjalon, Kinsella, Ray, Neil Horman

So that isn't the issue either. 

$ grep RTE_CPUFLAG_NUMFLAGS build-gcc-shared/install/dump/librte_eal.dump
4646:      <enumerator name='RTE_CPUFLAG_NUMFLAGS' value='104'/>
$ grep RTE_CPUFLAG_NUMFLAGS /build/dpdk/reference/v20.02/build-gcc-shared/dump/librte_eal.dump
3296:      <enumerator name='RTE_CPUFLAG_NUMFLAGS' value='87'/>
                                     1.7-1.fc31                             @updates

I finally got libabigail complaining about rte_cpu_flag_t, after doing a complete clear down.
So the suppression _is_ required. 
 
I then spent the following hour trying to identify the gremlin in the system with no luck.
In anycase, added my ack below.


On 29/04/2020 12:39, David Marchand wrote:
> On Tue, Apr 28, 2020 at 6:39 PM Ray Kinsella <mdr@ashroe.eu> wrote:
>>> diff --git a/devtools/libabigail.abignore b/devtools/libabigail.abignore
>>> index a59df8f13..045f436fb 100644
>>> --- a/devtools/libabigail.abignore
>>> +++ b/devtools/libabigail.abignore
>>
>> Kevin - you still have the surpession.
>> I am testing locally with 1.7.1, and it doesn't complain when I disable the supression.
>> Are you seeing something different?
> 
> Using current master libabigail, without the rule Kevin included, I
> get the warning:
> 
> 1 function with some indirect sub-type change:
> 
>   [C] 'function int rte_cpu_get_flag_enabled(rte_cpu_flag_t)' at
> rte_cpuflags.c:144:1 has some indirect sub-type changes:
>     parameter 1 of type 'enum rte_cpu_flag_t' has sub-type changes:
>       type size hasn't changed
>       17 enumerator insertions:
>         'rte_cpu_flag_t::RTE_CPUFLAG_AVX512DQ' value '87'
>         'rte_cpu_flag_t::RTE_CPUFLAG_AVX512IFMA' value '88'
>         'rte_cpu_flag_t::RTE_CPUFLAG_AVX512CD' value '89'
>         'rte_cpu_flag_t::RTE_CPUFLAG_AVX512BW' value '90'
>         'rte_cpu_flag_t::RTE_CPUFLAG_AVX512VL' value '91'
>         'rte_cpu_flag_t::RTE_CPUFLAG_AVX512VBMI' value '92'
>         'rte_cpu_flag_t::RTE_CPUFLAG_AVX512VBMI2' value '93'
>         'rte_cpu_flag_t::RTE_CPUFLAG_GFNI' value '94'
>         'rte_cpu_flag_t::RTE_CPUFLAG_VAES' value '95'
>         'rte_cpu_flag_t::RTE_CPUFLAG_VPCLMULQDQ' value '96'
>         'rte_cpu_flag_t::RTE_CPUFLAG_AVX512VNNI' value '97'
>         'rte_cpu_flag_t::RTE_CPUFLAG_AVX512BITALG' value '98'
>         'rte_cpu_flag_t::RTE_CPUFLAG_AVX512VPOPCNTDQ' value '99'
>         'rte_cpu_flag_t::RTE_CPUFLAG_CLDEMOTE' value '100'
>         'rte_cpu_flag_t::RTE_CPUFLAG_MOVDIRI' value '101'
>         'rte_cpu_flag_t::RTE_CPUFLAG_MOVDIR64B' value '102'
>         'rte_cpu_flag_t::RTE_CPUFLAG_AVX512VP2INTERSECT' value '103'
>       1 enumerator change:
>         'rte_cpu_flag_t::RTE_CPUFLAG_NUMFLAGS' from value '87' to
> '104' at rte_cpuflags.h:12:1
> 
> 
> Ray, could you check that the reference and new dumps in your env
> contain this enum?
> 
> $ grep RTE_CPUFLAG_NUMFLAGS
> $HOME/abi/v20.02/x86_64-native-linux-gcc+shared+debug+ASSERT+RTE_IBVERBS_LINK_DLOPEN/dump/librte_eal.dump
>       <enumerator name='RTE_CPUFLAG_NUMFLAGS' value='87'/>
> $ grep RTE_CPUFLAG_NUMFLAGS
> $HOME/builds/x86_64-native-linux-gcc+shared+debug+ASSERT+RTE_IBVERBS_LINK_DLOPEN/install/dump/librte_eal.dump
>       <enumerator name='RTE_CPUFLAG_NUMFLAGS' value='104'/>
> 
> If you are missing those, you might have built dpdk without debuginfo.
> 

Acked-By: Ray Kinsella <mdr@ashroe.eu>

^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [RFC] hash: unify crc32 API header for x86 and ARM
  2020-04-30  9:14  0% ` Van Haaren, Harry
@ 2020-04-30  9:27  0%   ` Pavan Nikhilesh Bhagavatula
  0 siblings, 0 replies; 200+ results
From: Pavan Nikhilesh Bhagavatula @ 2020-04-30  9:27 UTC (permalink / raw)
  To: Van Haaren, Harry, Jerin Jacob Kollanukkaran, thomas, Wang,
	Yipeng1, Gobriel, Sameh, Richardson, Bruce, Ruifeng Wang
  Cc: dev

>> -----Original Message-----
>> From: dev <dev-bounces@dpdk.org> On Behalf Of
>pbhagavatula@marvell.com
>> Sent: Wednesday, April 29, 2020 7:05 PM
>> To: jerinj@marvell.com; thomas@monjalon.net; Wang, Yipeng1
>> <yipeng1.wang@intel.com>; Gobriel, Sameh
><sameh.gobriel@intel.com>;
>> Richardson, Bruce <bruce.richardson@intel.com>; Ruifeng Wang
>> <ruifeng.wang@arm.com>
>> Cc: dev@dpdk.org; Pavan Nikhilesh <pbhagavatula@marvell.com>
>> Subject: [dpdk-dev] [RFC] hash: unify crc32 API header for x86 and
>ARM
>>
>> From: Pavan Nikhilesh <pbhagavatula@marvell.com>
>>
>> Merge crc32 hash calculation public API headers for x86 and ARM,
>> split implementations of x86 and ARM into their respective private
>> headers.
>> This reduces the ifdef code clutter while keeping current ABI intact.
>>
>> Although we install `rte_crc_arm64.h` it is not used in any of the lib or
>> drivers layers. All the libs and drivers use `rte_hash_crc.h` which falls
>> back to SW crc32 calculation for ARM platform.
>
><snip lots of stuff, to focus on meson install header change>
>
>> diff --git a/lib/librte_hash/meson.build b/lib/librte_hash/meson.build
>> index 6ab46ae9d..90a180bc8 100644
>> --- a/lib/librte_hash/meson.build
>> +++ b/lib/librte_hash/meson.build
>> @@ -1,8 +1,7 @@
>>  # SPDX-License-Identifier: BSD-3-Clause
>>  # Copyright(c) 2017 Intel Corporation
>>
>> -headers = files('rte_crc_arm64.h',
>> -	'rte_fbk_hash.h',
>> +headers = files('rte_fbk_hash.h',
>>  	'rte_hash_crc.h',
>>  	'rte_hash.h',
>>  	'rte_jhash.h',
>
>Am I right in that previously an application could #include
><rte_crc_arm64.h>  and hence if we no
>longer install that file, this will cause a compilation failure on that
>application? Applications shouldn't
>include arch specific headers... but we shouldn't knowingly remove
>publicly accessible includes either.
>
>Perhaps consider just installing a dummy header file if the code cleanup
>in the rest of the patch is desired?

Sure we could either symlink `rte_hash_crc.h` as `rte_crc_arm64.h` or
Just include rte_hash_crc.h in rte_crc_arm64.h for now and remove
rte_crc_arm64.h later with a deprecation notice? 

^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [RFC] hash: unify crc32 API header for x86 and ARM
  2020-04-29 18:05  2% [dpdk-dev] [RFC] hash: unify crc32 API header for x86 and ARM pbhagavatula
@ 2020-04-30  9:14  0% ` Van Haaren, Harry
  2020-04-30  9:27  0%   ` Pavan Nikhilesh Bhagavatula
  2020-05-06 22:02  0% ` Wang, Yipeng1
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 200+ results
From: Van Haaren, Harry @ 2020-04-30  9:14 UTC (permalink / raw)
  To: pbhagavatula, jerinj, thomas, Wang, Yipeng1, Gobriel, Sameh,
	Richardson, Bruce, Ruifeng Wang
  Cc: dev

> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of pbhagavatula@marvell.com
> Sent: Wednesday, April 29, 2020 7:05 PM
> To: jerinj@marvell.com; thomas@monjalon.net; Wang, Yipeng1
> <yipeng1.wang@intel.com>; Gobriel, Sameh <sameh.gobriel@intel.com>;
> Richardson, Bruce <bruce.richardson@intel.com>; Ruifeng Wang
> <ruifeng.wang@arm.com>
> Cc: dev@dpdk.org; Pavan Nikhilesh <pbhagavatula@marvell.com>
> Subject: [dpdk-dev] [RFC] hash: unify crc32 API header for x86 and ARM
> 
> From: Pavan Nikhilesh <pbhagavatula@marvell.com>
> 
> Merge crc32 hash calculation public API headers for x86 and ARM,
> split implementations of x86 and ARM into their respective private
> headers.
> This reduces the ifdef code clutter while keeping current ABI intact.
> 
> Although we install `rte_crc_arm64.h` it is not used in any of the lib or
> drivers layers. All the libs and drivers use `rte_hash_crc.h` which falls
> back to SW crc32 calculation for ARM platform.

<snip lots of stuff, to focus on meson install header change>

> diff --git a/lib/librte_hash/meson.build b/lib/librte_hash/meson.build
> index 6ab46ae9d..90a180bc8 100644
> --- a/lib/librte_hash/meson.build
> +++ b/lib/librte_hash/meson.build
> @@ -1,8 +1,7 @@
>  # SPDX-License-Identifier: BSD-3-Clause
>  # Copyright(c) 2017 Intel Corporation
> 
> -headers = files('rte_crc_arm64.h',
> -	'rte_fbk_hash.h',
> +headers = files('rte_fbk_hash.h',
>  	'rte_hash_crc.h',
>  	'rte_hash.h',
>  	'rte_jhash.h',

Am I right in that previously an application could #include <rte_crc_arm64.h>  and hence if we no
longer install that file, this will cause a compilation failure on that application? Applications shouldn't
include arch specific headers... but we shouldn't knowingly remove publicly accessible includes either.

Perhaps consider just installing a dummy header file if the code cleanup in the rest of the patch is desired?

^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [PATCH v2] abi: change references to abi 20.0.1 to abi v21
  2020-04-29 12:19  9%       ` Dodji Seketeli
@ 2020-04-30  8:23  6%         ` Ray Kinsella
  0 siblings, 0 replies; 200+ results
From: Ray Kinsella @ 2020-04-30  8:23 UTC (permalink / raw)
  To: Dodji Seketeli
  Cc: David Marchand, dev, Andrzej Ostruszka, Stephen Hemminger,
	Thomas Monjalon, Neil Horman, Jingjing Wu, Wenzhuo Lu,
	Matan Azrad, Shahaf Shuler, Viacheslav Ovsiienko, Jerin Jacob,
	Nithin Dabilpuram, Alfredo Cardigliano, Mahipal Challa,
	Cristian Dumitrescu, Wang, Haiyue



On 29/04/2020 13:19, Dodji Seketeli wrote:
> Hello,
> 
> Ray Kinsella <mdr@ashroe.eu> writes:
> 
>> ah ok, the particular system I made the change on was Ubuntu 18.04.2.
>> which is libabigail 1.2.0.
> 
> Whoah, 1.2 is super old.

I have a huge clunking raid'ed "build" server,
that I am pretty conservative about upgrading on v18.04.2 :-)

> In my opinion, one of the hallmarks of static analysis tools (and
> libabigail is just a static analysis framework) is to be able to
> recognize patterns used by developers, as much as we can.
> 
> Because we can't really do that at once, we try to add recognition of
> new patterns (of ABI changes) at every single release.  Furthermore,
> there are some change patterns that ought to be recognized and
> categorized as harmless, whereas some others out to be categorized as
> harmful.  That categorization is also the result of input coming from
> users as you, fine fellows.
> 
> All this to say that with every new version, the number of new supported
> features and bug fixes is potentially big.
> 
> To alleviate that, some distributors update libabigail even in their old
> stable distros, because the value of having an up to date version there
> outweighs the potential drawbacks.

Well it falls into the same category of problems of upgrading compilers.
User's typically build their software build reliably on a given distro version.
(or number of versions). 

If the maintainer upgrades compilers between distro versions, it introduces new 
warnings and errors, and all hell will generally break loose, when the user least expects it. 
They typically expect that mayhem when upgrading to new distro versions. 
Even tools like GNU indent can cause enormous problems. 

I would imagine that most maintainers would be pretty conservative about making
such changes. 

> 
>> Given we still support v19.11 on Ubuntu 18.04.2.
> 
> So maybe that's a discussion worth having with the maintainer of the
> Ubuntu package of Libabigail?

yes - I think it would be an interesting discussion alright.
I imagine the response might be inline with my understanding above.
Let's find out - as we can expect v18.04 to be around for at least another
two years I guess.

Another common way to handle this, is to be really explicit about what 
OS distros DPDK formally supports building on, which will then imply 
we support a small handful of versions of libabigail. 

We then simply say we don't support 18.04 anymore - FD.io VPP are planning 
this formal switch at the moment. 

> 
>> I think it's worthwhile keeping the suppression until v20.11?
> 
> [...]
> 
> David Marchand <david.marchand@redhat.com> writes:
> 
>> In Travis, we currently use libabigail 1.6 (mainly because I did not
>> update to 1.7 when it was released).
> 
> Right, that's probably another way to stay up to date independently from
> the underlying distribution.

You typically don't want to encourage this, you end up with some people
on a newer version, some people on an old version and never upgrading. 

Then you never end up with a consistent view of what mitigations are actually required.
Solving issues, becomes like a game of whack-a-mole. 

> 
> I hope this helps,

It does, greatly thanks. 

> 
> Cheers,
> 

^ permalink raw reply	[relevance 6%]

* Re: [dpdk-dev] [PATCH v4] eal/cpuflags: add x86 based cpu flags
  2020-04-29 11:22  0%           ` Neil Horman
@ 2020-04-30  7:59  4%             ` Ray Kinsella
  0 siblings, 0 replies; 200+ results
From: Ray Kinsella @ 2020-04-30  7:59 UTC (permalink / raw)
  To: Neil Horman
  Cc: Thomas Monjalon, ray.kinsella, Kevin Laatz, dev,
	bruce.richardson, harry.van.haaren, david.marchand, Haiyue Wang,
	ktraynor



On 29/04/2020 12:22, Neil Horman wrote:
> On Mon, Apr 27, 2020 at 02:58:07PM +0100, Ray Kinsella wrote:
>>
>>
>> On 27/04/2020 13:31, Thomas Monjalon wrote:
>>> 27/04/2020 11:27, Ray Kinsella:
>>>> On 25/04/2020 17:04, Thomas Monjalon wrote:
>>>>> PS: Who is REALLY maintaining the ABI?
>>>>> We really miss someone who carefully check all these things,
>>>>> and take care of the doc and tooling.
>>>>
>>>> I would say that I am missing these changes to libabigail.ignore, which would be useful. 
>>>> Should we consolidate the ABI Policy and ABI Versioning sections of the MAINTAINERS file?
>>>
>>> Yes, I think it does not make sense spliting ABI topic in 2 sections
>>> in MAINTAINERS file.
>>> We need to have a clear ownership covering policy, libs, tooling and doc.
>>> Let's agree to merge all in one section please.
>>>
>>
>> I would suggest merging and listing myself and Neil as maintainers?
>> Unless you are aware of another potential owner?
>>
> I'm ok with this
> Neil

ok I will take care of it in the next rev of the 

"[PATCH] abi: change references to abi 20.0.1 to abi v21"
 
>> Ray K
>>  
>>

^ permalink raw reply	[relevance 4%]

* Re: [dpdk-dev] [PATCH v4] ethdev: support flow aging
  2020-04-30  7:36  0%     ` Matan Azrad
@ 2020-04-30  7:49  0%       ` Tom Barbette
  0 siblings, 0 replies; 200+ results
From: Tom Barbette @ 2020-04-30  7:49 UTC (permalink / raw)
  To: Matan Azrad, Bill Zhou, Ori Kam, wenzhuo.lu, jingjing.wu,
	bernard.iremonger, john.mcnamara, marko.kovacevic,
	Thomas Monjalon, ferruh.yigit, arybchenko
  Cc: dev



Le 30/04/2020 à 09:36, Matan Azrad a écrit :
> 
> Hi Tom
> 
> From: Tom Barbette
>> Great news!
>>
>> - I can understand why there is no timeout unit. But that's calling for user
>> nightmare. Eg I could only get from the code (and not from documentation
>> yet? ) of the following mlx5 driver patch that the value should be in tenth of
>> seconds. If I build an application that is supposed to work with "any NIC",
>> what can I do? We'd need a way to query the timeout unit (have it in
>> dev_info probably).
> 
> Please see the new age action structure in rte_flow.h
> You can see comments there that timeout units is in seconds....
Oh okay, did not catch that. Maybe mention of the unit in the AGE action 
documentation of rte_flow.rst would be helpful.
> 
>> - It's not totally clear if the rule is automatically removed or not. is this a
>> helper or an OpenFlow-like notification?
> 
> Only notification, the aged-out flow should be destroyed (or other action) by the application according to the application needs...
Makes sense.
> 
>> - Find a typo and grammar fix inline.
>> - Recently, Mellanox introduced the ability to create 330K flows/s. Any
>> performance considerations if those flow "expire" at the same rate?
> 
> We didn't see performance impact (should be same rate like count action).
Ok great!

Thanks!
> 
>>
>> Hope it's helpfull,
>>
>> Tom
>>
>> Le 21/04/2020 à 12:11, Bill Zhou a écrit :
>>> From: Dong Zhou <dongz@mellanox.com>
>>>
>>> One of the reasons to destroy a flow is the fact that no packet
>>> matches the flow for "timeout" time.
>>> For example, when TCP\UDP sessions are suddenly closed.
>>>
>>> Currently, there is not any DPDK mechanism for flow aging and the
>>> applications use their own ways to detect and destroy aged-out flows.
>>>
>>> The flow aging implementation need include:
>>> - A new rte_flow action: RTE_FLOW_ACTION_TYPE_AGE to set the timeout
>> and
>>>     the application flow context for each flow.
>>> - A new ethdev event: RTE_ETH_EVENT_FLOW_AGED for the driver to
>> report
>>>     that there are new aged-out flows.
>>> - A new rte_flow API: rte_flow_get_aged_flows to get the aged-out flows
>>>     contexts from the port.
>>> - Support input flow aging command line in Testpmd.
>>>
>>> The new event type addition in the enum is flagged as an ABI breakage,
>>> so an ignore rule is added for these reasons:
>>> - It is not changing value of existing types (except MAX)
>>> - The new value is not used by existing API if the event is not
>>> registered In general, it is safe adding new ethdev event types at the
>>> end of the enum, because of event callback registration mechanism.
>>>
>>> Signed-off-by: Dong Zhou <dongz@mellanox.com>
>>> ---
>>> v2: Removing "* Added support for flow Aging mechanism base on
>> counter."
>>> this line from doc/guides/rel_notes/release_20_05.rst, this patch does
>>> not include this support.
>>>
>>> v3: Update file libabigail.abignore, add one new suppressed
>>> enumeration type for RTE_ETH_EVENT_MAX.
>>>
>>> v4: Add justification in devtools/libabigail.abignore and in the
>>> commit log about the modification of v3.
>>> ---
>>>    app/test-pmd/cmdline_flow.c              | 26 ++++++++++
>>>    devtools/libabigail.abignore             |  6 +++
>>>    doc/guides/prog_guide/rte_flow.rst       | 22 +++++++++
>>>    doc/guides/rel_notes/release_20_05.rst   | 11 +++++
>>>    lib/librte_ethdev/rte_ethdev.h           |  1 +
>>>    lib/librte_ethdev/rte_ethdev_version.map |  3 ++
>>>    lib/librte_ethdev/rte_flow.c             | 18 +++++++
>>>    lib/librte_ethdev/rte_flow.h             | 62 ++++++++++++++++++++++++
>>>    lib/librte_ethdev/rte_flow_driver.h      |  6 +++
>>>    9 files changed, 155 insertions(+)
>>>
>>> diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
>>> index e6ab8ff2f7..45bcff3cf5 100644
>>> --- a/app/test-pmd/cmdline_flow.c
>>> +++ b/app/test-pmd/cmdline_flow.c
>>> @@ -343,6 +343,8 @@ enum index {
>>>    	ACTION_SET_IPV4_DSCP_VALUE,
>>>    	ACTION_SET_IPV6_DSCP,
>>>    	ACTION_SET_IPV6_DSCP_VALUE,
>>> +	ACTION_AGE,
>>> +	ACTION_AGE_TIMEOUT,
>>>    };
>>>
>>>    /** Maximum size for pattern in struct rte_flow_item_raw. */ @@
>>> -1145,6 +1147,7 @@ static const enum index next_action[] = {
>>>    	ACTION_SET_META,
>>>    	ACTION_SET_IPV4_DSCP,
>>>    	ACTION_SET_IPV6_DSCP,
>>> +	ACTION_AGE,
>>>    	ZERO,
>>>    };
>>>
>>> @@ -1370,6 +1373,13 @@ static const enum index action_set_ipv6_dscp[]
>> = {
>>>    	ZERO,
>>>    };
>>>
>>> +static const enum index action_age[] = {
>>> +	ACTION_AGE,
>>> +	ACTION_AGE_TIMEOUT,
>>> +	ACTION_NEXT,
>>> +	ZERO,
>>> +};
>>> +
>>>    static int parse_set_raw_encap_decap(struct context *, const struct
>> token *,
>>>    				     const char *, unsigned int,
>>>    				     void *, unsigned int);
>>> @@ -3694,6 +3704,22 @@ static const struct token token_list[] = {
>>>    			     (struct rte_flow_action_set_dscp, dscp)),
>>>    		.call = parse_vc_conf,
>>>    	},
>>> +	[ACTION_AGE] = {
>>> +		.name = "age",
>>> +		.help = "set a specific metadata header",
>>> +		.next = NEXT(action_age),
>>> +		.priv = PRIV_ACTION(AGE,
>>> +			sizeof(struct rte_flow_action_age)),
>>> +		.call = parse_vc,
>>> +	},
>>> +	[ACTION_AGE_TIMEOUT] = {
>>> +		.name = "timeout",
>>> +		.help = "flow age timeout value",
>>> +		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_age,
>>> +					   timeout, 24)),
>>> +		.next = NEXT(action_age, NEXT_ENTRY(UNSIGNED)),
>>> +		.call = parse_vc_conf,
>>> +	},
>>>    };
>>>
>>>    /** Remove and return last entry from argument stack. */ diff --git
>>> a/devtools/libabigail.abignore b/devtools/libabigail.abignore index
>>> a59df8f135..c047adbd79 100644
>>> --- a/devtools/libabigail.abignore
>>> +++ b/devtools/libabigail.abignore
>>> @@ -11,3 +11,9 @@
>>>            type_kind = enum
>>>            name = rte_crypto_asym_xform_type
>>>            changed_enumerators =
>> RTE_CRYPTO_ASYM_XFORM_TYPE_LIST_END
>>> +; Ignore ethdev event enum update because new event cannot be ;
>>> +received if not registered [suppress_type]
>>> +        type_kind = enum
>>> +        name = rte_eth_event_type
>>> +        changed_enumerators = RTE_ETH_EVENT_MAX
>>> diff --git a/doc/guides/prog_guide/rte_flow.rst
>>> b/doc/guides/prog_guide/rte_flow.rst
>>> index 41c147913c..cf4368e1c4 100644
>>> --- a/doc/guides/prog_guide/rte_flow.rst
>>> +++ b/doc/guides/prog_guide/rte_flow.rst
>>> @@ -2616,6 +2616,28 @@ Otherwise, RTE_FLOW_ERROR_TYPE_ACTION
>> error will be returned.
>>>       | ``dscp``  | DSCP in low 6 bits, rest ignore |
>>>       +-----------+---------------------------------+
>>>
>>> +Action: ``AGE``
>>> +^^^^^^^^^^^^^^^^^^^^^^^^^
>>> +
>>> +Set ageing timeout configuration to a flow.
>>> +
>>> +Event RTE_ETH_EVENT_FLOW_AGED will be reported if timeout passed
>>> +without any matching on the flow.
>>> +
>>> +.. _table_rte_flow_action_age:
>>> +
>>> +.. table:: AGE
>>> +
>>> +   +--------------+---------------------------------+
>>> +   | Field        | Value                           |
>>> +   +==============+=================================+
>>> +   | ``timeout``  | 24 bits timeout value           |
>>> +   +--------------+---------------------------------+
>>> +   | ``reserved`` | 8 bits reserved, must be zero   |
>>> +   +--------------+---------------------------------+
>>> +   | ``context``  | user input flow context         |
>>> +   +--------------+---------------------------------+
>>> +
>>>    Negative types
>>>    ~~~~~~~~~~~~~~
>>>
>>> diff --git a/doc/guides/rel_notes/release_20_05.rst
>>> b/doc/guides/rel_notes/release_20_05.rst
>>> index bacd4c65a2..ff0cf9f1d6 100644
>>> --- a/doc/guides/rel_notes/release_20_05.rst
>>> +++ b/doc/guides/rel_notes/release_20_05.rst
>>> @@ -135,6 +135,17 @@ New Features
>>>      by making use of the event device capabilities. The event mode currently
>> supports
>>>      only inline IPsec protocol offload.
>>>
>>> +* **Added flow Aging Support.**
>>> +
>>> +  Added flow Aging support to detect and report aged-out flows,
>> including:
>>> +
>>> +  * Added new action: RTE_FLOW_ACTION_TYPE_AGE to set the timeout
>> and the
>>> +    application flow context for each flow.
>>> +  * Added new event: RTE_ETH_EVENT_FLOW_AGED for the driver to
>> report that
>>> +    there are new aged-out flows.
>>> +  * Added new API: rte_flow_get_aged_flows to get the aged-out flows
>> contexts
>>> +    from the port.
>>> +
>>>
>>>    Removed Items
>>>    -------------
>>> diff --git a/lib/librte_ethdev/rte_ethdev.h
>>> b/lib/librte_ethdev/rte_ethdev.h index 8d69b88f9e..00cc7b4052 100644
>>> --- a/lib/librte_ethdev/rte_ethdev.h
>>> +++ b/lib/librte_ethdev/rte_ethdev.h
>>> @@ -3018,6 +3018,7 @@ enum rte_eth_event_type {
>>>    	RTE_ETH_EVENT_NEW,      /**< port is probed */
>>>    	RTE_ETH_EVENT_DESTROY,  /**< port is released */
>>>    	RTE_ETH_EVENT_IPSEC,    /**< IPsec offload related event */
>>> +	RTE_ETH_EVENT_FLOW_AGED,/**< New aged-out flows is detected
>> */
>>>    	RTE_ETH_EVENT_MAX       /**< max value of this enum */
>>>    };
>>>
>>> diff --git a/lib/librte_ethdev/rte_ethdev_version.map
>>> b/lib/librte_ethdev/rte_ethdev_version.map
>>> index 3f32fdecf7..fa4b5816be 100644
>>> --- a/lib/librte_ethdev/rte_ethdev_version.map
>>> +++ b/lib/librte_ethdev/rte_ethdev_version.map
>>> @@ -230,4 +230,7 @@ EXPERIMENTAL {
>>>
>>>    	# added in 20.02
>>>    	rte_flow_dev_dump;
>>> +
>>> +	# added in 20.05
>>> +	rte_flow_get_aged_flows;
>>>    };
>>> diff --git a/lib/librte_ethdev/rte_flow.c
>>> b/lib/librte_ethdev/rte_flow.c index a5ac1c7fbd..3699edce49 100644
>>> --- a/lib/librte_ethdev/rte_flow.c
>>> +++ b/lib/librte_ethdev/rte_flow.c
>>> @@ -172,6 +172,7 @@ static const struct rte_flow_desc_data
>> rte_flow_desc_action[] = {
>>>    	MK_FLOW_ACTION(SET_META, sizeof(struct
>> rte_flow_action_set_meta)),
>>>    	MK_FLOW_ACTION(SET_IPV4_DSCP, sizeof(struct
>> rte_flow_action_set_dscp)),
>>>    	MK_FLOW_ACTION(SET_IPV6_DSCP, sizeof(struct
>>> rte_flow_action_set_dscp)),
>>> +	MK_FLOW_ACTION(AGE, sizeof(struct rte_flow_action_age)),
>>>    };
>>>
>>>    int
>>> @@ -1232,3 +1233,20 @@ rte_flow_dev_dump(uint16_t port_id, FILE *file,
>> struct rte_flow_error *error)
>>>    				  RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
>>>    				  NULL, rte_strerror(ENOSYS));
>>>    }
>>> +
>>> +int
>>> +rte_flow_get_aged_flows(uint16_t port_id, void **contexts,
>>> +		    uint32_t nb_contexts, struct rte_flow_error *error) {
>>> +	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
>>> +	const struct rte_flow_ops *ops = rte_flow_ops_get(port_id, error);
>>> +
>>> +	if (unlikely(!ops))
>>> +		return -rte_errno;
>>> +	if (likely(!!ops->get_aged_flows))
>>> +		return flow_err(port_id, ops->get_aged_flows(dev,
>> contexts,
>>> +				nb_contexts, error), error);
>>> +	return rte_flow_error_set(error, ENOTSUP,
>>> +				  RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
>>> +				  NULL, rte_strerror(ENOTSUP));
>>> +}
>>> diff --git a/lib/librte_ethdev/rte_flow.h
>>> b/lib/librte_ethdev/rte_flow.h index 7f3e08fad3..fab44f6c0b 100644
>>> --- a/lib/librte_ethdev/rte_flow.h
>>> +++ b/lib/librte_ethdev/rte_flow.h
>>> @@ -2081,6 +2081,16 @@ enum rte_flow_action_type {
>>>    	 * See struct rte_flow_action_set_dscp.
>>>    	 */
>>>    	RTE_FLOW_ACTION_TYPE_SET_IPV6_DSCP,
>>> +
>>> +	/**
>>> +	 * Report as aged flow if timeout passed without any matching on the
>>> +	 * flow.
>>> +	 *
>>> +	 * See struct rte_flow_action_age.
>>> +	 * See function rte_flow_get_aged_flows
>>> +	 * see enum RTE_ETH_EVENT_FLOW_AGED
>>> +	 */
>>> +	RTE_FLOW_ACTION_TYPE_AGE,
>>>    };
>>>
>>>    /**
>>> @@ -2122,6 +2132,25 @@ struct rte_flow_action_queue {
>>>    	uint16_t index; /**< Queue index to use. */
>>>    };
>>>
>>> +/**
>>> + * @warning
>>> + * @b EXPERIMENTAL: this structure may change without prior notice
>>> + *
>>> + * RTE_FLOW_ACTION_TYPE_AGE
>>> + *
>>> + * Report flow as aged-out if timeout passed without any matching
>>> + * on the flow. RTE_ETH_EVENT_FLOW_AGED event is triggered when a
>>> + * port detects new aged-out flows.
>>> + *
>>> + * The flow context and the flow handle will be reported by the
>>> + * rte_flow_get_aged_flows API.
>>> + */
>>> +struct rte_flow_action_age {
>>> +	uint32_t timeout:24; /**< Time in seconds. */
>>> +	uint32_t reserved:8; /**< Reserved, must be zero. */
>>> +	void *context;
>>> +		/**< The user flow context, NULL means the rte_flow
>> pointer. */ };
>>>
>>>    /**
>>>     * @warning
>>> @@ -3254,6 +3283,39 @@ rte_flow_conv(enum rte_flow_conv_op op,
>>>    	      const void *src,
>>>    	      struct rte_flow_error *error);
>>>
>>> +/**
>>> + * Get aged-out flows of a given port.
>>> + *
>>> + * RTE_ETH_EVENT_FLOW_AGED event will be triggered when at least
>> one
>>> +new aged
>>> + * out flow was detected after the last call to rte_flow_get_aged_flows.
>>> + * This function can be called to get the aged flows usynchronously
>>> +from the
>> usynchronously
>>> + * event callback or synchronously regardless the event.
>>> + * This is not safe to call rte_flow_get_aged_flows function with
>>> + other flow
>> It is not safe to
>>> + * functions from multiple threads simultaneously.
>>> + *
>>> + * @param port_id
>>> + *   Port identifier of Ethernet device.
>>> + * @param[in, out] contexts
>>> + *   The address of an array of pointers to the aged-out flows contexts.
>>> + * @param[in] nb_contexts
>>> + *   The length of context array pointers.
>>> + * @param[out] error
>>> + *   Perform verbose error reporting if not NULL. Initialized in case of
>>> + *   error only.
>>> + *
>>> + * @return
>>> + *   if nb_contexts is 0, return the amount of all aged contexts.
>>> + *   if nb_contexts is not 0 , return the amount of aged flows reported
>>> + *   in the context array, otherwise negative errno value.
>>> + *
>>> + * @see rte_flow_action_age
>>> + * @see RTE_ETH_EVENT_FLOW_AGED
>>> + */
>>> +__rte_experimental
>>> +int
>>> +rte_flow_get_aged_flows(uint16_t port_id, void **contexts,
>>> +			uint32_t nb_contexts, struct rte_flow_error *error);
>>> +
>>>    #ifdef __cplusplus
>>>    }
>>>    #endif
>>> diff --git a/lib/librte_ethdev/rte_flow_driver.h
>>> b/lib/librte_ethdev/rte_flow_driver.h
>>> index 51a9a57a0f..881cc469b7 100644
>>> --- a/lib/librte_ethdev/rte_flow_driver.h
>>> +++ b/lib/librte_ethdev/rte_flow_driver.h
>>> @@ -101,6 +101,12 @@ struct rte_flow_ops {
>>>    		(struct rte_eth_dev *dev,
>>>    		 FILE *file,
>>>    		 struct rte_flow_error *error);
>>> +	/** See rte_flow_get_aged_flows() */
>>> +	int (*get_aged_flows)
>>> +		(struct rte_eth_dev *dev,
>>> +		 void **context,
>>> +		 uint32_t nb_contexts,
>>> +		 struct rte_flow_error *err);
>>>    };
>>>
>>>    /**
>>>

^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [PATCH v4] ethdev: support flow aging
  2020-04-29 14:50  0%   ` Tom Barbette
@ 2020-04-30  7:36  0%     ` Matan Azrad
  2020-04-30  7:49  0%       ` Tom Barbette
  0 siblings, 1 reply; 200+ results
From: Matan Azrad @ 2020-04-30  7:36 UTC (permalink / raw)
  To: Tom Barbette, Bill Zhou, Ori Kam, wenzhuo.lu, jingjing.wu,
	bernard.iremonger, john.mcnamara, marko.kovacevic,
	Thomas Monjalon, ferruh.yigit, arybchenko
  Cc: dev


Hi Tom

From: Tom Barbette
> Great news!
> 
> - I can understand why there is no timeout unit. But that's calling for user
> nightmare. Eg I could only get from the code (and not from documentation
> yet? ) of the following mlx5 driver patch that the value should be in tenth of
> seconds. If I build an application that is supposed to work with "any NIC",
> what can I do? We'd need a way to query the timeout unit (have it in
> dev_info probably).

Please see the new age action structure in rte_flow.h
You can see comments there that timeout units is in seconds....

> - It's not totally clear if the rule is automatically removed or not. is this a
> helper or an OpenFlow-like notification?

Only notification, the aged-out flow should be destroyed (or other action) by the application according to the application needs...

> - Find a typo and grammar fix inline.
> - Recently, Mellanox introduced the ability to create 330K flows/s. Any
> performance considerations if those flow "expire" at the same rate?

We didn't see performance impact (should be same rate like count action).

> 
> Hope it's helpfull,
> 
> Tom
> 
> Le 21/04/2020 à 12:11, Bill Zhou a écrit :
> > From: Dong Zhou <dongz@mellanox.com>
> >
> > One of the reasons to destroy a flow is the fact that no packet
> > matches the flow for "timeout" time.
> > For example, when TCP\UDP sessions are suddenly closed.
> >
> > Currently, there is not any DPDK mechanism for flow aging and the
> > applications use their own ways to detect and destroy aged-out flows.
> >
> > The flow aging implementation need include:
> > - A new rte_flow action: RTE_FLOW_ACTION_TYPE_AGE to set the timeout
> and
> >    the application flow context for each flow.
> > - A new ethdev event: RTE_ETH_EVENT_FLOW_AGED for the driver to
> report
> >    that there are new aged-out flows.
> > - A new rte_flow API: rte_flow_get_aged_flows to get the aged-out flows
> >    contexts from the port.
> > - Support input flow aging command line in Testpmd.
> >
> > The new event type addition in the enum is flagged as an ABI breakage,
> > so an ignore rule is added for these reasons:
> > - It is not changing value of existing types (except MAX)
> > - The new value is not used by existing API if the event is not
> > registered In general, it is safe adding new ethdev event types at the
> > end of the enum, because of event callback registration mechanism.
> >
> > Signed-off-by: Dong Zhou <dongz@mellanox.com>
> > ---
> > v2: Removing "* Added support for flow Aging mechanism base on
> counter."
> > this line from doc/guides/rel_notes/release_20_05.rst, this patch does
> > not include this support.
> >
> > v3: Update file libabigail.abignore, add one new suppressed
> > enumeration type for RTE_ETH_EVENT_MAX.
> >
> > v4: Add justification in devtools/libabigail.abignore and in the
> > commit log about the modification of v3.
> > ---
> >   app/test-pmd/cmdline_flow.c              | 26 ++++++++++
> >   devtools/libabigail.abignore             |  6 +++
> >   doc/guides/prog_guide/rte_flow.rst       | 22 +++++++++
> >   doc/guides/rel_notes/release_20_05.rst   | 11 +++++
> >   lib/librte_ethdev/rte_ethdev.h           |  1 +
> >   lib/librte_ethdev/rte_ethdev_version.map |  3 ++
> >   lib/librte_ethdev/rte_flow.c             | 18 +++++++
> >   lib/librte_ethdev/rte_flow.h             | 62 ++++++++++++++++++++++++
> >   lib/librte_ethdev/rte_flow_driver.h      |  6 +++
> >   9 files changed, 155 insertions(+)
> >
> > diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
> > index e6ab8ff2f7..45bcff3cf5 100644
> > --- a/app/test-pmd/cmdline_flow.c
> > +++ b/app/test-pmd/cmdline_flow.c
> > @@ -343,6 +343,8 @@ enum index {
> >   	ACTION_SET_IPV4_DSCP_VALUE,
> >   	ACTION_SET_IPV6_DSCP,
> >   	ACTION_SET_IPV6_DSCP_VALUE,
> > +	ACTION_AGE,
> > +	ACTION_AGE_TIMEOUT,
> >   };
> >
> >   /** Maximum size for pattern in struct rte_flow_item_raw. */ @@
> > -1145,6 +1147,7 @@ static const enum index next_action[] = {
> >   	ACTION_SET_META,
> >   	ACTION_SET_IPV4_DSCP,
> >   	ACTION_SET_IPV6_DSCP,
> > +	ACTION_AGE,
> >   	ZERO,
> >   };
> >
> > @@ -1370,6 +1373,13 @@ static const enum index action_set_ipv6_dscp[]
> = {
> >   	ZERO,
> >   };
> >
> > +static const enum index action_age[] = {
> > +	ACTION_AGE,
> > +	ACTION_AGE_TIMEOUT,
> > +	ACTION_NEXT,
> > +	ZERO,
> > +};
> > +
> >   static int parse_set_raw_encap_decap(struct context *, const struct
> token *,
> >   				     const char *, unsigned int,
> >   				     void *, unsigned int);
> > @@ -3694,6 +3704,22 @@ static const struct token token_list[] = {
> >   			     (struct rte_flow_action_set_dscp, dscp)),
> >   		.call = parse_vc_conf,
> >   	},
> > +	[ACTION_AGE] = {
> > +		.name = "age",
> > +		.help = "set a specific metadata header",
> > +		.next = NEXT(action_age),
> > +		.priv = PRIV_ACTION(AGE,
> > +			sizeof(struct rte_flow_action_age)),
> > +		.call = parse_vc,
> > +	},
> > +	[ACTION_AGE_TIMEOUT] = {
> > +		.name = "timeout",
> > +		.help = "flow age timeout value",
> > +		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_age,
> > +					   timeout, 24)),
> > +		.next = NEXT(action_age, NEXT_ENTRY(UNSIGNED)),
> > +		.call = parse_vc_conf,
> > +	},
> >   };
> >
> >   /** Remove and return last entry from argument stack. */ diff --git
> > a/devtools/libabigail.abignore b/devtools/libabigail.abignore index
> > a59df8f135..c047adbd79 100644
> > --- a/devtools/libabigail.abignore
> > +++ b/devtools/libabigail.abignore
> > @@ -11,3 +11,9 @@
> >           type_kind = enum
> >           name = rte_crypto_asym_xform_type
> >           changed_enumerators =
> RTE_CRYPTO_ASYM_XFORM_TYPE_LIST_END
> > +; Ignore ethdev event enum update because new event cannot be ;
> > +received if not registered [suppress_type]
> > +        type_kind = enum
> > +        name = rte_eth_event_type
> > +        changed_enumerators = RTE_ETH_EVENT_MAX
> > diff --git a/doc/guides/prog_guide/rte_flow.rst
> > b/doc/guides/prog_guide/rte_flow.rst
> > index 41c147913c..cf4368e1c4 100644
> > --- a/doc/guides/prog_guide/rte_flow.rst
> > +++ b/doc/guides/prog_guide/rte_flow.rst
> > @@ -2616,6 +2616,28 @@ Otherwise, RTE_FLOW_ERROR_TYPE_ACTION
> error will be returned.
> >      | ``dscp``  | DSCP in low 6 bits, rest ignore |
> >      +-----------+---------------------------------+
> >
> > +Action: ``AGE``
> > +^^^^^^^^^^^^^^^^^^^^^^^^^
> > +
> > +Set ageing timeout configuration to a flow.
> > +
> > +Event RTE_ETH_EVENT_FLOW_AGED will be reported if timeout passed
> > +without any matching on the flow.
> > +
> > +.. _table_rte_flow_action_age:
> > +
> > +.. table:: AGE
> > +
> > +   +--------------+---------------------------------+
> > +   | Field        | Value                           |
> > +   +==============+=================================+
> > +   | ``timeout``  | 24 bits timeout value           |
> > +   +--------------+---------------------------------+
> > +   | ``reserved`` | 8 bits reserved, must be zero   |
> > +   +--------------+---------------------------------+
> > +   | ``context``  | user input flow context         |
> > +   +--------------+---------------------------------+
> > +
> >   Negative types
> >   ~~~~~~~~~~~~~~
> >
> > diff --git a/doc/guides/rel_notes/release_20_05.rst
> > b/doc/guides/rel_notes/release_20_05.rst
> > index bacd4c65a2..ff0cf9f1d6 100644
> > --- a/doc/guides/rel_notes/release_20_05.rst
> > +++ b/doc/guides/rel_notes/release_20_05.rst
> > @@ -135,6 +135,17 @@ New Features
> >     by making use of the event device capabilities. The event mode currently
> supports
> >     only inline IPsec protocol offload.
> >
> > +* **Added flow Aging Support.**
> > +
> > +  Added flow Aging support to detect and report aged-out flows,
> including:
> > +
> > +  * Added new action: RTE_FLOW_ACTION_TYPE_AGE to set the timeout
> and the
> > +    application flow context for each flow.
> > +  * Added new event: RTE_ETH_EVENT_FLOW_AGED for the driver to
> report that
> > +    there are new aged-out flows.
> > +  * Added new API: rte_flow_get_aged_flows to get the aged-out flows
> contexts
> > +    from the port.
> > +
> >
> >   Removed Items
> >   -------------
> > diff --git a/lib/librte_ethdev/rte_ethdev.h
> > b/lib/librte_ethdev/rte_ethdev.h index 8d69b88f9e..00cc7b4052 100644
> > --- a/lib/librte_ethdev/rte_ethdev.h
> > +++ b/lib/librte_ethdev/rte_ethdev.h
> > @@ -3018,6 +3018,7 @@ enum rte_eth_event_type {
> >   	RTE_ETH_EVENT_NEW,      /**< port is probed */
> >   	RTE_ETH_EVENT_DESTROY,  /**< port is released */
> >   	RTE_ETH_EVENT_IPSEC,    /**< IPsec offload related event */
> > +	RTE_ETH_EVENT_FLOW_AGED,/**< New aged-out flows is detected
> */
> >   	RTE_ETH_EVENT_MAX       /**< max value of this enum */
> >   };
> >
> > diff --git a/lib/librte_ethdev/rte_ethdev_version.map
> > b/lib/librte_ethdev/rte_ethdev_version.map
> > index 3f32fdecf7..fa4b5816be 100644
> > --- a/lib/librte_ethdev/rte_ethdev_version.map
> > +++ b/lib/librte_ethdev/rte_ethdev_version.map
> > @@ -230,4 +230,7 @@ EXPERIMENTAL {
> >
> >   	# added in 20.02
> >   	rte_flow_dev_dump;
> > +
> > +	# added in 20.05
> > +	rte_flow_get_aged_flows;
> >   };
> > diff --git a/lib/librte_ethdev/rte_flow.c
> > b/lib/librte_ethdev/rte_flow.c index a5ac1c7fbd..3699edce49 100644
> > --- a/lib/librte_ethdev/rte_flow.c
> > +++ b/lib/librte_ethdev/rte_flow.c
> > @@ -172,6 +172,7 @@ static const struct rte_flow_desc_data
> rte_flow_desc_action[] = {
> >   	MK_FLOW_ACTION(SET_META, sizeof(struct
> rte_flow_action_set_meta)),
> >   	MK_FLOW_ACTION(SET_IPV4_DSCP, sizeof(struct
> rte_flow_action_set_dscp)),
> >   	MK_FLOW_ACTION(SET_IPV6_DSCP, sizeof(struct
> > rte_flow_action_set_dscp)),
> > +	MK_FLOW_ACTION(AGE, sizeof(struct rte_flow_action_age)),
> >   };
> >
> >   int
> > @@ -1232,3 +1233,20 @@ rte_flow_dev_dump(uint16_t port_id, FILE *file,
> struct rte_flow_error *error)
> >   				  RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
> >   				  NULL, rte_strerror(ENOSYS));
> >   }
> > +
> > +int
> > +rte_flow_get_aged_flows(uint16_t port_id, void **contexts,
> > +		    uint32_t nb_contexts, struct rte_flow_error *error) {
> > +	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
> > +	const struct rte_flow_ops *ops = rte_flow_ops_get(port_id, error);
> > +
> > +	if (unlikely(!ops))
> > +		return -rte_errno;
> > +	if (likely(!!ops->get_aged_flows))
> > +		return flow_err(port_id, ops->get_aged_flows(dev,
> contexts,
> > +				nb_contexts, error), error);
> > +	return rte_flow_error_set(error, ENOTSUP,
> > +				  RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
> > +				  NULL, rte_strerror(ENOTSUP));
> > +}
> > diff --git a/lib/librte_ethdev/rte_flow.h
> > b/lib/librte_ethdev/rte_flow.h index 7f3e08fad3..fab44f6c0b 100644
> > --- a/lib/librte_ethdev/rte_flow.h
> > +++ b/lib/librte_ethdev/rte_flow.h
> > @@ -2081,6 +2081,16 @@ enum rte_flow_action_type {
> >   	 * See struct rte_flow_action_set_dscp.
> >   	 */
> >   	RTE_FLOW_ACTION_TYPE_SET_IPV6_DSCP,
> > +
> > +	/**
> > +	 * Report as aged flow if timeout passed without any matching on the
> > +	 * flow.
> > +	 *
> > +	 * See struct rte_flow_action_age.
> > +	 * See function rte_flow_get_aged_flows
> > +	 * see enum RTE_ETH_EVENT_FLOW_AGED
> > +	 */
> > +	RTE_FLOW_ACTION_TYPE_AGE,
> >   };
> >
> >   /**
> > @@ -2122,6 +2132,25 @@ struct rte_flow_action_queue {
> >   	uint16_t index; /**< Queue index to use. */
> >   };
> >
> > +/**
> > + * @warning
> > + * @b EXPERIMENTAL: this structure may change without prior notice
> > + *
> > + * RTE_FLOW_ACTION_TYPE_AGE
> > + *
> > + * Report flow as aged-out if timeout passed without any matching
> > + * on the flow. RTE_ETH_EVENT_FLOW_AGED event is triggered when a
> > + * port detects new aged-out flows.
> > + *
> > + * The flow context and the flow handle will be reported by the
> > + * rte_flow_get_aged_flows API.
> > + */
> > +struct rte_flow_action_age {
> > +	uint32_t timeout:24; /**< Time in seconds. */
> > +	uint32_t reserved:8; /**< Reserved, must be zero. */
> > +	void *context;
> > +		/**< The user flow context, NULL means the rte_flow
> pointer. */ };
> >
> >   /**
> >    * @warning
> > @@ -3254,6 +3283,39 @@ rte_flow_conv(enum rte_flow_conv_op op,
> >   	      const void *src,
> >   	      struct rte_flow_error *error);
> >
> > +/**
> > + * Get aged-out flows of a given port.
> > + *
> > + * RTE_ETH_EVENT_FLOW_AGED event will be triggered when at least
> one
> > +new aged
> > + * out flow was detected after the last call to rte_flow_get_aged_flows.
> > + * This function can be called to get the aged flows usynchronously
> > +from the
> usynchronously
> > + * event callback or synchronously regardless the event.
> > + * This is not safe to call rte_flow_get_aged_flows function with
> > + other flow
> It is not safe to
> > + * functions from multiple threads simultaneously.
> > + *
> > + * @param port_id
> > + *   Port identifier of Ethernet device.
> > + * @param[in, out] contexts
> > + *   The address of an array of pointers to the aged-out flows contexts.
> > + * @param[in] nb_contexts
> > + *   The length of context array pointers.
> > + * @param[out] error
> > + *   Perform verbose error reporting if not NULL. Initialized in case of
> > + *   error only.
> > + *
> > + * @return
> > + *   if nb_contexts is 0, return the amount of all aged contexts.
> > + *   if nb_contexts is not 0 , return the amount of aged flows reported
> > + *   in the context array, otherwise negative errno value.
> > + *
> > + * @see rte_flow_action_age
> > + * @see RTE_ETH_EVENT_FLOW_AGED
> > + */
> > +__rte_experimental
> > +int
> > +rte_flow_get_aged_flows(uint16_t port_id, void **contexts,
> > +			uint32_t nb_contexts, struct rte_flow_error *error);
> > +
> >   #ifdef __cplusplus
> >   }
> >   #endif
> > diff --git a/lib/librte_ethdev/rte_flow_driver.h
> > b/lib/librte_ethdev/rte_flow_driver.h
> > index 51a9a57a0f..881cc469b7 100644
> > --- a/lib/librte_ethdev/rte_flow_driver.h
> > +++ b/lib/librte_ethdev/rte_flow_driver.h
> > @@ -101,6 +101,12 @@ struct rte_flow_ops {
> >   		(struct rte_eth_dev *dev,
> >   		 FILE *file,
> >   		 struct rte_flow_error *error);
> > +	/** See rte_flow_get_aged_flows() */
> > +	int (*get_aged_flows)
> > +		(struct rte_eth_dev *dev,
> > +		 void **context,
> > +		 uint32_t nb_contexts,
> > +		 struct rte_flow_error *err);
> >   };
> >
> >   /**
> >

^ permalink raw reply	[relevance 0%]

* [dpdk-dev] [PATCH v1 2/2] devtools: updating internal symbols ABI version
  2020-04-30  5:46 33% [dpdk-dev] [PATCH v1 1/2] devtools: add internal ABI version check Haiyue Wang
@ 2020-04-30  5:46  4% ` Haiyue Wang
  0 siblings, 0 replies; 200+ results
From: Haiyue Wang @ 2020-04-30  5:46 UTC (permalink / raw)
  To: dev, thomas, david.marchand, bruce.richardson, anatoly.burakov,
	nhorman, mdr
  Cc: Haiyue Wang

INTERNAL is new introduced version, update the script that automatically
leaving internal section exactly as it is.

Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
---
 devtools/update_version_map_abi.py | 37 +++++++++++++++++++++++++++---
 1 file changed, 34 insertions(+), 3 deletions(-)

diff --git a/devtools/update_version_map_abi.py b/devtools/update_version_map_abi.py
index 616412a1c..e2104e61e 100755
--- a/devtools/update_version_map_abi.py
+++ b/devtools/update_version_map_abi.py
@@ -50,7 +50,10 @@ def __parse_map_file(f_in):
     stable_lines = set()
     # copy experimental section as is
     experimental_lines = []
+    # copy internal section as is
+    internal_lines = []
     in_experimental = False
+    in_internal = False
     has_stable = False
 
     # gather all functions
@@ -63,6 +66,7 @@ def __parse_map_file(f_in):
         if match:
             # whatever section this was, it's not active any more
             in_experimental = False
+            in_internal = False
             continue
 
         # if we're in the middle of experimental section, we need to copy
@@ -71,6 +75,12 @@ def __parse_map_file(f_in):
             experimental_lines += [line]
             continue
 
+        # if we're in the middle of internal section, we need to copy
+        # the section verbatim, so just add the line
+        if in_internal:
+            internal_lines += [line]
+            continue
+
         # skip empty lines
         if not line:
             continue
@@ -81,7 +91,9 @@ def __parse_map_file(f_in):
             cur_section = match.group("version")
             # is it experimental?
             in_experimental = cur_section == "EXPERIMENTAL"
-            if not in_experimental:
+            # is it internal?
+            in_internal = cur_section == "INTERNAL"
+            if not in_experimental and not in_internal:
                 has_stable = True
             continue
 
@@ -90,7 +102,7 @@ def __parse_map_file(f_in):
         if match:
             stable_lines.add(match.group("func"))
 
-    return has_stable, stable_lines, experimental_lines
+    return has_stable, stable_lines, experimental_lines, internal_lines
 
 
 def __generate_stable_abi(f_out, abi_version, lines):
@@ -132,6 +144,20 @@ def __generate_experimental_abi(f_out, lines):
     # end section
     print("};", file=f_out)
 
+def __generate_internal_abi(f_out, lines):
+    # start internal section
+    print("INTERNAL {", file=f_out)
+
+    # print all internal lines as they were
+    for line in lines:
+        # don't print empty whitespace
+        if not line:
+            print("", file=f_out)
+        else:
+            print("\t{}".format(line), file=f_out)
+
+    # end section
+    print("};", file=f_out)
 
 def __main():
     arg_parser = argparse.ArgumentParser(
@@ -158,7 +184,7 @@ def __main():
         sys.exit(1)
 
     with open(parsed.map_file) as f_in:
-        has_stable, stable_lines, experimental_lines = __parse_map_file(f_in)
+        has_stable, stable_lines, experimental_lines, internal_lines = __parse_map_file(f_in)
 
     with open(parsed.map_file, 'w') as f_out:
         need_newline = has_stable and experimental_lines
@@ -169,6 +195,11 @@ def __main():
             print(file=f_out)
         if experimental_lines:
             __generate_experimental_abi(f_out, experimental_lines)
+        if internal_lines:
+            if has_stable or experimental_lines:
+              # separate sections with a newline
+              print(file=f_out)
+            __generate_internal_abi(f_out, internal_lines)
 
 
 if __name__ == "__main__":
-- 
2.26.2


^ permalink raw reply	[relevance 4%]

* [dpdk-dev] [PATCH v1 1/2] devtools: add internal ABI version check
@ 2020-04-30  5:46 33% Haiyue Wang
  2020-04-30  5:46  4% ` [dpdk-dev] [PATCH v1 2/2] devtools: updating internal symbols ABI version Haiyue Wang
  0 siblings, 1 reply; 200+ results
From: Haiyue Wang @ 2020-04-30  5:46 UTC (permalink / raw)
  To: dev, thomas, david.marchand, bruce.richardson, anatoly.burakov,
	nhorman, mdr
  Cc: Haiyue Wang

INTERNAL is new introduced version, update the shell script that checks
whether built libraries are versioned with expected ABI (current ABI,
current ABI + 1, EXPERIMENTAL, or INTERNAL).

Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
---
 devtools/check-abi-version.sh | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/devtools/check-abi-version.sh b/devtools/check-abi-version.sh
index 9a3d13546..f0cca42a9 100755
--- a/devtools/check-abi-version.sh
+++ b/devtools/check-abi-version.sh
@@ -4,7 +4,7 @@
 
 # Check whether library symbols have correct
 # version (provided ABI number or provided ABI
-# number + 1 or EXPERIMENTAL).
+# number + 1 or EXPERIMENTAL or INTERNAL).
 # Args:
 #   $1: path of the library .so file
 #   $2: ABI major version number to check
@@ -12,7 +12,7 @@
 
 if [ -z "$1" ]; then
     echo "Script checks whether library symbols have"
-    echo "correct version (ABI_VER/ABI_VER+1/EXPERIMENTAL)"
+    echo "correct version (ABI_VER/ABI_VER+1/EXPERIMENTAL/INTERNAL)"
     echo "Usage:"
     echo "  $0 SO_FILE_PATH [ABI_VER]"
     exit 1
@@ -41,11 +41,11 @@ for SYM in $(echo "${OBJ_DUMP_OUTPUT}" | awk '{print $(NF-1) "-" $NF}')
 do
     version=$(echo $SYM | cut -d'-' -f 1)
     symbol=$(echo $SYM | cut -d'-' -f 2)
-    case $version in (*"$ABIVER"*|*"$NEXT_ABIVER"*|"EXPERIMENTAL")
+    case $version in (*"$ABIVER"*|*"$NEXT_ABIVER"*|"EXPERIMENTAL"|"INTERNAL")
         ;;
     (*)
         echo "Warning: symbol $symbol ($version) should be annotated " \
-             "as ABI version $ABIVER / $NEXT_ABIVER, or EXPERIMENTAL."
+             "as ABI version $ABIVER / $NEXT_ABIVER, EXPERIMENTAL, or INTERNAL."
         ret=1
     ;;
     esac
-- 
2.26.2


^ permalink raw reply	[relevance 33%]

* [dpdk-dev]  [RFC] hash: unify crc32 API header for x86 and ARM
@ 2020-04-29 18:05  2% pbhagavatula
  2020-04-30  9:14  0% ` Van Haaren, Harry
                   ` (3 more replies)
  0 siblings, 4 replies; 200+ results
From: pbhagavatula @ 2020-04-29 18:05 UTC (permalink / raw)
  To: jerinj, thomas, Yipeng Wang, Sameh Gobriel, Bruce Richardson,
	Ruifeng Wang
  Cc: dev, Pavan Nikhilesh

From: Pavan Nikhilesh <pbhagavatula@marvell.com>

Merge crc32 hash calculation public API headers for x86 and ARM,
split implementations of x86 and ARM into their respective private
headers.
This reduces the ifdef code clutter while keeping current ABI intact.

Although we install `rte_crc_arm64.h` it is not used in any of the lib or
drivers layers. All the libs and drivers use `rte_hash_crc.h` which falls
back to SW crc32 calculation for ARM platform.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---

 Currently, if application incorrectly sets CRC32_ARM64 as crc32 algorithm
 through `rte_hash_crc_set_alg()` on x86 or vice-versa we fallback to algorithm
 set previously via `rte_hash_crc_set_alg()` instead of setting the best
 available.
 This behaviour should probably change to setting the best available algorithm
 and is up for discussion.

 app/test/test_hash.c            |   6 +
 lib/librte_hash/Makefile        |   5 -
 lib/librte_hash/crc_arm64.h     |  67 +++++++++++
 lib/librte_hash/crc_x86.h       |  68 +++++++++++
 lib/librte_hash/meson.build     |   3 +-
 lib/librte_hash/rte_crc_arm64.h | 183 ------------------------------
 lib/librte_hash/rte_hash_crc.h  | 193 +++++++++++++-------------------
 7 files changed, 219 insertions(+), 306 deletions(-)
 create mode 100644 lib/librte_hash/crc_arm64.h
 create mode 100644 lib/librte_hash/crc_x86.h
 delete mode 100644 lib/librte_hash/rte_crc_arm64.h

diff --git a/app/test/test_hash.c b/app/test/test_hash.c
index afa3a1a3c..7bd457dac 100644
--- a/app/test/test_hash.c
+++ b/app/test/test_hash.c
@@ -195,7 +195,13 @@ test_crc32_hash_alg_equiv(void)
 	}

 	/* Resetting to best available algorithm */
+#if defined RTE_ARCH_X86
 	rte_hash_crc_set_alg(CRC32_SSE42_x64);
+#elif defined RTE_ARCH_ARM64
+	rte_hash_crc_set_alg(CRC32_ARM64);
+#else
+	rte_hash_crc_set_alg(CRC32_SW);
+#endif

 	if (i == CRC32_ITERATIONS)
 		return 0;
diff --git a/lib/librte_hash/Makefile b/lib/librte_hash/Makefile
index ec9f86499..f640afc42 100644
--- a/lib/librte_hash/Makefile
+++ b/lib/librte_hash/Makefile
@@ -19,11 +19,6 @@ SRCS-$(CONFIG_RTE_LIBRTE_HASH) += rte_fbk_hash.c
 # install this header file
 SYMLINK-$(CONFIG_RTE_LIBRTE_HASH)-include := rte_hash.h
 SYMLINK-$(CONFIG_RTE_LIBRTE_HASH)-include += rte_hash_crc.h
-ifeq ($(CONFIG_RTE_ARCH_ARM64),y)
-ifneq ($(findstring RTE_MACHINE_CPUFLAG_CRC32,$(CFLAGS)),)
-SYMLINK-$(CONFIG_RTE_LIBRTE_HASH)-include += rte_crc_arm64.h
-endif
-endif
 SYMLINK-$(CONFIG_RTE_LIBRTE_HASH)-include += rte_jhash.h
 SYMLINK-$(CONFIG_RTE_LIBRTE_HASH)-include += rte_thash.h
 SYMLINK-$(CONFIG_RTE_LIBRTE_HASH)-include += rte_fbk_hash.h
diff --git a/lib/librte_hash/crc_arm64.h b/lib/librte_hash/crc_arm64.h
new file mode 100644
index 000000000..8e75f8297
--- /dev/null
+++ b/lib/librte_hash/crc_arm64.h
@@ -0,0 +1,67 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2015 Cavium, Inc
+ */
+
+#ifndef _CRC_ARM64_H_
+#define _CRC_ARM64_H_
+
+/**
+ * @file
+ *
+ * CRC arm64 Hash
+ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <stdint.h>
+#include <rte_cpuflags.h>
+#include <rte_branch_prediction.h>
+#include <rte_common.h>
+
+static inline uint32_t
+crc32c_arm64_u8(uint8_t data, uint32_t init_val)
+{
+	__asm__ volatile(
+			"crc32cb %w[crc], %w[crc], %w[value]"
+			: [crc] "+r" (init_val)
+			: [value] "r" (data));
+	return init_val;
+}
+
+static inline uint32_t
+crc32c_arm64_u16(uint16_t data, uint32_t init_val)
+{
+	__asm__ volatile(
+			"crc32ch %w[crc], %w[crc], %w[value]"
+			: [crc] "+r" (init_val)
+			: [value] "r" (data));
+	return init_val;
+}
+
+static inline uint32_t
+crc32c_arm64_u32(uint32_t data, uint32_t init_val)
+{
+	__asm__ volatile(
+			"crc32cw %w[crc], %w[crc], %w[value]"
+			: [crc] "+r" (init_val)
+			: [value] "r" (data));
+	return init_val;
+}
+
+static inline uint32_t
+crc32c_arm64_u64(uint64_t data, uint32_t init_val)
+{
+	__asm__ volatile(
+			"crc32cx %w[crc], %w[crc], %x[value]"
+			: [crc] "+r" (init_val)
+			: [value] "r" (data));
+	return init_val;
+}
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _CRC_ARM64_H_ */
diff --git a/lib/librte_hash/crc_x86.h b/lib/librte_hash/crc_x86.h
new file mode 100644
index 000000000..fb45f2e98
--- /dev/null
+++ b/lib/librte_hash/crc_x86.h
@@ -0,0 +1,68 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2010-2014 Intel Corporation
+ */
+
+#ifndef _CRC_X86_H_
+#define _CRC_X86_H_
+
+#if defined(RTE_ARCH_X86)
+static inline uint32_t
+crc32c_sse42_u8(uint8_t data, uint32_t init_val)
+{
+	__asm__ volatile(
+			"crc32b %[data], %[init_val];"
+			: [init_val] "+r" (init_val)
+			: [data] "rm" (data));
+	return init_val;
+}
+
+static inline uint32_t
+crc32c_sse42_u16(uint16_t data, uint32_t init_val)
+{
+	__asm__ volatile(
+			"crc32w %[data], %[init_val];"
+			: [init_val] "+r" (init_val)
+			: [data] "rm" (data));
+	return init_val;
+}
+
+static inline uint32_t
+crc32c_sse42_u32(uint32_t data, uint32_t init_val)
+{
+	__asm__ volatile(
+			"crc32l %[data], %[init_val];"
+			: [init_val] "+r" (init_val)
+			: [data] "rm" (data));
+	return init_val;
+}
+
+static inline uint32_t
+crc32c_sse42_u64_mimic(uint64_t data, uint32_t init_val)
+{
+	union {
+		uint32_t u32[2];
+		uint64_t u64;
+	} d;
+
+	d.u64 = data;
+	init_val = crc32c_sse42_u32(d.u32[0], init_val);
+	init_val = crc32c_sse42_u32(d.u32[1], init_val);
+	return init_val;
+}
+#endif
+
+#ifdef RTE_ARCH_X86_64
+static inline uint32_t
+crc32c_sse42_u64(uint64_t data, uint32_t init_val)
+{
+	uint64_t val = init_val;
+
+	__asm__ volatile(
+			"crc32q %[data], %[init_val];"
+			: [init_val] "+r" (val)
+			: [data] "rm" (data));
+	return (uint32_t)val;
+}
+#endif
+
+#endif
diff --git a/lib/librte_hash/meson.build b/lib/librte_hash/meson.build
index 6ab46ae9d..90a180bc8 100644
--- a/lib/librte_hash/meson.build
+++ b/lib/librte_hash/meson.build
@@ -1,8 +1,7 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017 Intel Corporation

-headers = files('rte_crc_arm64.h',
-	'rte_fbk_hash.h',
+headers = files('rte_fbk_hash.h',
 	'rte_hash_crc.h',
 	'rte_hash.h',
 	'rte_jhash.h',
diff --git a/lib/librte_hash/rte_crc_arm64.h b/lib/librte_hash/rte_crc_arm64.h
deleted file mode 100644
index b4628cfc0..000000000
--- a/lib/librte_hash/rte_crc_arm64.h
+++ /dev/null
@@ -1,183 +0,0 @@
-/* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2015 Cavium, Inc
- */
-
-#ifndef _RTE_CRC_ARM64_H_
-#define _RTE_CRC_ARM64_H_
-
-/**
- * @file
- *
- * RTE CRC arm64 Hash
- */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <stdint.h>
-#include <rte_cpuflags.h>
-#include <rte_branch_prediction.h>
-#include <rte_common.h>
-
-static inline uint32_t
-crc32c_arm64_u8(uint8_t data, uint32_t init_val)
-{
-	__asm__ volatile(
-			"crc32cb %w[crc], %w[crc], %w[value]"
-			: [crc] "+r" (init_val)
-			: [value] "r" (data));
-	return init_val;
-}
-
-static inline uint32_t
-crc32c_arm64_u16(uint16_t data, uint32_t init_val)
-{
-	__asm__ volatile(
-			"crc32ch %w[crc], %w[crc], %w[value]"
-			: [crc] "+r" (init_val)
-			: [value] "r" (data));
-	return init_val;
-}
-
-static inline uint32_t
-crc32c_arm64_u32(uint32_t data, uint32_t init_val)
-{
-	__asm__ volatile(
-			"crc32cw %w[crc], %w[crc], %w[value]"
-			: [crc] "+r" (init_val)
-			: [value] "r" (data));
-	return init_val;
-}
-
-static inline uint32_t
-crc32c_arm64_u64(uint64_t data, uint32_t init_val)
-{
-	__asm__ volatile(
-			"crc32cx %w[crc], %w[crc], %x[value]"
-			: [crc] "+r" (init_val)
-			: [value] "r" (data));
-	return init_val;
-}
-
-/**
- * Allow or disallow use of arm64 SIMD instrinsics for CRC32 hash
- * calculation.
- *
- * @param alg
- *   An OR of following flags:
- *   - (CRC32_SW) Don't use arm64 crc intrinsics
- *   - (CRC32_ARM64) Use ARMv8 CRC intrinsic if available
- *
- */
-static inline void
-rte_hash_crc_set_alg(uint8_t alg)
-{
-	switch (alg) {
-	case CRC32_ARM64:
-		if (!rte_cpu_get_flag_enabled(RTE_CPUFLAG_CRC32))
-			alg = CRC32_SW;
-		/* fall-through */
-	case CRC32_SW:
-		crc32_alg = alg;
-		/* fall-through */
-	default:
-		break;
-	}
-}
-
-/* Setting the best available algorithm */
-RTE_INIT(rte_hash_crc_init_alg)
-{
-	rte_hash_crc_set_alg(CRC32_ARM64);
-}
-
-/**
- * Use single crc32 instruction to perform a hash on a 1 byte value.
- * Fall back to software crc32 implementation in case arm64 crc intrinsics is
- * not supported
- *
- * @param data
- *   Data to perform hash on.
- * @param init_val
- *   Value to initialise hash generator.
- * @return
- *   32bit calculated hash value.
- */
-static inline uint32_t
-rte_hash_crc_1byte(uint8_t data, uint32_t init_val)
-{
-	if (likely(crc32_alg & CRC32_ARM64))
-		return crc32c_arm64_u8(data, init_val);
-
-	return crc32c_1byte(data, init_val);
-}
-
-/**
- * Use single crc32 instruction to perform a hash on a 2 bytes value.
- * Fall back to software crc32 implementation in case arm64 crc intrinsics is
- * not supported
- *
- * @param data
- *   Data to perform hash on.
- * @param init_val
- *   Value to initialise hash generator.
- * @return
- *   32bit calculated hash value.
- */
-static inline uint32_t
-rte_hash_crc_2byte(uint16_t data, uint32_t init_val)
-{
-	if (likely(crc32_alg & CRC32_ARM64))
-		return crc32c_arm64_u16(data, init_val);
-
-	return crc32c_2bytes(data, init_val);
-}
-
-/**
- * Use single crc32 instruction to perform a hash on a 4 byte value.
- * Fall back to software crc32 implementation in case arm64 crc intrinsics is
- * not supported
- *
- * @param data
- *   Data to perform hash on.
- * @param init_val
- *   Value to initialise hash generator.
- * @return
- *   32bit calculated hash value.
- */
-static inline uint32_t
-rte_hash_crc_4byte(uint32_t data, uint32_t init_val)
-{
-	if (likely(crc32_alg & CRC32_ARM64))
-		return crc32c_arm64_u32(data, init_val);
-
-	return crc32c_1word(data, init_val);
-}
-
-/**
- * Use single crc32 instruction to perform a hash on a 8 byte value.
- * Fall back to software crc32 implementation in case arm64 crc intrinsics is
- * not supported
- *
- * @param data
- *   Data to perform hash on.
- * @param init_val
- *   Value to initialise hash generator.
- * @return
- *   32bit calculated hash value.
- */
-static inline uint32_t
-rte_hash_crc_8byte(uint64_t data, uint32_t init_val)
-{
-	if (likely(crc32_alg == CRC32_ARM64))
-		return crc32c_arm64_u64(data, init_val);
-
-	return crc32c_2words(data, init_val);
-}
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _RTE_CRC_ARM64_H_ */
diff --git a/lib/librte_hash/rte_hash_crc.h b/lib/librte_hash/rte_hash_crc.h
index cf28031b3..292697db1 100644
--- a/lib/librte_hash/rte_hash_crc.h
+++ b/lib/librte_hash/rte_hash_crc.h
@@ -21,6 +21,15 @@ extern "C" {
 #include <rte_branch_prediction.h>
 #include <rte_common.h>

+typedef uint32_t
+(*crc32_handler_1b)(uint8_t data, uint32_t init_val);
+typedef uint32_t
+(*crc32_handler_2b)(uint16_t data, uint32_t init_val);
+typedef uint32_t
+(*crc32_handler_4b)(uint32_t data, uint32_t init_val);
+typedef uint32_t
+(*crc32_handler_8b)(uint64_t data, uint32_t init_val);
+
 /* Lookup tables for software implementation of CRC32C */
 static const uint32_t crc32c_tables[8][256] = {{
  0x00000000, 0xF26B8303, 0xE13B70F7, 0x1350F3F4, 0xC79A971F, 0x35F1141C, 0x26A1E7E8, 0xD4CA64EB,
@@ -322,7 +331,7 @@ crc32c_2bytes(uint16_t data, uint32_t init_val)
 }

 static inline uint32_t
-crc32c_1word(uint32_t data, uint32_t init_val)
+crc32c_4bytes(uint32_t data, uint32_t init_val)
 {
 	uint32_t crc, term1, term2;
 	crc = init_val;
@@ -336,7 +345,7 @@ crc32c_1word(uint32_t data, uint32_t init_val)
 }

 static inline uint32_t
-crc32c_2words(uint64_t data, uint32_t init_val)
+crc32c_8bytes(uint64_t data, uint32_t init_val)
 {
 	uint32_t crc, term1, term2;
 	union {
@@ -357,109 +366,94 @@ crc32c_2words(uint64_t data, uint32_t init_val)

 	return crc;
 }
-
-#if defined(RTE_ARCH_X86)
-static inline uint32_t
-crc32c_sse42_u8(uint8_t data, uint32_t init_val)
-{
-	__asm__ volatile(
-			"crc32b %[data], %[init_val];"
-			: [init_val] "+r" (init_val)
-			: [data] "rm" (data));
-	return init_val;
-}
-
-static inline uint32_t
-crc32c_sse42_u16(uint16_t data, uint32_t init_val)
-{
-	__asm__ volatile(
-			"crc32w %[data], %[init_val];"
-			: [init_val] "+r" (init_val)
-			: [data] "rm" (data));
-	return init_val;
-}
-
-static inline uint32_t
-crc32c_sse42_u32(uint32_t data, uint32_t init_val)
-{
-	__asm__ volatile(
-			"crc32l %[data], %[init_val];"
-			: [init_val] "+r" (init_val)
-			: [data] "rm" (data));
-	return init_val;
-}
-
-static inline uint32_t
-crc32c_sse42_u64_mimic(uint64_t data, uint64_t init_val)
-{
-	union {
-		uint32_t u32[2];
-		uint64_t u64;
-	} d;
-
-	d.u64 = data;
-	init_val = crc32c_sse42_u32(d.u32[0], (uint32_t)init_val);
-	init_val = crc32c_sse42_u32(d.u32[1], (uint32_t)init_val);
-	return (uint32_t)init_val;
-}
-#endif
-
-#ifdef RTE_ARCH_X86_64
-static inline uint32_t
-crc32c_sse42_u64(uint64_t data, uint64_t init_val)
-{
-	__asm__ volatile(
-			"crc32q %[data], %[init_val];"
-			: [init_val] "+r" (init_val)
-			: [data] "rm" (data));
-	return (uint32_t)init_val;
-}
-#endif
-
 #define CRC32_SW            (1U << 0)
 #define CRC32_SSE42         (1U << 1)
 #define CRC32_x64           (1U << 2)
 #define CRC32_SSE42_x64     (CRC32_x64|CRC32_SSE42)
 #define CRC32_ARM64         (1U << 3)

-static uint8_t crc32_alg = CRC32_SW;
+static crc32_handler_1b crc32_1b = crc32c_1byte;
+static crc32_handler_2b crc32_2b = crc32c_2bytes;
+static crc32_handler_4b crc32_4b = crc32c_4bytes;
+static crc32_handler_8b crc32_8b = crc32c_8bytes;

 #if defined(RTE_ARCH_ARM64) && defined(RTE_MACHINE_CPUFLAG_CRC32)
-#include "rte_crc_arm64.h"
-#else
+#include "crc_arm64.h"
+#endif
+
+#if defined(RTE_ARCH_X86)
+#include "crc_x86.h"
+#endif

 /**
- * Allow or disallow use of SSE4.2 instrinsics for CRC32 hash
+ * Allow or disallow use of SSE4.2/ARMv8 instrinsics for CRC32 hash
  * calculation.
  *
  * @param alg
  *   An OR of following flags:
- *   - (CRC32_SW) Don't use SSE4.2 intrinsics
+ *   - (CRC32_SW) Don't use SSE4.2 intrinsics (default non-[x86/ARMv8])
  *   - (CRC32_SSE42) Use SSE4.2 intrinsics if available
- *   - (CRC32_SSE42_x64) Use 64-bit SSE4.2 intrinsic if available (default)
- *
+ *   - (CRC32_SSE42_x64) Use 64-bit SSE4.2 intrinsic if available (default x86)
+ *   - (CRC32_ARM64) Use ARMv8 CRC intrinsic if available
  */
 static inline void
 rte_hash_crc_set_alg(uint8_t alg)
 {
-#if defined(RTE_ARCH_X86)
-	if (alg == CRC32_SSE42_x64 &&
-			!rte_cpu_get_flag_enabled(RTE_CPUFLAG_EM64T))
-		alg = CRC32_SSE42;
+	switch (alg) {
+	case CRC32_SSE42_x64:
+#if defined RTE_ARCH_X86
+		crc32_1b = crc32c_sse42_u8;
+		crc32_2b = crc32c_sse42_u16;
+		crc32_4b = crc32c_sse42_u32;
+
+	if (!rte_cpu_get_flag_enabled(RTE_CPUFLAG_EM64T))
+		crc32_8b = crc32c_sse42_u64_mimic;
+	else
+		crc32_8b = crc32c_sse42_u64;
 #endif
-	crc32_alg = alg;
+		break;
+	case CRC32_SSE42:
+#if defined RTE_ARCH_X86
+		crc32_1b = crc32c_sse42_u8;
+		crc32_2b = crc32c_sse42_u16;
+		crc32_4b = crc32c_sse42_u32;
+		crc32_8b = crc32c_sse42_u64_mimic;
+#endif
+		break;
+	case CRC32_ARM64:
+#if defined RTE_ARCH_ARM64
+	if (rte_cpu_get_flag_enabled(RTE_CPUFLAG_CRC32)) {
+		crc32_1b = crc32c_arm64_u8;
+		crc32_2b = crc32c_arm64_u16;
+		crc32_4b = crc32c_arm64_u32;
+		crc32_8b = crc32c_arm64_u64;
+	}
+#endif
+		break;
+	case CRC32_SW:
+	default:
+		crc32_1b = crc32c_1byte;
+		crc32_2b = crc32c_2bytes;
+		crc32_4b = crc32c_4bytes;
+		crc32_8b = crc32c_8bytes;
+	break;
+	}
 }

 /* Setting the best available algorithm */
 RTE_INIT(rte_hash_crc_init_alg)
 {
+#if defined RTE_ARCH_X86
 	rte_hash_crc_set_alg(CRC32_SSE42_x64);
+#elif defined RTE_ARCH_ARM64
+	rte_hash_crc_set_alg(CRC32_ARM64);
+#else
+	rte_hash_crc_set_alg(CRC32_SW);
+#endif
 }

 /**
- * Use single crc32 instruction to perform a hash on a byte value.
- * Fall back to software crc32 implementation in case SSE4.2 is
- * not supported
+ * Calculate crc32 hash value of 1bytes.
  *
  * @param data
  *   Data to perform hash on.
@@ -471,18 +465,11 @@ RTE_INIT(rte_hash_crc_init_alg)
 static inline uint32_t
 rte_hash_crc_1byte(uint8_t data, uint32_t init_val)
 {
-#if defined RTE_ARCH_X86
-	if (likely(crc32_alg & CRC32_SSE42))
-		return crc32c_sse42_u8(data, init_val);
-#endif
-
-	return crc32c_1byte(data, init_val);
+	return (crc32_1b)(data, init_val);
 }

 /**
- * Use single crc32 instruction to perform a hash on a 2 bytes value.
- * Fall back to software crc32 implementation in case SSE4.2 is
- * not supported
+ * Calculate crc32 hash value of 2bytes.
  *
  * @param data
  *   Data to perform hash on.
@@ -494,18 +481,11 @@ rte_hash_crc_1byte(uint8_t data, uint32_t init_val)
 static inline uint32_t
 rte_hash_crc_2byte(uint16_t data, uint32_t init_val)
 {
-#if defined RTE_ARCH_X86
-	if (likely(crc32_alg & CRC32_SSE42))
-		return crc32c_sse42_u16(data, init_val);
-#endif
-
-	return crc32c_2bytes(data, init_val);
+	return (crc32_2b)(data, init_val);
 }

 /**
- * Use single crc32 instruction to perform a hash on a 4 byte value.
- * Fall back to software crc32 implementation in case SSE4.2 is
- * not supported
+ * Calculate crc32 hash value of 4bytes.
  *
  * @param data
  *   Data to perform hash on.
@@ -517,18 +497,11 @@ rte_hash_crc_2byte(uint16_t data, uint32_t init_val)
 static inline uint32_t
 rte_hash_crc_4byte(uint32_t data, uint32_t init_val)
 {
-#if defined RTE_ARCH_X86
-	if (likely(crc32_alg & CRC32_SSE42))
-		return crc32c_sse42_u32(data, init_val);
-#endif
-
-	return crc32c_1word(data, init_val);
+	return (crc32_4b)(data, init_val);
 }

 /**
- * Use single crc32 instruction to perform a hash on a 8 byte value.
- * Fall back to software crc32 implementation in case SSE4.2 is
- * not supported
+ * Calculate crc32 hash value of 8bytes.
  *
  * @param data
  *   Data to perform hash on.
@@ -540,21 +513,9 @@ rte_hash_crc_4byte(uint32_t data, uint32_t init_val)
 static inline uint32_t
 rte_hash_crc_8byte(uint64_t data, uint32_t init_val)
 {
-#ifdef RTE_ARCH_X86_64
-	if (likely(crc32_alg == CRC32_SSE42_x64))
-		return crc32c_sse42_u64(data, init_val);
-#endif
-
-#if defined RTE_ARCH_X86
-	if (likely(crc32_alg & CRC32_SSE42))
-		return crc32c_sse42_u64_mimic(data, init_val);
-#endif
-
-	return crc32c_2words(data, init_val);
+	return (crc32_8b)(data, init_val);
 }

-#endif
-
 /**
  * Calculate CRC32 hash on user-supplied byte array.
  *
--
2.17.1


^ permalink raw reply	[relevance 2%]

* Re: [dpdk-dev] [PATCH v4] ethdev: support flow aging
  @ 2020-04-29 14:50  0%   ` Tom Barbette
  2020-04-30  7:36  0%     ` Matan Azrad
  0 siblings, 1 reply; 200+ results
From: Tom Barbette @ 2020-04-29 14:50 UTC (permalink / raw)
  To: Bill Zhou, orika, matan, wenzhuo.lu, jingjing.wu,
	bernard.iremonger, john.mcnamara, marko.kovacevic, thomas,
	ferruh.yigit, arybchenko
  Cc: dev

Great news!

- I can understand why there is no timeout unit. But that's calling for 
user nightmare. Eg I could only get from the code (and not from 
documentation yet? ) of the following mlx5 driver patch that the value 
should be in tenth of seconds. If I build an application that is 
supposed to work with "any NIC", what can I do? We'd need a way to query 
the timeout unit (have it in dev_info probably).
- It's not totally clear if the rule is automatically removed or not. is 
this a helper or an OpenFlow-like notification?
- Find a typo and grammar fix inline.
- Recently, Mellanox introduced the ability to create 330K flows/s. Any 
performance considerations if those flow "expire" at the same rate?


Hope it's helpfull,

Tom

Le 21/04/2020 à 12:11, Bill Zhou a écrit :
> From: Dong Zhou <dongz@mellanox.com>
> 
> One of the reasons to destroy a flow is the fact that no packet matches the
> flow for "timeout" time.
> For example, when TCP\UDP sessions are suddenly closed.
> 
> Currently, there is not any DPDK mechanism for flow aging and the
> applications use their own ways to detect and destroy aged-out flows.
> 
> The flow aging implementation need include:
> - A new rte_flow action: RTE_FLOW_ACTION_TYPE_AGE to set the timeout and
>    the application flow context for each flow.
> - A new ethdev event: RTE_ETH_EVENT_FLOW_AGED for the driver to report
>    that there are new aged-out flows.
> - A new rte_flow API: rte_flow_get_aged_flows to get the aged-out flows
>    contexts from the port.
> - Support input flow aging command line in Testpmd.
> 
> The new event type addition in the enum is flagged as an ABI breakage, so
> an ignore rule is added for these reasons:
> - It is not changing value of existing types (except MAX)
> - The new value is not used by existing API if the event is not registered
> In general, it is safe adding new ethdev event types at the end of the
> enum, because of event callback registration mechanism.
> 
> Signed-off-by: Dong Zhou <dongz@mellanox.com>
> ---
> v2: Removing "* Added support for flow Aging mechanism base on counter."
> this line from doc/guides/rel_notes/release_20_05.rst, this patch does not
> include this support.
> 
> v3: Update file libabigail.abignore, add one new suppressed enumeration
> type for RTE_ETH_EVENT_MAX.
> 
> v4: Add justification in devtools/libabigail.abignore and in the commit
> log about the modification of v3.
> ---
>   app/test-pmd/cmdline_flow.c              | 26 ++++++++++
>   devtools/libabigail.abignore             |  6 +++
>   doc/guides/prog_guide/rte_flow.rst       | 22 +++++++++
>   doc/guides/rel_notes/release_20_05.rst   | 11 +++++
>   lib/librte_ethdev/rte_ethdev.h           |  1 +
>   lib/librte_ethdev/rte_ethdev_version.map |  3 ++
>   lib/librte_ethdev/rte_flow.c             | 18 +++++++
>   lib/librte_ethdev/rte_flow.h             | 62 ++++++++++++++++++++++++
>   lib/librte_ethdev/rte_flow_driver.h      |  6 +++
>   9 files changed, 155 insertions(+)
> 
> diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
> index e6ab8ff2f7..45bcff3cf5 100644
> --- a/app/test-pmd/cmdline_flow.c
> +++ b/app/test-pmd/cmdline_flow.c
> @@ -343,6 +343,8 @@ enum index {
>   	ACTION_SET_IPV4_DSCP_VALUE,
>   	ACTION_SET_IPV6_DSCP,
>   	ACTION_SET_IPV6_DSCP_VALUE,
> +	ACTION_AGE,
> +	ACTION_AGE_TIMEOUT,
>   };
>   
>   /** Maximum size for pattern in struct rte_flow_item_raw. */
> @@ -1145,6 +1147,7 @@ static const enum index next_action[] = {
>   	ACTION_SET_META,
>   	ACTION_SET_IPV4_DSCP,
>   	ACTION_SET_IPV6_DSCP,
> +	ACTION_AGE,
>   	ZERO,
>   };
>   
> @@ -1370,6 +1373,13 @@ static const enum index action_set_ipv6_dscp[] = {
>   	ZERO,
>   };
>   
> +static const enum index action_age[] = {
> +	ACTION_AGE,
> +	ACTION_AGE_TIMEOUT,
> +	ACTION_NEXT,
> +	ZERO,
> +};
> +
>   static int parse_set_raw_encap_decap(struct context *, const struct token *,
>   				     const char *, unsigned int,
>   				     void *, unsigned int);
> @@ -3694,6 +3704,22 @@ static const struct token token_list[] = {
>   			     (struct rte_flow_action_set_dscp, dscp)),
>   		.call = parse_vc_conf,
>   	},
> +	[ACTION_AGE] = {
> +		.name = "age",
> +		.help = "set a specific metadata header",
> +		.next = NEXT(action_age),
> +		.priv = PRIV_ACTION(AGE,
> +			sizeof(struct rte_flow_action_age)),
> +		.call = parse_vc,
> +	},
> +	[ACTION_AGE_TIMEOUT] = {
> +		.name = "timeout",
> +		.help = "flow age timeout value",
> +		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_age,
> +					   timeout, 24)),
> +		.next = NEXT(action_age, NEXT_ENTRY(UNSIGNED)),
> +		.call = parse_vc_conf,
> +	},
>   };
>   
>   /** Remove and return last entry from argument stack. */
> diff --git a/devtools/libabigail.abignore b/devtools/libabigail.abignore
> index a59df8f135..c047adbd79 100644
> --- a/devtools/libabigail.abignore
> +++ b/devtools/libabigail.abignore
> @@ -11,3 +11,9 @@
>           type_kind = enum
>           name = rte_crypto_asym_xform_type
>           changed_enumerators = RTE_CRYPTO_ASYM_XFORM_TYPE_LIST_END
> +; Ignore ethdev event enum update because new event cannot be
> +; received if not registered
> +[suppress_type]
> +        type_kind = enum
> +        name = rte_eth_event_type
> +        changed_enumerators = RTE_ETH_EVENT_MAX
> diff --git a/doc/guides/prog_guide/rte_flow.rst b/doc/guides/prog_guide/rte_flow.rst
> index 41c147913c..cf4368e1c4 100644
> --- a/doc/guides/prog_guide/rte_flow.rst
> +++ b/doc/guides/prog_guide/rte_flow.rst
> @@ -2616,6 +2616,28 @@ Otherwise, RTE_FLOW_ERROR_TYPE_ACTION error will be returned.
>      | ``dscp``  | DSCP in low 6 bits, rest ignore |
>      +-----------+---------------------------------+
>   
> +Action: ``AGE``
> +^^^^^^^^^^^^^^^^^^^^^^^^^
> +
> +Set ageing timeout configuration to a flow.
> +
> +Event RTE_ETH_EVENT_FLOW_AGED will be reported if
> +timeout passed without any matching on the flow.
> +
> +.. _table_rte_flow_action_age:
> +
> +.. table:: AGE
> +
> +   +--------------+---------------------------------+
> +   | Field        | Value                           |
> +   +==============+=================================+
> +   | ``timeout``  | 24 bits timeout value           |
> +   +--------------+---------------------------------+
> +   | ``reserved`` | 8 bits reserved, must be zero   |
> +   +--------------+---------------------------------+
> +   | ``context``  | user input flow context         |
> +   +--------------+---------------------------------+
> +
>   Negative types
>   ~~~~~~~~~~~~~~
>   
> diff --git a/doc/guides/rel_notes/release_20_05.rst b/doc/guides/rel_notes/release_20_05.rst
> index bacd4c65a2..ff0cf9f1d6 100644
> --- a/doc/guides/rel_notes/release_20_05.rst
> +++ b/doc/guides/rel_notes/release_20_05.rst
> @@ -135,6 +135,17 @@ New Features
>     by making use of the event device capabilities. The event mode currently supports
>     only inline IPsec protocol offload.
>   
> +* **Added flow Aging Support.**
> +
> +  Added flow Aging support to detect and report aged-out flows, including:
> +
> +  * Added new action: RTE_FLOW_ACTION_TYPE_AGE to set the timeout and the
> +    application flow context for each flow.
> +  * Added new event: RTE_ETH_EVENT_FLOW_AGED for the driver to report that
> +    there are new aged-out flows.
> +  * Added new API: rte_flow_get_aged_flows to get the aged-out flows contexts
> +    from the port.
> +
>   
>   Removed Items
>   -------------
> diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
> index 8d69b88f9e..00cc7b4052 100644
> --- a/lib/librte_ethdev/rte_ethdev.h
> +++ b/lib/librte_ethdev/rte_ethdev.h
> @@ -3018,6 +3018,7 @@ enum rte_eth_event_type {
>   	RTE_ETH_EVENT_NEW,      /**< port is probed */
>   	RTE_ETH_EVENT_DESTROY,  /**< port is released */
>   	RTE_ETH_EVENT_IPSEC,    /**< IPsec offload related event */
> +	RTE_ETH_EVENT_FLOW_AGED,/**< New aged-out flows is detected */
>   	RTE_ETH_EVENT_MAX       /**< max value of this enum */
>   };
>   
> diff --git a/lib/librte_ethdev/rte_ethdev_version.map b/lib/librte_ethdev/rte_ethdev_version.map
> index 3f32fdecf7..fa4b5816be 100644
> --- a/lib/librte_ethdev/rte_ethdev_version.map
> +++ b/lib/librte_ethdev/rte_ethdev_version.map
> @@ -230,4 +230,7 @@ EXPERIMENTAL {
>   
>   	# added in 20.02
>   	rte_flow_dev_dump;
> +
> +	# added in 20.05
> +	rte_flow_get_aged_flows;
>   };
> diff --git a/lib/librte_ethdev/rte_flow.c b/lib/librte_ethdev/rte_flow.c
> index a5ac1c7fbd..3699edce49 100644
> --- a/lib/librte_ethdev/rte_flow.c
> +++ b/lib/librte_ethdev/rte_flow.c
> @@ -172,6 +172,7 @@ static const struct rte_flow_desc_data rte_flow_desc_action[] = {
>   	MK_FLOW_ACTION(SET_META, sizeof(struct rte_flow_action_set_meta)),
>   	MK_FLOW_ACTION(SET_IPV4_DSCP, sizeof(struct rte_flow_action_set_dscp)),
>   	MK_FLOW_ACTION(SET_IPV6_DSCP, sizeof(struct rte_flow_action_set_dscp)),
> +	MK_FLOW_ACTION(AGE, sizeof(struct rte_flow_action_age)),
>   };
>   
>   int
> @@ -1232,3 +1233,20 @@ rte_flow_dev_dump(uint16_t port_id, FILE *file, struct rte_flow_error *error)
>   				  RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
>   				  NULL, rte_strerror(ENOSYS));
>   }
> +
> +int
> +rte_flow_get_aged_flows(uint16_t port_id, void **contexts,
> +		    uint32_t nb_contexts, struct rte_flow_error *error)
> +{
> +	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
> +	const struct rte_flow_ops *ops = rte_flow_ops_get(port_id, error);
> +
> +	if (unlikely(!ops))
> +		return -rte_errno;
> +	if (likely(!!ops->get_aged_flows))
> +		return flow_err(port_id, ops->get_aged_flows(dev, contexts,
> +				nb_contexts, error), error);
> +	return rte_flow_error_set(error, ENOTSUP,
> +				  RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
> +				  NULL, rte_strerror(ENOTSUP));
> +}
> diff --git a/lib/librte_ethdev/rte_flow.h b/lib/librte_ethdev/rte_flow.h
> index 7f3e08fad3..fab44f6c0b 100644
> --- a/lib/librte_ethdev/rte_flow.h
> +++ b/lib/librte_ethdev/rte_flow.h
> @@ -2081,6 +2081,16 @@ enum rte_flow_action_type {
>   	 * See struct rte_flow_action_set_dscp.
>   	 */
>   	RTE_FLOW_ACTION_TYPE_SET_IPV6_DSCP,
> +
> +	/**
> +	 * Report as aged flow if timeout passed without any matching on the
> +	 * flow.
> +	 *
> +	 * See struct rte_flow_action_age.
> +	 * See function rte_flow_get_aged_flows
> +	 * see enum RTE_ETH_EVENT_FLOW_AGED
> +	 */
> +	RTE_FLOW_ACTION_TYPE_AGE,
>   };
>   
>   /**
> @@ -2122,6 +2132,25 @@ struct rte_flow_action_queue {
>   	uint16_t index; /**< Queue index to use. */
>   };
>   
> +/**
> + * @warning
> + * @b EXPERIMENTAL: this structure may change without prior notice
> + *
> + * RTE_FLOW_ACTION_TYPE_AGE
> + *
> + * Report flow as aged-out if timeout passed without any matching
> + * on the flow. RTE_ETH_EVENT_FLOW_AGED event is triggered when a
> + * port detects new aged-out flows.
> + *
> + * The flow context and the flow handle will be reported by the
> + * rte_flow_get_aged_flows API.
> + */
> +struct rte_flow_action_age {
> +	uint32_t timeout:24; /**< Time in seconds. */
> +	uint32_t reserved:8; /**< Reserved, must be zero. */
> +	void *context;
> +		/**< The user flow context, NULL means the rte_flow pointer. */
> +};
>   
>   /**
>    * @warning
> @@ -3254,6 +3283,39 @@ rte_flow_conv(enum rte_flow_conv_op op,
>   	      const void *src,
>   	      struct rte_flow_error *error);
>   
> +/**
> + * Get aged-out flows of a given port.
> + *
> + * RTE_ETH_EVENT_FLOW_AGED event will be triggered when at least one new aged
> + * out flow was detected after the last call to rte_flow_get_aged_flows.
> + * This function can be called to get the aged flows usynchronously from the
usynchronously
> + * event callback or synchronously regardless the event.
> + * This is not safe to call rte_flow_get_aged_flows function with other flow
It is not safe to
> + * functions from multiple threads simultaneously.
> + *
> + * @param port_id
> + *   Port identifier of Ethernet device.
> + * @param[in, out] contexts
> + *   The address of an array of pointers to the aged-out flows contexts.
> + * @param[in] nb_contexts
> + *   The length of context array pointers.
> + * @param[out] error
> + *   Perform verbose error reporting if not NULL. Initialized in case of
> + *   error only.
> + *
> + * @return
> + *   if nb_contexts is 0, return the amount of all aged contexts.
> + *   if nb_contexts is not 0 , return the amount of aged flows reported
> + *   in the context array, otherwise negative errno value.
> + *
> + * @see rte_flow_action_age
> + * @see RTE_ETH_EVENT_FLOW_AGED
> + */
> +__rte_experimental
> +int
> +rte_flow_get_aged_flows(uint16_t port_id, void **contexts,
> +			uint32_t nb_contexts, struct rte_flow_error *error);
> +
>   #ifdef __cplusplus
>   }
>   #endif
> diff --git a/lib/librte_ethdev/rte_flow_driver.h b/lib/librte_ethdev/rte_flow_driver.h
> index 51a9a57a0f..881cc469b7 100644
> --- a/lib/librte_ethdev/rte_flow_driver.h
> +++ b/lib/librte_ethdev/rte_flow_driver.h
> @@ -101,6 +101,12 @@ struct rte_flow_ops {
>   		(struct rte_eth_dev *dev,
>   		 FILE *file,
>   		 struct rte_flow_error *error);
> +	/** See rte_flow_get_aged_flows() */
> +	int (*get_aged_flows)
> +		(struct rte_eth_dev *dev,
> +		 void **context,
> +		 uint32_t nb_contexts,
> +		 struct rte_flow_error *err);
>   };
>   
>   /**
> 

^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [PATCH v2] abi: change references to abi 20.0.1 to abi v21
  @ 2020-04-29 12:19  9%       ` Dodji Seketeli
  2020-04-30  8:23  6%         ` Ray Kinsella
  0 siblings, 1 reply; 200+ results
From: Dodji Seketeli @ 2020-04-29 12:19 UTC (permalink / raw)
  To: Ray Kinsella
  Cc: David Marchand, dev, Andrzej Ostruszka, Stephen Hemminger,
	Thomas Monjalon, Neil Horman, Jingjing Wu, Wenzhuo Lu,
	Matan Azrad, Shahaf Shuler, Viacheslav Ovsiienko, Jerin Jacob,
	Nithin Dabilpuram, Alfredo Cardigliano, Mahipal Challa,
	Cristian Dumitrescu, Wang, Haiyue

Hello,

Ray Kinsella <mdr@ashroe.eu> writes:

> ah ok, the particular system I made the change on was Ubuntu 18.04.2.
> which is libabigail 1.2.0.

Whoah, 1.2 is super old.

In my opinion, one of the hallmarks of static analysis tools (and
libabigail is just a static analysis framework) is to be able to
recognize patterns used by developers, as much as we can.

Because we can't really do that at once, we try to add recognition of
new patterns (of ABI changes) at every single release.  Furthermore,
there are some change patterns that ought to be recognized and
categorized as harmless, whereas some others out to be categorized as
harmful.  That categorization is also the result of input coming from
users as you, fine fellows.

All this to say that with every new version, the number of new supported
features and bug fixes is potentially big.

To alleviate that, some distributors update libabigail even in their old
stable distros, because the value of having an up to date version there
outweighs the potential drawbacks.

> Given we still support v19.11 on Ubuntu 18.04.2.

So maybe that's a discussion worth having with the maintainer of the
Ubuntu package of Libabigail?

> I think it's worthwhile keeping the suppression until v20.11?

[...]

David Marchand <david.marchand@redhat.com> writes:

> In Travis, we currently use libabigail 1.6 (mainly because I did not
> update to 1.7 when it was released).

Right, that's probably another way to stay up to date independently from
the underlying distribution.

I hope this helps,

Cheers,

-- 
		Dodji


^ permalink raw reply	[relevance 9%]

* Re: [dpdk-dev] [PATCH v5] eal/cpuflags: add x86 based cpu flags
    2020-04-28 18:11  4%       ` Laatz, Kevin
@ 2020-04-29 11:39  3%       ` David Marchand
  2020-04-30 10:02  0%         ` Ray Kinsella
  1 sibling, 1 reply; 200+ results
From: David Marchand @ 2020-04-29 11:39 UTC (permalink / raw)
  To: Ray Kinsella
  Cc: Kevin Laatz, dev, Bruce Richardson, Van Haaren Harry,
	Thomas Monjalon, Kinsella, Ray, Neil Horman

On Tue, Apr 28, 2020 at 6:39 PM Ray Kinsella <mdr@ashroe.eu> wrote:
> > diff --git a/devtools/libabigail.abignore b/devtools/libabigail.abignore
> > index a59df8f13..045f436fb 100644
> > --- a/devtools/libabigail.abignore
> > +++ b/devtools/libabigail.abignore
>
> Kevin - you still have the surpession.
> I am testing locally with 1.7.1, and it doesn't complain when I disable the supression.
> Are you seeing something different?

Using current master libabigail, without the rule Kevin included, I
get the warning:

1 function with some indirect sub-type change:

  [C] 'function int rte_cpu_get_flag_enabled(rte_cpu_flag_t)' at
rte_cpuflags.c:144:1 has some indirect sub-type changes:
    parameter 1 of type 'enum rte_cpu_flag_t' has sub-type changes:
      type size hasn't changed
      17 enumerator insertions:
        'rte_cpu_flag_t::RTE_CPUFLAG_AVX512DQ' value '87'
        'rte_cpu_flag_t::RTE_CPUFLAG_AVX512IFMA' value '88'
        'rte_cpu_flag_t::RTE_CPUFLAG_AVX512CD' value '89'
        'rte_cpu_flag_t::RTE_CPUFLAG_AVX512BW' value '90'
        'rte_cpu_flag_t::RTE_CPUFLAG_AVX512VL' value '91'
        'rte_cpu_flag_t::RTE_CPUFLAG_AVX512VBMI' value '92'
        'rte_cpu_flag_t::RTE_CPUFLAG_AVX512VBMI2' value '93'
        'rte_cpu_flag_t::RTE_CPUFLAG_GFNI' value '94'
        'rte_cpu_flag_t::RTE_CPUFLAG_VAES' value '95'
        'rte_cpu_flag_t::RTE_CPUFLAG_VPCLMULQDQ' value '96'
        'rte_cpu_flag_t::RTE_CPUFLAG_AVX512VNNI' value '97'
        'rte_cpu_flag_t::RTE_CPUFLAG_AVX512BITALG' value '98'
        'rte_cpu_flag_t::RTE_CPUFLAG_AVX512VPOPCNTDQ' value '99'
        'rte_cpu_flag_t::RTE_CPUFLAG_CLDEMOTE' value '100'
        'rte_cpu_flag_t::RTE_CPUFLAG_MOVDIRI' value '101'
        'rte_cpu_flag_t::RTE_CPUFLAG_MOVDIR64B' value '102'
        'rte_cpu_flag_t::RTE_CPUFLAG_AVX512VP2INTERSECT' value '103'
      1 enumerator change:
        'rte_cpu_flag_t::RTE_CPUFLAG_NUMFLAGS' from value '87' to
'104' at rte_cpuflags.h:12:1


Ray, could you check that the reference and new dumps in your env
contain this enum?

$ grep RTE_CPUFLAG_NUMFLAGS
$HOME/abi/v20.02/x86_64-native-linux-gcc+shared+debug+ASSERT+RTE_IBVERBS_LINK_DLOPEN/dump/librte_eal.dump
      <enumerator name='RTE_CPUFLAG_NUMFLAGS' value='87'/>
$ grep RTE_CPUFLAG_NUMFLAGS
$HOME/builds/x86_64-native-linux-gcc+shared+debug+ASSERT+RTE_IBVERBS_LINK_DLOPEN/install/dump/librte_eal.dump
      <enumerator name='RTE_CPUFLAG_NUMFLAGS' value='104'/>

If you are missing those, you might have built dpdk without debuginfo.

-- 
David Marchand


^ permalink raw reply	[relevance 3%]

* Re: [dpdk-dev] [PATCH v4] eal/cpuflags: add x86 based cpu flags
  @ 2020-04-29 11:22  0%           ` Neil Horman
  2020-04-30  7:59  4%             ` Ray Kinsella
  0 siblings, 1 reply; 200+ results
From: Neil Horman @ 2020-04-29 11:22 UTC (permalink / raw)
  To: Ray Kinsella
  Cc: Thomas Monjalon, ray.kinsella, Kevin Laatz, dev,
	bruce.richardson, harry.van.haaren, david.marchand, Haiyue Wang,
	ktraynor

On Mon, Apr 27, 2020 at 02:58:07PM +0100, Ray Kinsella wrote:
> 
> 
> On 27/04/2020 13:31, Thomas Monjalon wrote:
> > 27/04/2020 11:27, Ray Kinsella:
> >> On 25/04/2020 17:04, Thomas Monjalon wrote:
> >>> PS: Who is REALLY maintaining the ABI?
> >>> We really miss someone who carefully check all these things,
> >>> and take care of the doc and tooling.
> >>
> >> I would say that I am missing these changes to libabigail.ignore, which would be useful. 
> >> Should we consolidate the ABI Policy and ABI Versioning sections of the MAINTAINERS file?
> > 
> > Yes, I think it does not make sense spliting ABI topic in 2 sections
> > in MAINTAINERS file.
> > We need to have a clear ownership covering policy, libs, tooling and doc.
> > Let's agree to merge all in one section please.
> > 
> 
> I would suggest merging and listing myself and Neil as maintainers?
> Unless you are aware of another potential owner?
> 
I'm ok with this
Neil

> Ray K
>  
> 

^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [PATCH v4 1/4] ethdev: add tm support for shaper config in pkt mode
  2020-04-29  8:45  0%                         ` Dumitrescu, Cristian
@ 2020-04-29  9:03  0%                           ` Bruce Richardson
  2020-05-01 10:27  0%                             ` Ferruh Yigit
  0 siblings, 1 reply; 200+ results
From: Bruce Richardson @ 2020-04-29  9:03 UTC (permalink / raw)
  To: Dumitrescu, Cristian
  Cc: Thomas Monjalon, Jerin Jacob, Yigit, Ferruh, Luca Boccassi,
	Nithin Dabilpuram, Singh, Jasvinder, Andrew Rybchenko, dev,
	jerinj, kkanas, Nithin Dabilpuram, Kinsella, Ray, Neil Horman,
	Kevin Traynor, David Marchand

On Wed, Apr 29, 2020 at 09:45:44AM +0100, Dumitrescu, Cristian wrote:
> 
> 
> > -----Original Message-----
> > From: Thomas Monjalon <thomas@monjalon.net>
> > Sent: Tuesday, April 28, 2020 4:54 PM
> > To: Jerin Jacob <jerinjacobk@gmail.com>; Dumitrescu, Cristian
> > <cristian.dumitrescu@intel.com>
> > Cc: Richardson, Bruce <bruce.richardson@intel.com>; Yigit, Ferruh
> > <ferruh.yigit@intel.com>; Luca Boccassi <bluca@debian.org>; Nithin
> > Dabilpuram <nithind1988@gmail.com>; Singh, Jasvinder
> > <jasvinder.singh@intel.com>; Andrew Rybchenko
> > <arybchenko@solarflare.com>; dev@dpdk.org; jerinj@marvell.com;
> > kkanas@marvell.com; Nithin Dabilpuram <ndabilpuram@marvell.com>;
> > Kinsella, Ray <ray.kinsella@intel.com>; Neil Horman
> > <nhorman@tuxdriver.com>; Kevin Traynor <ktraynor@redhat.com>; David
> > Marchand <david.marchand@redhat.com>
> > Subject: Re: [dpdk-dev] [PATCH v4 1/4] ethdev: add tm support for shaper
> > config in pkt mode
> >
> > 28/04/2020 17:04, Luca Boccassi:
> > > On Tue, 2020-04-28 at 15:45 +0100, Bruce Richardson wrote:
> > > > On Tue, Apr 28, 2020 at 03:06:20PM +0100, Ferruh Yigit wrote:
> > > > > On 4/27/2020 5:59 PM, Jerin Jacob wrote:
> > > > > > On Mon, Apr 27, 2020 at 10:19 PM Ferruh Yigit
> > <ferruh.yigit@intel.com> wrote:
> > > > > > > On 4/27/2020 5:29 PM, Jerin Jacob wrote:
> > > > > > > > On Mon, Apr 27, 2020 at 9:42 PM Ferruh Yigit
> > <ferruh.yigit@intel.com> wrote:
> > > > > > > > > On 4/27/2020 10:19 AM, Dumitrescu, Cristian wrote:
> > > > > > > > > > From: Yigit, Ferruh <ferruh.yigit@intel.com>
> > > > > > > > > > > On 4/24/2020 11:28 AM, Dumitrescu, Cristian wrote:
> > > > > > > > > > > > From: Nithin Dabilpuram <nithind1988@gmail.com>
> > > > > > > > > > > > > This patch also updates tm port/level/node capability
> > structures with
> > > > > > > > > > > > > exiting features of scheduler wfq packet mode,
> > scheduler wfq byte mode
> > > > > > > > > > > > > and private/shared shaper byte mode.
> > > > > > > > > > > > >
> > > > > > > > > > > > > SoftNIC PMD is also updated with new capabilities.
> > [...]
> > > > > > > > > > > Hi Nithin,
> > > > > > > > > > >
> > > > > > > > > > > It looks like patch is causing ABI break, I am getting following
> > warning [1],
> > > > > > > > > > > can you please check?
> > > > > > > > > > >
> > > > > > > > > > > [1]
> > > > > > > > > > > https://pastebin.com/XYNFg14u
> > > > > > > > > >
> > > > > > > > > > Hi Ferruh,
> > > > > > > > > >
> > > > > > > > > > The RTE_TM API is marked as experimental,
> > > > > > > > > > but it looks that this was not correctly marked
> > > > > > > > > > when __rte_experimental ABI checker was introduced.
> > > > > > > > > >
> > > > > > > > > > It is marked as experimental at the top of the rte_tm.h,
> > > > > > > > > > similarly to other APIs introduced around same time,
> > > > > > > > > > but it was not correctly picked up by the ABI check procedure
> > > > > > > > > > when later introduced, so __rte_experimental was not added
> > to every function.
> > > > > > > > > >
> > > > > > > > >
> > > > > > > > > :(
> > > > > > > > >
> > > > > > > > > Is it time to mature them?
> > > > > > > > >
> > > > > > > > > As you said they are not marked as experimental both in header
> > file (function
> > > > > > > > > declarations) and .map file.
> > > > > > > > >
> > > > > > > > > The problem is, they are not marked as experimental in
> > DPDK_20.0 ABI (v19.11),
> > > > > > > > > so marking them as experimental now will break the ABI. Not
> > sure what to do,
> > > > > > > > > cc'ed a few ABI related names for comment.
> > > > > > > > >
> > > > > > > > > For me, we need to proceed as the experimental tag removed
> > and APIs become
> > > > > > > > > mature starting from v19.11, since this is what happened in
> > practice, and remove
> > > > > > > > > a few existing being experimental references in the doxygen
> > comments.
> > > > > > > >
> > > > > > > > I think, accidentally we can not make a library as NON-
> > experimental.
> > > > > > > > TM never went through experimental to mature transition(see git
> > log
> > > > > > > > lib/librte_ethdev/rte_tm.h)
> > > > > > > > It was a bug to not mark as experimental in each function in the
> > ABI process.
> > > > > > > > Some of the features like packet marking are not even
> > implemented by any HW.
> > > > > > > > I think, we can make API stable only all the features are
> > implemented
> > > > > > > > by one or two HW.
> >
> > Yes this is what was decided one or two years ago I think.
> > But rte_tm API was introduced 3 years ago and is implemented by 6 PMDs.
> >
> >
> >
> > > > > > > Fair enough, specially if the API is not ready yet.
> > > > > > >
> > > > > > > But they were part of stable ABI, and marking them as experimental
> > now will
> > > > > > > break the old applications using these APIs.
> > > > > >
> > > > > > it is still marked as EXPERIMENTAL everywhere and API is not ready
> > yet.
> >
> > rte_tm is implemented in 6 PMDs.
> >
> >
> > > > > Existing experimental marks are text only for human parsing.
> > > > >
> > > > > The compiler attribute and build time checks are missing, and the
> > symbol in the
> > > > > binary doesn't have experimental tag. Our scripts and automated
> > checks won't
> > > > > detect it as experimental.
> > > > >
> > > > > My point is just having experimental comment in header file is not
> > enough to
> > > > > qualify the APIs as experimental.
> > > > >
> > > > > > Anyway, we need to break the ABI to make it work on various HW.
> >
> > Yes this is why I was asking in 19.11 to check our API,
> > in order to avoid such situation.
> >
> >
> > > > > > I am not sure what to do?
> >
> > Either manage ABI versioning, or wait 20.11.
> >
> >
> > > > > > IMO, We need to send a patch as Fixes: for the bug of not adding
> > > > > > __rte_experimental in each function.
> >
> > No, this is wrong.
> >
> 
> Why exactly is this wrong? This is the gap that caused the current discussion, right?
> 
It's wrong for this release, since we can't change things from stable back
to experimental. Any such patch will have to wait for 20.11, as agreed in
the discussion.

/Bruce

^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [PATCH v4 1/4] ethdev: add tm support for shaper config in pkt mode
  2020-04-28 15:54  5%                       ` Thomas Monjalon
@ 2020-04-29  8:45  0%                         ` Dumitrescu, Cristian
  2020-04-29  9:03  0%                           ` Bruce Richardson
  2020-05-01 13:18  3%                         ` [dpdk-dev] " Jerin Jacob
  1 sibling, 1 reply; 200+ results
From: Dumitrescu, Cristian @ 2020-04-29  8:45 UTC (permalink / raw)
  To: Thomas Monjalon, Jerin Jacob
  Cc: Richardson, Bruce, Yigit, Ferruh, Luca Boccassi,
	Nithin Dabilpuram, Singh, Jasvinder, Andrew Rybchenko, dev,
	jerinj, kkanas, Nithin Dabilpuram, Kinsella, Ray, Neil Horman,
	Kevin Traynor, David Marchand



> -----Original Message-----
> From: Thomas Monjalon <thomas@monjalon.net>
> Sent: Tuesday, April 28, 2020 4:54 PM
> To: Jerin Jacob <jerinjacobk@gmail.com>; Dumitrescu, Cristian
> <cristian.dumitrescu@intel.com>
> Cc: Richardson, Bruce <bruce.richardson@intel.com>; Yigit, Ferruh
> <ferruh.yigit@intel.com>; Luca Boccassi <bluca@debian.org>; Nithin
> Dabilpuram <nithind1988@gmail.com>; Singh, Jasvinder
> <jasvinder.singh@intel.com>; Andrew Rybchenko
> <arybchenko@solarflare.com>; dev@dpdk.org; jerinj@marvell.com;
> kkanas@marvell.com; Nithin Dabilpuram <ndabilpuram@marvell.com>;
> Kinsella, Ray <ray.kinsella@intel.com>; Neil Horman
> <nhorman@tuxdriver.com>; Kevin Traynor <ktraynor@redhat.com>; David
> Marchand <david.marchand@redhat.com>
> Subject: Re: [dpdk-dev] [PATCH v4 1/4] ethdev: add tm support for shaper
> config in pkt mode
> 
> 28/04/2020 17:04, Luca Boccassi:
> > On Tue, 2020-04-28 at 15:45 +0100, Bruce Richardson wrote:
> > > On Tue, Apr 28, 2020 at 03:06:20PM +0100, Ferruh Yigit wrote:
> > > > On 4/27/2020 5:59 PM, Jerin Jacob wrote:
> > > > > On Mon, Apr 27, 2020 at 10:19 PM Ferruh Yigit
> <ferruh.yigit@intel.com> wrote:
> > > > > > On 4/27/2020 5:29 PM, Jerin Jacob wrote:
> > > > > > > On Mon, Apr 27, 2020 at 9:42 PM Ferruh Yigit
> <ferruh.yigit@intel.com> wrote:
> > > > > > > > On 4/27/2020 10:19 AM, Dumitrescu, Cristian wrote:
> > > > > > > > > From: Yigit, Ferruh <ferruh.yigit@intel.com>
> > > > > > > > > > On 4/24/2020 11:28 AM, Dumitrescu, Cristian wrote:
> > > > > > > > > > > From: Nithin Dabilpuram <nithind1988@gmail.com>
> > > > > > > > > > > > This patch also updates tm port/level/node capability
> structures with
> > > > > > > > > > > > exiting features of scheduler wfq packet mode,
> scheduler wfq byte mode
> > > > > > > > > > > > and private/shared shaper byte mode.
> > > > > > > > > > > >
> > > > > > > > > > > > SoftNIC PMD is also updated with new capabilities.
> [...]
> > > > > > > > > > Hi Nithin,
> > > > > > > > > >
> > > > > > > > > > It looks like patch is causing ABI break, I am getting following
> warning [1],
> > > > > > > > > > can you please check?
> > > > > > > > > >
> > > > > > > > > > [1]
> > > > > > > > > > https://pastebin.com/XYNFg14u
> > > > > > > > >
> > > > > > > > > Hi Ferruh,
> > > > > > > > >
> > > > > > > > > The RTE_TM API is marked as experimental,
> > > > > > > > > but it looks that this was not correctly marked
> > > > > > > > > when __rte_experimental ABI checker was introduced.
> > > > > > > > >
> > > > > > > > > It is marked as experimental at the top of the rte_tm.h,
> > > > > > > > > similarly to other APIs introduced around same time,
> > > > > > > > > but it was not correctly picked up by the ABI check procedure
> > > > > > > > > when later introduced, so __rte_experimental was not added
> to every function.
> > > > > > > > >
> > > > > > > >
> > > > > > > > :(
> > > > > > > >
> > > > > > > > Is it time to mature them?
> > > > > > > >
> > > > > > > > As you said they are not marked as experimental both in header
> file (function
> > > > > > > > declarations) and .map file.
> > > > > > > >
> > > > > > > > The problem is, they are not marked as experimental in
> DPDK_20.0 ABI (v19.11),
> > > > > > > > so marking them as experimental now will break the ABI. Not
> sure what to do,
> > > > > > > > cc'ed a few ABI related names for comment.
> > > > > > > >
> > > > > > > > For me, we need to proceed as the experimental tag removed
> and APIs become
> > > > > > > > mature starting from v19.11, since this is what happened in
> practice, and remove
> > > > > > > > a few existing being experimental references in the doxygen
> comments.
> > > > > > >
> > > > > > > I think, accidentally we can not make a library as NON-
> experimental.
> > > > > > > TM never went through experimental to mature transition(see git
> log
> > > > > > > lib/librte_ethdev/rte_tm.h)
> > > > > > > It was a bug to not mark as experimental in each function in the
> ABI process.
> > > > > > > Some of the features like packet marking are not even
> implemented by any HW.
> > > > > > > I think, we can make API stable only all the features are
> implemented
> > > > > > > by one or two HW.
> 
> Yes this is what was decided one or two years ago I think.
> But rte_tm API was introduced 3 years ago and is implemented by 6 PMDs.
> 
> 
> 
> > > > > > Fair enough, specially if the API is not ready yet.
> > > > > >
> > > > > > But they were part of stable ABI, and marking them as experimental
> now will
> > > > > > break the old applications using these APIs.
> > > > >
> > > > > it is still marked as EXPERIMENTAL everywhere and API is not ready
> yet.
> 
> rte_tm is implemented in 6 PMDs.
> 
> 
> > > > Existing experimental marks are text only for human parsing.
> > > >
> > > > The compiler attribute and build time checks are missing, and the
> symbol in the
> > > > binary doesn't have experimental tag. Our scripts and automated
> checks won't
> > > > detect it as experimental.
> > > >
> > > > My point is just having experimental comment in header file is not
> enough to
> > > > qualify the APIs as experimental.
> > > >
> > > > > Anyway, we need to break the ABI to make it work on various HW.
> 
> Yes this is why I was asking in 19.11 to check our API,
> in order to avoid such situation.
> 
> 
> > > > > I am not sure what to do?
> 
> Either manage ABI versioning, or wait 20.11.
> 
> 
> > > > > IMO, We need to send a patch as Fixes: for the bug of not adding
> > > > > __rte_experimental in each function.
> 
> No, this is wrong.
> 

Why exactly is this wrong? This is the gap that caused the current discussion, right?

> 
> > > > Yes, this is where we are, both you and Cristian suggest API is not ready
> and
> > > > should be experimental, but they were part of stable ABI, making them
> > > > experimental will break the ABI.
> > > > It looks like there is no good option but we should select one of the bad
> ones.
> > > >
> > > > > Traffic Management API - EXPERIMENTAL
> > > > > M: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
> > > > > T: git://dpdk.org/next/dpdk-next-qos
> > > > > F: lib/librte_ethdev/rte_tm*
> > > > > > > > Ray, Neil, David, Luca, Kevin, what do you think?
> > > While I'm not called any of those names, allow me to give my 2c.
> > >
> > > Since these are marked in binaries as part of the stable ABI, I think we
> > > need to honour that for the next two releases 20.05 and 20.08 [which
> means
> > > that we need to put in versioned functions for any changes, not that we
> > > can't change anything]
> > >
> > > For 20.11, I think these should then have one of two options taken:
> > > * have these "fixed" and ready to be marked as stable, and officially part
> > >   of v21 ABI or
> > > * mark them as experimental properly, and look to have them as part of
> the
> > >   v22 or subsequent ABI
> > >
> > > Given the comments here, I would tend towards the latter of the above
> two
> > > options, but that's really a decision for the maintainers.
> > >
> > > Remember, this is not the first bug we have encountered where we
> messed up
> > > some ABI versions in the 19.11 release, and, like the previous one with
> the
> > > screwed up version number, I think we need to honour the ABI
> committments
> > > made, especially since in this case it's only for a few more months till
> > > 20.11 development starts.
> > >
> > > /Bruce
> >
> > +1
> >
> > If they are not ready now, they haven't been ready for the past 6
> > months either, so staying not ready for 6 more is the lesser evil.
> 
> This API is almost 3 years old (release 17.08).
> That's good to improve it but we must respect the ABI contract that
> we all agreed.
> 
> 
> Summary:
> 17.08: rte_tm is introduced.
> 17.11: rte_mtr is introduced as experimental, but rte_tm remains stable.
> 18.02: __rte_experimental tag is introduced (including for rte_mtr),
> but rte_tm remains untouched as it is in stable ABI.
> 19.11: stable ABI is frozen until 20.11
> 20.05: rte_tm improvement is blocked because of ABI breakage.
> 
> 
> It should remind everybody of reviewing the new API and policies,
> and maintaining the existing code appropriately.
> 


^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [PATCH v7 0/6] dpdk: introduce __rte_internal tag
  2020-04-29  8:22  3%       ` David Marchand
@ 2020-04-29  8:24  0%         ` Wang, Haiyue
  0 siblings, 0 replies; 200+ results
From: Wang, Haiyue @ 2020-04-29  8:24 UTC (permalink / raw)
  To: David Marchand
  Cc: dev, Thomas Monjalon, Richardson, Bruce, Yigit, Ferruh,
	Neil Horman, Ray Kinsella

> -----Original Message-----
> From: David Marchand <david.marchand@redhat.com>
> Sent: Wednesday, April 29, 2020 16:22
> To: Wang, Haiyue <haiyue.wang@intel.com>
> Cc: dev <dev@dpdk.org>; Thomas Monjalon <thomas@monjalon.net>; Richardson, Bruce
> <bruce.richardson@intel.com>; Yigit, Ferruh <ferruh.yigit@intel.com>; Neil Horman
> <nhorman@tuxdriver.com>; Ray Kinsella <mdr@ashroe.eu>
> Subject: Re: [PATCH v7 0/6] dpdk: introduce __rte_internal tag
> 
> On Sat, Apr 25, 2020 at 8:10 PM Wang, Haiyue <haiyue.wang@intel.com> wrote:
> >
> > Hi David,
> >
> > > -----Original Message-----
> > > From: David Marchand <david.marchand@redhat.com>
> > > Sent: Saturday, April 25, 2020 22:39
> > > To: Wang, Haiyue <haiyue.wang@intel.com>
> > > Cc: dev <dev@dpdk.org>; Thomas Monjalon <thomas@monjalon.net>; Richardson, Bruce
> > > <bruce.richardson@intel.com>; Yigit, Ferruh <ferruh.yigit@intel.com>; Neil Horman
> > > <nhorman@tuxdriver.com>; Ray Kinsella <mdr@ashroe.eu>
> > > Subject: Re: [PATCH v7 0/6] dpdk: introduce __rte_internal tag
> > >
> > > On Sat, Apr 25, 2020 at 1:02 PM Haiyue Wang <haiyue.wang@intel.com> wrote:
> > > >
> > > > Move the internal function into INTERNAL session to avoid the ABI
> > > > checking, and it is only used for DPDK drivers or related library.
> > > >
> > > > __rte_internal funA
> > > >
> > > > INTERNAL {
> > > >         global:
> > > >
> > > >         funA
> > > > };
> > >
> > > Thanks a lot for working on this.
> > > I did some modifications (see my replies on patch 3 and 5) and applied
> > > this series.
> > >
> > > We are just missing the update on the scripts mentioned in a previous mail.
> > > Can you work on this for rc2?
> > >
> >
> > Do you mean ?
> 
> Sorry, I was referring to another mail:
> """
> > We are missing updates on devtools/check-abi-version.sh and
> > devtools/update_version_map_abi.py.
> """
> 
> Those scripts devtools/check-abi-version.sh and
> devtools/update_version_map_abi.py are not "internal" aware.
> Can you take care of them?
> 

Got it, I will try.

> 
> > > > >   This will apply to common drivers that will be 100% internal.
> > > > >   Not sure if this is an issue.
> > > >
> > > > This part should be fine, I want others to be aware of this.
> >
> > > I am not one of the ABI maintainers, but in my opinion it is OK
> > > to have "pure internal" libs with version 0.x.
> >
> > I've tested it with Intel's drivers/common/iavf, it works as expected.
> > a). librte_common_iavf.so.0.200.2
> > b). Skipped experimental library librte_common_iavf.dump.
> >
> > This has been updated by your modification.
> > +                       if is_stable
> >                                 lib_version = abi_version
> >                                 so_version = stable_so_version
> > +                       else
> > +                               lib_version = experimental_abi_version
> > +                               so_version = experimental_so_version
> >                         endif
> 
> Thanks for testing.
> 
> 
> --
> David Marchand


^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [PATCH v7 0/6] dpdk: introduce __rte_internal tag
  @ 2020-04-29  8:22  3%       ` David Marchand
  2020-04-29  8:24  0%         ` Wang, Haiyue
  0 siblings, 1 reply; 200+ results
From: David Marchand @ 2020-04-29  8:22 UTC (permalink / raw)
  To: Wang, Haiyue
  Cc: dev, Thomas Monjalon, Richardson, Bruce, Yigit, Ferruh,
	Neil Horman, Ray Kinsella

On Sat, Apr 25, 2020 at 8:10 PM Wang, Haiyue <haiyue.wang@intel.com> wrote:
>
> Hi David,
>
> > -----Original Message-----
> > From: David Marchand <david.marchand@redhat.com>
> > Sent: Saturday, April 25, 2020 22:39
> > To: Wang, Haiyue <haiyue.wang@intel.com>
> > Cc: dev <dev@dpdk.org>; Thomas Monjalon <thomas@monjalon.net>; Richardson, Bruce
> > <bruce.richardson@intel.com>; Yigit, Ferruh <ferruh.yigit@intel.com>; Neil Horman
> > <nhorman@tuxdriver.com>; Ray Kinsella <mdr@ashroe.eu>
> > Subject: Re: [PATCH v7 0/6] dpdk: introduce __rte_internal tag
> >
> > On Sat, Apr 25, 2020 at 1:02 PM Haiyue Wang <haiyue.wang@intel.com> wrote:
> > >
> > > Move the internal function into INTERNAL session to avoid the ABI
> > > checking, and it is only used for DPDK drivers or related library.
> > >
> > > __rte_internal funA
> > >
> > > INTERNAL {
> > >         global:
> > >
> > >         funA
> > > };
> >
> > Thanks a lot for working on this.
> > I did some modifications (see my replies on patch 3 and 5) and applied
> > this series.
> >
> > We are just missing the update on the scripts mentioned in a previous mail.
> > Can you work on this for rc2?
> >
>
> Do you mean ?

Sorry, I was referring to another mail:
"""
> We are missing updates on devtools/check-abi-version.sh and
> devtools/update_version_map_abi.py.
"""

Those scripts devtools/check-abi-version.sh and
devtools/update_version_map_abi.py are not "internal" aware.
Can you take care of them?


> > > >   This will apply to common drivers that will be 100% internal.
> > > >   Not sure if this is an issue.
> > >
> > > This part should be fine, I want others to be aware of this.
>
> > I am not one of the ABI maintainers, but in my opinion it is OK
> > to have "pure internal" libs with version 0.x.
>
> I've tested it with Intel's drivers/common/iavf, it works as expected.
> a). librte_common_iavf.so.0.200.2
> b). Skipped experimental library librte_common_iavf.dump.
>
> This has been updated by your modification.
> +                       if is_stable
>                                 lib_version = abi_version
>                                 so_version = stable_so_version
> +                       else
> +                               lib_version = experimental_abi_version
> +                               so_version = experimental_so_version
>                         endif

Thanks for testing.


-- 
David Marchand


^ permalink raw reply	[relevance 3%]

* Re: [dpdk-dev] [PATCH v3 2/4] hash: check flags on creation
  2020-04-27 23:16  3%   ` [dpdk-dev] [PATCH v3 2/4] hash: check flags on creation Stephen Hemminger
@ 2020-04-29  1:08  0%     ` Wang, Yipeng1
  0 siblings, 0 replies; 200+ results
From: Wang, Yipeng1 @ 2020-04-29  1:08 UTC (permalink / raw)
  To: Stephen Hemminger, dev; +Cc: Gobriel, Sameh, Richardson, Bruce

> -----Original Message-----
> From: Stephen Hemminger <stephen@networkplumber.org>
> Sent: Monday, April 27, 2020 4:16 PM
> To: dev@dpdk.org
> Cc: Stephen Hemminger <stephen@networkplumber.org>; Wang, Yipeng1
> <yipeng1.wang@intel.com>; Gobriel, Sameh <sameh.gobriel@intel.com>;
> Richardson, Bruce <bruce.richardson@intel.com>
> Subject: [PATCH v3 2/4] hash: check flags on creation
> 
> All API's should check that they support the flag values passed. If an application
> passes an invalid flag it could cause problems in later ABI.
> 
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> ---
Acked-by: Yipeng Wang <yipeng1.wang@intel.com>

^ permalink raw reply	[relevance 0%]

* [dpdk-dev] [PATCH v3 0/8] eal: cleanup resources on shutdown
    2020-04-28 23:14  3% ` [dpdk-dev] [PATCH v2 0/9] eal: " Stephen Hemminger
@ 2020-04-28 23:58  3% ` Stephen Hemminger
  2020-05-03 17:21  0%   ` David Marchand
  1 sibling, 1 reply; 200+ results
From: Stephen Hemminger @ 2020-04-28 23:58 UTC (permalink / raw)
  To: dev; +Cc: Stephen Hemminger

Started using valgrind with DPDK, and there are lots of leftover
memory and file descriptors. This makes it hard to find application
leaks versus DPDK leaks.

The DPDK has a function that applications can use to tell it
to cleanup resources on shutdown (rte_eal_cleanup). But the
current coverage of that API is spotty. Many internal parts of
DPDK leave files and allocated memory behind.

This patch set is a first step at getting the sub-parts of
DPDK to cleanup after themselves. These are the easier ones,
the harder and more critical ones are in the drivers
and the memory subsystem.

There are no new exposed API or ABI changes here.

v3
 - fix a couple of minor checkpatch complaints

v2
 - rebase after 20.05 file renames
 - incorporate review comment feedback
 - hold off some of the more involved patches for later

Stephen Hemminger (8):
  eal: log: close on cleanup
  eal: log: free dynamic state on cleanup
  eal: alarm: close file on cleanup
  eal: cleanup threads
  eal: mp: end the multiprocess thread during cleanup
  eal: vfio: cleanup the mp sync handle
  eal: hotplug: cleanup multiprocess resources
  eal: malloc: cleanup mp resources

 lib/librte_eal/common/eal_common_log.c  | 33 ++++++++++++++++++++++++-
 lib/librte_eal/common/eal_common_proc.c | 17 +++++++++----
 lib/librte_eal/common/eal_private.h     | 20 +++++++++++++++
 lib/librte_eal/common/hotplug_mp.c      |  5 ++++
 lib/librte_eal/common/hotplug_mp.h      |  6 +++++
 lib/librte_eal/common/malloc_heap.c     |  6 +++++
 lib/librte_eal/common/malloc_heap.h     |  3 +++
 lib/librte_eal/common/malloc_mp.c       | 12 +++++++++
 lib/librte_eal/common/malloc_mp.h       |  3 +++
 lib/librte_eal/freebsd/eal.c            |  1 +
 lib/librte_eal/freebsd/eal_alarm.c      | 10 ++++++++
 lib/librte_eal/linux/eal.c              | 20 +++++++++++++++
 lib/librte_eal/linux/eal_alarm.c        | 11 +++++++++
 lib/librte_eal/linux/eal_log.c          | 14 +++++++++++
 lib/librte_eal/linux/eal_vfio.h         |  1 +
 lib/librte_eal/linux/eal_vfio_mp_sync.c |  8 ++++++
 16 files changed, 164 insertions(+), 6 deletions(-)

-- 
2.20.1


^ permalink raw reply	[relevance 3%]

* [dpdk-dev] [PATCH v4 1/8] eal: replace rte_page_sizes with a set of constants
  @ 2020-04-28 23:50  4%   ` Dmitry Kozlyuk
  0 siblings, 0 replies; 200+ results
From: Dmitry Kozlyuk @ 2020-04-28 23:50 UTC (permalink / raw)
  To: dev
  Cc: Dmitry Malloy (MESHCHANINOV),
	Narcisa Ana Maria Vasile, Fady Bader, Tal Shnaiderman,
	Dmitry Kozlyuk, Jerin Jacob, John McNamara, Marko Kovacevic,
	Anatoly Burakov

Clang on Windows follows MS ABI where enum values are limited to 2^31-1.
Enum rte_page_sizes has members valued above this limit, which get
wrapped to zero, resulting in compilation error (duplicate values in
enum). Using MS ABI is mandatory for Windows EAL to call Win32 APIs.

Remove rte_page_sizes and replace its values with #define's.
This enumeration is not used in public API, so there's no ABI breakage.
Document API change in release notes.

Suggested-by: Jerin Jacob <jerinjacobk@gmail.com>
Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
 doc/guides/rel_notes/release_20_05.rst |  2 ++
 lib/librte_eal/include/rte_memory.h    | 23 ++++++++++-------------
 2 files changed, 12 insertions(+), 13 deletions(-)

diff --git a/doc/guides/rel_notes/release_20_05.rst b/doc/guides/rel_notes/release_20_05.rst
index b124c3f28..76ba59220 100644
--- a/doc/guides/rel_notes/release_20_05.rst
+++ b/doc/guides/rel_notes/release_20_05.rst
@@ -225,6 +225,8 @@ Removed Items
    Also, make sure to start the actual text at the margin.
    =========================================================
 
+* ``enum rte_page_sizes`` is removed, ``RTE_PGSIZE_*`` constants are kept.
+
 
 API Changes
 -----------
diff --git a/lib/librte_eal/include/rte_memory.h b/lib/librte_eal/include/rte_memory.h
index 3d8d0bd69..65374d53a 100644
--- a/lib/librte_eal/include/rte_memory.h
+++ b/lib/librte_eal/include/rte_memory.h
@@ -24,19 +24,16 @@ extern "C" {
 #include <rte_config.h>
 #include <rte_fbarray.h>
 
-__extension__
-enum rte_page_sizes {
-	RTE_PGSIZE_4K    = 1ULL << 12,
-	RTE_PGSIZE_64K   = 1ULL << 16,
-	RTE_PGSIZE_256K  = 1ULL << 18,
-	RTE_PGSIZE_2M    = 1ULL << 21,
-	RTE_PGSIZE_16M   = 1ULL << 24,
-	RTE_PGSIZE_256M  = 1ULL << 28,
-	RTE_PGSIZE_512M  = 1ULL << 29,
-	RTE_PGSIZE_1G    = 1ULL << 30,
-	RTE_PGSIZE_4G    = 1ULL << 32,
-	RTE_PGSIZE_16G   = 1ULL << 34,
-};
+#define RTE_PGSIZE_4K   (1ULL << 12)
+#define RTE_PGSIZE_64K  (1ULL << 16)
+#define RTE_PGSIZE_256K (1ULL << 18)
+#define RTE_PGSIZE_2M   (1ULL << 21)
+#define RTE_PGSIZE_16M  (1ULL << 24)
+#define RTE_PGSIZE_256M (1ULL << 28)
+#define RTE_PGSIZE_512M (1ULL << 29)
+#define RTE_PGSIZE_1G   (1ULL << 30)
+#define RTE_PGSIZE_4G   (1ULL << 32)
+#define RTE_PGSIZE_16G  (1ULL << 34)
 
 #define SOCKET_ID_ANY -1                    /**< Any NUMA socket. */
 
-- 
2.25.1


^ permalink raw reply	[relevance 4%]

* [dpdk-dev] [PATCH v2 0/9] eal: cleanup resources on shutdown
  @ 2020-04-28 23:14  3% ` Stephen Hemminger
  2020-04-28 23:58  3% ` [dpdk-dev] [PATCH v3 0/8] " Stephen Hemminger
  1 sibling, 0 replies; 200+ results
From: Stephen Hemminger @ 2020-04-28 23:14 UTC (permalink / raw)
  To: dev; +Cc: Stephen Hemminger

Started using valgrind with DPDK, and there are lots of leftover
memory and file descriptors. This makes it hard to find application
leaks versus DPDK leaks.

The DPDK has a function that applications can use to tell it
to cleanup resources on shutdown (rte_eal_cleanup). But the
current coverage of that API is spotty. Many internal parts of
DPDK leave files and allocated memory behind.

This patch set is a first step at getting the sub-parts of
DPDK to cleanup after themselves. These are the easier ones,
the harder and more critical ones are in the drivers
and the memory subsystem.

There are no new exposed API or ABI changes here.

v2
 - rebase after 20.05 file renames
 - incorporate review comment feedback
 - hold off some of the more involved patches for later

Stephen Hemminger (8):
  eal: log: close on cleanup
  eal: log: free dynamic state on cleanup
  eal: alarm: close file on cleanup
  eal: cleanup threads
  eal: mp: end the multiprocess thread during cleanup
  eal: vfio: cleanup the mp sync handle
  eal: hotplug: cleanup multiprocess resources
  eal: malloc: cleanup mp resources

 lib/librte_eal/common/eal_common_log.c  | 33 ++++++++++++++++++++++++-
 lib/librte_eal/common/eal_common_proc.c | 17 +++++++++----
 lib/librte_eal/common/eal_private.h     | 20 +++++++++++++++
 lib/librte_eal/common/hotplug_mp.c      |  5 ++++
 lib/librte_eal/common/hotplug_mp.h      |  6 +++++
 lib/librte_eal/common/malloc_heap.c     |  6 +++++
 lib/librte_eal/common/malloc_heap.h     |  3 +++
 lib/librte_eal/common/malloc_mp.c       | 12 +++++++++
 lib/librte_eal/common/malloc_mp.h       |  3 +++
 lib/librte_eal/freebsd/eal.c            |  1 +
 lib/librte_eal/freebsd/eal_alarm.c      | 10 ++++++++
 lib/librte_eal/linux/eal.c              | 20 +++++++++++++++
 lib/librte_eal/linux/eal_alarm.c        | 11 +++++++++
 lib/librte_eal/linux/eal_log.c          | 14 +++++++++++
 lib/librte_eal/linux/eal_vfio.h         |  1 +
 lib/librte_eal/linux/eal_vfio_mp_sync.c |  8 ++++++
 16 files changed, 164 insertions(+), 6 deletions(-)

-- 
2.20.1


^ permalink raw reply	[relevance 3%]

* Re: [dpdk-dev] [PATCH v5] eal/cpuflags: add x86 based cpu flags
  2020-04-28 18:11  4%       ` Laatz, Kevin
@ 2020-04-28 19:55  0%         ` Thomas Monjalon
  0 siblings, 0 replies; 200+ results
From: Thomas Monjalon @ 2020-04-28 19:55 UTC (permalink / raw)
  To: Ray Kinsella, Laatz, Kevin
  Cc: dev, Richardson, Bruce, Van Haaren, Harry, Kinsella, Ray,
	nhorman, david.marchand

28/04/2020 20:11, Laatz, Kevin:
> > > --- a/devtools/libabigail.abignore
> > > +++ b/devtools/libabigail.abignore
> > 
> > Kevin - you still have the surpession.
> > I am testing locally with 1.7.1, and it doesn't complain when I disable the
> > supression.
> > Are you seeing something different?
> > 
> 
> Ray,
> I have re-tested and with libabigail 1.6 and it reports the addition of the flags as an ABI break without the abignore suppression.
> With the suppression, it will still report changes to existing flags (e.g. inserting a new flag somewhere in the middle) in the enum as an ABI break, as expected.
> 
> The Travis CI is also based on Ubuntu 18.04 LTS, which uses libabigail 1.2-1. Without the suppression the community Travis CI builds fail on this false positive.

I think Travis uses libabigail 1.6:
http://git.dpdk.org/dpdk/tree/.ci/linux-build.sh#n61




^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [PATCH v5] eal/cpuflags: add x86 based cpu flags
  @ 2020-04-28 18:11  4%       ` Laatz, Kevin
  2020-04-28 19:55  0%         ` Thomas Monjalon
  2020-04-29 11:39  3%       ` David Marchand
  1 sibling, 1 reply; 200+ results
From: Laatz, Kevin @ 2020-04-28 18:11 UTC (permalink / raw)
  To: Ray Kinsella, dev
  Cc: Richardson, Bruce, Van Haaren, Harry, thomas, Kinsella, Ray,
	nhorman, david.marchand

<snip>

> > ---
> >  devtools/libabigail.abignore              |  5 +++++
> >  lib/librte_eal/x86/include/rte_cpuflags.h | 19 +++++++++++++++++++
> >  lib/librte_eal/x86/rte_cpuflags.c         | 18 ++++++++++++++++++
> >  3 files changed, 42 insertions(+)
> >
> > diff --git a/devtools/libabigail.abignore
> > b/devtools/libabigail.abignore index a59df8f13..045f436fb 100644
> > --- a/devtools/libabigail.abignore
> > +++ b/devtools/libabigail.abignore
> 
> Kevin - you still have the surpession.
> I am testing locally with 1.7.1, and it doesn't complain when I disable the
> supression.
> Are you seeing something different?
> 

Ray,
I have re-tested and with libabigail 1.6 and it reports the addition of the flags as an ABI break without the abignore suppression.
With the suppression, it will still report changes to existing flags (e.g. inserting a new flag somewhere in the middle) in the enum as an ABI break, as expected.

The Travis CI is also based on Ubuntu 18.04 LTS, which uses libabigail 1.2-1. Without the suppression the community Travis CI builds fail on this false positive.

-Kevin 
 


^ permalink raw reply	[relevance 4%]

* Re: [dpdk-dev] [PATCH v4 1/4] ethdev: add tm support for shaper config in pkt mode
  2020-04-28 15:30  4%             ` Thomas Monjalon
@ 2020-04-28 17:35  0%               ` Dumitrescu, Cristian
  0 siblings, 0 replies; 200+ results
From: Dumitrescu, Cristian @ 2020-04-28 17:35 UTC (permalink / raw)
  To: Thomas Monjalon
  Cc: Yigit, Ferruh, Nithin Dabilpuram, Singh, Jasvinder,
	Andrew Rybchenko, dev, jerinj, kkanas, Nithin Dabilpuram,
	Kinsella, Ray, Neil Horman, Luca Boccassi, Kevin Traynor,
	David Marchand, Richardson, Bruce



> -----Original Message-----
> From: Thomas Monjalon <thomas@monjalon.net>
> Sent: Tuesday, April 28, 2020 4:30 PM
> To: Dumitrescu, Cristian <cristian.dumitrescu@intel.com>
> Cc: Yigit, Ferruh <ferruh.yigit@intel.com>; Nithin Dabilpuram
> <nithind1988@gmail.com>; Singh, Jasvinder <jasvinder.singh@intel.com>;
> Andrew Rybchenko <arybchenko@solarflare.com>; dev@dpdk.org;
> jerinj@marvell.com; kkanas@marvell.com; Nithin Dabilpuram
> <ndabilpuram@marvell.com>; Kinsella, Ray <ray.kinsella@intel.com>; Neil
> Horman <nhorman@tuxdriver.com>; Luca Boccassi <bluca@debian.org>;
> Kevin Traynor <ktraynor@redhat.com>; David Marchand
> <david.marchand@redhat.com>; Richardson, Bruce
> <bruce.richardson@intel.com>
> Subject: Re: [PATCH v4 1/4] ethdev: add tm support for shaper config in pkt
> mode
> 
> 27/04/2020 18:28, Dumitrescu, Cristian:
> > From: Yigit, Ferruh <ferruh.yigit@intel.com>
> > > On 4/27/2020 10:19 AM, Dumitrescu, Cristian wrote:
> > > > From: Yigit, Ferruh <ferruh.yigit@intel.com>
> > > >> Hi Nithin,
> > > >>
> > > >> It looks like patch is causing ABI break, I am getting following warning
> [1],
> > > >> can you please check?
> > > >>
> > > >> [1]
> > > >> https://pastebin.com/XYNFg14u
> > > >
> > > >
> > > > Hi Ferruh,
> > > >
> > > > The RTE_TM API is marked as experimental, but it looks that this was
> not
> > > correctly marked when __rte_experimental ABI checker was introduced.
> > > >
> > > > It is marked as experimental at the top of the rte_tm.h, similarly to
> other
> > > APIs introduced around same time, but it was not correctly picked up by
> the
> > > ABI check procedure when later introduced, so __rte_experimental was
> not
> > > added to every function.
> > > >
> > >
> > > :(
> > >
> > > Is it time to mature them?
> > >
> > > As you said they are not marked as experimental both in header file
> > > (function
> > > declarations) and .map file.
> > >
> > > The problem is, they are not marked as experimental in DPDK_20.0 ABI
> > > (v19.11),
> > > so marking them as experimental now will break the ABI. Not sure what
> to
> > > do,
> > > cc'ed a few ABI related names for comment.
> > >
> > > For me, we need to proceed as the experimental tag removed and APIs
> > > become
> > > mature starting from v19.11, since this is what happened in practice, and
> > > remove
> > > a few existing being experimental references in the doxygen comments.
> > >
> > > Ray, Neil, David, Luca, Kevin, what do you think?
> >
> > Hi Ferruh,
> >
> > IMO your proposed approach is fixing the wrong problem and is
> > probably not the right way of doing things.
> >
> > This API is correctly marked as experimental in the header
> > file rte_tm.h and in the MAINTAINERS file,
> 
> in rte_tm.h:
> 	* @warning
> 	* @b EXPERIMENTAL: this API may change without prior notice
> 
> in MAINTAINERS:
> 	Traffic Management API - EXPERIMENTAL
> 	M: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
> 	T: git://dpdk.org/next/dpdk-next-qos
> 	F: lib/librte_ethdev/rte_tm*
> 
> 
> > therefore it should remain experimental,
> 
> in rte_ethdev_version.map:
> 	before 19.11: DPDK_17.08 {
> 	since 19.11: DPDK_20.0 {
> 
> When adding rte_tm in 17.08:
> http://git.dpdk.org/dpdk/diff/lib/librte_ether/rte_ether_version.map?id=5
> d109deffa
> 
> In 17.08, early July 2017, the first EXPERIMENTAL section was declared in EAL:
> http://git.dpdk.org/dpdk/diff/lib/librte_eal/linuxapp/eal/rte_eal_version.m
> ap?id=a3ee360f444
> 
> When adding rte_mtr in 17.11, all functions are made experimental:
> http://git.dpdk.org/dpdk/diff/lib/librte_ether/rte_ethdev_version.map?id=
> 6613ffe1
> 
> In 18.02, the tag __rte_experimental was introduced:
> 	http://git.dpdk.org/dpdk/commit/?id=7d540a3e735
> and functions are marked (including rte_mtr but not rte_tm):
> 	http://git.dpdk.org/dpdk/commit/?id=77b7b81e32e
> 
> 

Thanks, Thomas, for taking the time to put all the historic events in their proper sequence.

> > as more changes are expected from the people like Nithin and others
> > currently upstreaming drivers for it.
> 
> They are doing changes in the API introduced 3 years ago.
> 
> 
> > For some reason, the __rte_experimental tags were not added to
> > this file when the ABI checker was introduced,
> > and this is the real problem that should be fixed.
> 
> The mistake was done 2 years ago.
> As maintainer of rte_tm code, you are expected to notice the issue.

Apologies for not noticing this gap at the time. As Thomas shows above, the __rte_experimental tags were introduced several DPDK releases after the rte_tm API.

> As maintainer of rte_mtr code, you were expected to review the change
> on the mtr functions being marked as experimental.

I did.

> I am sorry that it took 2 years to discover the gap.
> 
> We can fix the ABI in the ABI-breakage window: in 20.11.
> 



^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [PATCH v4 1/4] ethdev: add tm support for shaper config in pkt mode
  2020-04-28 15:04  0%                     ` Luca Boccassi
@ 2020-04-28 15:54  5%                       ` Thomas Monjalon
  2020-04-29  8:45  0%                         ` Dumitrescu, Cristian
  2020-05-01 13:18  3%                         ` [dpdk-dev] " Jerin Jacob
  0 siblings, 2 replies; 200+ results
From: Thomas Monjalon @ 2020-04-28 15:54 UTC (permalink / raw)
  To: Jerin Jacob, Dumitrescu, Cristian
  Cc: Bruce Richardson, Ferruh Yigit, Luca Boccassi, Nithin Dabilpuram,
	Singh, Jasvinder, Andrew Rybchenko, dev, jerinj, kkanas,
	Nithin Dabilpuram, Kinsella, Ray, Neil Horman, Kevin Traynor,
	David Marchand

28/04/2020 17:04, Luca Boccassi:
> On Tue, 2020-04-28 at 15:45 +0100, Bruce Richardson wrote:
> > On Tue, Apr 28, 2020 at 03:06:20PM +0100, Ferruh Yigit wrote:
> > > On 4/27/2020 5:59 PM, Jerin Jacob wrote:
> > > > On Mon, Apr 27, 2020 at 10:19 PM Ferruh Yigit <ferruh.yigit@intel.com> wrote:
> > > > > On 4/27/2020 5:29 PM, Jerin Jacob wrote:
> > > > > > On Mon, Apr 27, 2020 at 9:42 PM Ferruh Yigit <ferruh.yigit@intel.com> wrote:
> > > > > > > On 4/27/2020 10:19 AM, Dumitrescu, Cristian wrote:
> > > > > > > > From: Yigit, Ferruh <ferruh.yigit@intel.com>
> > > > > > > > > On 4/24/2020 11:28 AM, Dumitrescu, Cristian wrote:
> > > > > > > > > > From: Nithin Dabilpuram <nithind1988@gmail.com>
> > > > > > > > > > > This patch also updates tm port/level/node capability structures with
> > > > > > > > > > > exiting features of scheduler wfq packet mode, scheduler wfq byte mode
> > > > > > > > > > > and private/shared shaper byte mode.
> > > > > > > > > > > 
> > > > > > > > > > > SoftNIC PMD is also updated with new capabilities.
[...]
> > > > > > > > > Hi Nithin,
> > > > > > > > > 
> > > > > > > > > It looks like patch is causing ABI break, I am getting following warning [1],
> > > > > > > > > can you please check?
> > > > > > > > > 
> > > > > > > > > [1]
> > > > > > > > > https://pastebin.com/XYNFg14u
> > > > > > > > 
> > > > > > > > Hi Ferruh,
> > > > > > > > 
> > > > > > > > The RTE_TM API is marked as experimental,
> > > > > > > > but it looks that this was not correctly marked
> > > > > > > > when __rte_experimental ABI checker was introduced.
> > > > > > > > 
> > > > > > > > It is marked as experimental at the top of the rte_tm.h,
> > > > > > > > similarly to other APIs introduced around same time,
> > > > > > > > but it was not correctly picked up by the ABI check procedure
> > > > > > > > when later introduced, so __rte_experimental was not added to every function.
> > > > > > > > 
> > > > > > > 
> > > > > > > :(
> > > > > > > 
> > > > > > > Is it time to mature them?
> > > > > > > 
> > > > > > > As you said they are not marked as experimental both in header file (function
> > > > > > > declarations) and .map file.
> > > > > > > 
> > > > > > > The problem is, they are not marked as experimental in DPDK_20.0 ABI (v19.11),
> > > > > > > so marking them as experimental now will break the ABI. Not sure what to do,
> > > > > > > cc'ed a few ABI related names for comment.
> > > > > > > 
> > > > > > > For me, we need to proceed as the experimental tag removed and APIs become
> > > > > > > mature starting from v19.11, since this is what happened in practice, and remove
> > > > > > > a few existing being experimental references in the doxygen comments.
> > > > > > 
> > > > > > I think, accidentally we can not make a library as NON-experimental.
> > > > > > TM never went through experimental to mature transition(see git log
> > > > > > lib/librte_ethdev/rte_tm.h)
> > > > > > It was a bug to not mark as experimental in each function in the ABI process.
> > > > > > Some of the features like packet marking are not even implemented by any HW.
> > > > > > I think, we can make API stable only all the features are implemented
> > > > > > by one or two HW.

Yes this is what was decided one or two years ago I think.
But rte_tm API was introduced 3 years ago and is implemented by 6 PMDs.



> > > > > Fair enough, specially if the API is not ready yet.
> > > > > 
> > > > > But they were part of stable ABI, and marking them as experimental now will
> > > > > break the old applications using these APIs.
> > > > 
> > > > it is still marked as EXPERIMENTAL everywhere and API is not ready yet.

rte_tm is implemented in 6 PMDs.


> > > Existing experimental marks are text only for human parsing.
> > > 
> > > The compiler attribute and build time checks are missing, and the symbol in the
> > > binary doesn't have experimental tag. Our scripts and automated checks won't
> > > detect it as experimental.
> > > 
> > > My point is just having experimental comment in header file is not enough to
> > > qualify the APIs as experimental.
> > > 
> > > > Anyway, we need to break the ABI to make it work on various HW.

Yes this is why I was asking in 19.11 to check our API,
in order to avoid such situation.


> > > > I am not sure what to do?

Either manage ABI versioning, or wait 20.11.


> > > > IMO, We need to send a patch as Fixes: for the bug of not adding
> > > > __rte_experimental in each function.

No, this is wrong.


> > > Yes, this is where we are, both you and Cristian suggest API is not ready and
> > > should be experimental, but they were part of stable ABI, making them
> > > experimental will break the ABI.
> > > It looks like there is no good option but we should select one of the bad ones.
> > > 
> > > > Traffic Management API - EXPERIMENTAL
> > > > M: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
> > > > T: git://dpdk.org/next/dpdk-next-qos
> > > > F: lib/librte_ethdev/rte_tm*
> > > > > > > Ray, Neil, David, Luca, Kevin, what do you think?
> > While I'm not called any of those names, allow me to give my 2c.
> > 
> > Since these are marked in binaries as part of the stable ABI, I think we
> > need to honour that for the next two releases 20.05 and 20.08 [which means
> > that we need to put in versioned functions for any changes, not that we
> > can't change anything]
> > 
> > For 20.11, I think these should then have one of two options taken:
> > * have these "fixed" and ready to be marked as stable, and officially part
> >   of v21 ABI or
> > * mark them as experimental properly, and look to have them as part of the
> >   v22 or subsequent ABI
> > 
> > Given the comments here, I would tend towards the latter of the above two
> > options, but that's really a decision for the maintainers.
> > 
> > Remember, this is not the first bug we have encountered where we messed up
> > some ABI versions in the 19.11 release, and, like the previous one with the
> > screwed up version number, I think we need to honour the ABI committments
> > made, especially since in this case it's only for a few more months till
> > 20.11 development starts.
> > 
> > /Bruce
> 
> +1
> 
> If they are not ready now, they haven't been ready for the past 6
> months either, so staying not ready for 6 more is the lesser evil.

This API is almost 3 years old (release 17.08).
That's good to improve it but we must respect the ABI contract that
we all agreed.


Summary:
17.08: rte_tm is introduced.
17.11: rte_mtr is introduced as experimental, but rte_tm remains stable.
18.02: __rte_experimental tag is introduced (including for rte_mtr),
but rte_tm remains untouched as it is in stable ABI.
19.11: stable ABI is frozen until 20.11
20.05: rte_tm improvement is blocked because of ABI breakage.


It should remind everybody of reviewing the new API and policies,
and maintaining the existing code appropriately.



^ permalink raw reply	[relevance 5%]

* Re: [dpdk-dev] [PATCH v4 1/4] ethdev: add tm support for shaper config in pkt mode
  2020-04-28 14:45  5%                   ` Bruce Richardson
  2020-04-28 15:04  0%                     ` Luca Boccassi
@ 2020-04-28 15:42  3%                     ` Ray Kinsella
  1 sibling, 0 replies; 200+ results
From: Ray Kinsella @ 2020-04-28 15:42 UTC (permalink / raw)
  To: Bruce Richardson, Ferruh Yigit
  Cc: Jerin Jacob, Dumitrescu, Cristian, Nithin Dabilpuram, Singh,
	Jasvinder, Thomas Monjalon, Andrew Rybchenko, dev, jerinj,
	kkanas, Nithin Dabilpuram, Kinsella, Ray, Neil Horman,
	Luca Boccassi, Kevin Traynor, David Marchand



On 28/04/2020 15:45, Bruce Richardson wrote:
> On Tue, Apr 28, 2020 at 03:06:20PM +0100, Ferruh Yigit wrote:
>> On 4/27/2020 5:59 PM, Jerin Jacob wrote:
>>> On Mon, Apr 27, 2020 at 10:19 PM Ferruh Yigit <ferruh.yigit@intel.com> wrote:
>>>>
>>>> On 4/27/2020 5:29 PM, Jerin Jacob wrote:
>>>>> On Mon, Apr 27, 2020 at 9:42 PM Ferruh Yigit <ferruh.yigit@intel.com> wrote:
>>>>>>
>>>>>> On 4/27/2020 10:19 AM, Dumitrescu, Cristian wrote:
>>>>>>>
>>>>>>>
>>>>>>>> -----Original Message-----
>>>>>>>> From: Yigit, Ferruh <ferruh.yigit@intel.com>
>>>>>>>> Sent: Saturday, April 25, 2020 9:09 PM
>>>>>>>> To: Dumitrescu, Cristian <cristian.dumitrescu@intel.com>; Nithin Dabilpuram
>>>>>>>> <nithind1988@gmail.com>; Singh, Jasvinder <jasvinder.singh@intel.com>;
>>>>>>>> Thomas Monjalon <thomas@monjalon.net>; Andrew Rybchenko
>>>>>>>> <arybchenko@solarflare.com>
>>>>>>>> Cc: dev@dpdk.org; jerinj@marvell.com; kkanas@marvell.com; Nithin
>>>>>>>> Dabilpuram <ndabilpuram@marvell.com>
>>>>>>>> Subject: Re: [PATCH v4 1/4] ethdev: add tm support for shaper config in pkt
>>>>>>>> mode
>>>>>>>>
>>>>>>>> On 4/24/2020 11:28 AM, Dumitrescu, Cristian wrote:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>> -----Original Message-----
>>>>>>>>>> From: Nithin Dabilpuram <nithind1988@gmail.com>
>>>>>>>>>> Sent: Wednesday, April 22, 2020 6:21 PM
>>>>>>>>>> To: Singh, Jasvinder <jasvinder.singh@intel.com>; Dumitrescu, Cristian
>>>>>>>>>> <cristian.dumitrescu@intel.com>; Thomas Monjalon
>>>>>>>>>> <thomas@monjalon.net>; Yigit, Ferruh <ferruh.yigit@intel.com>; Andrew
>>>>>>>>>> Rybchenko <arybchenko@solarflare.com>
>>>>>>>>>> Cc: dev@dpdk.org; jerinj@marvell.com; kkanas@marvell.com; Nithin
>>>>>>>>>> Dabilpuram <ndabilpuram@marvell.com>
>>>>>>>>>> Subject: [PATCH v4 1/4] ethdev: add tm support for shaper config in pkt
>>>>>>>>>> mode
>>>>>>>>>>
>>>>>>>>>> From: Nithin Dabilpuram <ndabilpuram@marvell.com>
>>>>>>>>>>
>>>>>>>>>> Some NIC hardware support shaper to work in packet mode i.e
>>>>>>>>>> shaping or ratelimiting traffic is in packets per second (PPS) as
>>>>>>>>>> opposed to default bytes per second (BPS). Hence this patch
>>>>>>>>>> adds support to configure shared or private shaper in packet mode,
>>>>>>>>>> provide rate in PPS and add related tm capabilities in port/level/node
>>>>>>>>>> capability structures.
>>>>>>>>>>
>>>>>>>>>> This patch also updates tm port/level/node capability structures with
>>>>>>>>>> exiting features of scheduler wfq packet mode, scheduler wfq byte mode
>>>>>>>>>> and private/shared shaper byte mode.
>>>>>>>>>>
>>>>>>>>>> SoftNIC PMD is also updated with new capabilities.
>>>>>>>>>>
>>>>>>>>>> Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
>>>>>>>>>> ---
>>>>>>>>>> v3..v4:
>>>>>>>>>> - Update text under packet_mode as per Cristian.
>>>>>>>>>> - Update rte_eth_softnic_tm.c based on Jasvinder's comments.
>>>>>>>>>> - Add error enum
>>>>>>>> RTE_TM_ERROR_TYPE_SHAPER_PROFILE_PACKET_MODE
>>>>>>>>>> - Fix shaper_profile_check() with packet mode check
>>>>>>>>>> - Fix typo's
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
>>>>>>>>>
>>>>>>>>
>>>>>>>> Hi Nithin,
>>>>>>>>
>>>>>>>> It looks like patch is causing ABI break, I am getting following warning [1],
>>>>>>>> can you please check?
>>>>>>>>
>>>>>>>> [1]
>>>>>>>> https://pastebin.com/XYNFg14u
>>>>>>>
>>>>>>>
>>>>>>> Hi Ferruh,
>>>>>>>
>>>>>>> The RTE_TM API is marked as experimental, but it looks that this was not correctly marked when __rte_experimental ABI checker was introduced.
>>>>>>>
>>>>>>> It is marked as experimental at the top of the rte_tm.h, similarly to other APIs introduced around same time, but it was not correctly picked up by the ABI check procedure when later introduced, so __rte_experimental was not added to every function.
>>>>>>>
>>>>>>
>>>>>> :(
>>>>>>
>>>>>> Is it time to mature them?
>>>>>>
>>>>>> As you said they are not marked as experimental both in header file (function
>>>>>> declarations) and .map file.
>>>>>>
>>>>>> The problem is, they are not marked as experimental in DPDK_20.0 ABI (v19.11),
>>>>>> so marking them as experimental now will break the ABI. Not sure what to do,
>>>>>> cc'ed a few ABI related names for comment.
>>>>>>
>>>>>> For me, we need to proceed as the experimental tag removed and APIs become
>>>>>> mature starting from v19.11, since this is what happened in practice, and remove
>>>>>> a few existing being experimental references in the doxygen comments.
>>>>>
>>>>> I think, accidentally we can not make a library as NON-experimental.
>>>>> TM never went through experimental to mature transition(see git log
>>>>> lib/librte_ethdev/rte_tm.h)
>>>>> It was a bug to not mark as experimental in each function in the ABI process.
>>>>> Some of the features like packet marking are not even implemented by any HW.
>>>>> I think, we can make API stable only all the features are implemented
>>>>> by one or two HW.
>>>>
>>>> Fair enough, specially if the API is not ready yet.
>>>>
>>>> But they were part of stable ABI, and marking them as experimental now will
>>>> break the old applications using these APIs.
>>>
>>> it is still marked as EXPERIMENTAL everywhere and API is not ready yet.
>>
>> Existing experimental marks are text only for human parsing.
>>
>> The compiler attribute and build time checks are missing, and the symbol in the
>> binary doesn't have experimental tag. Our scripts and automated checks won't
>> detect it as experimental.
>>
>> My point is just having experimental comment in header file is not enough to
>> qualify the APIs as experimental.
>>
>>> Anyway, we need to break the ABI to make it work on various HW.
>>> I am not sure what to do?
>>> IMO, We need to send a patch as Fixes: for the bug of not adding
>>> __rte_experimental in each function.
>>
>> Yes, this is where we are, both you and Cristian suggest API is not ready and
>> should be experimental, but they were part of stable ABI, making them
>> experimental will break the ABI.
>> It looks like there is no good option but we should select one of the bad ones.
>>
>>>
>>> Traffic Management API - EXPERIMENTAL
>>> M: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
>>> T: git://dpdk.org/next/dpdk-next-qos
>>> F: lib/librte_ethdev/rte_tm*
>>>>
>>>>>
>>>>>>
>>>>>> Ray, Neil, David, Luca, Kevin, what do you think?
>>>>
> While I'm not called any of those names, allow me to give my 2c.
> 
> Since these are marked in binaries as part of the stable ABI, I think we
> need to honour that for the next two releases 20.05 and 20.08 [which means
> that we need to put in versioned functions for any changes, not that we
> can't change anything]
> 
> For 20.11, I think these should then have one of two options taken:
> * have these "fixed" and ready to be marked as stable, and officially part
>   of v21 ABI or
> * mark them as experimental properly, and look to have them as part of the
>   v22 or subsequent ABI
> 
> Given the comments here, I would tend towards the latter of the above two
> options, but that's really a decision for the maintainers.
> 
> Remember, this is not the first bug we have encountered where we messed up
> some ABI versions in the 19.11 release, and, like the previous one with the
> screwed up version number, I think we need to honour the ABI committments
> made, especially since in this case it's only for a few more months till
> 20.11 development starts.
> 
> /Bruce
> 


So the rte_tm API has been "EXPERIMENTAL" for quiet a long time, as far back as v17.11.
To the extent it predates the experimental infrastructure the community developed 
since then. TM added in 17.08, EXPERIMENTAL appears to have been added in 17.11.

That said, some form of stable TM API should have emerged by this point. 
So I am not sure that EXPERIMENTAL status was 100% warranted. 

As Bruce points out.
It is simpler to wait for the next ABI breakage window in August. 
And mark them EXPERIMENTAL at that point. 

Thanks,

Ray K



^ permalink raw reply	[relevance 3%]

* Re: [dpdk-dev] [PATCH v4 1/4] ethdev: add tm support for shaper config in pkt mode
  @ 2020-04-28 15:30  4%             ` Thomas Monjalon
  2020-04-28 17:35  0%               ` Dumitrescu, Cristian
  0 siblings, 1 reply; 200+ results
From: Thomas Monjalon @ 2020-04-28 15:30 UTC (permalink / raw)
  To: Dumitrescu, Cristian
  Cc: Yigit, Ferruh, Nithin Dabilpuram, Singh, Jasvinder,
	Andrew Rybchenko, dev, jerinj, kkanas, Nithin Dabilpuram,
	Kinsella, Ray, Neil Horman, Luca Boccassi, Kevin Traynor,
	David Marchand, Richardson, Bruce

27/04/2020 18:28, Dumitrescu, Cristian:
> From: Yigit, Ferruh <ferruh.yigit@intel.com>
> > On 4/27/2020 10:19 AM, Dumitrescu, Cristian wrote:
> > > From: Yigit, Ferruh <ferruh.yigit@intel.com>
> > >> Hi Nithin,
> > >>
> > >> It looks like patch is causing ABI break, I am getting following warning [1],
> > >> can you please check?
> > >>
> > >> [1]
> > >> https://pastebin.com/XYNFg14u
> > >
> > >
> > > Hi Ferruh,
> > >
> > > The RTE_TM API is marked as experimental, but it looks that this was not
> > correctly marked when __rte_experimental ABI checker was introduced.
> > >
> > > It is marked as experimental at the top of the rte_tm.h, similarly to other
> > APIs introduced around same time, but it was not correctly picked up by the
> > ABI check procedure when later introduced, so __rte_experimental was not
> > added to every function.
> > >
> > 
> > :(
> > 
> > Is it time to mature them?
> > 
> > As you said they are not marked as experimental both in header file
> > (function
> > declarations) and .map file.
> > 
> > The problem is, they are not marked as experimental in DPDK_20.0 ABI
> > (v19.11),
> > so marking them as experimental now will break the ABI. Not sure what to
> > do,
> > cc'ed a few ABI related names for comment.
> > 
> > For me, we need to proceed as the experimental tag removed and APIs
> > become
> > mature starting from v19.11, since this is what happened in practice, and
> > remove
> > a few existing being experimental references in the doxygen comments.
> > 
> > Ray, Neil, David, Luca, Kevin, what do you think?
> 
> Hi Ferruh,
> 
> IMO your proposed approach is fixing the wrong problem and is
> probably not the right way of doing things.
> 
> This API is correctly marked as experimental in the header
> file rte_tm.h and in the MAINTAINERS file,

in rte_tm.h:
	* @warning
	* @b EXPERIMENTAL: this API may change without prior notice

in MAINTAINERS:
	Traffic Management API - EXPERIMENTAL
	M: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
	T: git://dpdk.org/next/dpdk-next-qos
	F: lib/librte_ethdev/rte_tm*


> therefore it should remain experimental,

in rte_ethdev_version.map:
	before 19.11: DPDK_17.08 {
	since 19.11: DPDK_20.0 {

When adding rte_tm in 17.08:
http://git.dpdk.org/dpdk/diff/lib/librte_ether/rte_ether_version.map?id=5d109deffa

In 17.08, early July 2017, the first EXPERIMENTAL section was declared in EAL:
http://git.dpdk.org/dpdk/diff/lib/librte_eal/linuxapp/eal/rte_eal_version.map?id=a3ee360f444

When adding rte_mtr in 17.11, all functions are made experimental:
http://git.dpdk.org/dpdk/diff/lib/librte_ether/rte_ethdev_version.map?id=6613ffe1

In 18.02, the tag __rte_experimental was introduced:
	http://git.dpdk.org/dpdk/commit/?id=7d540a3e735
and functions are marked (including rte_mtr but not rte_tm):
	http://git.dpdk.org/dpdk/commit/?id=77b7b81e32e


> as more changes are expected from the people like Nithin and others
> currently upstreaming drivers for it.

They are doing changes in the API introduced 3 years ago.


> For some reason, the __rte_experimental tags were not added to
> this file when the ABI checker was introduced,
> and this is the real problem that should be fixed.

The mistake was done 2 years ago.
As maintainer of rte_tm code, you are expected to notice the issue.
As maintainer of rte_mtr code, you were expected to review the change
on the mtr functions being marked as experimental.
I am sorry that it took 2 years to discover the gap.

We can fix the ABI in the ABI-breakage window: in 20.11.



^ permalink raw reply	[relevance 4%]

* Re: [dpdk-dev] [PATCH v4 1/4] ethdev: add tm support for shaper config in pkt mode
  2020-04-28 14:45  5%                   ` Bruce Richardson
@ 2020-04-28 15:04  0%                     ` Luca Boccassi
  2020-04-28 15:54  5%                       ` Thomas Monjalon
  2020-04-28 15:42  3%                     ` Ray Kinsella
  1 sibling, 1 reply; 200+ results
From: Luca Boccassi @ 2020-04-28 15:04 UTC (permalink / raw)
  To: Bruce Richardson, Ferruh Yigit
  Cc: Jerin Jacob, Dumitrescu, Cristian, Nithin Dabilpuram, Singh,
	Jasvinder, Thomas Monjalon, Andrew Rybchenko, dev, jerinj,
	kkanas, Nithin Dabilpuram, Kinsella, Ray, Neil Horman,
	Kevin Traynor, David Marchand

On Tue, 2020-04-28 at 15:45 +0100, Bruce Richardson wrote:
> On Tue, Apr 28, 2020 at 03:06:20PM +0100, Ferruh Yigit wrote:
> > On 4/27/2020 5:59 PM, Jerin Jacob wrote:
> > > On Mon, Apr 27, 2020 at 10:19 PM Ferruh Yigit <ferruh.yigit@intel.com> wrote:
> > > > On 4/27/2020 5:29 PM, Jerin Jacob wrote:
> > > > > On Mon, Apr 27, 2020 at 9:42 PM Ferruh Yigit <ferruh.yigit@intel.com> wrote:
> > > > > > On 4/27/2020 10:19 AM, Dumitrescu, Cristian wrote:
> > > > > > > 
> > > > > > > > -----Original Message-----
> > > > > > > > From: Yigit, Ferruh <ferruh.yigit@intel.com>
> > > > > > > > Sent: Saturday, April 25, 2020 9:09 PM
> > > > > > > > To: Dumitrescu, Cristian <cristian.dumitrescu@intel.com>; Nithin Dabilpuram
> > > > > > > > <nithind1988@gmail.com>; Singh, Jasvinder <jasvinder.singh@intel.com>;
> > > > > > > > Thomas Monjalon <thomas@monjalon.net>; Andrew Rybchenko
> > > > > > > > <arybchenko@solarflare.com>
> > > > > > > > Cc: dev@dpdk.org; jerinj@marvell.com; kkanas@marvell.com; Nithin
> > > > > > > > Dabilpuram <ndabilpuram@marvell.com>
> > > > > > > > Subject: Re: [PATCH v4 1/4] ethdev: add tm support for shaper config in pkt
> > > > > > > > mode
> > > > > > > > 
> > > > > > > > On 4/24/2020 11:28 AM, Dumitrescu, Cristian wrote:
> > > > > > > > > 
> > > > > > > > > > -----Original Message-----
> > > > > > > > > > From: Nithin Dabilpuram <nithind1988@gmail.com>
> > > > > > > > > > Sent: Wednesday, April 22, 2020 6:21 PM
> > > > > > > > > > To: Singh, Jasvinder <jasvinder.singh@intel.com>; Dumitrescu, Cristian
> > > > > > > > > > <cristian.dumitrescu@intel.com>; Thomas Monjalon
> > > > > > > > > > <thomas@monjalon.net>; Yigit, Ferruh <ferruh.yigit@intel.com>; Andrew
> > > > > > > > > > Rybchenko <arybchenko@solarflare.com>
> > > > > > > > > > Cc: dev@dpdk.org; jerinj@marvell.com; kkanas@marvell.com; Nithin
> > > > > > > > > > Dabilpuram <ndabilpuram@marvell.com>
> > > > > > > > > > Subject: [PATCH v4 1/4] ethdev: add tm support for shaper config in pkt
> > > > > > > > > > mode
> > > > > > > > > > 
> > > > > > > > > > From: Nithin Dabilpuram <ndabilpuram@marvell.com>
> > > > > > > > > > 
> > > > > > > > > > Some NIC hardware support shaper to work in packet mode i.e
> > > > > > > > > > shaping or ratelimiting traffic is in packets per second (PPS) as
> > > > > > > > > > opposed to default bytes per second (BPS). Hence this patch
> > > > > > > > > > adds support to configure shared or private shaper in packet mode,
> > > > > > > > > > provide rate in PPS and add related tm capabilities in port/level/node
> > > > > > > > > > capability structures.
> > > > > > > > > > 
> > > > > > > > > > This patch also updates tm port/level/node capability structures with
> > > > > > > > > > exiting features of scheduler wfq packet mode, scheduler wfq byte mode
> > > > > > > > > > and private/shared shaper byte mode.
> > > > > > > > > > 
> > > > > > > > > > SoftNIC PMD is also updated with new capabilities.
> > > > > > > > > > 
> > > > > > > > > > Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
> > > > > > > > > > ---
> > > > > > > > > > v3..v4:
> > > > > > > > > > - Update text under packet_mode as per Cristian.
> > > > > > > > > > - Update rte_eth_softnic_tm.c based on Jasvinder's comments.
> > > > > > > > > > - Add error enum
> > > > > > > > RTE_TM_ERROR_TYPE_SHAPER_PROFILE_PACKET_MODE
> > > > > > > > > > - Fix shaper_profile_check() with packet mode check
> > > > > > > > > > - Fix typo's
> > > > > > > > > > 
> > > > > > > > > 
> > > > > > > > > Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
> > > > > > > > > 
> > > > > > > > 
> > > > > > > > Hi Nithin,
> > > > > > > > 
> > > > > > > > It looks like patch is causing ABI break, I am getting following warning [1],
> > > > > > > > can you please check?
> > > > > > > > 
> > > > > > > > [1]
> > > > > > > > https://pastebin.com/XYNFg14u
> > > > > > > 
> > > > > > > Hi Ferruh,
> > > > > > > 
> > > > > > > The RTE_TM API is marked as experimental, but it looks that this was not correctly marked when __rte_experimental ABI checker was introduced.
> > > > > > > 
> > > > > > > It is marked as experimental at the top of the rte_tm.h, similarly to other APIs introduced around same time, but it was not correctly picked up by the ABI check procedure when later introduced, so __rte_experimental was not added to every function.
> > > > > > > 
> > > > > > 
> > > > > > :(
> > > > > > 
> > > > > > Is it time to mature them?
> > > > > > 
> > > > > > As you said they are not marked as experimental both in header file (function
> > > > > > declarations) and .map file.
> > > > > > 
> > > > > > The problem is, they are not marked as experimental in DPDK_20.0 ABI (v19.11),
> > > > > > so marking them as experimental now will break the ABI. Not sure what to do,
> > > > > > cc'ed a few ABI related names for comment.
> > > > > > 
> > > > > > For me, we need to proceed as the experimental tag removed and APIs become
> > > > > > mature starting from v19.11, since this is what happened in practice, and remove
> > > > > > a few existing being experimental references in the doxygen comments.
> > > > > 
> > > > > I think, accidentally we can not make a library as NON-experimental.
> > > > > TM never went through experimental to mature transition(see git log
> > > > > lib/librte_ethdev/rte_tm.h)
> > > > > It was a bug to not mark as experimental in each function in the ABI process.
> > > > > Some of the features like packet marking are not even implemented by any HW.
> > > > > I think, we can make API stable only all the features are implemented
> > > > > by one or two HW.
> > > > 
> > > > Fair enough, specially if the API is not ready yet.
> > > > 
> > > > But they were part of stable ABI, and marking them as experimental now will
> > > > break the old applications using these APIs.
> > > 
> > > it is still marked as EXPERIMENTAL everywhere and API is not ready yet.
> > 
> > Existing experimental marks are text only for human parsing.
> > 
> > The compiler attribute and build time checks are missing, and the symbol in the
> > binary doesn't have experimental tag. Our scripts and automated checks won't
> > detect it as experimental.
> > 
> > My point is just having experimental comment in header file is not enough to
> > qualify the APIs as experimental.
> > 
> > > Anyway, we need to break the ABI to make it work on various HW.
> > > I am not sure what to do?
> > > IMO, We need to send a patch as Fixes: for the bug of not adding
> > > __rte_experimental in each function.
> > 
> > Yes, this is where we are, both you and Cristian suggest API is not ready and
> > should be experimental, but they were part of stable ABI, making them
> > experimental will break the ABI.
> > It looks like there is no good option but we should select one of the bad ones.
> > 
> > > Traffic Management API - EXPERIMENTAL
> > > M: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
> > > T: git://dpdk.org/next/dpdk-next-qos
> > > F: lib/librte_ethdev/rte_tm*
> > > > > > Ray, Neil, David, Luca, Kevin, what do you think?
> While I'm not called any of those names, allow me to give my 2c.
> 
> Since these are marked in binaries as part of the stable ABI, I think we
> need to honour that for the next two releases 20.05 and 20.08 [which means
> that we need to put in versioned functions for any changes, not that we
> can't change anything]
> 
> For 20.11, I think these should then have one of two options taken:
> * have these "fixed" and ready to be marked as stable, and officially part
>   of v21 ABI or
> * mark them as experimental properly, and look to have them as part of the
>   v22 or subsequent ABI
> 
> Given the comments here, I would tend towards the latter of the above two
> options, but that's really a decision for the maintainers.
> 
> Remember, this is not the first bug we have encountered where we messed up
> some ABI versions in the 19.11 release, and, like the previous one with the
> screwed up version number, I think we need to honour the ABI committments
> made, especially since in this case it's only for a few more months till
> 20.11 development starts.
> 
> /Bruce

+1

If they are not ready now, they haven't been ready for the past 6
months either, so staying not ready for 6 more is the lesser evil.

-- 
Kind regards,
Luca Boccassi

^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [PATCH v4 1/4] ethdev: add tm support for shaper config in pkt mode
  2020-04-28 14:06  4%                 ` [dpdk-dev] " Ferruh Yigit
@ 2020-04-28 14:45  5%                   ` Bruce Richardson
  2020-04-28 15:04  0%                     ` Luca Boccassi
  2020-04-28 15:42  3%                     ` Ray Kinsella
  0 siblings, 2 replies; 200+ results
From: Bruce Richardson @ 2020-04-28 14:45 UTC (permalink / raw)
  To: Ferruh Yigit
  Cc: Jerin Jacob, Dumitrescu, Cristian, Nithin Dabilpuram, Singh,
	Jasvinder, Thomas Monjalon, Andrew Rybchenko, dev, jerinj,
	kkanas, Nithin Dabilpuram, Kinsella, Ray, Neil Horman,
	Luca Boccassi, Kevin Traynor, David Marchand

On Tue, Apr 28, 2020 at 03:06:20PM +0100, Ferruh Yigit wrote:
> On 4/27/2020 5:59 PM, Jerin Jacob wrote:
> > On Mon, Apr 27, 2020 at 10:19 PM Ferruh Yigit <ferruh.yigit@intel.com> wrote:
> >>
> >> On 4/27/2020 5:29 PM, Jerin Jacob wrote:
> >>> On Mon, Apr 27, 2020 at 9:42 PM Ferruh Yigit <ferruh.yigit@intel.com> wrote:
> >>>>
> >>>> On 4/27/2020 10:19 AM, Dumitrescu, Cristian wrote:
> >>>>>
> >>>>>
> >>>>>> -----Original Message-----
> >>>>>> From: Yigit, Ferruh <ferruh.yigit@intel.com>
> >>>>>> Sent: Saturday, April 25, 2020 9:09 PM
> >>>>>> To: Dumitrescu, Cristian <cristian.dumitrescu@intel.com>; Nithin Dabilpuram
> >>>>>> <nithind1988@gmail.com>; Singh, Jasvinder <jasvinder.singh@intel.com>;
> >>>>>> Thomas Monjalon <thomas@monjalon.net>; Andrew Rybchenko
> >>>>>> <arybchenko@solarflare.com>
> >>>>>> Cc: dev@dpdk.org; jerinj@marvell.com; kkanas@marvell.com; Nithin
> >>>>>> Dabilpuram <ndabilpuram@marvell.com>
> >>>>>> Subject: Re: [PATCH v4 1/4] ethdev: add tm support for shaper config in pkt
> >>>>>> mode
> >>>>>>
> >>>>>> On 4/24/2020 11:28 AM, Dumitrescu, Cristian wrote:
> >>>>>>>
> >>>>>>>
> >>>>>>>> -----Original Message-----
> >>>>>>>> From: Nithin Dabilpuram <nithind1988@gmail.com>
> >>>>>>>> Sent: Wednesday, April 22, 2020 6:21 PM
> >>>>>>>> To: Singh, Jasvinder <jasvinder.singh@intel.com>; Dumitrescu, Cristian
> >>>>>>>> <cristian.dumitrescu@intel.com>; Thomas Monjalon
> >>>>>>>> <thomas@monjalon.net>; Yigit, Ferruh <ferruh.yigit@intel.com>; Andrew
> >>>>>>>> Rybchenko <arybchenko@solarflare.com>
> >>>>>>>> Cc: dev@dpdk.org; jerinj@marvell.com; kkanas@marvell.com; Nithin
> >>>>>>>> Dabilpuram <ndabilpuram@marvell.com>
> >>>>>>>> Subject: [PATCH v4 1/4] ethdev: add tm support for shaper config in pkt
> >>>>>>>> mode
> >>>>>>>>
> >>>>>>>> From: Nithin Dabilpuram <ndabilpuram@marvell.com>
> >>>>>>>>
> >>>>>>>> Some NIC hardware support shaper to work in packet mode i.e
> >>>>>>>> shaping or ratelimiting traffic is in packets per second (PPS) as
> >>>>>>>> opposed to default bytes per second (BPS). Hence this patch
> >>>>>>>> adds support to configure shared or private shaper in packet mode,
> >>>>>>>> provide rate in PPS and add related tm capabilities in port/level/node
> >>>>>>>> capability structures.
> >>>>>>>>
> >>>>>>>> This patch also updates tm port/level/node capability structures with
> >>>>>>>> exiting features of scheduler wfq packet mode, scheduler wfq byte mode
> >>>>>>>> and private/shared shaper byte mode.
> >>>>>>>>
> >>>>>>>> SoftNIC PMD is also updated with new capabilities.
> >>>>>>>>
> >>>>>>>> Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
> >>>>>>>> ---
> >>>>>>>> v3..v4:
> >>>>>>>> - Update text under packet_mode as per Cristian.
> >>>>>>>> - Update rte_eth_softnic_tm.c based on Jasvinder's comments.
> >>>>>>>> - Add error enum
> >>>>>> RTE_TM_ERROR_TYPE_SHAPER_PROFILE_PACKET_MODE
> >>>>>>>> - Fix shaper_profile_check() with packet mode check
> >>>>>>>> - Fix typo's
> >>>>>>>>
> >>>>>>>
> >>>>>>> Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
> >>>>>>>
> >>>>>>
> >>>>>> Hi Nithin,
> >>>>>>
> >>>>>> It looks like patch is causing ABI break, I am getting following warning [1],
> >>>>>> can you please check?
> >>>>>>
> >>>>>> [1]
> >>>>>> https://pastebin.com/XYNFg14u
> >>>>>
> >>>>>
> >>>>> Hi Ferruh,
> >>>>>
> >>>>> The RTE_TM API is marked as experimental, but it looks that this was not correctly marked when __rte_experimental ABI checker was introduced.
> >>>>>
> >>>>> It is marked as experimental at the top of the rte_tm.h, similarly to other APIs introduced around same time, but it was not correctly picked up by the ABI check procedure when later introduced, so __rte_experimental was not added to every function.
> >>>>>
> >>>>
> >>>> :(
> >>>>
> >>>> Is it time to mature them?
> >>>>
> >>>> As you said they are not marked as experimental both in header file (function
> >>>> declarations) and .map file.
> >>>>
> >>>> The problem is, they are not marked as experimental in DPDK_20.0 ABI (v19.11),
> >>>> so marking them as experimental now will break the ABI. Not sure what to do,
> >>>> cc'ed a few ABI related names for comment.
> >>>>
> >>>> For me, we need to proceed as the experimental tag removed and APIs become
> >>>> mature starting from v19.11, since this is what happened in practice, and remove
> >>>> a few existing being experimental references in the doxygen comments.
> >>>
> >>> I think, accidentally we can not make a library as NON-experimental.
> >>> TM never went through experimental to mature transition(see git log
> >>> lib/librte_ethdev/rte_tm.h)
> >>> It was a bug to not mark as experimental in each function in the ABI process.
> >>> Some of the features like packet marking are not even implemented by any HW.
> >>> I think, we can make API stable only all the features are implemented
> >>> by one or two HW.
> >>
> >> Fair enough, specially if the API is not ready yet.
> >>
> >> But they were part of stable ABI, and marking them as experimental now will
> >> break the old applications using these APIs.
> > 
> > it is still marked as EXPERIMENTAL everywhere and API is not ready yet.
> 
> Existing experimental marks are text only for human parsing.
> 
> The compiler attribute and build time checks are missing, and the symbol in the
> binary doesn't have experimental tag. Our scripts and automated checks won't
> detect it as experimental.
> 
> My point is just having experimental comment in header file is not enough to
> qualify the APIs as experimental.
> 
> > Anyway, we need to break the ABI to make it work on various HW.
> > I am not sure what to do?
> > IMO, We need to send a patch as Fixes: for the bug of not adding
> > __rte_experimental in each function.
> 
> Yes, this is where we are, both you and Cristian suggest API is not ready and
> should be experimental, but they were part of stable ABI, making them
> experimental will break the ABI.
> It looks like there is no good option but we should select one of the bad ones.
> 
> > 
> > Traffic Management API - EXPERIMENTAL
> > M: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
> > T: git://dpdk.org/next/dpdk-next-qos
> > F: lib/librte_ethdev/rte_tm*
> >>
> >>>
> >>>>
> >>>> Ray, Neil, David, Luca, Kevin, what do you think?
> >>
While I'm not called any of those names, allow me to give my 2c.

Since these are marked in binaries as part of the stable ABI, I think we
need to honour that for the next two releases 20.05 and 20.08 [which means
that we need to put in versioned functions for any changes, not that we
can't change anything]

For 20.11, I think these should then have one of two options taken:
* have these "fixed" and ready to be marked as stable, and officially part
  of v21 ABI or
* mark them as experimental properly, and look to have them as part of the
  v22 or subsequent ABI

Given the comments here, I would tend towards the latter of the above two
options, but that's really a decision for the maintainers.

Remember, this is not the first bug we have encountered where we messed up
some ABI versions in the 19.11 release, and, like the previous one with the
screwed up version number, I think we need to honour the ABI committments
made, especially since in this case it's only for a few more months till
20.11 development starts.

/Bruce

^ permalink raw reply	[relevance 5%]

* Re: [dpdk-dev] [PATCH v4 1/4] ethdev: add tm support for shaper config in pkt mode
  2020-04-27 16:59  3%               ` Jerin Jacob
  2020-04-28 11:51  0%                 ` [dpdk-dev] [EXT] " Nithin Dabilpuram
@ 2020-04-28 14:06  4%                 ` Ferruh Yigit
  2020-04-28 14:45  5%                   ` Bruce Richardson
  1 sibling, 1 reply; 200+ results
From: Ferruh Yigit @ 2020-04-28 14:06 UTC (permalink / raw)
  To: Jerin Jacob
  Cc: Dumitrescu, Cristian, Nithin Dabilpuram, Singh, Jasvinder,
	Thomas Monjalon, Andrew Rybchenko, dev, jerinj, kkanas,
	Nithin Dabilpuram, Kinsella, Ray, Neil Horman, Luca Boccassi,
	Kevin Traynor, David Marchand, Bruce Richardson

On 4/27/2020 5:59 PM, Jerin Jacob wrote:
> On Mon, Apr 27, 2020 at 10:19 PM Ferruh Yigit <ferruh.yigit@intel.com> wrote:
>>
>> On 4/27/2020 5:29 PM, Jerin Jacob wrote:
>>> On Mon, Apr 27, 2020 at 9:42 PM Ferruh Yigit <ferruh.yigit@intel.com> wrote:
>>>>
>>>> On 4/27/2020 10:19 AM, Dumitrescu, Cristian wrote:
>>>>>
>>>>>
>>>>>> -----Original Message-----
>>>>>> From: Yigit, Ferruh <ferruh.yigit@intel.com>
>>>>>> Sent: Saturday, April 25, 2020 9:09 PM
>>>>>> To: Dumitrescu, Cristian <cristian.dumitrescu@intel.com>; Nithin Dabilpuram
>>>>>> <nithind1988@gmail.com>; Singh, Jasvinder <jasvinder.singh@intel.com>;
>>>>>> Thomas Monjalon <thomas@monjalon.net>; Andrew Rybchenko
>>>>>> <arybchenko@solarflare.com>
>>>>>> Cc: dev@dpdk.org; jerinj@marvell.com; kkanas@marvell.com; Nithin
>>>>>> Dabilpuram <ndabilpuram@marvell.com>
>>>>>> Subject: Re: [PATCH v4 1/4] ethdev: add tm support for shaper config in pkt
>>>>>> mode
>>>>>>
>>>>>> On 4/24/2020 11:28 AM, Dumitrescu, Cristian wrote:
>>>>>>>
>>>>>>>
>>>>>>>> -----Original Message-----
>>>>>>>> From: Nithin Dabilpuram <nithind1988@gmail.com>
>>>>>>>> Sent: Wednesday, April 22, 2020 6:21 PM
>>>>>>>> To: Singh, Jasvinder <jasvinder.singh@intel.com>; Dumitrescu, Cristian
>>>>>>>> <cristian.dumitrescu@intel.com>; Thomas Monjalon
>>>>>>>> <thomas@monjalon.net>; Yigit, Ferruh <ferruh.yigit@intel.com>; Andrew
>>>>>>>> Rybchenko <arybchenko@solarflare.com>
>>>>>>>> Cc: dev@dpdk.org; jerinj@marvell.com; kkanas@marvell.com; Nithin
>>>>>>>> Dabilpuram <ndabilpuram@marvell.com>
>>>>>>>> Subject: [PATCH v4 1/4] ethdev: add tm support for shaper config in pkt
>>>>>>>> mode
>>>>>>>>
>>>>>>>> From: Nithin Dabilpuram <ndabilpuram@marvell.com>
>>>>>>>>
>>>>>>>> Some NIC hardware support shaper to work in packet mode i.e
>>>>>>>> shaping or ratelimiting traffic is in packets per second (PPS) as
>>>>>>>> opposed to default bytes per second (BPS). Hence this patch
>>>>>>>> adds support to configure shared or private shaper in packet mode,
>>>>>>>> provide rate in PPS and add related tm capabilities in port/level/node
>>>>>>>> capability structures.
>>>>>>>>
>>>>>>>> This patch also updates tm port/level/node capability structures with
>>>>>>>> exiting features of scheduler wfq packet mode, scheduler wfq byte mode
>>>>>>>> and private/shared shaper byte mode.
>>>>>>>>
>>>>>>>> SoftNIC PMD is also updated with new capabilities.
>>>>>>>>
>>>>>>>> Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
>>>>>>>> ---
>>>>>>>> v3..v4:
>>>>>>>> - Update text under packet_mode as per Cristian.
>>>>>>>> - Update rte_eth_softnic_tm.c based on Jasvinder's comments.
>>>>>>>> - Add error enum
>>>>>> RTE_TM_ERROR_TYPE_SHAPER_PROFILE_PACKET_MODE
>>>>>>>> - Fix shaper_profile_check() with packet mode check
>>>>>>>> - Fix typo's
>>>>>>>>
>>>>>>>
>>>>>>> Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
>>>>>>>
>>>>>>
>>>>>> Hi Nithin,
>>>>>>
>>>>>> It looks like patch is causing ABI break, I am getting following warning [1],
>>>>>> can you please check?
>>>>>>
>>>>>> [1]
>>>>>> https://pastebin.com/XYNFg14u
>>>>>
>>>>>
>>>>> Hi Ferruh,
>>>>>
>>>>> The RTE_TM API is marked as experimental, but it looks that this was not correctly marked when __rte_experimental ABI checker was introduced.
>>>>>
>>>>> It is marked as experimental at the top of the rte_tm.h, similarly to other APIs introduced around same time, but it was not correctly picked up by the ABI check procedure when later introduced, so __rte_experimental was not added to every function.
>>>>>
>>>>
>>>> :(
>>>>
>>>> Is it time to mature them?
>>>>
>>>> As you said they are not marked as experimental both in header file (function
>>>> declarations) and .map file.
>>>>
>>>> The problem is, they are not marked as experimental in DPDK_20.0 ABI (v19.11),
>>>> so marking them as experimental now will break the ABI. Not sure what to do,
>>>> cc'ed a few ABI related names for comment.
>>>>
>>>> For me, we need to proceed as the experimental tag removed and APIs become
>>>> mature starting from v19.11, since this is what happened in practice, and remove
>>>> a few existing being experimental references in the doxygen comments.
>>>
>>> I think, accidentally we can not make a library as NON-experimental.
>>> TM never went through experimental to mature transition(see git log
>>> lib/librte_ethdev/rte_tm.h)
>>> It was a bug to not mark as experimental in each function in the ABI process.
>>> Some of the features like packet marking are not even implemented by any HW.
>>> I think, we can make API stable only all the features are implemented
>>> by one or two HW.
>>
>> Fair enough, specially if the API is not ready yet.
>>
>> But they were part of stable ABI, and marking them as experimental now will
>> break the old applications using these APIs.
> 
> it is still marked as EXPERIMENTAL everywhere and API is not ready yet.

Existing experimental marks are text only for human parsing.

The compiler attribute and build time checks are missing, and the symbol in the
binary doesn't have experimental tag. Our scripts and automated checks won't
detect it as experimental.

My point is just having experimental comment in header file is not enough to
qualify the APIs as experimental.

> Anyway, we need to break the ABI to make it work on various HW.
> I am not sure what to do?
> IMO, We need to send a patch as Fixes: for the bug of not adding
> __rte_experimental in each function.

Yes, this is where we are, both you and Cristian suggest API is not ready and
should be experimental, but they were part of stable ABI, making them
experimental will break the ABI.
It looks like there is no good option but we should select one of the bad ones.

> 
> Traffic Management API - EXPERIMENTAL
> M: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
> T: git://dpdk.org/next/dpdk-next-qos
> F: lib/librte_ethdev/rte_tm*
>>
>>>
>>>>
>>>> Ray, Neil, David, Luca, Kevin, what do you think?
>>


^ permalink raw reply	[relevance 4%]

* Re: [dpdk-dev] [EXT] Re: [PATCH v4 1/4] ethdev: add tm support for shaper config in pkt mode
  2020-04-28 11:51  0%                 ` [dpdk-dev] [EXT] " Nithin Dabilpuram
@ 2020-04-28 13:56  0%                   ` Ferruh Yigit
  0 siblings, 0 replies; 200+ results
From: Ferruh Yigit @ 2020-04-28 13:56 UTC (permalink / raw)
  To: Nithin Dabilpuram, Jerin Jacob
  Cc: Dumitrescu, Cristian, Nithin Dabilpuram, Singh, Jasvinder,
	Thomas Monjalon, Andrew Rybchenko, dev, jerinj, kkanas, Kinsella,
	Ray, Neil Horman, Luca Boccassi, Kevin Traynor, David Marchand,
	Bruce Richardson

On 4/28/2020 12:51 PM, Nithin Dabilpuram wrote:
> On Mon, Apr 27, 2020 at 10:29:48PM +0530, Jerin Jacob wrote:
>> External Email
>>
>> ----------------------------------------------------------------------
>> On Mon, Apr 27, 2020 at 10:19 PM Ferruh Yigit <ferruh.yigit@intel.com> wrote:
>>>
>>> On 4/27/2020 5:29 PM, Jerin Jacob wrote:
>>>> On Mon, Apr 27, 2020 at 9:42 PM Ferruh Yigit <ferruh.yigit@intel.com> wrote:
>>>>>
>>>>> On 4/27/2020 10:19 AM, Dumitrescu, Cristian wrote:
>>>>>>
>>>>>>
>>>>>>> -----Original Message-----
>>>>>>> From: Yigit, Ferruh <ferruh.yigit@intel.com>
>>>>>>> Sent: Saturday, April 25, 2020 9:09 PM
>>>>>>> To: Dumitrescu, Cristian <cristian.dumitrescu@intel.com>; Nithin Dabilpuram
>>>>>>> <nithind1988@gmail.com>; Singh, Jasvinder <jasvinder.singh@intel.com>;
>>>>>>> Thomas Monjalon <thomas@monjalon.net>; Andrew Rybchenko
>>>>>>> <arybchenko@solarflare.com>
>>>>>>> Cc: dev@dpdk.org; jerinj@marvell.com; kkanas@marvell.com; Nithin
>>>>>>> Dabilpuram <ndabilpuram@marvell.com>
>>>>>>> Subject: Re: [PATCH v4 1/4] ethdev: add tm support for shaper config in pkt
>>>>>>> mode
>>>>>>>
>>>>>>> On 4/24/2020 11:28 AM, Dumitrescu, Cristian wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>>> -----Original Message-----
>>>>>>>>> From: Nithin Dabilpuram <nithind1988@gmail.com>
>>>>>>>>> Sent: Wednesday, April 22, 2020 6:21 PM
>>>>>>>>> To: Singh, Jasvinder <jasvinder.singh@intel.com>; Dumitrescu, Cristian
>>>>>>>>> <cristian.dumitrescu@intel.com>; Thomas Monjalon
>>>>>>>>> <thomas@monjalon.net>; Yigit, Ferruh <ferruh.yigit@intel.com>; Andrew
>>>>>>>>> Rybchenko <arybchenko@solarflare.com>
>>>>>>>>> Cc: dev@dpdk.org; jerinj@marvell.com; kkanas@marvell.com; Nithin
>>>>>>>>> Dabilpuram <ndabilpuram@marvell.com>
>>>>>>>>> Subject: [PATCH v4 1/4] ethdev: add tm support for shaper config in pkt
>>>>>>>>> mode
>>>>>>>>>
>>>>>>>>> From: Nithin Dabilpuram <ndabilpuram@marvell.com>
>>>>>>>>>
>>>>>>>>> Some NIC hardware support shaper to work in packet mode i.e
>>>>>>>>> shaping or ratelimiting traffic is in packets per second (PPS) as
>>>>>>>>> opposed to default bytes per second (BPS). Hence this patch
>>>>>>>>> adds support to configure shared or private shaper in packet mode,
>>>>>>>>> provide rate in PPS and add related tm capabilities in port/level/node
>>>>>>>>> capability structures.
>>>>>>>>>
>>>>>>>>> This patch also updates tm port/level/node capability structures with
>>>>>>>>> exiting features of scheduler wfq packet mode, scheduler wfq byte mode
>>>>>>>>> and private/shared shaper byte mode.
>>>>>>>>>
>>>>>>>>> SoftNIC PMD is also updated with new capabilities.
>>>>>>>>>
>>>>>>>>> Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
>>>>>>>>> ---
>>>>>>>>> v3..v4:
>>>>>>>>> - Update text under packet_mode as per Cristian.
>>>>>>>>> - Update rte_eth_softnic_tm.c based on Jasvinder's comments.
>>>>>>>>> - Add error enum
>>>>>>> RTE_TM_ERROR_TYPE_SHAPER_PROFILE_PACKET_MODE
>>>>>>>>> - Fix shaper_profile_check() with packet mode check
>>>>>>>>> - Fix typo's
>>>>>>>>>
>>>>>>>>
>>>>>>>> Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
>>>>>>>>
>>>>>>>
>>>>>>> Hi Nithin,
>>>>>>>
>>>>>>> It looks like patch is causing ABI break, I am getting following warning [1],
>>>>>>> can you please check?
>>>>>>>
>>>>>>> [1]
>>>>>>> https://urldefense.proofpoint.com/v2/url?u=https-3A__pastebin.com_XYNFg14u&d=DwIBaQ&c=nKjWec2b6R0mOyPaz7xtfQ&r=FZ_tPCbgFOh18zwRPO9H0yDx8VW38vuapifdDfc8SFQ&m=xJB0Qb2Q-1bl0hEDeknUjJqrCDc3z-h0F0e7kj8KvvI&s=R6xtRQRRIIzAilc5z52oYjyHNlvvJB_9SUsKBkpPC6g&e= 
>>>>>>
>>>>>>
>>>>>> Hi Ferruh,
>>>>>>
>>>>>> The RTE_TM API is marked as experimental, but it looks that this was not correctly marked when __rte_experimental ABI checker was introduced.
>>>>>>
>>>>>> It is marked as experimental at the top of the rte_tm.h, similarly to other APIs introduced around same time, but it was not correctly picked up by the ABI check procedure when later introduced, so __rte_experimental was not added to every function.
>>>>>>
>>>>>
>>>>> :(
>>>>>
>>>>> Is it time to mature them?
>>>>>
>>>>> As you said they are not marked as experimental both in header file (function
>>>>> declarations) and .map file.
>>>>>
>>>>> The problem is, they are not marked as experimental in DPDK_20.0 ABI (v19.11),
>>>>> so marking them as experimental now will break the ABI. Not sure what to do,
>>>>> cc'ed a few ABI related names for comment.
>>>>>
>>>>> For me, we need to proceed as the experimental tag removed and APIs become
>>>>> mature starting from v19.11, since this is what happened in practice, and remove
>>>>> a few existing being experimental references in the doxygen comments.
>>>>
>>>> I think, accidentally we can not make a library as NON-experimental.
>>>> TM never went through experimental to mature transition(see git log
>>>> lib/librte_ethdev/rte_tm.h)
>>>> It was a bug to not mark as experimental in each function in the ABI process.
>>>> Some of the features like packet marking are not even implemented by any HW.
>>>> I think, we can make API stable only all the features are implemented
>>>> by one or two HW.
>>>
>>> Fair enough, specially if the API is not ready yet.
>>>
>>> But they were part of stable ABI, and marking them as experimental now will
>>> break the old applications using these APIs.
>>
>> it is still marked as EXPERIMENTAL everywhere and API is not ready yet.
>> Anyway, we need to break the ABI to make it work on various HW.
>> I am not sure what to do?
>> IMO, We need to send a patch as Fixes: for the bug of not adding
>> __rte_experimental in each function.
>>
>> Traffic Management API - EXPERIMENTAL
>> M: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
>> T: git://dpdk.org/next/dpdk-next-qos
>> F: lib/librte_ethdev/rte_tm*
> 
> Ray, Neil, David, Luca, Kevin, Ferruh
> 
> Any thoughts on this proposal ?
> 
> If it is fine, I can send a "Fixes:" patch to update experimental attribute in rte_tm.h
> for all functions so that 20.05 is having the right marking.

Hi Nithin,

Please send the fix patch, we may continue to discuss in that patch but it would
be good to have it ready.

> 
>>>
>>>>
>>>>>
>>>>> Ray, Neil, David, Luca, Kevin, what do you think?
>>>


^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [EXT] Re: [PATCH v4 1/4] ethdev: add tm support for shaper config in pkt mode
  2020-04-27 16:59  3%               ` Jerin Jacob
@ 2020-04-28 11:51  0%                 ` Nithin Dabilpuram
  2020-04-28 13:56  0%                   ` Ferruh Yigit
  2020-04-28 14:06  4%                 ` [dpdk-dev] " Ferruh Yigit
  1 sibling, 1 reply; 200+ results
From: Nithin Dabilpuram @ 2020-04-28 11:51 UTC (permalink / raw)
  To: Jerin Jacob
  Cc: Ferruh Yigit, Dumitrescu, Cristian, Nithin Dabilpuram, Singh,
	Jasvinder, Thomas Monjalon, Andrew Rybchenko, dev, jerinj,
	kkanas, Kinsella, Ray, Neil Horman, Luca Boccassi, Kevin Traynor,
	David Marchand, Bruce Richardson

On Mon, Apr 27, 2020 at 10:29:48PM +0530, Jerin Jacob wrote:
> External Email
> 
> ----------------------------------------------------------------------
> On Mon, Apr 27, 2020 at 10:19 PM Ferruh Yigit <ferruh.yigit@intel.com> wrote:
> >
> > On 4/27/2020 5:29 PM, Jerin Jacob wrote:
> > > On Mon, Apr 27, 2020 at 9:42 PM Ferruh Yigit <ferruh.yigit@intel.com> wrote:
> > >>
> > >> On 4/27/2020 10:19 AM, Dumitrescu, Cristian wrote:
> > >>>
> > >>>
> > >>>> -----Original Message-----
> > >>>> From: Yigit, Ferruh <ferruh.yigit@intel.com>
> > >>>> Sent: Saturday, April 25, 2020 9:09 PM
> > >>>> To: Dumitrescu, Cristian <cristian.dumitrescu@intel.com>; Nithin Dabilpuram
> > >>>> <nithind1988@gmail.com>; Singh, Jasvinder <jasvinder.singh@intel.com>;
> > >>>> Thomas Monjalon <thomas@monjalon.net>; Andrew Rybchenko
> > >>>> <arybchenko@solarflare.com>
> > >>>> Cc: dev@dpdk.org; jerinj@marvell.com; kkanas@marvell.com; Nithin
> > >>>> Dabilpuram <ndabilpuram@marvell.com>
> > >>>> Subject: Re: [PATCH v4 1/4] ethdev: add tm support for shaper config in pkt
> > >>>> mode
> > >>>>
> > >>>> On 4/24/2020 11:28 AM, Dumitrescu, Cristian wrote:
> > >>>>>
> > >>>>>
> > >>>>>> -----Original Message-----
> > >>>>>> From: Nithin Dabilpuram <nithind1988@gmail.com>
> > >>>>>> Sent: Wednesday, April 22, 2020 6:21 PM
> > >>>>>> To: Singh, Jasvinder <jasvinder.singh@intel.com>; Dumitrescu, Cristian
> > >>>>>> <cristian.dumitrescu@intel.com>; Thomas Monjalon
> > >>>>>> <thomas@monjalon.net>; Yigit, Ferruh <ferruh.yigit@intel.com>; Andrew
> > >>>>>> Rybchenko <arybchenko@solarflare.com>
> > >>>>>> Cc: dev@dpdk.org; jerinj@marvell.com; kkanas@marvell.com; Nithin
> > >>>>>> Dabilpuram <ndabilpuram@marvell.com>
> > >>>>>> Subject: [PATCH v4 1/4] ethdev: add tm support for shaper config in pkt
> > >>>>>> mode
> > >>>>>>
> > >>>>>> From: Nithin Dabilpuram <ndabilpuram@marvell.com>
> > >>>>>>
> > >>>>>> Some NIC hardware support shaper to work in packet mode i.e
> > >>>>>> shaping or ratelimiting traffic is in packets per second (PPS) as
> > >>>>>> opposed to default bytes per second (BPS). Hence this patch
> > >>>>>> adds support to configure shared or private shaper in packet mode,
> > >>>>>> provide rate in PPS and add related tm capabilities in port/level/node
> > >>>>>> capability structures.
> > >>>>>>
> > >>>>>> This patch also updates tm port/level/node capability structures with
> > >>>>>> exiting features of scheduler wfq packet mode, scheduler wfq byte mode
> > >>>>>> and private/shared shaper byte mode.
> > >>>>>>
> > >>>>>> SoftNIC PMD is also updated with new capabilities.
> > >>>>>>
> > >>>>>> Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
> > >>>>>> ---
> > >>>>>> v3..v4:
> > >>>>>> - Update text under packet_mode as per Cristian.
> > >>>>>> - Update rte_eth_softnic_tm.c based on Jasvinder's comments.
> > >>>>>> - Add error enum
> > >>>> RTE_TM_ERROR_TYPE_SHAPER_PROFILE_PACKET_MODE
> > >>>>>> - Fix shaper_profile_check() with packet mode check
> > >>>>>> - Fix typo's
> > >>>>>>
> > >>>>>
> > >>>>> Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
> > >>>>>
> > >>>>
> > >>>> Hi Nithin,
> > >>>>
> > >>>> It looks like patch is causing ABI break, I am getting following warning [1],
> > >>>> can you please check?
> > >>>>
> > >>>> [1]
> > >>>> https://urldefense.proofpoint.com/v2/url?u=https-3A__pastebin.com_XYNFg14u&d=DwIBaQ&c=nKjWec2b6R0mOyPaz7xtfQ&r=FZ_tPCbgFOh18zwRPO9H0yDx8VW38vuapifdDfc8SFQ&m=xJB0Qb2Q-1bl0hEDeknUjJqrCDc3z-h0F0e7kj8KvvI&s=R6xtRQRRIIzAilc5z52oYjyHNlvvJB_9SUsKBkpPC6g&e= 
> > >>>
> > >>>
> > >>> Hi Ferruh,
> > >>>
> > >>> The RTE_TM API is marked as experimental, but it looks that this was not correctly marked when __rte_experimental ABI checker was introduced.
> > >>>
> > >>> It is marked as experimental at the top of the rte_tm.h, similarly to other APIs introduced around same time, but it was not correctly picked up by the ABI check procedure when later introduced, so __rte_experimental was not added to every function.
> > >>>
> > >>
> > >> :(
> > >>
> > >> Is it time to mature them?
> > >>
> > >> As you said they are not marked as experimental both in header file (function
> > >> declarations) and .map file.
> > >>
> > >> The problem is, they are not marked as experimental in DPDK_20.0 ABI (v19.11),
> > >> so marking them as experimental now will break the ABI. Not sure what to do,
> > >> cc'ed a few ABI related names for comment.
> > >>
> > >> For me, we need to proceed as the experimental tag removed and APIs become
> > >> mature starting from v19.11, since this is what happened in practice, and remove
> > >> a few existing being experimental references in the doxygen comments.
> > >
> > > I think, accidentally we can not make a library as NON-experimental.
> > > TM never went through experimental to mature transition(see git log
> > > lib/librte_ethdev/rte_tm.h)
> > > It was a bug to not mark as experimental in each function in the ABI process.
> > > Some of the features like packet marking are not even implemented by any HW.
> > > I think, we can make API stable only all the features are implemented
> > > by one or two HW.
> >
> > Fair enough, specially if the API is not ready yet.
> >
> > But they were part of stable ABI, and marking them as experimental now will
> > break the old applications using these APIs.
> 
> it is still marked as EXPERIMENTAL everywhere and API is not ready yet.
> Anyway, we need to break the ABI to make it work on various HW.
> I am not sure what to do?
> IMO, We need to send a patch as Fixes: for the bug of not adding
> __rte_experimental in each function.
> 
> Traffic Management API - EXPERIMENTAL
> M: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
> T: git://dpdk.org/next/dpdk-next-qos
> F: lib/librte_ethdev/rte_tm*

Ray, Neil, David, Luca, Kevin, Ferruh

Any thoughts on this proposal ?

If it is fine, I can send a "Fixes:" patch to update experimental attribute in rte_tm.h
for all functions so that 20.05 is having the right marking.

> >
> > >
> > >>
> > >> Ray, Neil, David, Luca, Kevin, what do you think?
> >

^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [PATCH v3 0/4] Enforce checking on flag values in API's
  2020-04-27 23:16  3% ` [dpdk-dev] [PATCH v3 0/4] Enforce checking on flag values " Stephen Hemminger
                     ` (4 preceding siblings ...)
  2020-04-28 10:28  0%   ` [dpdk-dev] [PATCH v3 0/4] Enforce checking on flag values in API's Bruce Richardson
@ 2020-04-28 11:04  0%   ` Ananyev, Konstantin
  5 siblings, 0 replies; 200+ results
From: Ananyev, Konstantin @ 2020-04-28 11:04 UTC (permalink / raw)
  To: Stephen Hemminger, dev

> The DPDK API's are lax about checking for undefined flag values.
> This makes it impossible to add new bits to existing API's
> without causing ABI breakage. This means we end up doing unnecessary
> symbol versioning just to work around applications that might
> pass in naughty bits.
> 
> This is the DPDK analog of the Linux kernel openat() problem.
> Openat api was added but since kernel did not check flags it
> ended up that another syscall openat2() was necessary before
> the flags could be used.
> 
> v3 - define mask based on existing defines for ring and hash
> 
> Stephen Hemminger (4):
>   ring: future proof flag settings
>   hash: check flags on creation
>   stack: check flags on creation
>   cfgfile: check flags value
> 
>  lib/librte_cfgfile/rte_cfgfile.c  |  4 ++++
>  lib/librte_hash/rte_cuckoo_hash.c | 14 ++++++++++++++
>  lib/librte_ring/rte_ring.c        | 12 ++++++++++++
>  lib/librte_stack/rte_stack.c      |  5 +++++
>  4 files changed, 35 insertions(+)
> 
> --

Series Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>

> 2.20.1


^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [PATCH v3 0/4] Enforce checking on flag values in API's
  2020-04-27 23:16  3% ` [dpdk-dev] [PATCH v3 0/4] Enforce checking on flag values " Stephen Hemminger
                     ` (3 preceding siblings ...)
  2020-04-27 23:16  3%   ` [dpdk-dev] [PATCH v3 4/4] cfgfile: check flags value Stephen Hemminger
@ 2020-04-28 10:28  0%   ` Bruce Richardson
  2020-04-28 11:04  0%   ` Ananyev, Konstantin
  5 siblings, 0 replies; 200+ results
From: Bruce Richardson @ 2020-04-28 10:28 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: dev

On Mon, Apr 27, 2020 at 04:16:21PM -0700, Stephen Hemminger wrote:
> The DPDK API's are lax about checking for undefined flag values.
> This makes it impossible to add new bits to existing API's
> without causing ABI breakage. This means we end up doing unnecessary
> symbol versioning just to work around applications that might
> pass in naughty bits.
> 
> This is the DPDK analog of the Linux kernel openat() problem.
> Openat api was added but since kernel did not check flags it
> ended up that another syscall openat2() was necessary before
> the flags could be used.
> 
> v3 - define mask based on existing defines for ring and hash
> 
> Stephen Hemminger (4):
>   ring: future proof flag settings
>   hash: check flags on creation
>   stack: check flags on creation
>   cfgfile: check flags value
> 
>  lib/librte_cfgfile/rte_cfgfile.c  |  4 ++++
>  lib/librte_hash/rte_cuckoo_hash.c | 14 ++++++++++++++
>  lib/librte_ring/rte_ring.c        | 12 ++++++++++++
>  lib/librte_stack/rte_stack.c      |  5 +++++
>  4 files changed, 35 insertions(+)
> 
I think this is a good idea to do in DPDK

Series-acked-by: Bruce Richardson <bruce.richardson@intel.com>

^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [PATCH v3 4/4] cfgfile: check flags value
  2020-04-27 23:16  3%   ` [dpdk-dev] [PATCH v3 4/4] cfgfile: check flags value Stephen Hemminger
@ 2020-04-28 10:24  0%     ` Bruce Richardson
  0 siblings, 0 replies; 200+ results
From: Bruce Richardson @ 2020-04-28 10:24 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: dev, Cristian Dumitrescu

On Mon, Apr 27, 2020 at 04:16:25PM -0700, Stephen Hemminger wrote:
> All API's should check that they support the flag values
> passed. If an application passes an invalid flag it could
> cause problems in later ABI.
> 
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> ---
Acked-by: Bruce Richardson <bruce.richardson@intel.com>

^ permalink raw reply	[relevance 0%]

* [dpdk-dev] [Bug 465] app/test compile failed with gcc and clang
@ 2020-04-28  9:15  3% bugzilla
  0 siblings, 0 replies; 200+ results
From: bugzilla @ 2020-04-28  9:15 UTC (permalink / raw)
  To: dev

https://bugs.dpdk.org/show_bug.cgi?id=465

            Bug ID: 465
           Summary: app/test compile failed with gcc and clang
           Product: DPDK
           Version: 20.05
          Hardware: x86
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: testpmd
          Assignee: dev@dpdk.org
          Reporter: qimaix.xiao@intel.com
  Target Milestone: ---

---------------------------------Description-----------------------------------
build ./app/test failed on dpdk 20.05
---------------------------------reproduce steps-------------------------------
Steps:

 1. cd /root/dpdk
 2. export RTE_TARGET=x86_64-native-linuxapp-gcc;export RTE_SDK=`pwd`;make
install T=x86_64-native-linuxapp-gcc -j70
 3. sed -i -e 's/#define MAX_TRAFFIC_BURST              2048/#define
MAX_TRAFFIC_BURST              32/' app/test/test_pmd_perf.c
 4. sed -i -e 's/lpbk_mode = 1/lpbk_mode = 0/' app/test/test_pmd_perf.c
 5. rm -rf ./app/test/test_resource_c.res.o
 6. rm -rf ./app/test/test_resource_tar.res.o
 7. rm -rf ./app/test/test_pci_sysfs.res.o
 8. make -j 70 -C app/test

Output:

...
test_mbuf.c:2670:2: error: ‘rte_mbuf_dyn_dump’ is deprecated: Symbol is not yet
part of stable ABI [-Werror=deprecated-declarations]
rte_mbuf_dyn_dump(stdout);
^~~~~~~~~~~~~~~~~
In file included from test_mbuf.c:35:0:
/root/dpdk/x86_64-native-linuxapp-gcc/include/rte_mbuf_dyn.h:235:6: note:
declared here
void rte_mbuf_dyn_dump(FILE *out);
^~~~~~~~~~~~~~~~~
test_flow_classify.c: At top level:
cc1: error: unrecognized command line option ‘-Wno-address-of-packed-member’
[-Werror]
cc1: all warnings being treated as errors
/root/dpdk/mk/internal/rte.compile-pre.mk:114: recipe for target
'test_flow_classify.o' failed
make: *** [test_flow_classify.o] Error 1
test_stack_perf.c: At top level:
cc1: error: unrecognized command line option ‘-Wno-address-of-packed-member’
[-Werror]
cc1: all warnings being treated as errors
/root/dpdk/mk/internal/rte.compile-pre.mk:114: recipe for target
'test_stack_perf.o' failed
make: *** [test_stack_perf.o] Error 1
test_timer_secondary.c: At top level:
cc1: error: unrecognized command line option ‘-Wno-address-of-packed-member’
[-Werror]
cc1: all warnings being treated as errors
/root/dpdk/mk/internal/rte.compile-pre.mk:114: recipe for target
'test_timer_secondary.o' failed
make: *** [test_timer_secondary.o] Error 1
test_stack.c: At top level:
cc1: error: unrecognized command line option ‘-Wno-address-of-packed-member’
[-Werror]
cc1: all warnings being treated as errors
/root/dpdk/mk/internal/rte.compile-pre.mk:114: recipe for target 'test_stack.o'
failed
make: *** [test_stack.o] Error 1
test_mbuf.c: At top level:
cc1: error: unrecognized command line option ‘-Wno-address-of-packed-member’
[-Werror]
cc1: all warnings being treated as errors
/root/dpdk/mk/internal/rte.compile-pre.mk:114: recipe for target 'test_mbuf.o'
failed
make: *** [test_mbuf.o] Error 1
test_ring_perf.c: At top level:
cc1: error: unrecognized command line option ‘-Wno-address-of-packed-member’
[-Werror]
cc1: all warnings being treated as errors
/root/dpdk/mk/internal/rte.compile-pre.mk:114: recipe for target
'test_ring_perf.o' failed
make: *** [test_ring_perf.o] Error 1
test_ring.c: At top level:
cc1: error: unrecognized command line option ‘-Wno-address-of-packed-member’
[-Werror]
cc1: all warnings being treated as errors
/root/dpdk/mk/internal/rte.compile-pre.mk:114: recipe for target 'test_ring.o'
failed
make: *** [test_ring.o] Error 1

Comments: clang has the same issue with gcc

-- 
You are receiving this mail because:
You are the assignee for the bug.

^ permalink raw reply	[relevance 3%]

* Re: [dpdk-dev] [PATCH v3 1/4] ring: future proof flag settings
  2020-04-27 23:16  3%   ` [dpdk-dev] [PATCH v3 1/4] ring: future proof flag settings Stephen Hemminger
@ 2020-04-28  4:12  0%     ` Honnappa Nagarahalli
  0 siblings, 0 replies; 200+ results
From: Honnappa Nagarahalli @ 2020-04-28  4:12 UTC (permalink / raw)
  To: Stephen Hemminger, dev; +Cc: Konstantin Ananyev, nd, Honnappa Nagarahalli, nd

<snip>

> 
> All API's should check that they support the flag values passed.
> These checks ensure that the extra bits can safely be used without risk of ABI
> breakage.
> 
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>

> ---
>  lib/librte_ring/rte_ring.c | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/lib/librte_ring/rte_ring.c b/lib/librte_ring/rte_ring.c index
> ebe5ccf0de68..e16dd45a82de 100644
> --- a/lib/librte_ring/rte_ring.c
> +++ b/lib/librte_ring/rte_ring.c
> @@ -42,6 +42,11 @@ static struct rte_tailq_elem rte_ring_tailq = {  };
>  EAL_REGISTER_TAILQ(rte_ring_tailq)
> 
> +/* mask of all valid flag values to ring_create() */ #define
> +RING_F_MASK (RING_F_SP_ENQ | RING_F_SC_DEQ | RING_F_EXACT_SZ | \
> +		     RING_F_MP_RTS_ENQ | RING_F_MC_RTS_DEQ |	       \
> +		     RING_F_MP_HTS_ENQ | RING_F_MC_HTS_DEQ )
> +
>  /* true if x is a power of 2 */
>  #define POWEROF2(x) ((((x)-1) & (x)) == 0)
> 
> @@ -197,6 +202,13 @@ rte_ring_init(struct rte_ring *r, const char *name,
> unsigned count,
>  	RTE_BUILD_BUG_ON(offsetof(struct rte_ring_headtail, tail) !=
>  		offsetof(struct rte_ring_rts_headtail, tail.val.pos));
> 
> +	/* future proof flags, only allow supported values */
> +	if (flags & ~RING_F_MASK) {
> +		RTE_LOG(ERR, RING,
> +			"Unsupported flags requested %#x\n", flags);
> +		return -EINVAL;
> +	}
> +
>  	/* init the ring structure */
>  	memset(r, 0, sizeof(*r));
>  	ret = strlcpy(r->name, name, sizeof(r->name));
> --
> 2.20.1


^ permalink raw reply	[relevance 0%]

* [dpdk-dev] [PATCH v3 4/4] cfgfile: check flags value
  2020-04-27 23:16  3% ` [dpdk-dev] [PATCH v3 0/4] Enforce checking on flag values " Stephen Hemminger
                     ` (2 preceding siblings ...)
  2020-04-27 23:16  3%   ` [dpdk-dev] [PATCH v3 3/4] stack: " Stephen Hemminger
@ 2020-04-27 23:16  3%   ` Stephen Hemminger
  2020-04-28 10:24  0%     ` Bruce Richardson
  2020-04-28 10:28  0%   ` [dpdk-dev] [PATCH v3 0/4] Enforce checking on flag values in API's Bruce Richardson
  2020-04-28 11:04  0%   ` Ananyev, Konstantin
  5 siblings, 1 reply; 200+ results
From: Stephen Hemminger @ 2020-04-27 23:16 UTC (permalink / raw)
  To: dev; +Cc: Stephen Hemminger, Cristian Dumitrescu

All API's should check that they support the flag values
passed. If an application passes an invalid flag it could
cause problems in later ABI.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 lib/librte_cfgfile/rte_cfgfile.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/librte_cfgfile/rte_cfgfile.c b/lib/librte_cfgfile/rte_cfgfile.c
index 9049fd9c2319..714717dd9007 100644
--- a/lib/librte_cfgfile/rte_cfgfile.c
+++ b/lib/librte_cfgfile/rte_cfgfile.c
@@ -272,6 +272,10 @@ rte_cfgfile_create(int flags)
 	int i;
 	struct rte_cfgfile *cfg;
 
+	/* future proof flags usage */
+	if (flags & ~(CFG_FLAG_GLOBAL_SECTION | CFG_FLAG_EMPTY_VALUES))
+		return NULL;
+
 	cfg = malloc(sizeof(*cfg));
 
 	if (cfg == NULL)
-- 
2.20.1


^ permalink raw reply	[relevance 3%]

* [dpdk-dev] [PATCH v3 3/4] stack: check flags on creation
  2020-04-27 23:16  3% ` [dpdk-dev] [PATCH v3 0/4] Enforce checking on flag values " Stephen Hemminger
  2020-04-27 23:16  3%   ` [dpdk-dev] [PATCH v3 1/4] ring: future proof flag settings Stephen Hemminger
  2020-04-27 23:16  3%   ` [dpdk-dev] [PATCH v3 2/4] hash: check flags on creation Stephen Hemminger
@ 2020-04-27 23:16  3%   ` Stephen Hemminger
  2020-05-02  2:36  0%     ` Eads, Gage
  2020-04-27 23:16  3%   ` [dpdk-dev] [PATCH v3 4/4] cfgfile: check flags value Stephen Hemminger
                     ` (2 subsequent siblings)
  5 siblings, 1 reply; 200+ results
From: Stephen Hemminger @ 2020-04-27 23:16 UTC (permalink / raw)
  To: dev; +Cc: Stephen Hemminger, Gage Eads, Olivier Matz

All API's should check that they support the flag values
passed. If an application passes an invalid flag it could
cause problems in later ABI.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 lib/librte_stack/rte_stack.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lib/librte_stack/rte_stack.c b/lib/librte_stack/rte_stack.c
index d19824f00439..e58fa545fca4 100644
--- a/lib/librte_stack/rte_stack.c
+++ b/lib/librte_stack/rte_stack.c
@@ -59,6 +59,11 @@ rte_stack_create(const char *name, unsigned int count, int socket_id,
 	unsigned int sz;
 	int ret;
 
+	if (flags & ~(RTE_STACK_F_LF)) {
+		STACK_LOG_ERR("Unsupported stack flags %#x\n", flags);
+		return NULL;
+	}
+
 #ifdef RTE_ARCH_64
 	RTE_BUILD_BUG_ON(sizeof(struct rte_stack_lf_head) != 16);
 #else
-- 
2.20.1


^ permalink raw reply	[relevance 3%]

* [dpdk-dev] [PATCH v3 2/4] hash: check flags on creation
  2020-04-27 23:16  3% ` [dpdk-dev] [PATCH v3 0/4] Enforce checking on flag values " Stephen Hemminger
  2020-04-27 23:16  3%   ` [dpdk-dev] [PATCH v3 1/4] ring: future proof flag settings Stephen Hemminger
@ 2020-04-27 23:16  3%   ` Stephen Hemminger
  2020-04-29  1:08  0%     ` Wang, Yipeng1
  2020-04-27 23:16  3%   ` [dpdk-dev] [PATCH v3 3/4] stack: " Stephen Hemminger
                     ` (3 subsequent siblings)
  5 siblings, 1 reply; 200+ results
From: Stephen Hemminger @ 2020-04-27 23:16 UTC (permalink / raw)
  To: dev; +Cc: Stephen Hemminger, Yipeng Wang, Sameh Gobriel, Bruce Richardson

All API's should check that they support the flag values
passed. If an application passes an invalid flag it could
cause problems in later ABI.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 lib/librte_hash/rte_cuckoo_hash.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/lib/librte_hash/rte_cuckoo_hash.c b/lib/librte_hash/rte_cuckoo_hash.c
index 38767a8a164f..d54bbb47edcb 100644
--- a/lib/librte_hash/rte_cuckoo_hash.c
+++ b/lib/librte_hash/rte_cuckoo_hash.c
@@ -32,6 +32,14 @@
 #include "rte_hash.h"
 #include "rte_cuckoo_hash.h"
 
+/* Mask of all flags supported by this version */
+#define RTE_HASH_EXTRA_FLAGS_MASK (RTE_HASH_EXTRA_FLAGS_TRANS_MEM_SUPPORT | \
+				   RTE_HASH_EXTRA_FLAGS_MULTI_WRITER_ADD | \
+				   RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY | \
+				   RTE_HASH_EXTRA_FLAGS_EXT_TABLE |	\
+				   RTE_HASH_EXTRA_FLAGS_NO_FREE_ON_DEL | \
+				   RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY_LF)
+
 #define FOR_EACH_BUCKET(CURRENT_BKT, START_BUCKET)                            \
 	for (CURRENT_BKT = START_BUCKET;                                      \
 		CURRENT_BKT != NULL;                                          \
@@ -164,6 +172,12 @@ rte_hash_create(const struct rte_hash_parameters *params)
 		return NULL;
 	}
 
+	if (params->extra_flag & ~RTE_HASH_EXTRA_FLAGS_MASK) {
+		rte_errno = EINVAL;
+		RTE_LOG(ERR, HASH, "rte_hash_create: unsupported extra flags\n");
+		return NULL;
+	}
+
 	/* Validate correct usage of extra options */
 	if ((params->extra_flag & RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY) &&
 	    (params->extra_flag & RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY_LF)) {
-- 
2.20.1


^ permalink raw reply	[relevance 3%]

* [dpdk-dev] [PATCH v3 1/4] ring: future proof flag settings
  2020-04-27 23:16  3% ` [dpdk-dev] [PATCH v3 0/4] Enforce checking on flag values " Stephen Hemminger
@ 2020-04-27 23:16  3%   ` Stephen Hemminger
  2020-04-28  4:12  0%     ` Honnappa Nagarahalli
  2020-04-27 23:16  3%   ` [dpdk-dev] [PATCH v3 2/4] hash: check flags on creation Stephen Hemminger
                     ` (4 subsequent siblings)
  5 siblings, 1 reply; 200+ results
From: Stephen Hemminger @ 2020-04-27 23:16 UTC (permalink / raw)
  To: dev; +Cc: Stephen Hemminger, Honnappa Nagarahalli, Konstantin Ananyev

All API's should check that they support the flag values passed.
These checks ensure that the extra bits can safely be used
without risk of ABI breakage.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 lib/librte_ring/rte_ring.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/lib/librte_ring/rte_ring.c b/lib/librte_ring/rte_ring.c
index ebe5ccf0de68..e16dd45a82de 100644
--- a/lib/librte_ring/rte_ring.c
+++ b/lib/librte_ring/rte_ring.c
@@ -42,6 +42,11 @@ static struct rte_tailq_elem rte_ring_tailq = {
 };
 EAL_REGISTER_TAILQ(rte_ring_tailq)
 
+/* mask of all valid flag values to ring_create() */
+#define RING_F_MASK (RING_F_SP_ENQ | RING_F_SC_DEQ | RING_F_EXACT_SZ | \
+		     RING_F_MP_RTS_ENQ | RING_F_MC_RTS_DEQ |	       \
+		     RING_F_MP_HTS_ENQ | RING_F_MC_HTS_DEQ )
+
 /* true if x is a power of 2 */
 #define POWEROF2(x) ((((x)-1) & (x)) == 0)
 
@@ -197,6 +202,13 @@ rte_ring_init(struct rte_ring *r, const char *name, unsigned count,
 	RTE_BUILD_BUG_ON(offsetof(struct rte_ring_headtail, tail) !=
 		offsetof(struct rte_ring_rts_headtail, tail.val.pos));
 
+	/* future proof flags, only allow supported values */
+	if (flags & ~RING_F_MASK) {
+		RTE_LOG(ERR, RING,
+			"Unsupported flags requested %#x\n", flags);
+		return -EINVAL;
+	}
+
 	/* init the ring structure */
 	memset(r, 0, sizeof(*r));
 	ret = strlcpy(r->name, name, sizeof(r->name));
-- 
2.20.1


^ permalink raw reply	[relevance 3%]

* [dpdk-dev] [PATCH v3 0/4] Enforce checking on flag values in API's
  @ 2020-04-27 23:16  3% ` Stephen Hemminger
  2020-04-27 23:16  3%   ` [dpdk-dev] [PATCH v3 1/4] ring: future proof flag settings Stephen Hemminger
                     ` (5 more replies)
  0 siblings, 6 replies; 200+ results
From: Stephen Hemminger @ 2020-04-27 23:16 UTC (permalink / raw)
  To: dev; +Cc: Stephen Hemminger

The DPDK API's are lax about checking for undefined flag values.
This makes it impossible to add new bits to existing API's
without causing ABI breakage. This means we end up doing unnecessary
symbol versioning just to work around applications that might
pass in naughty bits.

This is the DPDK analog of the Linux kernel openat() problem.
Openat api was added but since kernel did not check flags it
ended up that another syscall openat2() was necessary before
the flags could be used.

v3 - define mask based on existing defines for ring and hash

Stephen Hemminger (4):
  ring: future proof flag settings
  hash: check flags on creation
  stack: check flags on creation
  cfgfile: check flags value

 lib/librte_cfgfile/rte_cfgfile.c  |  4 ++++
 lib/librte_hash/rte_cuckoo_hash.c | 14 ++++++++++++++
 lib/librte_ring/rte_ring.c        | 12 ++++++++++++
 lib/librte_stack/rte_stack.c      |  5 +++++
 4 files changed, 35 insertions(+)

-- 
2.20.1


^ permalink raw reply	[relevance 3%]

* Re: [dpdk-dev] [PATCH v3] mempool: return 0 if area is too small on populate
  @ 2020-04-27 18:02  0%       ` Lukasz Wojciechowski
  0 siblings, 0 replies; 200+ results
From: Lukasz Wojciechowski @ 2020-04-27 18:02 UTC (permalink / raw)
  To: Ray Kinsella, Thomas Monjalon, dev
  Cc: david.marchand, Olivier Matz, Neil Horman, John McNamara,
	Marko Kovacevic, Xiaoyun Li, Jingjing Wu, Andrew Rybchenko


W dniu 27.04.2020 o 13:44, Ray Kinsella pisze:
>
> On 25/04/2020 23:23, Thomas Monjalon wrote:
>> From: Olivier Matz <olivier.matz@6wind.com>
>>
>> Change rte_mempool_populate_iova() and rte_mempool_populate_iova() to
... and rte_mempool_populate_virt()
>> return 0 instead of -EINVAL when there is not enough room to store one
>> object, as it can be helpful for applications to distinguish this
>> specific case.
>>
>> As this is an ABI change, use symbol versioning to preserve old
>> behavior for binary applications.
>>
>> Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
>> ---
>>
>> changes in v3:
>>      - rebase
>>      - remove deprecation notice
>>      - notify API change in release notes
>>      - fix ABI version from 20.0.1 to 20.0.2 (should be 21 maybe)
> yes, should be v21.
>
>> This v3 cannot be merged because of a false positive ABI check:
>>
>> 2 Removed functions:
>>    'function int rte_mempool_populate_iova(rte_mempool*, char*, rte_iova_t, size_t, rte_mempool_memchunk_free_cb_t*, void*)'    {rte_mempool_populate_iova@@DPDK_20.0}
>>    'function int rte_mempool_populate_virt(rte_mempool*, char*, size_t, size_t, rte_mempool_memchunk_free_cb_t*, void*)'    {rte_mempool_populate_virt@@DPDK_20.0}
> Well it's not really a false positive, as the v20 symbols are now missing.
> See notes on VERSION_SYMBOL.
>
>> ---
>>   doc/guides/rel_notes/deprecation.rst       |  5 --
>>   doc/guides/rel_notes/release_20_05.rst     |  4 ++
>>   examples/ntb/ntb_fwd.c                     |  2 +-
>>   lib/librte_mempool/meson.build             |  2 +
>>   lib/librte_mempool/rte_mempool.c           | 77 ++++++++++++++++++----
>>   lib/librte_mempool/rte_mempool.h           | 14 ++--
>>   lib/librte_mempool/rte_mempool_version.map |  7 ++
>>   7 files changed, 90 insertions(+), 21 deletions(-)
>>
>> diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
>> index 1339f54f5f..20aa745b77 100644
>> --- a/doc/guides/rel_notes/deprecation.rst
>> +++ b/doc/guides/rel_notes/deprecation.rst
>> @@ -65,11 +65,6 @@ Deprecation Notices
>>     structure would be made internal (or removed if all dependencies are cleared)
>>     in future releases.
>>   
>> -* mempool: starting from v20.05, the API of rte_mempool_populate_iova()
>> -  and rte_mempool_populate_virt() will change to return 0 instead
>> -  of -EINVAL when there is not enough room to store one object. The ABI
>> -  will be preserved until 20.11.
>> -
>>   * ethdev: the legacy filter API, including
>>     ``rte_eth_dev_filter_supported()``, ``rte_eth_dev_filter_ctrl()`` as well
>>     as filter types MACVLAN, ETHERTYPE, FLEXIBLE, SYN, NTUPLE, TUNNEL, FDIR,
>> diff --git a/doc/guides/rel_notes/release_20_05.rst b/doc/guides/rel_notes/release_20_05.rst
>> index b124c3f287..ab20a7d021 100644
>> --- a/doc/guides/rel_notes/release_20_05.rst
>> +++ b/doc/guides/rel_notes/release_20_05.rst
>> @@ -241,6 +241,10 @@ API Changes
>>      Also, make sure to start the actual text at the margin.
>>      =========================================================
>>   
>> +* mempool: The API of ``rte_mempool_populate_iova()`` and
>> +  ``rte_mempool_populate_virt()`` changed to return 0 instead of -EINVAL
>> +  when there is not enough room to store one object.
>> +
>>   
>>   ABI Changes
>>   -----------
>> diff --git a/examples/ntb/ntb_fwd.c b/examples/ntb/ntb_fwd.c
>> index d49189e175..eba8ebf9fa 100644
>> --- a/examples/ntb/ntb_fwd.c
>> +++ b/examples/ntb/ntb_fwd.c
>> @@ -1319,7 +1319,7 @@ ntb_mbuf_pool_create(uint16_t mbuf_seg_size, uint32_t nb_mbuf,
>>   					mz->len - ntb_info.ntb_hdr_size,
>>   					ntb_mempool_mz_free,
>>   					(void *)(uintptr_t)mz);
>> -		if (ret < 0) {
>> +		if (ret <= 0) {
>>   			rte_memzone_free(mz);
>>   			rte_mempool_free(mp);
>>   			return NULL;
>> diff --git a/lib/librte_mempool/meson.build b/lib/librte_mempool/meson.build
>> index a6e861cbfc..7dbe6b9bea 100644
>> --- a/lib/librte_mempool/meson.build
>> +++ b/lib/librte_mempool/meson.build
>> @@ -9,6 +9,8 @@ foreach flag: extra_flags
>>   	endif
>>   endforeach
>>   
>> +use_function_versioning = true
>> +
>>   sources = files('rte_mempool.c', 'rte_mempool_ops.c',
>>   		'rte_mempool_ops_default.c', 'mempool_trace_points.c')
>>   headers = files('rte_mempool.h', 'rte_mempool_trace.h',
>> diff --git a/lib/librte_mempool/rte_mempool.c b/lib/librte_mempool/rte_mempool.c
>> index 0be8f9f59d..edbdafaafb 100644
>> --- a/lib/librte_mempool/rte_mempool.c
>> +++ b/lib/librte_mempool/rte_mempool.c
>> @@ -31,6 +31,7 @@
>>   #include <rte_string_fns.h>
>>   #include <rte_spinlock.h>
>>   #include <rte_tailq.h>
>> +#include <rte_function_versioning.h>
>>   
>>   #include "rte_mempool.h"
>>   #include "rte_mempool_trace.h"
>> @@ -303,12 +304,17 @@ mempool_ops_alloc_once(struct rte_mempool *mp)
>>   	return 0;
>>   }
>>   
>> +__vsym int
>> +rte_mempool_populate_iova_v20_0_2(struct rte_mempool *mp, char *vaddr,
>> +	rte_iova_t iova, size_t len, rte_mempool_memchunk_free_cb_t *free_cb,
>> +	void *opaque);
>> +
>>   /* Add objects in the pool, using a physically contiguous memory
>>    * zone. Return the number of objects added, or a negative value
>>    * on error.
>>    */
>> -static int
>> -__rte_mempool_populate_iova(struct rte_mempool *mp, char *vaddr,
>> +__vsym int
>> +rte_mempool_populate_iova_v20_0_2(struct rte_mempool *mp, char *vaddr,
>>   	rte_iova_t iova, size_t len, rte_mempool_memchunk_free_cb_t *free_cb,
>>   	void *opaque)
>>   {
>> @@ -366,14 +372,27 @@ __rte_mempool_populate_iova(struct rte_mempool *mp, char *vaddr,
>>   	return ret;
>>   }
>>   
>> -int
>> -rte_mempool_populate_iova(struct rte_mempool *mp, char *vaddr,
>> +BIND_DEFAULT_SYMBOL(rte_mempool_populate_iova, _v20_0_2, 20.0.2);
> as discussed v21.
>
>> +MAP_STATIC_SYMBOL(
>> +	int rte_mempool_populate_iova(struct rte_mempool *mp, char *vaddr,
>> +				rte_iova_t iova, size_t len,
>> +				rte_mempool_memchunk_free_cb_t *free_cb,
>> +				void *opaque),
>> +	rte_mempool_populate_iova_v20_0_2);
>> +
>> +__vsym int
>> +rte_mempool_populate_iova_v20(struct rte_mempool *mp, char *vaddr,
>> +	rte_iova_t iova, size_t len, rte_mempool_memchunk_free_cb_t *free_cb,
>> +	void *opaque);
>> +
>> +__vsym int
>> +rte_mempool_populate_iova_v20(struct rte_mempool *mp, char *vaddr,
>>   	rte_iova_t iova, size_t len, rte_mempool_memchunk_free_cb_t *free_cb,
>>   	void *opaque)
>>   {
>>   	int ret;
>>   
>> -	ret = __rte_mempool_populate_iova(mp, vaddr, iova, len, free_cb,
>> +	ret = rte_mempool_populate_iova_v20_0_2(mp, vaddr, iova, len, free_cb,
>>   					opaque);
>>   	if (ret == 0)
>>   		ret = -EINVAL;
>> @@ -381,6 +400,7 @@ rte_mempool_populate_iova(struct rte_mempool *mp, char *vaddr,
>>   	rte_mempool_trace_populate_iova(mp, vaddr, iova, len, free_cb, opaque);
>>   	return ret;
>>   }
>> +VERSION_SYMBOL(rte_mempool_populate_iova, _v20_0, 20.0);
> this should be
>
> VERSION_SYMBOL(rte_mempool_populate_iova, _v20, 20.0);
>
>>   
>>   static rte_iova_t
>>   get_iova(void *addr)
>> @@ -395,11 +415,16 @@ get_iova(void *addr)
>>   	return ms->iova + RTE_PTR_DIFF(addr, ms->addr);
>>   }
>>   
>> +__vsym int
>> +rte_mempool_populate_virt_v20_0_2(struct rte_mempool *mp, char *addr,
>> +	size_t len, size_t pg_sz, rte_mempool_memchunk_free_cb_t *free_cb,
>> +	void *opaque);
>> +
>>   /* Populate the mempool with a virtual area. Return the number of
>>    * objects added, or a negative value on error.
>>    */
>> -int
>> -rte_mempool_populate_virt(struct rte_mempool *mp, char *addr,
>> +__vsym int
>> +rte_mempool_populate_virt_v20_0_2(struct rte_mempool *mp, char *addr,
>>   	size_t len, size_t pg_sz, rte_mempool_memchunk_free_cb_t *free_cb,
>>   	void *opaque)
>>   {
>> @@ -432,7 +457,7 @@ rte_mempool_populate_virt(struct rte_mempool *mp, char *addr,
>>   				break;
>>   		}
>>   
>> -		ret = __rte_mempool_populate_iova(mp, addr + off, iova,
>> +		ret = rte_mempool_populate_iova_v20_0_2(mp, addr + off, iova,
>>   			phys_len, free_cb, opaque);
>>   		if (ret == 0)
>>   			continue;
>> @@ -443,9 +468,6 @@ rte_mempool_populate_virt(struct rte_mempool *mp, char *addr,
>>   		cnt += ret;
>>   	}
>>   
>> -	if (cnt == 0)
>> -		return -EINVAL;
>> -
>>   	rte_mempool_trace_populate_virt(mp, addr, len, pg_sz, free_cb, opaque);
>>   	return cnt;
>>   
>> @@ -453,6 +475,35 @@ rte_mempool_populate_virt(struct rte_mempool *mp, char *addr,
>>   	rte_mempool_free_memchunks(mp);
>>   	return ret;
>>   }
>> +BIND_DEFAULT_SYMBOL(rte_mempool_populate_virt, _v20_0_2, 20.0.2);
> as discussed v21.
>
>> +MAP_STATIC_SYMBOL(
>> +	int rte_mempool_populate_virt(struct rte_mempool *mp,
>> +				char *addr, size_t len, size_t pg_sz,
>> +				rte_mempool_memchunk_free_cb_t *free_cb,
>> +				void *opaque),
>> +	rte_mempool_populate_virt_v20_0_2);
>> +
>> +__vsym int
>> +rte_mempool_populate_virt_v20(struct rte_mempool *mp, char *addr,
>> +	size_t len, size_t pg_sz, rte_mempool_memchunk_free_cb_t *free_cb,
>> +	void *opaque);
>> +
>> +__vsym int
>> +rte_mempool_populate_virt_v20(struct rte_mempool *mp, char *addr,
>> +	size_t len, size_t pg_sz, rte_mempool_memchunk_free_cb_t *free_cb,
>> +	void *opaque)
>> +{
>> +	int ret;
>> +
>> +	ret = rte_mempool_populate_virt_v20_0_2(mp, addr, len, pg_sz,
>> +						free_cb, opaque);
>> +
>> +	if (ret == 0)
>> +		ret = -EINVAL;
>> +
>> +	return ret;
>> +}
>> +VERSION_SYMBOL(rte_mempool_populate_virt, _v20_0, 20.0);
> this should be
> VERSION_SYMBOL(rte_mempool_populate_virt, _v20, 20.0);
>
>
>>   
>>   /* Get the minimal page size used in a mempool before populating it. */
>>   int
>> @@ -609,6 +660,8 @@ rte_mempool_populate_default(struct rte_mempool *mp)
>>   				mz->len, pg_sz,
>>   				rte_mempool_memchunk_mz_free,
>>   				(void *)(uintptr_t)mz);
>> +		if (ret == 0) /* should not happen */
>> +			ret = -ENOBUFS;
>>   		if (ret < 0) {
>>   			rte_memzone_free(mz);
>>   			goto fail;
>> @@ -701,6 +754,8 @@ rte_mempool_populate_anon(struct rte_mempool *mp)
>>   
>>   	ret = rte_mempool_populate_virt(mp, addr, size, getpagesize(),
>>   		rte_mempool_memchunk_anon_free, addr);
>> +	if (ret == 0) /* should not happen */
>> +		ret = -ENOBUFS;
>>   	if (ret < 0) {
>>   		rte_errno = -ret;
>>   		goto fail;
>> diff --git a/lib/librte_mempool/rte_mempool.h b/lib/librte_mempool/rte_mempool.h
>> index 6e0573ea42..652d19f9f1 100644
>> --- a/lib/librte_mempool/rte_mempool.h
>> +++ b/lib/librte_mempool/rte_mempool.h
>> @@ -1112,9 +1112,12 @@ rte_mempool_free(struct rte_mempool *mp);
>>    * @param opaque
>>    *   An opaque argument passed to free_cb.
>>    * @return
>> - *   The number of objects added on success.
>> + *   The number of objects added on success (strictly positive).
>>    *   On error, the chunk is not added in the memory list of the
>> - *   mempool and a negative errno is returned.
>> + *   mempool the following code is returned:
>> + *     (0): not enough room in chunk for one object.
>> + *     (-ENOSPC): mempool is already populated.
>> + *     (-ENOMEM): allocation failure.
>>    */
>>   int rte_mempool_populate_iova(struct rte_mempool *mp, char *vaddr,
>>   	rte_iova_t iova, size_t len, rte_mempool_memchunk_free_cb_t *free_cb,
>> @@ -1139,9 +1142,12 @@ int rte_mempool_populate_iova(struct rte_mempool *mp, char *vaddr,
>>    * @param opaque
>>    *   An opaque argument passed to free_cb.
>>    * @return
>> - *   The number of objects added on success.
>> + *   The number of objects added on success (strictly positive).
>>    *   On error, the chunk is not added in the memory list of the
>> - *   mempool and a negative errno is returned.
>> + *   mempool the following code is returned:
>> + *     (0): not enough room in chunk for one object.
>> + *     (-ENOSPC): mempool is already populated.
>> + *     (-ENOMEM): allocation failure.
>>    */
>>   int
>>   rte_mempool_populate_virt(struct rte_mempool *mp, char *addr,
>> diff --git a/lib/librte_mempool/rte_mempool_version.map b/lib/librte_mempool/rte_mempool_version.map
>> index 695dd6e04f..9e58093665 100644
>> --- a/lib/librte_mempool/rte_mempool_version.map
>> +++ b/lib/librte_mempool/rte_mempool_version.map
>> @@ -31,6 +31,13 @@ DPDK_20.0 {
>>   	local: *;
>>   };
>>   
>> +DPDK_20.0.2 {
> as discussed DPDK_21
>
>> +	global:
>> +
>> +	rte_mempool_populate_iova;
>> +	rte_mempool_populate_virt;
>> +} DPDK_20.0;
>> +
>>   EXPERIMENTAL {
>>   	global:
>>   
>>
-- 

Lukasz Wojciechowski
Principal Software Engineer

Samsung R&D Institute Poland
Samsung Electronics
Office +48 22 377 88 25
l.wojciechow@partner.samsung.com


^ permalink raw reply	[relevance 0%]

* Re: [dpdk-dev] [PATCH v4 1/4] ethdev: add tm support for shaper config in pkt mode
  2020-04-27 16:49  3%             ` Ferruh Yigit
@ 2020-04-27 16:59  3%               ` Jerin Jacob
  2020-04-28 11:51  0%                 ` [dpdk-dev] [EXT] " Nithin Dabilpuram
  2020-04-28 14:06  4%                 ` [dpdk-dev] " Ferruh Yigit
  0 siblings, 2 replies; 200+ results
From: Jerin Jacob @ 2020-04-27 16:59 UTC (permalink / raw)
  To: Ferruh Yigit
  Cc: Dumitrescu, Cristian, Nithin Dabilpuram, Singh, Jasvinder,
	Thomas Monjalon, Andrew Rybchenko, dev, jerinj, kkanas,
	Nithin Dabilpuram, Kinsella, Ray, Neil Horman, Luca Boccassi,
	Kevin Traynor, David Marchand, Bruce Richardson

On Mon, Apr 27, 2020 at 10:19 PM Ferruh Yigit <ferruh.yigit@intel.com> wrote:
>
> On 4/27/2020 5:29 PM, Jerin Jacob wrote:
> > On Mon, Apr 27, 2020 at 9:42 PM Ferruh Yigit <ferruh.yigit@intel.com> wrote:
> >>
> >> On 4/27/2020 10:19 AM, Dumitrescu, Cristian wrote:
> >>>
> >>>
> >>>> -----Original Message-----
> >>>> From: Yigit, Ferruh <ferruh.yigit@intel.com>
> >>>> Sent: Saturday, April 25, 2020 9:09 PM
> >>>> To: Dumitrescu, Cristian <cristian.dumitrescu@intel.com>; Nithin Dabilpuram
> >>>> <nithind1988@gmail.com>; Singh, Jasvinder <jasvinder.singh@intel.com>;
> >>>> Thomas Monjalon <thomas@monjalon.net>; Andrew Rybchenko
> >>>> <arybchenko@solarflare.com>
> >>>> Cc: dev@dpdk.org; jerinj@marvell.com; kkanas@marvell.com; Nithin
> >>>> Dabilpuram <ndabilpuram@marvell.com>
> >>>> Subject: Re: [PATCH v4 1/4] ethdev: add tm support for shaper config in pkt
> >>>> mode
> >>>>
> >>>> On 4/24/2020 11:28 AM, Dumitrescu, Cristian wrote:
> >>>>>
> >>>>>
> >>>>>> -----Original Message-----
> >>>>>> From: Nithin Dabilpuram <nithind1988@gmail.com>
> >>>>>> Sent: Wednesday, April 22, 2020 6:21 PM
> >>>>>> To: Singh, Jasvinder <jasvinder.singh@intel.com>; Dumitrescu, Cristian
> >>>>>> <cristian.dumitrescu@intel.com>; Thomas Monjalon
> >>>>>> <thomas@monjalon.net>; Yigit, Ferruh <ferruh.yigit@intel.com>; Andrew
> >>>>>> Rybchenko <arybchenko@solarflare.com>
> >>>>>> Cc: dev@dpdk.org; jerinj@marvell.com; kkanas@marvell.com; Nithin
> >>>>>> Dabilpuram <ndabilpuram@marvell.com>
> >>>>>> Subject: [PATCH v4 1/4] ethdev: add tm support for shaper config in pkt
> >>>>>> mode
> >>>>>>
> >>>>>> From: Nithin Dabilpuram <ndabilpuram@marvell.com>
> >>>>>>
> >>>>>> Some NIC hardware support shaper to work in packet mode i.e
> >>>>>> shaping or ratelimiting traffic is in packets per second (PPS) as
> >>>>>> opposed to default bytes per second (BPS). Hence this patch
> >>>>>> adds support to configure shared or private shaper in packet mode,
> >>>>>> provide rate in PPS and add related tm capabilities in port/level/node
> >>>>>> capability structures.
> >>>>>>
> >>>>>> This patch also updates tm port/level/node capability structures with
> >>>>>> exiting features of scheduler wfq packet mode, scheduler wfq byte mode
> >>>>>> and private/shared shaper byte mode.
> >>>>>>
> >>>>>> SoftNIC PMD is also updated with new capabilities.
> >>>>>>
> >>>>>> Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
> >>>>>> ---
> >>>>>> v3..v4:
> >>>>>> - Update text under packet_mode as per Cristian.
> >>>>>> - Update rte_eth_softnic_tm.c based on Jasvinder's comments.
> >>>>>> - Add error enum
> >>>> RTE_TM_ERROR_TYPE_SHAPER_PROFILE_PACKET_MODE
> >>>>>> - Fix shaper_profile_check() with packet mode check
> >>>>>> - Fix typo's
> >>>>>>
> >>>>>
> >>>>> Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
> >>>>>
> >>>>
> >>>> Hi Nithin,
> >>>>
> >>>> It looks like patch is causing ABI break, I am getting following warning [1],
> >>>> can you please check?
> >>>>
> >>>> [1]
> >>>> https://pastebin.com/XYNFg14u
> >>>
> >>>
> >>> Hi Ferruh,
> >>>
> >>> The RTE_TM API is marked as experimental, but it looks that this was not correctly marked when __rte_experimental ABI checker was introduced.
> >>>
> >>> It is marked as experimental at the top of the rte_tm.h, similarly to other APIs introduced around same time, but it was not correctly picked up by the ABI check procedure when later introduced, so __rte_experimental was not added to every function.
> >>>
> >>
> >> :(
> >>
> >> Is it time to mature them?
> >>
> >> As you said they are not marked as experimental both in header file (function
> >> declarations) and .map file.
> >>
> >> The problem is, they are not marked as experimental in DPDK_20.0 ABI (v19.11),
> >> so marking them as experimental now will break the ABI. Not sure what to do,
> >> cc'ed a few ABI related names for comment.
> >>
> >> For me, we need to proceed as the experimental tag removed and APIs become
> >> mature starting from v19.11, since this is what happened in practice, and remove
> >> a few existing being experimental references in the doxygen comments.
> >
> > I think, accidentally we can not make a library as NON-experimental.
> > TM never went through experimental to mature transition(see git log
> > lib/librte_ethdev/rte_tm.h)
> > It was a bug to not mark as experimental in each function in the ABI process.
> > Some of the features like packet marking are not even implemented by any HW.
> > I think, we can make API stable only all the features are implemented
> > by one or two HW.
>
> Fair enough, specially if the API is not ready yet.
>
> But they were part of stable ABI, and marking them as experimental now will
> break the old applications using these APIs.

it is still marked as EXPERIMENTAL everywhere and API is not ready yet.
Anyway, we need to break the ABI to make it work on various HW.
I am not sure what to do?
IMO, We need to send a patch as Fixes: for the bug of not adding
__rte_experimental in each function.

Traffic Management API - EXPERIMENTAL
M: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
T: git://dpdk.org/next/dpdk-next-qos
F: lib/librte_ethdev/rte_tm*
>
> >
> >>
> >> Ray, Neil, David, Luca, Kevin, what do you think?
>

^ permalink raw reply	[relevance 3%]

* Re: [dpdk-dev] [PATCH v4 1/4] ethdev: add tm support for shaper config in pkt mode
  @ 2020-04-27 16:49  3%             ` Ferruh Yigit
  2020-04-27 16:59  3%               ` Jerin Jacob
  0 siblings, 1 reply; 200+ results
From: Ferruh Yigit @ 2020-04-27 16:49 UTC (permalink / raw)
  To: Jerin Jacob
  Cc: Dumitrescu, Cristian, Nithin Dabilpuram, Singh, Jasvinder,
	Thomas Monjalon, Andrew Rybchenko, dev, jerinj, kkanas,
	Nithin Dabilpuram, Kinsella, Ray, Neil Horman, Luca Boccassi,
	Kevin Traynor, David Marchand, Bruce Richardson

On 4/27/2020 5:29 PM, Jerin Jacob wrote:
> On Mon, Apr 27, 2020 at 9:42 PM Ferruh Yigit <ferruh.yigit@intel.com> wrote:
>>
>> On 4/27/2020 10:19 AM, Dumitrescu, Cristian wrote:
>>>
>>>
>>>> -----Original Message-----
>>>> From: Yigit, Ferruh <ferruh.yigit@intel.com>
>>>> Sent: Saturday, April 25, 2020 9:09 PM
>>>> To: Dumitrescu, Cristian <cristian.dumitrescu@intel.com>; Nithin Dabilpuram
>>>> <nithind1988@gmail.com>; Singh, Jasvinder <jasvinder.singh@intel.com>;
>>>> Thomas Monjalon <thomas@monjalon.net>; Andrew Rybchenko
>>>> <arybchenko@solarflare.com>
>>>> Cc: dev@dpdk.org; jerinj@marvell.com; kkanas@marvell.com; Nithin
>>>> Dabilpuram <ndabilpuram@marvell.com>
>>>> Subject: Re: [PATCH v4 1/4] ethdev: add tm support for shaper config in pkt
>>>> mode
>>>>
>>>> On 4/24/2020 11:28 AM, Dumitrescu, Cristian wrote:
>>>>>
>>>>>
>>>>>> -----Original Message-----
>>>>>> From: Nithin Dabilpuram <nithind1988@gmail.com>
>>>>>> Sent: Wednesday, April 22, 2020 6:21 PM
>>>>>> To: Singh, Jasvinder <jasvinder.singh@intel.com>; Dumitrescu, Cristian
>>>>>> <cristian.dumitrescu@intel.com>; Thomas Monjalon
>>>>>> <thomas@monjalon.net>; Yigit, Ferruh <ferruh.yigit@intel.com>; Andrew
>>>>>> Rybchenko <arybchenko@solarflare.com>
>>>>>> Cc: dev@dpdk.org; jerinj@marvell.com; kkanas@marvell.com; Nithin
>>>>>> Dabilpuram <ndabilpuram@marvell.com>
>>>>>> Subject: [PATCH v4 1/4] ethdev: add tm support for shaper config in pkt
>>>>>> mode
>>>>>>
>>>>>> From: Nithin Dabilpuram <ndabilpuram@marvell.com>
>>>>>>
>>>>>> Some NIC hardware support shaper to work in packet mode i.e
>>>>>> shaping or ratelimiting traffic is in packets per second (PPS) as
>>>>>> opposed to default bytes per second (BPS). Hence this patch
>>>>>> adds support to configure shared or private shaper in packet mode,
>>>>>> provide rate in PPS and add related tm capabilities in port/level/node
>>>>>> capability structures.
>>>>>>
>>>>>> This patch also updates tm port/level/node capability structures with
>>>>>> exiting features of scheduler wfq packet mode, scheduler wfq byte mode
>>>>>> and private/shared shaper byte mode.
>>>>>>
>>>>>> SoftNIC PMD is also updated with new capabilities.
>>>>>>
>>>>>> Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
>>>>>> ---
>>>>>> v3..v4:
>>>>>> - Update text under packet_mode as per Cristian.
>>>>>> - Update rte_eth_softnic_tm.c based on Jasvinder's comments.
>>>>>> - Add error enum
>>>> RTE_TM_ERROR_TYPE_SHAPER_PROFILE_PACKET_MODE
>>>>>> - Fix shaper_profile_check() with packet mode check
>>>>>> - Fix typo's
>>>>>>
>>>>>
>>>>> Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
>>>>>
>>>>
>>>> Hi Nithin,
>>>>
>>>> It looks like patch is causing ABI break, I am getting following warning [1],
>>>> can you please check?
>>>>
>>>> [1]
>>>> https://pastebin.com/XYNFg14u
>>>
>>>
>>> Hi Ferruh,
>>>
>>> The RTE_TM API is marked as experimental, but it looks that this was not correctly marked when __rte_experimental ABI checker was introduced.
>>>
>>> It is marked as experimental at the top of the rte_tm.h, similarly to other APIs introduced around same time, but it was not correctly picked up by the ABI check procedure when later introduced, so __rte_experimental was not added to every function.
>>>
>>
>> :(
>>
>> Is it time to mature them?
>>
>> As you said they are not marked as experimental both in header file (function
>> declarations) and .map file.
>>
>> The problem is, they are not marked as experimental in DPDK_20.0 ABI (v19.11),
>> so marking them as experimental now will break the ABI. Not sure what to do,
>> cc'ed a few ABI related names for comment.
>>
>> For me, we need to proceed as the experimental tag removed and APIs become
>> mature starting from v19.11, since this is what happened in practice, and remove
>> a few existing being experimental references in the doxygen comments.
> 
> I think, accidentally we can not make a library as NON-experimental.
> TM never went through experimental to mature transition(see git log
> lib/librte_ethdev/rte_tm.h)
> It was a bug to not mark as experimental in each function in the ABI process.
> Some of the features like packet marking are not even implemented by any HW.
> I think, we can make API stable only all the features are implemented
> by one or two HW.

Fair enough, specially if the API is not ready yet.

But they were part of stable ABI, and marking them as experimental now will
break the old applications using these APIs.

> 
>>
>> Ray, Neil, David, Luca, Kevin, what do you think?


^ permalink raw reply	[relevance 3%]

Results 5601-5800 of ~18000   |  | reverse | sort options + mbox downloads above
-- links below jump to the message on this page --
2019-06-13 14:23     [dpdk-dev] [PATCH v2 0/10] dpdk: introduce __rte_internal tag Neil Horman
2020-04-25 10:56     ` [dpdk-dev] [PATCH v7 0/6] " Haiyue Wang
2020-04-25 14:39       ` David Marchand
2020-04-25 18:09         ` Wang, Haiyue
2020-04-29  8:22  3%       ` David Marchand
2020-04-29  8:24  0%         ` Wang, Haiyue
2019-12-04 10:05     [dpdk-dev] [PATCH] drivers/net: fix mlx* glue libraries ABI version David Marchand
2019-12-12 22:17     ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon
2020-05-07 12:35  7%   ` David Marchand
2020-05-07 20:04  4%     ` Thomas Monjalon
2020-01-04  1:33     [dpdk-dev] [PATCH 00/14] cleanup resources on shutdown Stephen Hemminger
2020-04-28 23:14  3% ` [dpdk-dev] [PATCH v2 0/9] eal: " Stephen Hemminger
2020-04-28 23:58  3% ` [dpdk-dev] [PATCH v3 0/8] " Stephen Hemminger
2020-05-03 17:21  0%   ` David Marchand
2020-01-07 14:56     [dpdk-dev] [PATCH] librte_ethdev: extend dpdk api led control to query capability Laurent Hardy
2020-01-08 10:31     ` Laurent Hardy
2020-01-08 12:59       ` Ferruh Yigit
2020-01-08 13:06         ` Thomas Monjalon
2020-01-08 13:58           ` Laurent Hardy
2020-05-08 12:11  0%         ` Ferruh Yigit
2020-01-17 14:57     [dpdk-dev] [PATCH v2 3/3] [20.05] mempool: return 0 if area is too small on populate Olivier Matz
2020-04-25 22:23     ` [dpdk-dev] [PATCH v3] " Thomas Monjalon
     [not found]       ` <CGME20200427114503eucas1p216417dd6a0d7c0560671e7b16eabe26d@eucas1p2.samsung.com>
2020-04-27 11:44         ` Ray Kinsella
2020-04-27 18:02  0%       ` Lukasz Wojciechowski
2020-01-29 16:43     [dpdk-dev] [RFC v2] meter: fix ABI break due to experimental tag removal Ferruh Yigit
2020-05-13 12:11     ` [dpdk-dev] [PATCH] meter: provide experimental alias of API for old apps Ferruh Yigit
2020-05-13 16:30  4%   ` Thomas Monjalon
2020-05-13 17:37  0%     ` Ferruh Yigit
2020-05-13 18:05       ` [dpdk-dev] [PATCH v2] " Ferruh Yigit
2020-05-14  8:44  4%     ` Ray Kinsella
2020-05-14 11:53  0%       ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
2020-05-14 11:52  4%   ` [dpdk-dev] [PATCH v3] " Ferruh Yigit
2020-02-05 15:17     [dpdk-dev] [PATCH] doc: alias to experimental tag for stable apis Ray Kinsella
2020-05-14 13:38  9% ` [dpdk-dev] [PATCH v5] " Ray Kinsella
2020-02-12 23:08     [dpdk-dev] [RFC 0/4] Enforce flag checking in API's Stephen Hemminger
2020-04-27 23:16  3% ` [dpdk-dev] [PATCH v3 0/4] Enforce checking on flag values " Stephen Hemminger
2020-04-27 23:16  3%   ` [dpdk-dev] [PATCH v3 1/4] ring: future proof flag settings Stephen Hemminger
2020-04-28  4:12  0%     ` Honnappa Nagarahalli
2020-04-27 23:16  3%   ` [dpdk-dev] [PATCH v3 2/4] hash: check flags on creation Stephen Hemminger
2020-04-29  1:08  0%     ` Wang, Yipeng1
2020-04-27 23:16  3%   ` [dpdk-dev] [PATCH v3 3/4] stack: " Stephen Hemminger
2020-05-02  2:36  0%     ` Eads, Gage
2020-04-27 23:16  3%   ` [dpdk-dev] [PATCH v3 4/4] cfgfile: check flags value Stephen Hemminger
2020-04-28 10:24  0%     ` Bruce Richardson
2020-04-28 10:28  0%   ` [dpdk-dev] [PATCH v3 0/4] Enforce checking on flag values in API's Bruce Richardson
2020-04-28 11:04  0%   ` Ananyev, Konstantin
2020-03-03 16:27     [dpdk-dev] [PATCH v1] mbuf: replace zero-length marker with unnamed union Gavin Hu
2020-03-07 15:56     ` [dpdk-dev] [PATCH v2] " Gavin Hu
2020-03-09  8:55       ` Ferruh Yigit
2020-03-09  9:45         ` Gavin Hu
2020-03-09 11:29           ` Ferruh Yigit
2020-03-09 13:30             ` Morten Brørup
2020-03-11  7:50               ` Gavin Hu
2020-03-11  9:04                 ` Morten Brørup
2020-03-11 12:07                   ` Bruce Richardson
2020-03-13  9:22                     ` Gavin Hu
2020-04-07 17:13                       ` Kevin Traynor
2020-04-08 15:04                         ` Gavin Hu
2020-04-08 15:22                           ` [dpdk-dev] [dpdk-stable] " David Marchand
2020-05-14 13:24  0%                         ` Kevin Traynor
2020-03-05  4:33     [dpdk-dev] [RFC v1 1/1] vfio: set vf token and gain vf device access vattunuru
2020-05-05  7:46  4% ` [dpdk-dev] [PATCH v11 0/2] support for VFIO-PCI VF token interface Haiyue Wang
2020-05-05 10:34  4% ` [dpdk-dev] [PATCH v12 " Haiyue Wang
2020-05-06 11:35  4% ` [dpdk-dev] [PATCH v13 " Haiyue Wang
2020-03-06  9:57     [dpdk-dev] [PATCH v2 00/16] NXP DPAAx fixes and enhancements Hemant Agrawal
2020-05-04 12:41  3% ` [dpdk-dev] [PATCH v3 0/8] " Hemant Agrawal
2020-05-07 10:46  3%   ` [dpdk-dev] [PATCH v4 0/9] " Hemant Agrawal
2020-05-08 12:59  3%     ` [dpdk-dev] [PATCH v5 " Hemant Agrawal
2020-05-08 13:02  3%     ` [dpdk-dev] [PATCH v6 00/10] NXP DPAAx fixes and enhancement Hemant Agrawal
2020-03-06 16:41     [dpdk-dev] [PATCH 0/4] Introduce IF proxy library Andrzej Ostruszka
2020-05-04  8:53  2% ` [dpdk-dev] [PATCH v3 " Andrzej Ostruszka
2020-05-04  8:53  1%   ` [dpdk-dev] [PATCH v3 1/4] lib: introduce IF Proxy library Andrzej Ostruszka
2020-03-12  9:57     [dpdk-dev] [PATCH] vhost: return -EAGAIN during unregistering vhost if it is busy Zhike Wang
2020-03-18  3:31     ` 王志克
2020-04-27  8:09       ` [dpdk-dev] [ovs-dev] " Maxime Coquelin
2020-05-06  2:39         ` 王志克
2020-05-06  7:53  3%       ` Maxime Coquelin
2020-03-17  1:17     [dpdk-dev] [PATCH v3 00/12] generic rte atomic APIs deprecate proposal Phil Yang
2020-05-12  8:03     ` [dpdk-dev] [PATCH v4 0/4] " Phil Yang
2020-05-12  8:03       ` [dpdk-dev] [PATCH v4 4/4] eal/atomic: add wrapper for c11 atomics Phil Yang
2020-05-12 18:20         ` Stephen Hemminger
2020-05-12 19:23           ` Honnappa Nagarahalli
2020-05-13  8:57  3%         ` Morten Brørup
2020-05-13 15:30  0%           ` Honnappa Nagarahalli
2020-05-13 19:04  0%           ` Mattias Rönnblom
2020-05-13 19:40  0%             ` Honnappa Nagarahalli
2020-05-13 20:17  0%               ` Mattias Rönnblom
2020-05-14  8:34  0%                 ` Morten Brørup
2020-03-30 12:15     [dpdk-dev] [PATCH v3] eal/cpuflags: add x86 based cpu flags Kevin Laatz
2020-04-16 11:00     ` [dpdk-dev] [PATCH v4] " Kevin Laatz
2020-04-25 16:04       ` Thomas Monjalon
2020-04-27  9:22  4%     ` Kinsella, Ray
2020-04-27  9:27         ` Ray Kinsella
2020-04-27 12:31           ` Thomas Monjalon
2020-04-27 13:58             ` Ray Kinsella
2020-04-29 11:22  0%           ` Neil Horman
2020-04-30  7:59  4%             ` Ray Kinsella
2020-04-28 12:40       ` [dpdk-dev] [PATCH v5] " Kevin Laatz
2020-04-28 16:39         ` Ray Kinsella
2020-04-28 18:11  4%       ` Laatz, Kevin
2020-04-28 19:55  0%         ` Thomas Monjalon
2020-04-29 11:39  3%       ` David Marchand
2020-04-30 10:02  0%         ` Ray Kinsella
2020-03-30 16:00     [dpdk-dev] [PATCH 1/2] ethdev: add tm cap for private shaper packet mode Nithin Dabilpuram
2020-04-22 17:21     ` [dpdk-dev] [PATCH v4 1/4] ethdev: add tm support for shaper config in pkt mode Nithin Dabilpuram
2020-04-24 10:28       ` Dumitrescu, Cristian
2020-04-25 20:09         ` Ferruh Yigit
2020-04-27  9:19           ` Dumitrescu, Cristian
2020-04-27 16:12             ` Ferruh Yigit
2020-04-27 16:28               ` Dumitrescu, Cristian
2020-04-28 15:30  4%             ` Thomas Monjalon
2020-04-28 17:35  0%               ` Dumitrescu, Cristian
2020-04-27 16:29               ` Jerin Jacob
2020-04-27 16:49  3%             ` Ferruh Yigit
2020-04-27 16:59  3%               ` Jerin Jacob
2020-04-28 11:51  0%                 ` [dpdk-dev] [EXT] " Nithin Dabilpuram
2020-04-28 13:56  0%                   ` Ferruh Yigit
2020-04-28 14:06  4%                 ` [dpdk-dev] " Ferruh Yigit
2020-04-28 14:45  5%                   ` Bruce Richardson
2020-04-28 15:04  0%                     ` Luca Boccassi
2020-04-28 15:54  5%                       ` Thomas Monjalon
2020-04-29  8:45  0%                         ` Dumitrescu, Cristian
2020-04-29  9:03  0%                           ` Bruce Richardson
2020-05-01 10:27  0%                             ` Ferruh Yigit
2020-05-01 13:16  0%                               ` [dpdk-dev] [EXT] " Nithin Dabilpuram
2020-05-01 13:18  3%                         ` [dpdk-dev] " Jerin Jacob
2020-05-05  8:01  0%                           ` Ray Kinsella
2020-04-28 15:42  3%                     ` Ray Kinsella
2020-04-10 14:27     [dpdk-dev] [PATCH v3 0/4] add AESNI-MB rawdev for multi-function processing David Coyle
2020-04-14 14:44     ` Thomas Monjalon
2020-04-15 22:19       ` Doherty, Declan
2020-04-15 22:33         ` Thomas Monjalon
2020-04-21 16:46           ` Doherty, Declan
2020-04-21 17:23             ` Coyle, David
2020-04-22 10:51               ` Akhil Goyal
2020-04-22 13:17                 ` Coyle, David
2020-04-22 13:44                   ` Akhil Goyal
2020-05-01 13:18  0%                 ` Zhang, Roy Fan
2020-05-12 17:32  0%                   ` Coyle, David
2020-04-10 16:43     [dpdk-dev] [PATCH v2 00/10] eal: Windows basic memory management Dmitry Kozlyuk
2020-04-14 19:44     ` [dpdk-dev] [PATCH v3 00/10] " Dmitry Kozlyuk
2020-04-14 19:44       ` [dpdk-dev] [PATCH v3 08/10] eal/windows: fix rte_page_sizes with Clang on Windows Dmitry Kozlyuk
2020-04-15  9:34         ` Jerin Jacob
2020-04-15 10:32           ` Dmitry Kozlyuk
2020-04-15 10:57             ` Jerin Jacob
2020-04-15 11:09               ` Dmitry Kozlyuk
2020-04-15 11:17                 ` Jerin Jacob
2020-05-06  5:41  0%               ` Ray Kinsella
2020-04-28 23:50     ` [dpdk-dev] [PATCH v4 0/8] Windows basic memory management Dmitry Kozlyuk
2020-04-28 23:50  4%   ` [dpdk-dev] [PATCH v4 1/8] eal: replace rte_page_sizes with a set of constants Dmitry Kozlyuk
2020-04-20  8:33     [dpdk-dev] [PATCH] cryptodev: add support for user callback functions Abhinandan Gujjar
2020-04-24 15:10     ` Ananyev, Konstantin
2020-05-07 14:46  0%   ` Gujjar, Abhinandan S
2020-04-20  9:34     [dpdk-dev] [PATCH] abi: change references to abi 20.0.1 to abi v21 Ray Kinsella
2020-04-23  6:41     ` [dpdk-dev] [PATCH v2] " Ray Kinsella
2020-04-24 14:10       ` David Marchand
2020-04-24 14:50         ` Ray Kinsella
2020-04-29 12:19  9%       ` Dodji Seketeli
2020-04-30  8:23  6%         ` Ray Kinsella
2020-04-30 10:21 31% ` [dpdk-dev] [PATCH v5] " Ray Kinsella
2020-04-30 10:27 10% ` [dpdk-dev] [PATCH v6 1/1] " Ray Kinsella
2020-04-30 10:27 31%   ` Ray Kinsella
2020-05-04 22:23  6%     ` Thomas Monjalon
2020-05-04 22:05  6%   ` Thomas Monjalon
2020-04-21  6:22     [dpdk-dev] [PATCH v3] ethdev: support flow aging Bill Zhou
2020-04-21 10:11     ` [dpdk-dev] [PATCH v4] " Bill Zhou
2020-04-29 14:50  0%   ` Tom Barbette
2020-04-30  7:36  0%     ` Matan Azrad
2020-04-30  7:49  0%       ` Tom Barbette
2020-04-23 10:12     [dpdk-dev] [PATCH v1] abi: document reasons behind the three part versioning Ray Kinsella
2020-05-04 21:46  4% ` Thomas Monjalon
2020-05-05  8:07  4%   ` Ray Kinsella
2020-05-05  8:31  4%     ` Thomas Monjalon
2020-05-05  8:56 19% ` [dpdk-dev] [PATCH v2] " Ray Kinsella
2020-04-26 16:52     [dpdk-dev] [PATCH v4] mempool: return 0 if area is too small on populate Thomas Monjalon
2020-05-04 12:49 11% ` [dpdk-dev] [PATCH v5] " Olivier Matz
2020-05-04 12:54  0%   ` Andrew Rybchenko
2020-05-04 15:47  0%     ` Lukasz Wojciechowski
2020-05-04 22:30  0%       ` Thomas Monjalon
2020-04-28  9:15  3% [dpdk-dev] [Bug 465] app/test compile failed with gcc and clang bugzilla
2020-04-29 18:05  2% [dpdk-dev] [RFC] hash: unify crc32 API header for x86 and ARM pbhagavatula
2020-04-30  9:14  0% ` Van Haaren, Harry
2020-04-30  9:27  0%   ` Pavan Nikhilesh Bhagavatula
2020-05-06 22:02  0% ` Wang, Yipeng1
2020-05-10 22:49  0%   ` Pavan Nikhilesh Bhagavatula
2020-05-08 12:55  0% ` Ananyev, Konstantin
2020-05-10 22:53  0%   ` Pavan Nikhilesh Bhagavatula
2020-05-11  9:46  0%     ` Ananyev, Konstantin
2020-05-11 10:23  0%       ` Pavan Nikhilesh Bhagavatula
2020-05-11 10:27  0%         ` Ananyev, Konstantin
2020-05-11 10:57  0%           ` Pavan Nikhilesh Bhagavatula
2020-05-11 12:10  0%             ` Ananyev, Konstantin
2020-05-11 12:32  0%               ` Pavan Nikhilesh Bhagavatula
2020-05-12 20:40  3% ` [dpdk-dev] [RFC v2] " pbhagavatula
2020-05-13  3:04  3%   ` Ruifeng Wang
2020-05-13 13:22  0%     ` Ananyev, Konstantin
2020-04-30  5:46 33% [dpdk-dev] [PATCH v1 1/2] devtools: add internal ABI version check Haiyue Wang
2020-04-30  5:46  4% ` [dpdk-dev] [PATCH v1 2/2] devtools: updating internal symbols ABI version Haiyue Wang
2020-04-30 13:55  4% [dpdk-dev] DPDK Release Status Meeting 30/04/2020 Ferruh Yigit
2020-04-30 15:52     [dpdk-dev] [PATCH v4 1/2] cryptodev: add chacha20-poly1305 aead algorithm Arek Kusztal
2020-04-30 15:52 10% ` [dpdk-dev] [PATCH v4 2/2] cryptodev: version cryptodev info get function Arek Kusztal
2020-05-01 17:16     [dpdk-dev] [PATCH] doc: deprication notice to mark tm spec as experimental Nithin Dabilpuram
2020-05-05  6:47  3% ` Ray Kinsella
2020-05-05  7:45  0%   ` [dpdk-dev] [EXT] " Nithin Dabilpuram
2020-05-05  8:07  5% ` [dpdk-dev] [PATCH v2] " Nithin Dabilpuram
2020-05-05  8:10  0%   ` Ray Kinsella
2020-05-05  8:55  0%   ` Dumitrescu, Cristian
2020-05-02 16:10  4% [dpdk-dev] [PATCH] common/octeontx: fix GCC 9.1 ABI break pbhagavatula
2020-05-04  9:17  4% ` Harman Kalra
2020-05-05 10:33  4%   ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
2020-05-06 21:51  4%     ` Thomas Monjalon
2020-05-05 11:20 10% [dpdk-dev] [PATCH v1 1/3] devtools: create internal ignore file for libabigail Ophir Munk
2020-05-05 11:45  0% ` Matan Azrad
2020-05-05 14:53  0% ` David Marchand
2020-05-05 15:02  0%   ` Ray Kinsella
2020-05-07  7:37     ` [dpdk-dev] [PATCH v2 0/2] add INTERNAL tags and avoid comparison Ophir Munk
2020-05-07  7:37  2%   ` [dpdk-dev] [PATCH v2 1/2] common/mlx5: add rte internal tag " Ophir Munk
2020-05-07  7:44  0%     ` Matan Azrad
2020-05-07  7:56  0%     ` Ray Kinsella
2020-05-07  8:56  2%     ` [dpdk-dev] [PATCH v3 " Ophir Munk
2020-05-07 10:23           ` Thomas Monjalon
2020-05-07 11:41  3%         ` Ophir Munk
2020-05-07 20:08  3%           ` Thomas Monjalon
2020-05-10  8:14  0%             ` Ophir Munk
2020-05-07 11:31  2%       ` [dpdk-dev] [PATCH v4 " Ophir Munk
2020-05-12 10:52  0%         ` Raslan Darawsheh
2020-05-05 14:08  3% [dpdk-dev] [PATCH 1/7] common/dpaax: move internal symbols into INTERNAL section Hemant Agrawal
2020-05-05 14:08  3% ` [dpdk-dev] [PATCH 2/7] mempool/dpaa2: " Hemant Agrawal
2020-05-05 14:08  1% ` [dpdk-dev] [PATCH 3/7] bus/fslmc: " Hemant Agrawal
2020-05-05 14:08  1% ` [dpdk-dev] [PATCH 4/7] bus/dpaa: " Hemant Agrawal
2020-05-05 14:08  3% ` [dpdk-dev] [PATCH 5/7] crypto: " Hemant Agrawal
2020-05-05 14:08  3% ` [dpdk-dev] [PATCH 6/7] net/dpaa2: " Hemant Agrawal
2020-05-05 14:08  3% ` [dpdk-dev] [PATCH 7/7] net/dpaa: " Hemant Agrawal
2020-05-05 17:07  4% ` [dpdk-dev] [PATCH 1/7] common/dpaax: " David Marchand
2020-05-07  6:20  0%   ` Hemant Agrawal
2020-05-07  6:54  0%     ` Ray Kinsella
2020-05-12 14:00  3% ` [dpdk-dev] [PATCH v2 01/12] " Hemant Agrawal
2020-05-12 14:00  3%   ` [dpdk-dev] [PATCH v2 02/12] mempool/dpaa2: " Hemant Agrawal
2020-05-12 14:00  1%   ` [dpdk-dev] [PATCH v2 03/12] bus/fslmc: " Hemant Agrawal
2020-05-12 14:00  1%   ` [dpdk-dev] [PATCH v2 06/12] bus/dpaa: " Hemant Agrawal
2020-05-12 14:00  3%   ` [dpdk-dev] [PATCH v2 07/12] crypto: " Hemant Agrawal
2020-05-12 14:00  3%   ` [dpdk-dev] [PATCH v2 08/12] net/dpaa2: " Hemant Agrawal
2020-05-12 14:00  3%   ` [dpdk-dev] [PATCH v2 09/12] net/dpaa: " Hemant Agrawal
2020-05-13 12:44  4%   ` [dpdk-dev] [PATCH v2 01/12] common/dpaax: " Thomas Monjalon
2020-05-13 13:27       ` [dpdk-dev] [PATCH v3 00/12] NXP DPAAx: move internal symbols to INTERNAL Hemant Agrawal
2020-05-13 13:27  3%     ` [dpdk-dev] [PATCH v3 01/12] common/dpaax: move internal symbols into INTERNAL section Hemant Agrawal
2020-05-13 14:06  0%       ` Hemant Agrawal (OSS)
2020-05-14  7:13  3%         ` Ray Kinsella
2020-05-14  9:53  0%           ` Hemant Agrawal (OSS)
2020-05-13 13:27  3%     ` [dpdk-dev] [PATCH v3 02/12] mempool/dpaa2: " Hemant Agrawal
2020-05-13 13:27  1%     ` [dpdk-dev] [PATCH v3 03/12] bus/fslmc: " Hemant Agrawal
2020-05-13 13:27  1%     ` [dpdk-dev] [PATCH v3 04/12] bus/dpaa: " Hemant Agrawal
2020-05-13 13:27  3%     ` [dpdk-dev] [PATCH v3 05/12] crypto: " Hemant Agrawal
2020-05-13 13:27  3%     ` [dpdk-dev] [PATCH v3 06/12] net/dpaa2: " Hemant Agrawal
2020-05-13 13:27  3%     ` [dpdk-dev] [PATCH v3 07/12] net/dpaa: " Hemant Agrawal
2020-05-14 13:25         ` [dpdk-dev] [PATCH v4 00/13]NXP DPAAx: move internal symbols to INTERNAL Hemant Agrawal
2020-05-14 13:25  3%       ` [dpdk-dev] [PATCH v4 01/13] common/dpaax: move internal symbols into INTERNAL section Hemant Agrawal
2020-05-14 13:25  1%       ` [dpdk-dev] [PATCH v4 02/13] bus/fslmc: " Hemant Agrawal
2020-05-14 13:25  1%       ` [dpdk-dev] [PATCH v4 03/13] bus/dpaa: " Hemant Agrawal
2020-05-14 13:25  3%       ` [dpdk-dev] [PATCH v4 04/13] crypto: " Hemant Agrawal
2020-05-14 13:25  3%       ` [dpdk-dev] [PATCH v4 05/13] mempool/dpaa2: " Hemant Agrawal
2020-05-14 13:25  3%       ` [dpdk-dev] [PATCH v4 06/13] net/dpaa: " Hemant Agrawal
2020-05-14 13:25  3%       ` [dpdk-dev] [PATCH v4 07/13] net/dpaa2: " Hemant Agrawal
2020-05-14 14:24           ` [dpdk-dev] [PATCH v5 00/13] NXP DPAAx: move internal symbols to INTERNAL Hemant Agrawal
2020-05-14 14:24  3%         ` [dpdk-dev] [PATCH v5 01/13] common/dpaax: move internal symbols into INTERNAL section Hemant Agrawal
2020-05-14 14:24  1%         ` [dpdk-dev] [PATCH v5 02/13] bus/fslmc: " Hemant Agrawal
2020-05-14 14:24  3%         ` [dpdk-dev] [PATCH v5 04/13] crypto: " Hemant Agrawal
2020-05-05 17:49  5% [dpdk-dev] [PATCH v1] doc: fix references to bind_default_symbol Ray Kinsella
2020-05-06  8:26  8% ` [dpdk-dev] [PATCH v2] " Ray Kinsella
2020-05-06 15:41  8% ` [dpdk-dev] [PATCH v3] " Ray Kinsella
2020-05-07 10:57     [dpdk-dev] [PATCH v5 1/2] cryptodev: add chacha20-poly1305 aead algorithm Arek Kusztal
2020-05-07 10:57 10% ` [dpdk-dev] [PATCH v5 2/2] cryptodev: version cryptodev info get function Arek Kusztal
2020-05-07 11:05  0%   ` Ray Kinsella
2020-05-09 21:11  4%     ` Akhil Goyal
2020-05-11  6:12  0%       ` Ray Kinsella
2020-05-11  7:47  5%       ` Ray Kinsella
2020-05-11  8:18  4%         ` Akhil Goyal
2020-05-11 11:38  4%           ` Akhil Goyal
2020-05-11 16:09  5%           ` Ray Kinsella
2020-05-07 18:12  0%   ` Trahe, Fiona
2020-05-07 12:53  4% [dpdk-dev] DPDK Release Status Meeting 7/05/2020 Ferruh Yigit
2020-05-11 10:00  3% [dpdk-dev] [PATCH 1/2] common/octeontx2: move internal symbols to INTERNAL section pbhagavatula
2020-05-11 10:00  3% ` [dpdk-dev] [PATCH 2/2] mempool/octeontx2: " pbhagavatula
2020-05-11 14:45  0% ` [dpdk-dev] [PATCH 1/2] common/octeontx2: " Thomas Monjalon
2020-05-13  1:04  3% ` [dpdk-dev] [PATCH v2 " pbhagavatula
2020-05-13  1:04  3%   ` [dpdk-dev] [PATCH v2 2/2] mempool/octeontx2: " pbhagavatula
2020-05-13  9:55  3%   ` [dpdk-dev] [PATCH v3 1/2] common/octeontx2: " pbhagavatula
2020-05-13  9:55  3%     ` [dpdk-dev] [PATCH v3 2/2] mempool/octeontx2: " pbhagavatula
2020-05-14  7:02  0%   ` [dpdk-dev] [PATCH v2 1/2] common/octeontx2: " Ray Kinsella
2020-05-12  2:22     [dpdk-dev] [dpdk-announce] release candidate 20.05-rc2 Thomas Monjalon
2020-05-12 16:41  7% ` [dpdk-dev] Release candidate 20.05-rc2 ABI Ray Kinsella
2020-05-12 20:40  4%   ` Honnappa Nagarahalli
2020-05-13  8:24  3% [dpdk-dev] [Bug 471] failing to build test from app/test bugzilla
2020-05-13 10:42  4% [dpdk-dev] [PATCH v1] doc: remove deprecation notice about old devargs changes Gaetan Rivet
2020-05-13 10:43 36% [dpdk-dev] [PATCH v1] doc: fix typos and errors in abi policy doc Gaetan Rivet
2020-05-14  6:40  4% ` Ray Kinsella
2020-05-14  9:00  3% [dpdk-dev] DPDK-20.05 RC2 day3 quick report Peng, Yuan
2020-05-14 11:13  4% [dpdk-dev] DPDK Release Status Meeting 14/05/2020 Ferruh Yigit

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).