[02/27] eventdev: do not pass disable_implicit_release bit to trace macro
diff mbox series

Message ID 20200612212434.6852-3-timothy.mcdaniel@intel.com
State Superseded, archived
Delegated to: Jerin Jacob
Headers show
Series
  • V1 event/dlb add Intel DLB PMD
Related show

Checks

Context Check Description
ci/Intel-compilation fail Compilation issues
ci/checkpatch warning coding style issues

Commit Message

Timothy McDaniel June 12, 2020, 9:24 p.m. UTC
The disable implicit_release indicator is now a bitfield, so it
    must be converted to uint8_t when calling the tracepoint macro.

Change-Id: Iab83bbc295de2431a936ce2a73ed6801366d392f
Signed-off-by: McDaniel, Timothy <timothy.mcdaniel@intel.com>
---
 lib/librte_eventdev/rte_event_crypto_adapter.c |  7 ++++++-
 lib/librte_eventdev/rte_event_eth_tx_adapter.c | 14 ++++++++++++--
 lib/librte_eventdev/rte_eventdev.c             | 10 +++++++---
 lib/librte_eventdev/rte_eventdev_trace.h       | 15 +++++++++------
 4 files changed, 34 insertions(+), 12 deletions(-)

Patch
diff mbox series

diff --git a/lib/librte_eventdev/rte_event_crypto_adapter.c b/lib/librte_eventdev/rte_event_crypto_adapter.c
index 8f2593316..1b56f2eb4 100644
--- a/lib/librte_eventdev/rte_event_crypto_adapter.c
+++ b/lib/librte_eventdev/rte_event_crypto_adapter.c
@@ -205,8 +205,10 @@  rte_event_crypto_adapter_create_ext(uint8_t id, uint8_t dev_id,
 	struct rte_event_crypto_adapter *adapter;
 	char mem_name[CRYPTO_ADAPTER_NAME_LEN];
 	struct rte_event_dev_info dev_info;
+	struct rte_event_port_conf *port_conf = conf_arg;
 	int socket_id;
 	uint8_t i;
+	uint8_t disable_impl_rel;
 	int ret;
 
 	EVENT_CRYPTO_ADAPTER_ID_VALID_OR_ERR_RET(id, -EINVAL);
@@ -268,8 +270,11 @@  rte_event_crypto_adapter_create_ext(uint8_t id, uint8_t dev_id,
 
 	event_crypto_adapter[id] = adapter;
 
+	disable_impl_rel = !!(port_conf->event_port_cfg &
+		RTE_EVENT_PORT_CFG_DISABLE_IMPL_REL);
+
 	rte_eventdev_trace_crypto_adapter_create(id, dev_id, adapter, conf_arg,
-		mode);
+		disable_impl_rel, mode);
 	return 0;
 }
 
diff --git a/lib/librte_eventdev/rte_event_eth_tx_adapter.c b/lib/librte_eventdev/rte_event_eth_tx_adapter.c
index 8a72256de..e872f7c8c 100644
--- a/lib/librte_eventdev/rte_event_eth_tx_adapter.c
+++ b/lib/librte_eventdev/rte_event_eth_tx_adapter.c
@@ -910,6 +910,7 @@  rte_event_eth_tx_adapter_create(uint8_t id, uint8_t dev_id,
 				struct rte_event_port_conf *port_conf)
 {
 	struct rte_eventdev *dev;
+	uint8_t disable_impl_rel;
 	int ret;
 
 	if (port_conf == NULL)
@@ -943,8 +944,12 @@  rte_event_eth_tx_adapter_create(uint8_t id, uint8_t dev_id,
 		txa_dev_id_array[id] = TXA_INVALID_DEV_ID;
 		return ret;
 	}
+
+	disable_impl_rel = !!(port_conf->event_port_cfg &
+		RTE_EVENT_PORT_CFG_DISABLE_IMPL_REL);
+
 	rte_eventdev_trace_eth_tx_adapter_create(id, dev_id, NULL, port_conf,
-		ret);
+		disable_impl_rel, ret);
 	txa_dev_id_array[id] = dev_id;
 	return 0;
 }
@@ -955,6 +960,8 @@  rte_event_eth_tx_adapter_create_ext(uint8_t id, uint8_t dev_id,
 				void *conf_arg)
 {
 	struct rte_eventdev *dev;
+	struct rte_event_port_conf *port_conf = conf_arg;
+	uint8_t disable_impl_rel;
 	int ret;
 
 	RTE_EVENT_ETH_TX_ADAPTER_ID_VALID_OR_ERR_RET(id, -EINVAL);
@@ -986,8 +993,11 @@  rte_event_eth_tx_adapter_create_ext(uint8_t id, uint8_t dev_id,
 		return ret;
 	}
 
+	disable_impl_rel = !!(port_conf->event_port_cfg &
+		RTE_EVENT_PORT_CFG_DISABLE_IMPL_REL);
+
 	rte_eventdev_trace_eth_tx_adapter_create(id, dev_id, conf_cb, conf_arg,
-		ret);
+		disable_impl_rel, ret);
 	txa_dev_id_array[id] = dev_id;
 	return 0;
 }
diff --git a/lib/librte_eventdev/rte_eventdev.c b/lib/librte_eventdev/rte_eventdev.c
index 4955ab1a0..67c9c8357 100644
--- a/lib/librte_eventdev/rte_eventdev.c
+++ b/lib/librte_eventdev/rte_eventdev.c
@@ -736,6 +736,7 @@  rte_event_port_setup(uint8_t dev_id, uint8_t port_id,
 {
 	struct rte_eventdev *dev;
 	struct rte_event_port_conf def_conf;
+	uint8_t disable_impl_rel;
 	int diag;
 
 	RTE_EVENTDEV_VALID_DEVID_OR_ERR_RET(dev_id, -EINVAL);
@@ -812,7 +813,12 @@  rte_event_port_setup(uint8_t dev_id, uint8_t port_id,
 	if (!diag)
 		diag = rte_event_port_unlink(dev_id, port_id, NULL, 0);
 
-	rte_eventdev_trace_port_setup(dev_id, port_id, port_conf, diag);
+	disable_impl_rel = !!(port_conf->event_port_cfg &
+		RTE_EVENT_PORT_CFG_DISABLE_IMPL_REL);
+
+	rte_eventdev_trace_port_setup(dev_id, port_id, port_conf,
+				      disable_impl_rel, diag);
+
 	if (diag < 0)
 		return diag;
 
@@ -1422,10 +1428,8 @@  rte_event_pmd_allocate(const char *name, int socket_id)
 		eventdev->data = eventdev_data;
 
 		if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
-
 			strlcpy(eventdev->data->name, name,
 				RTE_EVENTDEV_NAME_MAX_LEN);
-
 			eventdev->data->dev_id = dev_id;
 			eventdev->data->socket_id = socket_id;
 			eventdev->data->dev_started = 0;
diff --git a/lib/librte_eventdev/rte_eventdev_trace.h b/lib/librte_eventdev/rte_eventdev_trace.h
index 4de6341ca..f56063976 100644
--- a/lib/librte_eventdev/rte_eventdev_trace.h
+++ b/lib/librte_eventdev/rte_eventdev_trace.h
@@ -53,13 +53,14 @@  RTE_TRACE_POINT(
 RTE_TRACE_POINT(
 	rte_eventdev_trace_port_setup,
 	RTE_TRACE_POINT_ARGS(uint8_t dev_id, uint8_t port_id,
-		const struct rte_event_port_conf *port_conf, int rc),
+		const struct rte_event_port_conf *port_conf,
+		uint8_t disable_impl_rel, int rc),
 	rte_trace_point_emit_u8(dev_id);
 	rte_trace_point_emit_u8(port_id);
 	rte_trace_point_emit_i32(port_conf->new_event_threshold);
 	rte_trace_point_emit_u16(port_conf->dequeue_depth);
 	rte_trace_point_emit_u16(port_conf->enqueue_depth);
-	rte_trace_point_emit_u8(port_conf->disable_implicit_release);
+	rte_trace_point_emit_u8(disable_impl_rel);
 	rte_trace_point_emit_int(rc);
 )
 
@@ -159,13 +160,14 @@  RTE_TRACE_POINT(
 RTE_TRACE_POINT(
 	rte_eventdev_trace_eth_tx_adapter_create,
 	RTE_TRACE_POINT_ARGS(uint8_t adptr_id, uint8_t dev_id, void *conf_cb,
-		struct rte_event_port_conf *port_conf, int rc),
+		struct rte_event_port_conf *port_conf, uint8_t disable_impl_rel,
+		int rc),
 	rte_trace_point_emit_u8(adptr_id);
 	rte_trace_point_emit_u8(dev_id);
 	rte_trace_point_emit_i32(port_conf->new_event_threshold);
 	rte_trace_point_emit_u16(port_conf->dequeue_depth);
 	rte_trace_point_emit_u16(port_conf->enqueue_depth);
-	rte_trace_point_emit_u8(port_conf->disable_implicit_release);
+	rte_trace_point_emit_u8(disable_impl_rel);
 	rte_trace_point_emit_ptr(conf_cb);
 	rte_trace_point_emit_int(rc);
 )
@@ -249,7 +251,8 @@  RTE_TRACE_POINT(
 RTE_TRACE_POINT(
 	rte_eventdev_trace_crypto_adapter_create,
 	RTE_TRACE_POINT_ARGS(uint8_t adptr_id, uint8_t dev_id, void *adapter,
-		struct rte_event_port_conf *port_conf, uint8_t mode),
+		struct rte_event_port_conf *port_conf, uint8_t disable_impl_rel,
+		uint8_t mode),
 	rte_trace_point_emit_u8(adptr_id);
 	rte_trace_point_emit_u8(dev_id);
 	rte_trace_point_emit_ptr(adapter);
@@ -257,7 +260,7 @@  RTE_TRACE_POINT(
 	rte_trace_point_emit_i32(port_conf->new_event_threshold);
 	rte_trace_point_emit_u16(port_conf->dequeue_depth);
 	rte_trace_point_emit_u16(port_conf->enqueue_depth);
-	rte_trace_point_emit_u8(port_conf->disable_implicit_release);
+	rte_trace_point_emit_u8(disable_impl_rel);
 )
 
 RTE_TRACE_POINT(