patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Kevin Traynor <ktraynor@redhat.com>
To: Aakash Sasidharan <asasidharan@marvell.com>
Cc: Anoob Joseph <anoobj@marvell.com>, dpdk stable <stable@dpdk.org>
Subject: patch 'event/cnxk: fix return values for capability API' has been queued to stable release 21.11.6
Date: Thu,  2 Nov 2023 13:11:42 +0000	[thread overview]
Message-ID: <20231102131254.315947-36-ktraynor@redhat.com> (raw)
In-Reply-To: <20231102131254.315947-1-ktraynor@redhat.com>

Hi,

FYI, your patch has been queued to stable release 21.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/08/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/107d68ad4d5247be953193394b0d670b3bfbdc46

Thanks.

Kevin

---
From 107d68ad4d5247be953193394b0d670b3bfbdc46 Mon Sep 17 00:00:00 2001
From: Aakash Sasidharan <asasidharan@marvell.com>
Date: Tue, 22 Aug 2023 18:46:47 +0530
Subject: [PATCH] event/cnxk: fix return values for capability API

[ upstream commit bccb1d4f10e12c396058c06c3ba9e3565633390e ]

When event_cnxk or crypto_cnxk PMDs are not available,
return -ENOTSUP instead of -EINVAL.
This would allow unit test to be skipped when
the devices are not available.

Fixes: 19f81cb59cb4 ("event/cnxk: add crypto adapter operations")

Signed-off-by: Aakash Sasidharan <asasidharan@marvell.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
---
 drivers/event/cnxk/cn10k_eventdev.c | 12 ++++++------
 drivers/event/cnxk/cn9k_eventdev.c  | 16 ++++++++--------
 drivers/event/cnxk/cnxk_eventdev.h  |  4 ++--
 3 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/drivers/event/cnxk/cn10k_eventdev.c b/drivers/event/cnxk/cn10k_eventdev.c
index 9e51fa2385..5fce6a22ac 100644
--- a/drivers/event/cnxk/cn10k_eventdev.c
+++ b/drivers/event/cnxk/cn10k_eventdev.c
@@ -749,6 +749,6 @@ cn10k_crypto_adapter_caps_get(const struct rte_eventdev *event_dev,
 			      const struct rte_cryptodev *cdev, uint32_t *caps)
 {
-	CNXK_VALID_DEV_OR_ERR_RET(event_dev->dev, "event_cn10k");
-	CNXK_VALID_DEV_OR_ERR_RET(cdev->device, "crypto_cn10k");
+	CNXK_VALID_DEV_OR_ERR_RET(event_dev->dev, "event_cn10k", ENOTSUP);
+	CNXK_VALID_DEV_OR_ERR_RET(cdev->device, "crypto_cn10k", ENOTSUP);
 
 	*caps = RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_FWD |
@@ -768,6 +768,6 @@ cn10k_crypto_adapter_qp_add(const struct rte_eventdev *event_dev,
 	RTE_SET_USED(event);
 
-	CNXK_VALID_DEV_OR_ERR_RET(event_dev->dev, "event_cn10k");
-	CNXK_VALID_DEV_OR_ERR_RET(cdev->device, "crypto_cn10k");
+	CNXK_VALID_DEV_OR_ERR_RET(event_dev->dev, "event_cn10k", EINVAL);
+	CNXK_VALID_DEV_OR_ERR_RET(cdev->device, "crypto_cn10k", EINVAL);
 
 	dev->is_ca_internal_port = 1;
@@ -782,6 +782,6 @@ cn10k_crypto_adapter_qp_del(const struct rte_eventdev *event_dev,
 			    int32_t queue_pair_id)
 {
-	CNXK_VALID_DEV_OR_ERR_RET(event_dev->dev, "event_cn10k");
-	CNXK_VALID_DEV_OR_ERR_RET(cdev->device, "crypto_cn10k");
+	CNXK_VALID_DEV_OR_ERR_RET(event_dev->dev, "event_cn10k", EINVAL);
+	CNXK_VALID_DEV_OR_ERR_RET(cdev->device, "crypto_cn10k", EINVAL);
 
 	return cnxk_crypto_adapter_qp_del(cdev, queue_pair_id);
diff --git a/drivers/event/cnxk/cn9k_eventdev.c b/drivers/event/cnxk/cn9k_eventdev.c
index 73cf61670a..16075aab86 100644
--- a/drivers/event/cnxk/cn9k_eventdev.c
+++ b/drivers/event/cnxk/cn9k_eventdev.c
@@ -997,9 +997,9 @@ cn9k_sso_tx_adapter_queue_del(uint8_t id, const struct rte_eventdev *event_dev,
 
 static int
-cn9k_crypto_adapter_caps_get(const struct rte_eventdev *event_dev,
-			     const struct rte_cryptodev *cdev, uint32_t *caps)
+cn9k_crypto_adapter_caps_get(const struct rte_eventdev *event_dev, const struct rte_cryptodev *cdev,
+			     uint32_t *caps)
 {
-	CNXK_VALID_DEV_OR_ERR_RET(event_dev->dev, "event_cn9k");
-	CNXK_VALID_DEV_OR_ERR_RET(cdev->device, "crypto_cn9k");
+	CNXK_VALID_DEV_OR_ERR_RET(event_dev->dev, "event_cn9k", ENOTSUP);
+	CNXK_VALID_DEV_OR_ERR_RET(cdev->device, "crypto_cn9k", ENOTSUP);
 
 	*caps = RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_FWD |
@@ -1018,6 +1018,6 @@ cn9k_crypto_adapter_qp_add(const struct rte_eventdev *event_dev,
 	RTE_SET_USED(event);
 
-	CNXK_VALID_DEV_OR_ERR_RET(event_dev->dev, "event_cn9k");
-	CNXK_VALID_DEV_OR_ERR_RET(cdev->device, "crypto_cn9k");
+	CNXK_VALID_DEV_OR_ERR_RET(event_dev->dev, "event_cn9k", EINVAL);
+	CNXK_VALID_DEV_OR_ERR_RET(cdev->device, "crypto_cn9k", EINVAL);
 
 	dev->is_ca_internal_port = 1;
@@ -1032,6 +1032,6 @@ cn9k_crypto_adapter_qp_del(const struct rte_eventdev *event_dev,
 			   int32_t queue_pair_id)
 {
-	CNXK_VALID_DEV_OR_ERR_RET(event_dev->dev, "event_cn9k");
-	CNXK_VALID_DEV_OR_ERR_RET(cdev->device, "crypto_cn9k");
+	CNXK_VALID_DEV_OR_ERR_RET(event_dev->dev, "event_cn9k", EINVAL);
+	CNXK_VALID_DEV_OR_ERR_RET(cdev->device, "crypto_cn9k", EINVAL);
 
 	return cnxk_crypto_adapter_qp_del(cdev, queue_pair_id);
diff --git a/drivers/event/cnxk/cnxk_eventdev.h b/drivers/event/cnxk/cnxk_eventdev.h
index 981a2efc5f..9cd1d37010 100644
--- a/drivers/event/cnxk/cnxk_eventdev.h
+++ b/drivers/event/cnxk/cnxk_eventdev.h
@@ -55,8 +55,8 @@
 #define CN10K_GW_MODE_PREF_WFE 2
 
-#define CNXK_VALID_DEV_OR_ERR_RET(dev, drv_name)                               \
+#define CNXK_VALID_DEV_OR_ERR_RET(dev, drv_name, err_val)                      \
 	do {                                                                   \
 		if (strncmp(dev->driver->name, drv_name, strlen(drv_name)))    \
-			return -EINVAL;                                        \
+			return -err_val;                                       \
 	} while (0)
 
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-11-02 13:09:41.743304416 +0000
+++ 0036-event-cnxk-fix-return-values-for-capability-API.patch	2023-11-02 13:09:40.836163409 +0000
@@ -1 +1 @@
-From bccb1d4f10e12c396058c06c3ba9e3565633390e Mon Sep 17 00:00:00 2001
+From 107d68ad4d5247be953193394b0d670b3bfbdc46 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit bccb1d4f10e12c396058c06c3ba9e3565633390e ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -17 +18 @@
- drivers/event/cnxk/cn10k_eventdev.c | 16 ++++++++--------
+ drivers/event/cnxk/cn10k_eventdev.c | 12 ++++++------
@@ -20 +21 @@
- 3 files changed, 18 insertions(+), 18 deletions(-)
+ 3 files changed, 16 insertions(+), 16 deletions(-)
@@ -23 +24 @@
-index 499a3aace7..c5d4be0474 100644
+index 9e51fa2385..5fce6a22ac 100644
@@ -26 +27 @@
-@@ -912,6 +912,6 @@ cn10k_crypto_adapter_caps_get(const struct rte_eventdev *event_dev,
+@@ -749,6 +749,6 @@ cn10k_crypto_adapter_caps_get(const struct rte_eventdev *event_dev,
@@ -35,2 +36,2 @@
-@@ -930,6 +930,6 @@ cn10k_crypto_adapter_qp_add(const struct rte_eventdev *event_dev,
- 	int ret;
+@@ -768,6 +768,6 @@ cn10k_crypto_adapter_qp_add(const struct rte_eventdev *event_dev,
+ 	RTE_SET_USED(event);
@@ -43,2 +44,2 @@
- 	cn10k_sso_fp_fns_set((struct rte_eventdev *)(uintptr_t)event_dev);
-@@ -945,6 +945,6 @@ cn10k_crypto_adapter_qp_del(const struct rte_eventdev *event_dev, const struct r
+ 	dev->is_ca_internal_port = 1;
+@@ -782,6 +782,6 @@ cn10k_crypto_adapter_qp_del(const struct rte_eventdev *event_dev,
@@ -53,9 +53,0 @@
-@@ -964,6 +964,6 @@ cn10k_crypto_adapter_vec_limits(const struct rte_eventdev *event_dev,
- 				struct rte_event_crypto_adapter_vector_limits *limits)
- {
--	CNXK_VALID_DEV_OR_ERR_RET(event_dev->dev, "event_cn10k");
--	CNXK_VALID_DEV_OR_ERR_RET(cdev->device, "crypto_cn10k");
-+	CNXK_VALID_DEV_OR_ERR_RET(event_dev->dev, "event_cn10k", EINVAL);
-+	CNXK_VALID_DEV_OR_ERR_RET(cdev->device, "crypto_cn10k", EINVAL);
- 
- 	limits->log2_sz = false;
@@ -63 +55 @@
-index 6cce5477f0..f77a9d7085 100644
+index 73cf61670a..16075aab86 100644
@@ -66 +58 @@
-@@ -943,9 +943,9 @@ cn9k_sso_tx_adapter_queue_del(uint8_t id, const struct rte_eventdev *event_dev,
+@@ -997,9 +997,9 @@ cn9k_sso_tx_adapter_queue_del(uint8_t id, const struct rte_eventdev *event_dev,
@@ -80,2 +72,2 @@
-@@ -963,6 +963,6 @@ cn9k_crypto_adapter_qp_add(const struct rte_eventdev *event_dev,
- 	int ret;
+@@ -1018,6 +1018,6 @@ cn9k_crypto_adapter_qp_add(const struct rte_eventdev *event_dev,
+ 	RTE_SET_USED(event);
@@ -88,2 +80,2 @@
- 	cn9k_sso_fp_fns_set((struct rte_eventdev *)(uintptr_t)event_dev);
-@@ -978,6 +978,6 @@ cn9k_crypto_adapter_qp_del(const struct rte_eventdev *event_dev, const struct rt
+ 	dev->is_ca_internal_port = 1;
+@@ -1032,6 +1032,6 @@ cn9k_crypto_adapter_qp_del(const struct rte_eventdev *event_dev,
@@ -99 +91 @@
-index 9d95092669..bd50de87c0 100644
+index 981a2efc5f..9cd1d37010 100644
@@ -102,2 +94,2 @@
-@@ -49,8 +49,8 @@
- #define CNXK_SSO_FLUSH_RETRY_MAX 0xfff
+@@ -55,8 +55,8 @@
+ #define CN10K_GW_MODE_PREF_WFE 2


  parent reply	other threads:[~2023-11-02 13:14 UTC|newest]

Thread overview: 104+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-02 13:11 patch 'mempool: fix default ops for an empty mempool' " Kevin Traynor
2023-11-02 13:11 ` patch 'eal/unix: fix firmware reading with external xz helper' " Kevin Traynor
2023-11-02 13:11 ` patch 'rawdev: fix device class in log message' " Kevin Traynor
2023-11-02 13:11 ` patch 'net/bonding: fix header for C++' " Kevin Traynor
2023-11-02 13:11 ` patch 'net/sfc: set max Rx packet length for representors' " Kevin Traynor
2023-11-02 13:11 ` patch 'net/sfc: account for data offset on Tx' " Kevin Traynor
2023-11-02 13:11 ` patch 'net/sfc: add missing error code indication to MAE init path' " Kevin Traynor
2023-11-02 13:11 ` patch 'net/hns3: fix VF default MAC modified when set failed' " Kevin Traynor
2023-11-02 13:11 ` patch 'net/hns3: fix error code for multicast resource' " Kevin Traynor
2023-11-02 13:11 ` patch 'net/hns3: fix flushing multicast MAC address' " Kevin Traynor
2023-11-02 13:11 ` patch 'net/hns3: fix order in NEON Rx' " Kevin Traynor
2023-11-02 13:11 ` patch 'random: initialize state for unregistered non-EAL threads' " Kevin Traynor
2023-11-02 13:11 ` patch 'bus/dpaa: fix build with asserts for GCC 13' " Kevin Traynor
2023-11-02 13:11 ` patch 'hash: align SSE lookup to scalar implementation' " Kevin Traynor
2023-11-02 13:11 ` patch 'net/netvsc: increase VSP response timeout to 60 seconds' " Kevin Traynor
2023-11-02 13:11 ` patch 'net/txgbe: add Tx queue maximum limit' " Kevin Traynor
2023-11-02 13:11 ` patch 'net/txgbe: fix GRE tunnel packet checksum' " Kevin Traynor
2023-11-02 13:11 ` patch 'net/ngbe: fix flow control' " Kevin Traynor
2023-11-02 13:11 ` patch 'net/txgbe: reconfigure MAC Rx when link update' " Kevin Traynor
2023-11-02 13:11 ` patch 'net/ngbe: " Kevin Traynor
2023-11-02 13:11 ` patch 'net/txgbe: keep link down after device close' " Kevin Traynor
2023-11-02 13:11 ` patch 'net/ngbe: " Kevin Traynor
2023-11-02 13:11 ` patch 'net/txgbe: check process type in close operation' " Kevin Traynor
2023-11-02 13:11 ` patch 'net/ngbe: " Kevin Traynor
2023-11-02 13:11 ` patch 'net/tap: use MAC address parse API instead of local parser' " Kevin Traynor
2023-11-02 13:11 ` patch 'app/testpmd: fix help string' " Kevin Traynor
2023-11-02 13:11 ` patch 'cryptodev: add missing doc for security context' " Kevin Traynor
2023-11-02 13:11 ` patch 'doc: replace code blocks with includes in security guide' " Kevin Traynor
2023-11-02 13:11 ` patch 'test/crypto: fix IV in some vectors' " Kevin Traynor
2023-11-02 13:11 ` patch 'test/crypto: skip some synchronous tests with CPU crypto' " Kevin Traynor
2023-11-02 13:11 ` patch 'test/crypto: fix typo in asym tests' " Kevin Traynor
2023-11-02 13:11 ` patch 'crypto/ipsec_mb: add dependency check for cross build' " Kevin Traynor
2023-11-02 13:11 ` patch 'eventdev: fix symbol export for port maintenance' " Kevin Traynor
2023-11-02 13:11 ` patch 'bus/pci: fix device ID log' " Kevin Traynor
2023-11-02 13:11 ` patch 'event/cnxk: fix getwork mode devargs parsing' " Kevin Traynor
2023-11-02 13:11 ` Kevin Traynor [this message]
2023-11-02 13:11 ` patch 'test/event: fix crypto null device creation' " Kevin Traynor
2023-11-02 13:11 ` patch 'event/sw: remove obsolete comment' " Kevin Traynor
2023-11-02 13:11 ` patch 'eventdev/eth_rx: fix timestamp field register in mbuf' " Kevin Traynor
2023-11-02 13:11 ` patch 'event/sw: fix ordering corruption with op release' " Kevin Traynor
2023-11-02 13:11 ` patch 'common/cnxk: fix default flow action setting' " Kevin Traynor
2023-11-02 13:11 ` patch 'common/cnxk: fix xstats for different packet sizes' " Kevin Traynor
2023-11-02 13:11 ` patch 'common/cnxk: fix different size bit operations' " Kevin Traynor
2023-11-02 13:11 ` patch 'net/cnxk: fix uninitialized variable' " Kevin Traynor
2023-11-02 13:11 ` Kevin Traynor
2023-11-02 13:11 ` patch 'common/cnxk: fix DPI memzone name' " Kevin Traynor
2023-11-02 13:11 ` patch 'dma/cnxk: fix device state' " Kevin Traynor
2023-11-02 13:11 ` patch 'mempool/cnxk: fix free from non-EAL threads' " Kevin Traynor
2023-11-02 13:11 ` patch 'common/cnxk: fix aura disable handling' " Kevin Traynor
2023-11-02 13:11 ` patch 'common/cnxk: remove dead Meson code' " Kevin Traynor
2023-11-02 13:11 ` patch 'baseband/acc: fix ACC100 HARQ input alignment' " Kevin Traynor
2023-11-02 13:11 ` patch 'app/bbdev: fix link with NXP LA12XX' " Kevin Traynor
2023-11-02 13:11 ` patch 'net/i40e: fix FDIR queue receives broadcast packets' " Kevin Traynor
2023-11-02 13:12 ` patch 'net/ice: write timestamp to first segment in scattered Rx' " Kevin Traynor
2023-11-02 13:12 ` patch 'net/iavf: fix VLAN offload strip flag' " Kevin Traynor
2023-11-02 13:12 ` patch 'net/iavf: fix checksum offloading' " Kevin Traynor
2023-11-02 13:12 ` patch 'net/i40e: fix buffer leak on Rx reconfiguration' " Kevin Traynor
2023-11-02 13:12 ` patch 'net/ice: fix TM configuration clearing' " Kevin Traynor
2023-11-02 13:12 ` patch 'net/iavf: fix port stats " Kevin Traynor
2023-11-02 13:12 ` patch 'net/iavf: unregister interrupt handler before FD close' " Kevin Traynor
2023-11-02 13:12 ` patch 'net/iavf: fix ESN session update' " Kevin Traynor
2023-11-02 13:12 ` patch 'net/ice: fix initial link status' " Kevin Traynor
2023-11-02 13:12 ` patch 'net/iavf: fix Tx debug' " Kevin Traynor
2023-11-02 13:12 ` patch 'net/iavf: remove log from Tx prepare function' " Kevin Traynor
2023-11-02 13:12 ` patch 'net/iavf: fix TSO with big segments' " Kevin Traynor
2023-11-02 13:12 ` patch 'net/ice: remove log from Tx prepare function' " Kevin Traynor
2023-11-02 13:12 ` patch 'net/ice: fix TSO with big segments' " Kevin Traynor
2023-11-02 13:12 ` patch 'net/mlx5: fix leak in sysfs port name translation' " Kevin Traynor
2023-11-02 13:12 ` patch 'fib: fix adding default route overwriting entire table' " Kevin Traynor
2023-11-02 13:12 ` patch 'fib6: fix adding default route as first route' " Kevin Traynor
2023-11-02 13:12 ` patch 'net/af_packet: fix Rx and Tx queue state' " Kevin Traynor
2023-11-02 13:12 ` patch 'net/af_xdp: " Kevin Traynor
2023-11-02 13:12 ` patch 'net/avp: " Kevin Traynor
2023-11-02 13:12 ` patch 'net/bnx2x: " Kevin Traynor
2023-11-02 13:12 ` patch 'net/bnxt: " Kevin Traynor
2023-11-02 13:12 ` patch 'net/bonding: " Kevin Traynor
2023-11-02 13:12 ` patch 'net/cxgbe: " Kevin Traynor
2023-11-02 13:12 ` patch 'net/dpaa: " Kevin Traynor
2023-11-02 13:12 ` patch 'net/dpaa2: " Kevin Traynor
2023-11-02 13:12 ` patch 'net/e1000: " Kevin Traynor
2023-11-02 13:12 ` patch 'net/ena: " Kevin Traynor
2023-11-02 13:12 ` patch 'net/enetc: " Kevin Traynor
2023-11-02 13:12 ` patch 'net/enic: " Kevin Traynor
2023-11-02 13:12 ` patch 'net/hinic: " Kevin Traynor
2023-11-02 13:12 ` patch 'net/ipn3ke: " Kevin Traynor
2023-11-02 13:12 ` patch 'net/memif: " Kevin Traynor
2023-11-02 13:12 ` patch 'net/mlx4: " Kevin Traynor
2023-11-02 13:12 ` patch 'net/mvneta: " Kevin Traynor
2023-11-02 13:12 ` patch 'net/mvpp2: " Kevin Traynor
2023-11-02 13:12 ` patch 'net/ngbe: " Kevin Traynor
2023-11-02 13:12 ` patch 'net/null: " Kevin Traynor
2023-11-02 13:12 ` patch 'net/octeon_ep: " Kevin Traynor
2023-11-02 13:12 ` patch 'net/pfe: " Kevin Traynor
2023-11-02 13:12 ` patch 'net/ring: " Kevin Traynor
2023-11-02 13:12 ` patch 'net/sfc: " Kevin Traynor
2023-11-02 13:12 ` patch 'net/softnic: " Kevin Traynor
2023-11-02 13:12 ` patch 'net/txgbe: " Kevin Traynor
2023-11-02 13:12 ` patch 'net/vhost: " Kevin Traynor
2023-11-02 13:12 ` patch 'net/virtio: " Kevin Traynor
2023-11-02 13:12 ` patch 'net/vmxnet3: " Kevin Traynor
2023-11-02 13:12 ` patch 'app/testpmd: fix primary process not polling all queues' " Kevin Traynor
2023-11-02 13:12 ` patch 'net/bonding: fix link status callback stop' " Kevin Traynor
2023-11-02 13:12 ` patch 'app/procinfo: remove unnecessary rte_malloc' " Kevin Traynor
2023-11-02 13:12 ` patch 'malloc: remove return from void functions' " Kevin Traynor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231102131254.315947-36-ktraynor@redhat.com \
    --to=ktraynor@redhat.com \
    --cc=anoobj@marvell.com \
    --cc=asasidharan@marvell.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).