DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH 1/3] net/cnxk: fix incorrect check cookies with security offload
@ 2023-06-15 13:09 Nithin Dabilpuram
  2023-06-15 13:09 ` [PATCH 2/3] net/cnxk: support backpressure on SPB pool Nithin Dabilpuram
  2023-06-15 13:09 ` [PATCH 3/3] common/cnxk: update minimum size of packet Nithin Dabilpuram
  0 siblings, 2 replies; 4+ messages in thread
From: Nithin Dabilpuram @ 2023-06-15 13:09 UTC (permalink / raw)
  To: Nithin Dabilpuram, Kiran Kumar K, Sunil Kumar Kori, Satha Rao; +Cc: jerinj, dev

Fix missing/incorrect check cookies call's with security offload
enabled on Rx and Tx.

Fixes: 55bfac717c72 ("net/cnxk: support Tx security offload on cn10k")
Fixes: 0ed7107373b4 ("net/cnxk: remove duplicate mempool debug checks")

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
---
 drivers/net/cnxk/cn10k_rx.h | 12 ++++++------
 drivers/net/cnxk/cn10k_tx.h |  2 ++
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/drivers/net/cnxk/cn10k_rx.h b/drivers/net/cnxk/cn10k_rx.h
index b7074906a6..8148866e44 100644
--- a/drivers/net/cnxk/cn10k_rx.h
+++ b/drivers/net/cnxk/cn10k_rx.h
@@ -1241,6 +1241,12 @@ cn10k_nix_recv_pkts_vector(void *args, struct rte_mbuf **mbufs, uint16_t pkts,
 		mbuf2 = (struct rte_mbuf *)vgetq_lane_u64(mbuf23, 0);
 		mbuf3 = (struct rte_mbuf *)vgetq_lane_u64(mbuf23, 1);
 
+		/* Mark mempool obj as "get" as it is alloc'ed by NIX */
+		RTE_MEMPOOL_CHECK_COOKIES(mbuf0->pool, (void **)&mbuf0, 1, 1);
+		RTE_MEMPOOL_CHECK_COOKIES(mbuf1->pool, (void **)&mbuf1, 1, 1);
+		RTE_MEMPOOL_CHECK_COOKIES(mbuf2->pool, (void **)&mbuf2, 1, 1);
+		RTE_MEMPOOL_CHECK_COOKIES(mbuf3->pool, (void **)&mbuf3, 1, 1);
+
 		if (!(flags & NIX_RX_VWQE_F)) {
 			/* Mask to get packet len from NIX_RX_SG_S */
 			const uint8x16_t shuf_msk = {
@@ -1753,12 +1759,6 @@ cn10k_nix_recv_pkts_vector(void *args, struct rte_mbuf **mbufs, uint16_t pkts,
 		vst1q_u64((uint64_t *)&mbufs[packets], mbuf01);
 		vst1q_u64((uint64_t *)&mbufs[packets + 2], mbuf23);
 
-		/* Mark mempool obj as "get" as it is alloc'ed by NIX */
-		RTE_MEMPOOL_CHECK_COOKIES(mbuf0->pool, (void **)&mbuf0, 1, 1);
-		RTE_MEMPOOL_CHECK_COOKIES(mbuf1->pool, (void **)&mbuf1, 1, 1);
-		RTE_MEMPOOL_CHECK_COOKIES(mbuf2->pool, (void **)&mbuf2, 1, 1);
-		RTE_MEMPOOL_CHECK_COOKIES(mbuf3->pool, (void **)&mbuf3, 1, 1);
-
 		nix_mbuf_validate_next(mbuf0);
 		nix_mbuf_validate_next(mbuf1);
 		nix_mbuf_validate_next(mbuf2);
diff --git a/drivers/net/cnxk/cn10k_tx.h b/drivers/net/cnxk/cn10k_tx.h
index 17793493cc..17e27aff40 100644
--- a/drivers/net/cnxk/cn10k_tx.h
+++ b/drivers/net/cnxk/cn10k_tx.h
@@ -1866,10 +1866,12 @@ cn10k_nix_xmit_store(struct cn10k_eth_txq *txq,
 			vst1q_u64(LMT_OFF(laddr, 0, 16), cmd2);
 			vst1q_u64(LMT_OFF(laddr, 0, 32), cmd1);
 		}
+		RTE_MEMPOOL_CHECK_COOKIES(mbuf->pool, (void **)&mbuf, 1, 0);
 	} else {
 		/* Store the prepared send desc to LMT lines */
 		vst1q_u64(LMT_OFF(laddr, 0, 0), cmd0);
 		vst1q_u64(LMT_OFF(laddr, 0, 16), cmd1);
+		RTE_MEMPOOL_CHECK_COOKIES(mbuf->pool, (void **)&mbuf, 1, 0);
 	}
 }
 
-- 
2.25.1


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

* [PATCH 2/3] net/cnxk: support backpressure on SPB pool
  2023-06-15 13:09 [PATCH 1/3] net/cnxk: fix incorrect check cookies with security offload Nithin Dabilpuram
@ 2023-06-15 13:09 ` Nithin Dabilpuram
  2023-06-15 13:09 ` [PATCH 3/3] common/cnxk: update minimum size of packet Nithin Dabilpuram
  1 sibling, 0 replies; 4+ messages in thread
From: Nithin Dabilpuram @ 2023-06-15 13:09 UTC (permalink / raw)
  To: Nithin Dabilpuram, Kiran Kumar K, Sunil Kumar Kori, Satha Rao; +Cc: jerinj, dev

From: Sunil Kumar Kori <skori@marvell.com>

With current implementation, backpressure can be configured only
on lpb_pool but a RQ can be configured with spb_pool too and
spb_pool can also participate to assert backpressure.

Enabling backpressure support on spb_pool for 802.3x and
802.1qbb both.

Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
---
 drivers/net/cnxk/cnxk_ethdev_ops.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/cnxk/cnxk_ethdev_ops.c b/drivers/net/cnxk/cnxk_ethdev_ops.c
index da5ee19c85..3ade8eed36 100644
--- a/drivers/net/cnxk/cnxk_ethdev_ops.c
+++ b/drivers/net/cnxk/cnxk_ethdev_ops.c
@@ -308,7 +308,9 @@ cnxk_nix_flow_ctrl_set(struct rte_eth_dev *eth_dev,
 		fc_cfg.rq_cfg.tc = 0;
 		fc_cfg.rq_cfg.rq = rq->qid;
 		fc_cfg.rq_cfg.pool = rq->aura_handle;
+		fc_cfg.rq_cfg.spb_pool = rq->spb_aura_handle;
 		fc_cfg.rq_cfg.cq_drop = cq->drop_thresh;
+		fc_cfg.rq_cfg.pool_drop_pct = ROC_NIX_AURA_THRESH;
 
 		rc = roc_nix_fc_config_set(nix, &fc_cfg);
 		if (rc)
@@ -1198,7 +1200,9 @@ nix_priority_flow_ctrl_rq_conf(struct rte_eth_dev *eth_dev, uint16_t qid,
 	fc_cfg.rq_cfg.enable = !!tx_pause;
 	fc_cfg.rq_cfg.rq = rq->qid;
 	fc_cfg.rq_cfg.pool = rxq->qconf.mp->pool_id;
+	fc_cfg.rq_cfg.spb_pool = rq->spb_aura_handle;
 	fc_cfg.rq_cfg.cq_drop = cq->drop_thresh;
+	fc_cfg.rq_cfg.pool_drop_pct = ROC_NIX_AURA_THRESH;
 	rc = roc_nix_fc_config_set(nix, &fc_cfg);
 	if (rc)
 		return rc;
-- 
2.25.1


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

* [PATCH 3/3] common/cnxk: update minimum size of packet
  2023-06-15 13:09 [PATCH 1/3] net/cnxk: fix incorrect check cookies with security offload Nithin Dabilpuram
  2023-06-15 13:09 ` [PATCH 2/3] net/cnxk: support backpressure on SPB pool Nithin Dabilpuram
@ 2023-06-15 13:09 ` Nithin Dabilpuram
  2023-06-16  1:24   ` Jerin Jacob
  1 sibling, 1 reply; 4+ messages in thread
From: Nithin Dabilpuram @ 2023-06-15 13:09 UTC (permalink / raw)
  To: Nithin Dabilpuram, Kiran Kumar K, Sunil Kumar Kori, Satha Rao
  Cc: jerinj, dev, Akhil Goyal

From: Akhil Goyal <gakhil@marvell.com>

In case of MACsec, short packets may also come,
hence reduced the minimum packet size to 40B.

Signed-off-by: Akhil Goyal <gakhil@marvell.com>
---
 drivers/common/cnxk/hw/nix.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/common/cnxk/hw/nix.h b/drivers/common/cnxk/hw/nix.h
index fbdf1b64f6..26dcda680e 100644
--- a/drivers/common/cnxk/hw/nix.h
+++ b/drivers/common/cnxk/hw/nix.h
@@ -2128,7 +2128,7 @@ struct nix_lso_format {
 #define NIX_SDP_MAX_HW_FRS  65535UL
 #define NIX_SDP_16K_HW_FRS  16380UL
 #define NIX_RPM_MAX_HW_FRS  16380UL
-#define NIX_MIN_HW_FRS	    60UL
+#define NIX_MIN_HW_FRS	    40UL
 
 /** NIX policer rate limits */
 #define NIX_BPF_MAX_RATE_DIV_EXP  12
-- 
2.25.1


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

* Re: [PATCH 3/3] common/cnxk: update minimum size of packet
  2023-06-15 13:09 ` [PATCH 3/3] common/cnxk: update minimum size of packet Nithin Dabilpuram
@ 2023-06-16  1:24   ` Jerin Jacob
  0 siblings, 0 replies; 4+ messages in thread
From: Jerin Jacob @ 2023-06-16  1:24 UTC (permalink / raw)
  To: Nithin Dabilpuram
  Cc: Kiran Kumar K, Sunil Kumar Kori, Satha Rao, jerinj, dev, Akhil Goyal

On Thu, Jun 15, 2023 at 6:40 PM Nithin Dabilpuram
<ndabilpuram@marvell.com> wrote:
>
> From: Akhil Goyal <gakhil@marvell.com>
>
> In case of MACsec, short packets may also come,
> hence reduced the minimum packet size to 40B.
>
> Signed-off-by: Akhil Goyal <gakhil@marvell.com>

Series applied to dpdk-next-net-mrvl/for-next-net. Thanks.


> ---
>  drivers/common/cnxk/hw/nix.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/common/cnxk/hw/nix.h b/drivers/common/cnxk/hw/nix.h
> index fbdf1b64f6..26dcda680e 100644
> --- a/drivers/common/cnxk/hw/nix.h
> +++ b/drivers/common/cnxk/hw/nix.h
> @@ -2128,7 +2128,7 @@ struct nix_lso_format {
>  #define NIX_SDP_MAX_HW_FRS  65535UL
>  #define NIX_SDP_16K_HW_FRS  16380UL
>  #define NIX_RPM_MAX_HW_FRS  16380UL
> -#define NIX_MIN_HW_FRS     60UL
> +#define NIX_MIN_HW_FRS     40UL
>
>  /** NIX policer rate limits */
>  #define NIX_BPF_MAX_RATE_DIV_EXP  12
> --
> 2.25.1
>

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

end of thread, other threads:[~2023-06-16  1:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-15 13:09 [PATCH 1/3] net/cnxk: fix incorrect check cookies with security offload Nithin Dabilpuram
2023-06-15 13:09 ` [PATCH 2/3] net/cnxk: support backpressure on SPB pool Nithin Dabilpuram
2023-06-15 13:09 ` [PATCH 3/3] common/cnxk: update minimum size of packet Nithin Dabilpuram
2023-06-16  1:24   ` Jerin Jacob

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