patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH 18.11 1/5] net/dpaa2: add retry and timeout in packet enqueue API
@ 2019-12-17  9:30 Nipun Gupta
  2019-12-17  9:30 ` [dpdk-stable] [PATCH 18.11 2/5] raw/dpaa2_cmdif: " Nipun Gupta
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Nipun Gupta @ 2019-12-17  9:30 UTC (permalink / raw)
  To: ktraynor; +Cc: stable, Nipun Gupta, Radu Bulie

In the packet transmit, if the QBMAN is not able to process the
packets, the Tx function loops infinitely to send the packet out.
This patch changes the logic retry for some time (count) and then
return.

Fixes: cd9935cec873 ("net/dpaa2: enable Rx and Tx operations")
Fixes: 16c4a3c46ab7 ("bus/fslmc: add enqueue response read in qbman")
Cc: stable@dpdk.org

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Signed-off-by: Radu Bulie <radu-andrei.bulie@nxp.com>
---
 drivers/bus/fslmc/portal/dpaa2_hw_pvt.h |  2 ++
 drivers/net/dpaa2/dpaa2_rxtx.c          | 38 +++++++++++++++++++------
 2 files changed, 32 insertions(+), 8 deletions(-)

diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h
index 473f779a1..0a59f9d84 100644
--- a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h
+++ b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h
@@ -54,6 +54,8 @@
 #define DPAA2_SWP_CINH_REGION		1
 #define DPAA2_SWP_CENA_MEM_REGION	2
 
+#define DPAA2_MAX_TX_RETRY_COUNT	10000
+
 #define MC_PORTAL_INDEX		0
 #define NUM_DPIO_REGIONS	2
 #define NUM_DQS_PER_QUEUE       2
diff --git a/drivers/net/dpaa2/dpaa2_rxtx.c b/drivers/net/dpaa2/dpaa2_rxtx.c
index 03320ca1b..b0ed20551 100644
--- a/drivers/net/dpaa2/dpaa2_rxtx.c
+++ b/drivers/net/dpaa2/dpaa2_rxtx.c
@@ -809,15 +809,28 @@ dpaa2_dev_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 			}
 			bufs++;
 		}
+
 		loop = 0;
+		retry_count = 0;
 		while (loop < frames_to_send) {
-			loop += qbman_swp_enqueue_multiple(swp, &eqdesc,
+			ret = qbman_swp_enqueue_multiple(swp, &eqdesc,
 					&fd_arr[loop], &flags[loop],
 					frames_to_send - loop);
+			if (unlikely(ret < 0)) {
+				retry_count++;
+				if (retry_count > DPAA2_MAX_TX_RETRY_COUNT) {
+					num_tx += loop;
+					nb_pkts -= loop;
+					goto send_n_return;
+				}
+			} else {
+				loop += ret;
+				retry_count = 0;
+			}
 		}
 
-		num_tx += frames_to_send;
-		nb_pkts -= frames_to_send;
+		num_tx += loop;
+		nb_pkts -= loop;
 	}
 	dpaa2_q->tx_pkts += num_tx;
 	return num_tx;
@@ -827,13 +840,22 @@ dpaa2_dev_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 	if (loop) {
 		unsigned int i = 0;
 
+		retry_count = 0;
 		while (i < loop) {
-			i += qbman_swp_enqueue_multiple(swp, &eqdesc,
-							&fd_arr[i],
-							&flags[loop],
-							loop - i);
+			ret = qbman_swp_enqueue_multiple(swp, &eqdesc,
+							 &fd_arr[i],
+							 &flags[i],
+							 loop - i);
+			if (unlikely(ret < 0)) {
+				retry_count++;
+				if (retry_count > DPAA2_MAX_TX_RETRY_COUNT)
+					break;
+			} else {
+				i += ret;
+				retry_count = 0;
+			}
 		}
-		num_tx += loop;
+		num_tx += i;
 	}
 skip_tx:
 	dpaa2_q->tx_pkts += num_tx;
-- 
2.17.1


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

* [dpdk-stable] [PATCH 18.11 2/5] raw/dpaa2_cmdif: add retry and timeout in packet enqueue API
  2019-12-17  9:30 [dpdk-stable] [PATCH 18.11 1/5] net/dpaa2: add retry and timeout in packet enqueue API Nipun Gupta
@ 2019-12-17  9:30 ` Nipun Gupta
  2019-12-17  9:30 ` [dpdk-stable] [PATCH 18.11 3/5] net/dpaa2: set port in mbuf Nipun Gupta
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Nipun Gupta @ 2019-12-17  9:30 UTC (permalink / raw)
  To: ktraynor; +Cc: stable, Nipun Gupta

This patch adds retry in the DPAA2 CMDIF packet enqueue API

Fixes: 53c71586c789 ("raw/dpaa2_cmdif: support enqueue/dequeue operations")
Cc: stable@dpdk.org

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/raw/dpaa2_cmdif/dpaa2_cmdif.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/raw/dpaa2_cmdif/dpaa2_cmdif.c b/drivers/raw/dpaa2_cmdif/dpaa2_cmdif.c
index 55ded4645..9687e14d6 100644
--- a/drivers/raw/dpaa2_cmdif/dpaa2_cmdif.c
+++ b/drivers/raw/dpaa2_cmdif/dpaa2_cmdif.c
@@ -62,6 +62,7 @@ dpaa2_cmdif_enqueue_bufs(struct rte_rawdev *dev,
 	struct qbman_fd fd;
 	struct qbman_eq_desc eqdesc;
 	struct qbman_swp *swp;
+	uint32_t retry_count = 0;
 	int ret;
 
 	DPAA2_CMDIF_FUNC_TRACE();
@@ -102,11 +103,15 @@ dpaa2_cmdif_enqueue_bufs(struct rte_rawdev *dev,
 		ret = qbman_swp_enqueue_multiple(swp, &eqdesc, &fd, NULL, 1);
 		if (ret < 0 && ret != -EBUSY)
 			DPAA2_CMDIF_ERR("Transmit failure with err: %d\n", ret);
-	} while (ret == -EBUSY);
+		retry_count++;
+	} while ((ret == -EBUSY) && (retry_count < DPAA2_MAX_TX_RETRY_COUNT));
+
+	if (ret < 0)
+		return ret;
 
 	DPAA2_CMDIF_DP_DEBUG("Successfully transmitted a packet\n");
 
-	return 0;
+	return 1;
 }
 
 static int
-- 
2.17.1


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

* [dpdk-stable] [PATCH 18.11 3/5] net/dpaa2: set port in mbuf
  2019-12-17  9:30 [dpdk-stable] [PATCH 18.11 1/5] net/dpaa2: add retry and timeout in packet enqueue API Nipun Gupta
  2019-12-17  9:30 ` [dpdk-stable] [PATCH 18.11 2/5] raw/dpaa2_cmdif: " Nipun Gupta
@ 2019-12-17  9:30 ` Nipun Gupta
  2019-12-17  9:30 ` [dpdk-stable] [PATCH 18.11 4/5] bus/dpaa: fix dpaa_sec blacklist Nipun Gupta
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Nipun Gupta @ 2019-12-17  9:30 UTC (permalink / raw)
  To: ktraynor; +Cc: stable, Nipun Gupta

This patch sets the port in mbuf for event scenarios as well

Fixes: b677d4c6d281 ("net/dpaa2: add API for event Rx adapter")
Fixes: 2d3788631862 ("net/dpaa2: support atomic queues")
Fixes: 16c4a3c46ab7 ("bus/fslmc: add enqueue response read in qbman")
Cc: stable@dpdk.org

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/net/dpaa2/dpaa2_rxtx.c | 20 +++++++++++++-------
 1 file changed, 13 insertions(+), 7 deletions(-)

diff --git a/drivers/net/dpaa2/dpaa2_rxtx.c b/drivers/net/dpaa2/dpaa2_rxtx.c
index b0ed20551..5ef6136f5 100644
--- a/drivers/net/dpaa2/dpaa2_rxtx.c
+++ b/drivers/net/dpaa2/dpaa2_rxtx.c
@@ -235,7 +235,8 @@ dpaa2_dev_rx_parse(struct rte_mbuf *mbuf, void *hw_annot_addr)
 }
 
 static inline struct rte_mbuf *__attribute__((hot))
-eth_sg_fd_to_mbuf(const struct qbman_fd *fd)
+eth_sg_fd_to_mbuf(const struct qbman_fd *fd,
+		  int port_id)
 {
 	struct qbman_sge *sgt, *sge;
 	size_t sg_addr, fd_addr;
@@ -261,6 +262,7 @@ eth_sg_fd_to_mbuf(const struct qbman_fd *fd)
 	first_seg->pkt_len = DPAA2_GET_FD_LEN(fd);
 	first_seg->nb_segs = 1;
 	first_seg->next = NULL;
+	first_seg->port = port_id;
 	if (dpaa2_svr_family == SVR_LX2160A)
 		dpaa2_dev_rx_parse_new(first_seg, fd);
 	else
@@ -294,7 +296,8 @@ eth_sg_fd_to_mbuf(const struct qbman_fd *fd)
 }
 
 static inline struct rte_mbuf *__attribute__((hot))
-eth_fd_to_mbuf(const struct qbman_fd *fd)
+eth_fd_to_mbuf(const struct qbman_fd *fd,
+	       int port_id)
 {
 	struct rte_mbuf *mbuf = DPAA2_INLINE_MBUF_FROM_BUF(
 		DPAA2_IOVA_TO_VADDR(DPAA2_GET_FD_ADDR(fd)),
@@ -308,6 +311,7 @@ eth_fd_to_mbuf(const struct qbman_fd *fd)
 	mbuf->data_off = DPAA2_GET_FD_OFFSET(fd);
 	mbuf->data_len = DPAA2_GET_FD_LEN(fd);
 	mbuf->pkt_len = mbuf->data_len;
+	mbuf->port = port_id;
 	mbuf->next = NULL;
 	rte_mbuf_refcnt_set(mbuf, 1);
 
@@ -588,10 +592,9 @@ dpaa2_dev_prefetch_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 		}
 
 		if (unlikely(DPAA2_FD_GET_FORMAT(fd) == qbman_fd_sg))
-			bufs[num_rx] = eth_sg_fd_to_mbuf(fd);
+			bufs[num_rx] = eth_sg_fd_to_mbuf(fd, dev->data->port_id);
 		else
-			bufs[num_rx] = eth_fd_to_mbuf(fd);
-		bufs[num_rx]->port = dev->data->port_id;
+			bufs[num_rx] = eth_fd_to_mbuf(fd, dev->data->port_id);
 
 		if (dev->data->dev_conf.rxmode.offloads & DEV_RX_OFFLOAD_VLAN_STRIP)
 			rte_vlan_strip(bufs[num_rx]);
@@ -631,6 +634,8 @@ dpaa2_dev_process_parallel_event(struct qbman_swp *swp,
 				 struct dpaa2_queue *rxq,
 				 struct rte_event *ev)
 {
+	struct rte_eth_dev *dev = rxq->dev;
+
 	rte_prefetch0((void *)(size_t)(DPAA2_GET_FD_ADDR(fd) +
 		DPAA2_FD_PTA_SIZE + 16));
 
@@ -642,7 +647,7 @@ dpaa2_dev_process_parallel_event(struct qbman_swp *swp,
 	ev->queue_id = rxq->ev.queue_id;
 	ev->priority = rxq->ev.priority;
 
-	ev->mbuf = eth_fd_to_mbuf(fd);
+	ev->mbuf = eth_fd_to_mbuf(fd, dev->data->port_id);
 
 	qbman_swp_dqrr_consume(swp, dq);
 }
@@ -654,6 +659,7 @@ dpaa2_dev_process_atomic_event(struct qbman_swp *swp __attribute__((unused)),
 			       struct dpaa2_queue *rxq,
 			       struct rte_event *ev)
 {
+	struct rte_eth_dev *dev = rxq->dev;
 	uint8_t dqrr_index;
 
 	rte_prefetch0((void *)(size_t)(DPAA2_GET_FD_ADDR(fd) +
@@ -667,7 +673,7 @@ dpaa2_dev_process_atomic_event(struct qbman_swp *swp __attribute__((unused)),
 	ev->queue_id = rxq->ev.queue_id;
 	ev->priority = rxq->ev.priority;
 
-	ev->mbuf = eth_fd_to_mbuf(fd);
+	ev->mbuf = eth_fd_to_mbuf(fd, dev->data->port_id);
 
 	dqrr_index = qbman_get_dqrr_idx(dq);
 	ev->mbuf->seqn = dqrr_index + 1;
-- 
2.17.1


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

* [dpdk-stable] [PATCH 18.11 4/5] bus/dpaa: fix dpaa_sec blacklist
  2019-12-17  9:30 [dpdk-stable] [PATCH 18.11 1/5] net/dpaa2: add retry and timeout in packet enqueue API Nipun Gupta
  2019-12-17  9:30 ` [dpdk-stable] [PATCH 18.11 2/5] raw/dpaa2_cmdif: " Nipun Gupta
  2019-12-17  9:30 ` [dpdk-stable] [PATCH 18.11 3/5] net/dpaa2: set port in mbuf Nipun Gupta
@ 2019-12-17  9:30 ` Nipun Gupta
  2019-12-17  9:30 ` [dpdk-stable] [PATCH 18.11 5/5] test/crypto: fix session init failure for wireless case Nipun Gupta
  2019-12-17 14:08 ` [dpdk-stable] [PATCH 18.11 1/5] net/dpaa2: add retry and timeout in packet enqueue API Kevin Traynor
  4 siblings, 0 replies; 7+ messages in thread
From: Nipun Gupta @ 2019-12-17  9:30 UTC (permalink / raw)
  To: ktraynor; +Cc: stable, Hemant Agrawal

From: Hemant Agrawal <hemant.agrawal@nxp.com>

The black list of dpaa_sec devices fails.
EAL: failed to parse device "dpaa:dpaa_sec-1"

This patch address following issues:
- bus usages dpaa-sec while the driver usage dpaa_sec
- bus usages numbers from 0 to MAX_SEC - while driver
probe usages sec number form max-fman_device +1

Fixes: 6e0752205bb2 ("bus/dpaa: support device blacklisting")
Cc: stable@dpdk.org

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Reviewed-by: Sachin Saxena <sachin.saxena@nxp.com>
---
 doc/guides/cryptodevs/dpaa_sec.rst | 6 +++---
 drivers/bus/dpaa/dpaa_bus.c        | 4 ++--
 drivers/crypto/dpaa_sec/dpaa_sec.c | 3 +--
 3 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/doc/guides/cryptodevs/dpaa_sec.rst b/doc/guides/cryptodevs/dpaa_sec.rst
index 897a4fe80..4874a09ae 100644
--- a/doc/guides/cryptodevs/dpaa_sec.rst
+++ b/doc/guides/cryptodevs/dpaa_sec.rst
@@ -85,11 +85,11 @@ For blacklisting a DPAA device, following commands can be used.
 
  .. code-block:: console
 
-    <dpdk app> <EAL args> -b "dpaa_bus:dpaa-secX" -- ...
-    e.g. "dpaa_bus:dpaa-sec0"
+    <dpdk app> <EAL args> -b "dpaa:dpaa_sec-X" -- ...
+    e.g. "dpaa:dpaa_sec-1"
 
     or to disable all 4 SEC devices
-    -b "dpaa_sec:dpaa-sec0"  -b "dpaa_sec:dpaa-sec1" -b "dpaa_sec:dpaa-sec2" -b "dpaa_sec:dpaa-sec3"
+    -b "dpaa:dpaa_sec-1"  -b "dpaa:dpaa_sec-2" -b "dpaa:dpaa_sec-3" -b "dpaa:dpaa_sec-4"
 
 Limitations
 -----------
diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c
index c7da96f8d..25a63ab93 100644
--- a/drivers/bus/dpaa/dpaa_bus.c
+++ b/drivers/bus/dpaa/dpaa_bus.c
@@ -218,7 +218,7 @@ dpaa_create_device_list(void)
 		 * allocated for dev->name/
 		 */
 		memset(dev->name, 0, RTE_ETH_NAME_MAX_LEN);
-		sprintf(dev->name, "dpaa-sec%d", i);
+		sprintf(dev->name, "dpaa_sec-%d", i+1);
 		DPAA_BUS_LOG(INFO, "%s cryptodev added", dev->name);
 		dev->device.name = dev->name;
 		dev->device.devargs = dpaa_devargs_lookup(dev);
@@ -416,7 +416,7 @@ rte_dpaa_bus_parse(const char *name, void *out_name)
 	for (i = 0; i < RTE_LIBRTE_DPAA_MAX_CRYPTODEV; i++) {
 		char sec_name[16];
 
-		snprintf(sec_name, 16, "dpaa-sec%d", i);
+		snprintf(sec_name, 16, "dpaa_sec-%d", i+1);
 		if (strcmp(sec_name, sep) == 0) {
 			if (out_name)
 				strcpy(out_name, sep);
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
index 742e24c52..901c7ab26 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
@@ -2391,8 +2391,7 @@ cryptodev_dpaa_sec_probe(struct rte_dpaa_driver *dpaa_drv __rte_unused,
 
 	int retval;
 
-	snprintf(cryptodev_name, sizeof(cryptodev_name), "dpaa_sec-%d",
-			dpaa_dev->id.dev_id);
+	snprintf(cryptodev_name, sizeof(cryptodev_name), "%s", dpaa_dev->name);
 
 	cryptodev = rte_cryptodev_pmd_allocate(cryptodev_name, rte_socket_id());
 	if (cryptodev == NULL)
-- 
2.17.1


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

* [dpdk-stable] [PATCH 18.11 5/5] test/crypto: fix session init failure for wireless case
  2019-12-17  9:30 [dpdk-stable] [PATCH 18.11 1/5] net/dpaa2: add retry and timeout in packet enqueue API Nipun Gupta
                   ` (2 preceding siblings ...)
  2019-12-17  9:30 ` [dpdk-stable] [PATCH 18.11 4/5] bus/dpaa: fix dpaa_sec blacklist Nipun Gupta
@ 2019-12-17  9:30 ` Nipun Gupta
  2019-12-17 14:08 ` [dpdk-stable] [PATCH 18.11 1/5] net/dpaa2: add retry and timeout in packet enqueue API Kevin Traynor
  4 siblings, 0 replies; 7+ messages in thread
From: Nipun Gupta @ 2019-12-17  9:30 UTC (permalink / raw)
  To: ktraynor; +Cc: stable, Hemant Agrawal

From: Hemant Agrawal <hemant.agrawal@nxp.com>

This patch add the support to handle the failure in session
create for wireless related cases. Else it will cause
segment fault due to I/O on un-initialized sessions.

Fixes: b3bbd9e5f2659 ("cryptodev: support device independent sessions")
Cc: stable@dpdk.org

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 test/test/test_cryptodev.c | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/test/test/test_cryptodev.c b/test/test/test_cryptodev.c
index fbe8c21e6..d7ee88e40 100644
--- a/test/test/test_cryptodev.c
+++ b/test/test/test_cryptodev.c
@@ -2300,6 +2300,7 @@ create_wireless_algo_hash_session(uint8_t dev_id,
 	enum rte_crypto_auth_algorithm algo)
 {
 	uint8_t hash_key[key_len];
+	int status;
 
 	struct crypto_testsuite_params *ts_params = &testsuite_params;
 	struct crypto_unittest_params *ut_params = &unittest_params;
@@ -2322,8 +2323,10 @@ create_wireless_algo_hash_session(uint8_t dev_id,
 	ut_params->sess = rte_cryptodev_sym_session_create(
 			ts_params->session_mpool);
 
+	status = rte_cryptodev_sym_session_init(dev_id, ut_params->sess,
 	rte_cryptodev_sym_session_init(dev_id, ut_params->sess,
 			&ut_params->auth_xform, ts_params->session_mpool);
+	TEST_ASSERT_EQUAL(status, 0, "session init failed");
 	TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation failed");
 	return 0;
 }
@@ -2336,7 +2339,7 @@ create_wireless_algo_cipher_session(uint8_t dev_id,
 			uint8_t iv_len)
 {
 	uint8_t cipher_key[key_len];
-
+	int status;
 	struct crypto_testsuite_params *ts_params = &testsuite_params;
 	struct crypto_unittest_params *ut_params = &unittest_params;
 
@@ -2359,8 +2362,10 @@ create_wireless_algo_cipher_session(uint8_t dev_id,
 	ut_params->sess = rte_cryptodev_sym_session_create(
 			ts_params->session_mpool);
 
+	status = rte_cryptodev_sym_session_init(dev_id, ut_params->sess,
 	rte_cryptodev_sym_session_init(dev_id, ut_params->sess,
 			&ut_params->cipher_xform, ts_params->session_mpool);
+	TEST_ASSERT_EQUAL(status, 0, "session init failed");
 	TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation failed");
 	return 0;
 }
@@ -2438,6 +2443,7 @@ create_wireless_algo_cipher_auth_session(uint8_t dev_id,
 
 {
 	uint8_t cipher_auth_key[key_len];
+	int status;
 
 	struct crypto_testsuite_params *ts_params = &testsuite_params;
 	struct crypto_unittest_params *ut_params = &unittest_params;
@@ -2475,9 +2481,11 @@ create_wireless_algo_cipher_auth_session(uint8_t dev_id,
 	ut_params->sess = rte_cryptodev_sym_session_create(
 			ts_params->session_mpool);
 
+	status = rte_cryptodev_sym_session_init(dev_id, ut_params->sess,
 	rte_cryptodev_sym_session_init(dev_id, ut_params->sess,
 			&ut_params->cipher_xform, ts_params->session_mpool);
 
+	TEST_ASSERT_EQUAL(status, 0, "session init failed");
 	TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation failed");
 	return 0;
 }
@@ -2492,6 +2500,7 @@ create_wireless_cipher_auth_session(uint8_t dev_id,
 {
 	const uint8_t key_len = tdata->key.len;
 	uint8_t cipher_auth_key[key_len];
+	int status;
 
 	struct crypto_testsuite_params *ts_params = &testsuite_params;
 	struct crypto_unittest_params *ut_params = &unittest_params;
@@ -2534,9 +2543,11 @@ create_wireless_cipher_auth_session(uint8_t dev_id,
 	ut_params->sess = rte_cryptodev_sym_session_create(
 			ts_params->session_mpool);
 
+	status = rte_cryptodev_sym_session_init(dev_id, ut_params->sess,
 	rte_cryptodev_sym_session_init(dev_id, ut_params->sess,
 			&ut_params->cipher_xform, ts_params->session_mpool);
 
+	TEST_ASSERT_EQUAL(status, 0, "session init failed");
 	TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation failed");
 	return 0;
 }
@@ -2562,7 +2573,7 @@ create_wireless_algo_auth_cipher_session(uint8_t dev_id,
 		uint8_t cipher_iv_len)
 {
 	uint8_t auth_cipher_key[key_len];
-
+	int status;
 	struct crypto_testsuite_params *ts_params = &testsuite_params;
 	struct crypto_unittest_params *ut_params = &unittest_params;
 
@@ -2596,9 +2607,11 @@ create_wireless_algo_auth_cipher_session(uint8_t dev_id,
 	ut_params->sess = rte_cryptodev_sym_session_create(
 			ts_params->session_mpool);
 
+	status = rte_cryptodev_sym_session_init(dev_id, ut_params->sess,
 	rte_cryptodev_sym_session_init(dev_id, ut_params->sess,
 			&ut_params->auth_xform, ts_params->session_mpool);
 
+	TEST_ASSERT_EQUAL(status, 0, "session init failed");
 	TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation failed");
 
 	return 0;
-- 
2.17.1


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

* Re: [dpdk-stable] [PATCH 18.11 1/5] net/dpaa2: add retry and timeout in packet enqueue API
  2019-12-17  9:30 [dpdk-stable] [PATCH 18.11 1/5] net/dpaa2: add retry and timeout in packet enqueue API Nipun Gupta
                   ` (3 preceding siblings ...)
  2019-12-17  9:30 ` [dpdk-stable] [PATCH 18.11 5/5] test/crypto: fix session init failure for wireless case Nipun Gupta
@ 2019-12-17 14:08 ` Kevin Traynor
  2019-12-18  5:02   ` Nipun Gupta
  4 siblings, 1 reply; 7+ messages in thread
From: Kevin Traynor @ 2019-12-17 14:08 UTC (permalink / raw)
  To: Nipun Gupta; +Cc: stable, Radu Bulie

On 17/12/2019 09:30, Nipun Gupta wrote:
> In the packet transmit, if the QBMAN is not able to process the
> packets, the Tx function loops infinitely to send the packet out.
> This patch changes the logic retry for some time (count) and then
> return.
> 
> Fixes: cd9935cec873 ("net/dpaa2: enable Rx and Tx operations")
> Fixes: 16c4a3c46ab7 ("bus/fslmc: add enqueue response read in qbman")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
> Signed-off-by: Radu Bulie <radu-andrei.bulie@nxp.com>

Thanks for the backports Nipun. Updated commit messages with upstream
commits ids, removed stable tags and applied. I dropped the test one as
it was causing a build error - feel free to rebase, or we can just drop
it from stable.

thanks,
Kevin.


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

* Re: [dpdk-stable] [PATCH 18.11 1/5] net/dpaa2: add retry and timeout in packet enqueue API
  2019-12-17 14:08 ` [dpdk-stable] [PATCH 18.11 1/5] net/dpaa2: add retry and timeout in packet enqueue API Kevin Traynor
@ 2019-12-18  5:02   ` Nipun Gupta
  0 siblings, 0 replies; 7+ messages in thread
From: Nipun Gupta @ 2019-12-18  5:02 UTC (permalink / raw)
  To: Kevin Traynor; +Cc: stable, Radu-andrei Bulie, Hemant Agrawal

Hi Kevin,

Thanks for applying the patches.

Regarding test patch I had some local change which I missed adding.
I have resent this patch.

Regards,
Nipun

> -----Original Message-----
> From: Kevin Traynor <ktraynor@redhat.com>
> Sent: Tuesday, December 17, 2019 7:39 PM
> To: Nipun Gupta <nipun.gupta@nxp.com>
> Cc: stable@dpdk.org; Radu-andrei Bulie <radu-andrei.bulie@nxp.com>
> Subject: Re: [PATCH 18.11 1/5] net/dpaa2: add retry and timeout in packet
> enqueue API
> 
> On 17/12/2019 09:30, Nipun Gupta wrote:
> > In the packet transmit, if the QBMAN is not able to process the
> > packets, the Tx function loops infinitely to send the packet out.
> > This patch changes the logic retry for some time (count) and then
> > return.
> >
> > Fixes: cd9935cec873 ("net/dpaa2: enable Rx and Tx operations")
> > Fixes: 16c4a3c46ab7 ("bus/fslmc: add enqueue response read in qbman")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
> > Signed-off-by: Radu Bulie <radu-andrei.bulie@nxp.com>
> 
> Thanks for the backports Nipun. Updated commit messages with upstream
> commits ids, removed stable tags and applied. I dropped the test one as
> it was causing a build error - feel free to rebase, or we can just drop
> it from stable.
> 
> thanks,
> Kevin.


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

end of thread, other threads:[~2019-12-18  5:02 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-17  9:30 [dpdk-stable] [PATCH 18.11 1/5] net/dpaa2: add retry and timeout in packet enqueue API Nipun Gupta
2019-12-17  9:30 ` [dpdk-stable] [PATCH 18.11 2/5] raw/dpaa2_cmdif: " Nipun Gupta
2019-12-17  9:30 ` [dpdk-stable] [PATCH 18.11 3/5] net/dpaa2: set port in mbuf Nipun Gupta
2019-12-17  9:30 ` [dpdk-stable] [PATCH 18.11 4/5] bus/dpaa: fix dpaa_sec blacklist Nipun Gupta
2019-12-17  9:30 ` [dpdk-stable] [PATCH 18.11 5/5] test/crypto: fix session init failure for wireless case Nipun Gupta
2019-12-17 14:08 ` [dpdk-stable] [PATCH 18.11 1/5] net/dpaa2: add retry and timeout in packet enqueue API Kevin Traynor
2019-12-18  5:02   ` Nipun Gupta

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).