DPDK patches and discussions
 help / color / mirror / Atom feed
From: Nithin Dabilpuram <ndabilpuram@marvell.com>
To: <jerinj@marvell.com>, Pavan Nikhilesh <pbhagavatula@marvell.com>,
	"Shijith Thotton" <sthotton@marvell.com>,
	Nithin Dabilpuram <ndabilpuram@marvell.com>,
	Kiran Kumar K <kirankumark@marvell.com>,
	Sunil Kumar Kori <skori@marvell.com>,
	Satha Rao <skoteshwar@marvell.com>
Cc: <dev@dpdk.org>
Subject: [dpdk-dev] [PATCH 9/9] event/cnxk: disable drop re on vector enable for cn10k a0
Date: Tue, 2 Nov 2021 21:24:20 +0530	[thread overview]
Message-ID: <20211102155421.486-9-ndabilpuram@marvell.com> (raw)
In-Reply-To: <20211102155421.486-1-ndabilpuram@marvell.com>

Disable drop_re i.e dropping packets with receive errors on
vector enable for few cn10k revisions due to HW errata.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
---
 drivers/event/cnxk/cnxk_eventdev_adptr.c |  8 ++++++++
 drivers/net/cnxk/cn10k_ethdev.c          | 11 ++++++++---
 drivers/net/cnxk/cnxk_ethdev.h           |  1 +
 3 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/drivers/event/cnxk/cnxk_eventdev_adptr.c b/drivers/event/cnxk/cnxk_eventdev_adptr.c
index b9a5df0..fdcd68c 100644
--- a/drivers/event/cnxk/cnxk_eventdev_adptr.c
+++ b/drivers/event/cnxk/cnxk_eventdev_adptr.c
@@ -242,6 +242,10 @@ cnxk_sso_rx_adapter_queue_add(
 				queue_conf->vector_sz,
 				queue_conf->vector_timeout_ns,
 				queue_conf->vector_mp);
+
+			if (cnxk_eth_dev->vec_drop_re_dis)
+				rc |= roc_nix_rx_drop_re_set(&cnxk_eth_dev->nix,
+							     false);
 		}
 		rox_nix_fc_npa_bp_cfg(&cnxk_eth_dev->nix,
 				      rxq_sp->qconf.mp->pool_id, true,
@@ -290,6 +294,10 @@ cnxk_sso_rx_adapter_queue_del(const struct rte_eventdev *event_dev,
 				      rxq_sp->qconf.mp->pool_id, false,
 				      dev->force_ena_bp);
 		cnxk_eth_dev->nb_rxq_sso--;
+
+		/* Enable drop_re if it was disabled earlier */
+		if (cnxk_eth_dev->vec_drop_re_dis && !cnxk_eth_dev->nb_rxq_sso)
+			rc |= roc_nix_rx_drop_re_set(&cnxk_eth_dev->nix, true);
 	}
 
 	if (rc < 0)
diff --git a/drivers/net/cnxk/cn10k_ethdev.c b/drivers/net/cnxk/cn10k_ethdev.c
index 5d9536c..8378cbf 100644
--- a/drivers/net/cnxk/cn10k_ethdev.c
+++ b/drivers/net/cnxk/cn10k_ethdev.c
@@ -553,10 +553,15 @@ cn10k_nix_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev)
 
 	dev = cnxk_eth_pmd_priv(eth_dev);
 
-	/* DROP_RE is not supported with inline IPSec for CN10K A0 */
-	if (roc_model_is_cn10ka_a0() || roc_model_is_cnf10ka_a0() ||
-	    roc_model_is_cnf10kb_a0())
+	/* DROP_RE is not supported with inline IPSec for CN10K A0 and
+	 * when vector mode is enabled.
+	 */
+	if ((roc_model_is_cn10ka_a0() || roc_model_is_cnf10ka_a0() ||
+	     roc_model_is_cnf10kb_a0()) &&
+	    !roc_env_is_asim()) {
 		dev->ipsecd_drop_re_dis = 1;
+		dev->vec_drop_re_dis = 1;
+	}
 
 	/* Register up msg callbacks for PTP information */
 	roc_nix_ptp_info_cb_register(&dev->nix, cn10k_nix_ptp_info_update_cb);
diff --git a/drivers/net/cnxk/cnxk_ethdev.h b/drivers/net/cnxk/cnxk_ethdev.h
index 93879c8..7cbd9f1 100644
--- a/drivers/net/cnxk/cnxk_ethdev.h
+++ b/drivers/net/cnxk/cnxk_ethdev.h
@@ -342,6 +342,7 @@ struct cnxk_eth_dev {
 		struct {
 			uint64_t cq_min_4k : 1;
 			uint64_t ipsecd_drop_re_dis : 1;
+			uint64_t vec_drop_re_dis : 1;
 		};
 		uint64_t hwcap;
 	};
-- 
2.8.4


  parent reply	other threads:[~2021-11-02 15:55 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-02 15:54 [dpdk-dev] [PATCH 1/9] common/cnxk: add code to write CPT CTX through microcode op Nithin Dabilpuram
2021-11-02 15:54 ` [dpdk-dev] [PATCH 2/9] common/cnxk: add CPT CTX sync mailbox API Nithin Dabilpuram
2021-11-02 15:54 ` [dpdk-dev] [PATCH 3/9] common/cnxk: support flow control on LBK Nithin Dabilpuram
2021-11-02 15:54 ` [dpdk-dev] [PATCH 4/9] common/cnxk: enable tm to listen on Rx pause frames Nithin Dabilpuram
2021-11-02 15:54 ` [dpdk-dev] [PATCH 5/9] common/cnxk: enable bp on CPT with inline inbound Nithin Dabilpuram
2021-11-02 15:54 ` [dpdk-dev] [PATCH 6/9] common/cnxk: support changing drop re flag after lf alloc Nithin Dabilpuram
2021-11-02 15:54 ` [dpdk-dev] [PATCH 7/9] net/cnxk: write CPT CTX through microcode op Nithin Dabilpuram
2021-11-02 15:54 ` [dpdk-dev] [PATCH 8/9] net/cnxk: allow fc on lbk and enable tm bp on Rx pause Nithin Dabilpuram
2021-11-02 15:54 ` Nithin Dabilpuram [this message]
2021-11-03 15:09 ` [dpdk-dev] [PATCH 1/9] common/cnxk: add code to write CPT CTX through microcode op Jerin Jacob

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=20211102155421.486-9-ndabilpuram@marvell.com \
    --to=ndabilpuram@marvell.com \
    --cc=dev@dpdk.org \
    --cc=jerinj@marvell.com \
    --cc=kirankumark@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).