From: Jerin Jacob <jerinjacobk@gmail.com>
To: Nithin Dabilpuram <ndabilpuram@marvell.com>
Cc: Jerin Jacob <jerinj@marvell.com>,
Kiran Kumar K <kirankumark@marvell.com>,
Sunil Kumar Kori <skori@marvell.com>,
Satha Rao <skoteshwar@marvell.com>,
Pavan Nikhilesh <pbhagavatula@marvell.com>,
Shijith Thotton <sthotton@marvell.com>, dpdk-dev <dev@dpdk.org>
Subject: Re: [PATCH v2 01/12] common/cnxk: use computed value for WQE skip
Date: Mon, 20 Jun 2022 22:56:53 +0530 [thread overview]
Message-ID: <CALBAE1MZipgB1mHWgXZAMGr4Mhoj9BGTBoZ7bCHCyM8dSgUg5g@mail.gmail.com> (raw)
In-Reply-To: <20220616092420.17861-1-ndabilpuram@marvell.com>
On Thu, Jun 16, 2022 at 2:54 PM Nithin Dabilpuram
<ndabilpuram@marvell.com> wrote:
>
> Use computed value for WQE skip instead of a hardcoded value.
> WQE skip needs to be number of 128B lines to accommodate rte_mbuf.
>
> Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
> ---
> Depends-on: series=23500 ("common/cnxk: add cnf10kb support")
Series(except 12/12) applied to dpdk-next-net-mrvl/for-next-net. Thanks
>
> v2:
> - Fixed commit message in 10/12, 1/12 patches
>
> drivers/common/cnxk/roc_nix_inl.h | 2 +-
> drivers/common/cnxk/roc_nix_inl_priv.h | 2 +-
> drivers/event/cnxk/cnxk_eventdev_adptr.c | 5 ++++-
> drivers/net/cnxk/cnxk_ethdev_sec.c | 5 ++++-
> 4 files changed, 10 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/common/cnxk/roc_nix_inl.h b/drivers/common/cnxk/roc_nix_inl.h
> index b1b4c5b..c7b1817 100644
> --- a/drivers/common/cnxk/roc_nix_inl.h
> +++ b/drivers/common/cnxk/roc_nix_inl.h
> @@ -131,7 +131,7 @@ struct roc_nix_inl_dev {
> uint16_t channel;
> uint16_t chan_mask;
> bool attach_cptlf;
> - bool wqe_skip;
> + uint16_t wqe_skip;
> uint8_t spb_drop_pc;
> uint8_t lpb_drop_pc;
> bool set_soft_exp_poll;
> diff --git a/drivers/common/cnxk/roc_nix_inl_priv.h b/drivers/common/cnxk/roc_nix_inl_priv.h
> index d61c7b2..a775efc 100644
> --- a/drivers/common/cnxk/roc_nix_inl_priv.h
> +++ b/drivers/common/cnxk/roc_nix_inl_priv.h
> @@ -84,7 +84,7 @@ struct nix_inl_dev {
> uint32_t ipsec_in_max_spi;
> uint32_t inb_spi_mask;
> bool attach_cptlf;
> - bool wqe_skip;
> + uint16_t wqe_skip;
> bool ts_ena;
> };
>
> diff --git a/drivers/event/cnxk/cnxk_eventdev_adptr.c b/drivers/event/cnxk/cnxk_eventdev_adptr.c
> index fa96090..cf5b1dd 100644
> --- a/drivers/event/cnxk/cnxk_eventdev_adptr.c
> +++ b/drivers/event/cnxk/cnxk_eventdev_adptr.c
> @@ -125,6 +125,7 @@ cnxk_sso_rxq_enable(struct cnxk_eth_dev *cnxk_eth_dev, uint16_t rq_id,
> {
> struct roc_nix *nix = &cnxk_eth_dev->nix;
> struct roc_nix_rq *rq;
> + uint16_t wqe_skip;
> int rc;
>
> rq = &cnxk_eth_dev->rqs[rq_id];
> @@ -132,7 +133,9 @@ cnxk_sso_rxq_enable(struct cnxk_eth_dev *cnxk_eth_dev, uint16_t rq_id,
> rq->tt = ev->sched_type;
> rq->hwgrp = ev->queue_id;
> rq->flow_tag_width = 20;
> - rq->wqe_skip = 1;
> + wqe_skip = RTE_ALIGN_CEIL(sizeof(struct rte_mbuf), ROC_CACHE_LINE_SZ);
> + wqe_skip = wqe_skip / ROC_CACHE_LINE_SZ;
> + rq->wqe_skip = wqe_skip;
> rq->tag_mask = (port_id & 0xF) << 20;
> rq->tag_mask |= (((port_id >> 4) & 0xF) | (RTE_EVENT_TYPE_ETHDEV << 4))
> << 24;
> diff --git a/drivers/net/cnxk/cnxk_ethdev_sec.c b/drivers/net/cnxk/cnxk_ethdev_sec.c
> index d01ebb4..1de3454 100644
> --- a/drivers/net/cnxk/cnxk_ethdev_sec.c
> +++ b/drivers/net/cnxk/cnxk_ethdev_sec.c
> @@ -264,6 +264,7 @@ cnxk_nix_inl_dev_probe(struct rte_pci_driver *pci_drv,
> char name[CNXK_NIX_INL_DEV_NAME_LEN];
> struct roc_nix_inl_dev *inl_dev;
> const struct rte_memzone *mz;
> + uint16_t wqe_skip;
> int rc = -ENOMEM;
>
> RTE_SET_USED(pci_drv);
> @@ -295,7 +296,9 @@ cnxk_nix_inl_dev_probe(struct rte_pci_driver *pci_drv,
>
> inl_dev->attach_cptlf = true;
> /* WQE skip is one for DPDK */
> - inl_dev->wqe_skip = true;
> + wqe_skip = RTE_ALIGN_CEIL(sizeof(struct rte_mbuf), ROC_CACHE_LINE_SZ);
> + wqe_skip = wqe_skip / ROC_CACHE_LINE_SZ;
> + inl_dev->wqe_skip = wqe_skip;
> inl_dev->set_soft_exp_poll = true;
> rc = roc_nix_inl_dev_init(inl_dev);
> if (rc) {
> --
> 2.8.4
>
prev parent reply other threads:[~2022-06-20 17:27 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-16 7:07 [PATCH 01/12] common/cnxk: use computed value for wqe skip Nithin Dabilpuram
2022-06-16 7:07 ` [PATCH 02/12] common/cnxk: avoid CPT backpressure due to errata Nithin Dabilpuram
2022-06-16 7:07 ` [PATCH 03/12] common/cnxk: add PFC support for VFs Nithin Dabilpuram
2022-06-23 16:01 ` Ray Kinsella
2022-06-16 7:07 ` [PATCH 04/12] common/cnxk: support same TC value across multiple queues Nithin Dabilpuram
2022-06-16 7:07 ` [PATCH 05/12] common/cnxk: enhance CPT parse header dump Nithin Dabilpuram
2022-06-16 7:07 ` [PATCH 06/12] common/cnxk: fix mbox structs to avoid unaligned access Nithin Dabilpuram
2022-06-16 7:07 ` [PATCH 07/12] net/cnxk: add SDP link status Nithin Dabilpuram
2022-06-16 7:07 ` [PATCH 08/12] net/cnxk: remove restriction on VFs for PFC config Nithin Dabilpuram
2022-06-16 7:07 ` [PATCH 09/12] net/cnxk: pfc class disable resulting in invalid behaviour Nithin Dabilpuram
2022-06-16 7:07 ` [PATCH 10/12] net/cnxk: resize CQ for Rx security for errata Nithin Dabilpuram
2022-06-16 8:50 ` Jerin Jacob
2022-06-16 7:07 ` [PATCH 11/12] net/cnxk: add SDP VF device ID for probe matching Nithin Dabilpuram
2022-06-16 7:07 ` [PATCH 12/12] event/cnxk: offset timestamp data only if enabled on port Nithin Dabilpuram
2022-06-16 8:45 ` [PATCH 01/12] common/cnxk: use computed value for wqe skip Jerin Jacob
2022-06-16 9:24 ` [PATCH v2 01/12] common/cnxk: use computed value for WQE skip Nithin Dabilpuram
2022-06-16 9:24 ` [PATCH v2 02/12] common/cnxk: avoid CPT backpressure due to errata Nithin Dabilpuram
2022-06-16 9:24 ` [PATCH v2 03/12] common/cnxk: add PFC support for VFs Nithin Dabilpuram
2022-06-16 9:24 ` [PATCH v2 04/12] common/cnxk: support same TC value across multiple queues Nithin Dabilpuram
2022-06-16 9:24 ` [PATCH v2 05/12] common/cnxk: enhance CPT parse header dump Nithin Dabilpuram
2022-06-16 9:24 ` [PATCH v2 06/12] common/cnxk: fix mbox structs to avoid unaligned access Nithin Dabilpuram
2022-06-16 9:24 ` [PATCH v2 07/12] net/cnxk: add SDP link status Nithin Dabilpuram
2022-06-16 9:24 ` [PATCH v2 08/12] net/cnxk: remove restriction on VFs for PFC config Nithin Dabilpuram
2022-06-16 9:24 ` [PATCH v2 09/12] net/cnxk: pfc class disable resulting in invalid behaviour Nithin Dabilpuram
2022-06-16 9:24 ` [PATCH v2 10/12] net/cnxk: resize CQ for Rx security for errata Nithin Dabilpuram
2022-06-16 9:24 ` [PATCH v2 11/12] net/cnxk: add SDP VF device ID for probe matching Nithin Dabilpuram
2022-06-16 9:24 ` [PATCH v2 12/12] event/cnxk: offset timestamp data only if enabled on port Nithin Dabilpuram
2022-06-16 10:30 ` Nithin Kumar Dabilpuram
2022-06-20 17:26 ` Jerin Jacob [this message]
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=CALBAE1MZipgB1mHWgXZAMGr4Mhoj9BGTBoZ7bCHCyM8dSgUg5g@mail.gmail.com \
--to=jerinjacobk@gmail.com \
--cc=dev@dpdk.org \
--cc=jerinj@marvell.com \
--cc=kirankumark@marvell.com \
--cc=ndabilpuram@marvell.com \
--cc=pbhagavatula@marvell.com \
--cc=skori@marvell.com \
--cc=skoteshwar@marvell.com \
--cc=sthotton@marvell.com \
/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).