patch 'common/cnxk: fix SQ flush sequence' has been queued to stable release 21.11.2
Kevin Traynor
ktraynor at redhat.com
Wed May 25 18:35:21 CEST 2022
On 25/05/2022 17:28, Kevin Traynor wrote:
> 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 at 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")
>
Please check this patch. In general, fixing different issues from
different releases in the same patch should be avoided, as it makes it a
bit more difficult to backport. Need to check that there isn't
dependencies between the parts that apply and the parts that don't etc.
Thanks.
> Signed-off-by: Satha Rao <skoteshwar at marvell.com>
> Acked-by: Jerin Jacob <jerinj at 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 */
More information about the stable
mailing list