patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Kevin Traynor <ktraynor@redhat.com>
To: Satha Rao <skoteshwar@marvell.com>
Cc: Jerin Jacob <jerinj@marvell.com>, dpdk stable <stable@dpdk.org>
Subject: patch 'common/cnxk: fix SQ flush sequence' has been queued to stable release 21.11.2
Date: Wed, 25 May 2022 17:28:26 +0100	[thread overview]
Message-ID: <20220525162847.711753-34-ktraynor@redhat.com> (raw)
In-Reply-To: <20220525162847.711753-1-ktraynor@redhat.com>

Hi,

FYI, your patch has been queued to stable release 21.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/30/22. 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/8790891a6dac401fe968022272e31a14d6b99fb9

Thanks.

Kevin

---
From 8790891a6dac401fe968022272e31a14d6b99fb9 Mon Sep 17 00:00:00 2001
From: Satha Rao <skoteshwar@marvell.com>
Date: Sun, 8 May 2022 13:18:16 +0530
Subject: [PATCH] common/cnxk: fix SQ flush sequence

[ upstream commit e746aec161cc5642935e1ac4b823bdb2d722ec27 ]

Fix SQ flush sequence to issue NIX RX SW Sync after SMQ flush.
This sync ensures that all the packets that were in-flight are
flushed out of memory.

This patch also fixes NULL return issues reported by
static analysis tool in Traffic Manager and sync's mailbox
to that of the kernel version.

Fixes: 05d727e8b14a ("common/cnxk: support NIX traffic management")
Fixes: 0b7e667ee303 ("common/cnxk: enable packet marking")

Signed-off-by: Satha Rao <skoteshwar@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
 drivers/common/cnxk/roc_mbox.h   | 35 ++++++++++++++++++++++++++++++--
 drivers/common/cnxk/roc_nix_tm.c |  7 +++++++
 2 files changed, 40 insertions(+), 2 deletions(-)

diff --git a/drivers/common/cnxk/roc_mbox.h b/drivers/common/cnxk/roc_mbox.h
index b63fe108c9..9a8ae6b216 100644
--- a/drivers/common/cnxk/roc_mbox.h
+++ b/drivers/common/cnxk/roc_mbox.h
@@ -115,5 +115,5 @@ struct mbox_msghdr {
 	M(SSO_GRP_GET_PRIORITY, 0x606, sso_grp_get_priority, sso_info_req,     \
 	  sso_grp_priority)                                                    \
-	M(SSO_WS_CACHE_INV, 0x607, sso_ws_cache_inv, msg_req, msg_rsp)         \
+	M(SSO_WS_CACHE_INV, 0x607, sso_ws_cache_inv, ssow_lf_inv_req, msg_rsp) \
 	M(SSO_GRP_QOS_CONFIG, 0x608, sso_grp_qos_config, sso_grp_qos_cfg,      \
 	  msg_rsp)                                                             \
@@ -124,4 +124,7 @@ struct mbox_msghdr {
 	M(SSO_HW_RELEASE_XAQ, 0x611, sso_hw_release_xaq_aura,                  \
 	  sso_hw_xaq_release, msg_rsp)                                         \
+	M(SSO_CONFIG_LSW, 0x612, ssow_config_lsw, ssow_config_lsw, msg_rsp)    \
+	M(SSO_HWS_CHNG_MSHIP, 0x613, ssow_chng_mship, ssow_chng_mship,         \
+	  msg_rsp)                                                             \
 	/* TIM mbox IDs (range 0x800 - 0x9FF) */                               \
 	M(TIM_LF_ALLOC, 0x800, tim_lf_alloc, tim_lf_alloc_req,                 \
@@ -248,5 +251,6 @@ struct mbox_msghdr {
 	  nix_bp_cfg_rsp)                                                      \
 	M(NIX_CPT_BP_DISABLE, 0x8021, nix_cpt_bp_disable, nix_bp_cfg_req,      \
-	  msg_rsp)
+	  msg_rsp)                                                             \
+	M(NIX_RX_SW_SYNC, 0x8022, nix_rx_sw_sync, msg_req, msg_rsp)
 
 /* Messages initiated by AF (range 0xC00 - 0xDFF) */
@@ -1241,4 +1245,31 @@ struct ssow_lf_free_req {
 };
 
+#define SSOW_INVAL_SELECTIVE_VER 0x1000
+struct ssow_lf_inv_req {
+	struct mbox_msghdr hdr;
+	uint16_t nb_hws;		 /* Number of HWS to invalidate*/
+	uint16_t hws[MAX_RVU_BLKLF_CNT]; /* Array of HWS */
+};
+
+struct ssow_config_lsw {
+	struct mbox_msghdr hdr;
+#define SSOW_LSW_DIS	 0
+#define SSOW_LSW_GW_WAIT 1
+#define SSOW_LSW_GW_IMM	 2
+	uint8_t __io lsw_mode;
+#define SSOW_WQE_REL_LSW_WAIT 0
+#define SSOW_WQE_REL_IMM      1
+	uint8_t __io wqe_release;
+};
+
+struct ssow_chng_mship {
+	struct mbox_msghdr hdr;
+	uint8_t __io set;	 /* Membership set to modify. */
+	uint8_t __io enable;	 /* Enable/Disable the hwgrps. */
+	uint8_t __io hws;	 /* HWS to modify. */
+	uint16_t __io nb_hwgrps; /* Number of hwgrps in the array */
+	uint16_t __io hwgrps[MAX_RVU_BLKLF_CNT]; /* Array of hwgrps. */
+};
+
 struct sso_hw_setconfig {
 	struct mbox_msghdr hdr;
diff --git a/drivers/common/cnxk/roc_nix_tm.c b/drivers/common/cnxk/roc_nix_tm.c
index ebb27a3106..506cb066ce 100644
--- a/drivers/common/cnxk/roc_nix_tm.c
+++ b/drivers/common/cnxk/roc_nix_tm.c
@@ -565,4 +565,5 @@ nix_tm_sq_flush_pre(struct roc_nix_sq *sq)
 	struct nix_tm_node_list *list;
 	enum roc_nix_tm_tree tree;
+	struct msg_req *req;
 	struct mbox *mbox;
 	struct nix *nix;
@@ -654,4 +655,10 @@ nix_tm_sq_flush_pre(struct roc_nix_sq *sq)
 		goto cleanup;
 	}
+
+	req = mbox_alloc_msg_nix_rx_sw_sync(mbox);
+	if (!req)
+		return -ENOSPC;
+
+	rc = mbox_process(mbox);
 cleanup:
 	/* Restore cgx state */
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-05-25 17:26:59.394662975 +0100
+++ 0034-common-cnxk-fix-SQ-flush-sequence.patch	2022-05-25 17:26:58.614828400 +0100
@@ -1 +1 @@
-From e746aec161cc5642935e1ac4b823bdb2d722ec27 Mon Sep 17 00:00:00 2001
+From 8790891a6dac401fe968022272e31a14d6b99fb9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e746aec161cc5642935e1ac4b823bdb2d722ec27 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -21,4 +22,3 @@
- drivers/common/cnxk/roc_mbox.h        | 35 +++++++++++++++++++++++++--
- drivers/common/cnxk/roc_nix_tm.c      |  7 ++++++
- drivers/common/cnxk/roc_nix_tm_mark.c |  9 +++++++
- 3 files changed, 49 insertions(+), 2 deletions(-)
+ drivers/common/cnxk/roc_mbox.h   | 35 ++++++++++++++++++++++++++++++--
+ drivers/common/cnxk/roc_nix_tm.c |  7 +++++++
+ 2 files changed, 40 insertions(+), 2 deletions(-)
@@ -27 +27 @@
-index b608f58357..2c30f19904 100644
+index b63fe108c9..9a8ae6b216 100644
@@ -30 +30 @@
-@@ -117,5 +117,5 @@ struct mbox_msghdr {
+@@ -115,5 +115,5 @@ struct mbox_msghdr {
@@ -37 +37 @@
-@@ -126,4 +126,7 @@ struct mbox_msghdr {
+@@ -124,4 +124,7 @@ struct mbox_msghdr {
@@ -45 +45 @@
-@@ -260,5 +263,6 @@ struct mbox_msghdr {
+@@ -248,5 +251,6 @@ struct mbox_msghdr {
@@ -53 +53 @@
-@@ -1269,4 +1273,31 @@ struct ssow_lf_free_req {
+@@ -1241,4 +1245,31 @@ struct ssow_lf_free_req {
@@ -86 +86 @@
-index 5b70c7bfed..42d3abd070 100644
+index ebb27a3106..506cb066ce 100644
@@ -89 +89 @@
-@@ -591,4 +591,5 @@ nix_tm_sq_flush_pre(struct roc_nix_sq *sq)
+@@ -565,4 +565,5 @@ nix_tm_sq_flush_pre(struct roc_nix_sq *sq)
@@ -95 +95 @@
-@@ -680,4 +681,10 @@ nix_tm_sq_flush_pre(struct roc_nix_sq *sq)
+@@ -654,4 +655,10 @@ nix_tm_sq_flush_pre(struct roc_nix_sq *sq)
@@ -106,28 +105,0 @@
-diff --git a/drivers/common/cnxk/roc_nix_tm_mark.c b/drivers/common/cnxk/roc_nix_tm_mark.c
-index 64cf67943a..d37292e8b9 100644
---- a/drivers/common/cnxk/roc_nix_tm_mark.c
-+++ b/drivers/common/cnxk/roc_nix_tm_mark.c
-@@ -111,4 +111,7 @@ nix_tm_update_red_algo(struct nix *nix, bool red_send)
- 		/* Update txschq config  */
- 		req = mbox_alloc_msg_nix_txschq_cfg(mbox);
-+		if (req == NULL)
-+			return -ENOSPC;
-+
- 		req->lvl = tm_node->hw_lvl;
- 		k = prepare_tm_shaper_red_algo(tm_node, req->reg, req->regval,
-@@ -209,4 +212,7 @@ nix_tm_mark_init(struct nix *nix)
- 	/* Null mark format */
- 	req = mbox_alloc_msg_nix_mark_format_cfg(mbox);
-+	if (req == NULL)
-+		return -ENOSPC;
-+
- 	rc = mbox_process_msg(mbox, (void *)&rsp);
- 	if (rc) {
-@@ -221,4 +227,7 @@ nix_tm_mark_init(struct nix *nix)
- 		for (j = 0; j < ROC_NIX_TM_MARK_COLOR_MAX; j++) {
- 			req = mbox_alloc_msg_nix_mark_format_cfg(mbox);
-+			if (req == NULL)
-+				return -ENOSPC;
-+
- 			req->offset = mark_off[i];
- 


  parent reply	other threads:[~2022-05-25 16:29 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-25 16:27 patch 'test/mem: disable ASan when accessing unallocated memory' " Kevin Traynor
2022-05-25 16:27 ` patch 'net/netvsc: fix hot adding multiple VF PCI devices' " Kevin Traynor
2022-05-25 16:27 ` patch 'net/nfp: remove unneeded header inclusion' " Kevin Traynor
2022-05-25 16:27 ` patch 'net/bonding: fix RSS key config with extended key length' " Kevin Traynor
2022-05-25 16:27 ` patch 'net/cxgbe: fix port ID in Rx mbuf' " Kevin Traynor
2022-05-25 16:27 ` patch 'net/cxgbe: fix Tx queue stuck with mbuf chain coalescing' " Kevin Traynor
2022-05-25 16:27 ` patch 'net/vhost: fix access to freed memory' " Kevin Traynor
2022-05-25 16:28 ` patch 'net/virtio: restore some optimisations with AVX512' " Kevin Traynor
2022-05-25 16:28 ` patch 'net/vhost: fix TSO feature default disablement' " Kevin Traynor
2022-05-25 16:28 ` patch 'vhost: fix missing virtqueue lock protection' " Kevin Traynor
2022-05-25 16:28 ` patch 'vdpa/mlx5: fix interrupt trash that leads to crash' " Kevin Traynor
2022-05-25 16:28 ` patch 'vdpa/mlx5: fix dead loop when process interrupted' " Kevin Traynor
2022-05-25 16:28 ` patch 'net/dpaa: fix event queue detach' " Kevin Traynor
2022-05-25 16:28 ` patch 'doc: update matching versions in ice guide' " Kevin Traynor
2022-05-25 16:28 ` patch 'net/bonding: fix stopping non-active slaves' " Kevin Traynor
2022-05-25 16:28 ` patch 'net/bonding: fix slave stop and remove on port close' " Kevin Traynor
2022-05-25 16:28 ` patch 'net/tap: fix interrupt handler freeing' " Kevin Traynor
2022-05-25 16:28 ` patch 'ethdev: fix build with vtune option' " Kevin Traynor
2022-05-25 16:28 ` patch 'net/hns3: fix order of clearing imissed register in PF' " Kevin Traynor
2022-05-25 16:28 ` patch 'net/hns3: fix MAC and queues HW statistics overflow' " Kevin Traynor
2022-05-25 16:28 ` patch 'net/hns3: fix pseudo-sharing between threads' " Kevin Traynor
2022-05-25 16:28 ` patch 'net/hns3: fix mbuf free on Tx done cleanup' " Kevin Traynor
2022-05-25 16:28 ` patch 'net/hns3: fix RSS disable' " Kevin Traynor
2022-05-25 16:28 ` patch 'net/hns3: fix rollback on RSS hash update' " Kevin Traynor
2022-05-25 16:28 ` patch 'net/hns3: remove redundant RSS tuple field' " Kevin Traynor
2022-05-25 16:28 ` patch 'ethdev: fix RSS update when RSS is disabled' " Kevin Traynor
2022-05-25 16:28 ` patch 'net/hns3: remove unnecessary RSS switch' " Kevin Traynor
2022-05-25 16:28 ` patch 'app/testpmd: check statistics query before printing' " Kevin Traynor
2022-05-25 16:28 ` patch 'app/testpmd: fix MTU verification' " Kevin Traynor
2022-05-25 16:28 ` patch 'net/cnxk: add message on flow parsing failure' " Kevin Traynor
2022-05-25 16:28 ` patch 'common/cnxk: fix unaligned access to device memory' " Kevin Traynor
2022-05-25 16:28 ` patch 'common/cnxk: fix null pointer dereference' " Kevin Traynor
2022-05-25 16:28 ` patch 'net/cnxk: fix uninitialized variables' " Kevin Traynor
2022-05-25 16:28 ` Kevin Traynor [this message]
2022-05-25 16:35   ` patch 'common/cnxk: fix SQ flush sequence' " Kevin Traynor
2022-05-25 16:28 ` patch 'net/cnxk: add barrier after meta batch free in scalar' " Kevin Traynor
2022-05-25 16:28 ` patch 'net/bnxt: fix reordering in NEON Rx' " Kevin Traynor
2022-05-25 16:28 ` patch 'net/bnxt: fix device capability reporting' " Kevin Traynor
2022-05-25 16:28 ` patch 'net/bnxt: remove unused macro' " Kevin Traynor
2022-05-25 16:28 ` patch 'net/bnxt: fix Rx configuration' " Kevin Traynor
2022-05-25 16:28 ` patch 'net/bnxt: fix RSS action' " Kevin Traynor
2022-05-25 16:28 ` patch 'net/bnxt: fix ring group on Rx restart' " Kevin Traynor
2022-05-25 16:28 ` patch 'net/bnxt: check duplicate queue IDs' " Kevin Traynor
2022-05-25 16:28 ` patch 'net/bnxt: handle queue stop during RSS flow create' " Kevin Traynor
2022-05-25 16:28 ` patch 'net/bnxt: avoid unnecessary endianness conversion' " Kevin Traynor
2022-05-25 16:28 ` patch 'net/bnxt: fix speed autonegotiation' " Kevin Traynor
2022-05-25 16:28 ` patch 'net/bnxt: force PHY update on certain configurations' " Kevin Traynor
2022-05-25 16:28 ` patch 'net/bnxt: fix link status when port is stopped' " Kevin Traynor
2022-05-25 16:28 ` patch 'net/bnxt: recheck FW readiness if in reset process' " Kevin Traynor
2022-05-25 16:28 ` patch 'net/bnxt: fix freeing VNIC filters' " Kevin Traynor
2022-05-25 16:28 ` patch 'net/mlx5: fix no-green metering with RSS' " Kevin Traynor
2022-05-25 16:28 ` patch 'doc: fix build with sphinx 4.5' " Kevin Traynor
2022-05-25 16:28 ` patch 'eventdev/eth_rx: fix telemetry Rx stats reset' " Kevin Traynor
2022-05-25 16:28 ` patch 'event/cnxk: fix out of bounds access in test' " Kevin Traynor
2022-05-25 16:28 ` patch 'eal/x86: fix unaligned access for small memcpy' " Kevin Traynor
2022-05-25 16:28 ` patch 'devargs: fix leak on hotplug failure' " 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=20220525162847.711753-34-ktraynor@redhat.com \
    --to=ktraynor@redhat.com \
    --cc=jerinj@marvell.com \
    --cc=skoteshwar@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).