From: Rahul Bhansali <rbhansali@marvell.com>
To: <dev@dpdk.org>, Nithin Dabilpuram <ndabilpuram@marvell.com>,
Kiran Kumar K <kirankumark@marvell.com>,
Sunil Kumar Kori <skori@marvell.com>,
Satha Rao <skoteshwar@marvell.com>
Cc: <jerinj@marvell.com>, Rahul Bhansali <rbhansali@marvell.com>
Subject: [PATCH 2/2] net/cnxk: use ROC errata API
Date: Wed, 30 Mar 2022 14:13:56 +0530 [thread overview]
Message-ID: <20220330084356.3614662-2-rbhansali@marvell.com> (raw)
In-Reply-To: <20220330084356.3614662-1-rbhansali@marvell.com>
Used errata APIs roc_errata_nix_has_no_drop_re() and
roc_errata_nix_has_cq_min_size_4k() instead of direct
ROC model check.
Signed-off-by: Rahul Bhansali <rbhansali@marvell.com>
---
drivers/net/cnxk/cn10k_ethdev.c | 4 +---
drivers/net/cnxk/cn9k_ethdev.c | 2 +-
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/net/cnxk/cn10k_ethdev.c b/drivers/net/cnxk/cn10k_ethdev.c
index 15dbea2180..6f37bf5a4b 100644
--- a/drivers/net/cnxk/cn10k_ethdev.c
+++ b/drivers/net/cnxk/cn10k_ethdev.c
@@ -778,9 +778,7 @@ cn10k_nix_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev)
/* 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()) {
+ if (roc_errata_nix_has_no_drop_re() && !roc_env_is_asim()) {
dev->ipsecd_drop_re_dis = 1;
dev->vec_drop_re_dis = 1;
}
diff --git a/drivers/net/cnxk/cn9k_ethdev.c b/drivers/net/cnxk/cn9k_ethdev.c
index eda33dc8c5..be1276180c 100644
--- a/drivers/net/cnxk/cn9k_ethdev.c
+++ b/drivers/net/cnxk/cn9k_ethdev.c
@@ -737,7 +737,7 @@ cn9k_nix_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev)
roc_nix_ptp_info_cb_register(&dev->nix, cn9k_nix_ptp_info_update_cb);
/* Update HW erratas */
- if (roc_model_is_cn96_a0() || roc_model_is_cn95_a0())
+ if (roc_errata_nix_has_cq_min_size_4k())
dev->cq_min_4k = 1;
return 0;
}
--
2.25.1
next prev parent reply other threads:[~2022-03-30 8:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-30 8:43 [PATCH 1/2] common/cnxk: add ROC errata list Rahul Bhansali
2022-03-30 8:43 ` Rahul Bhansali [this message]
2022-05-02 18:33 ` [PATCH 2/2] net/cnxk: use ROC errata API 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=20220330084356.3614662-2-rbhansali@marvell.com \
--to=rbhansali@marvell.com \
--cc=dev@dpdk.org \
--cc=jerinj@marvell.com \
--cc=kirankumark@marvell.com \
--cc=ndabilpuram@marvell.com \
--cc=skori@marvell.com \
--cc=skoteshwar@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).