From 5a75f638186a1a4f9df60d5f9218cc62342a59a6 Mon Sep 17 00:00:00 2001 From: Rahul Bhansali Date: Wed, 30 Mar 2022 14:13:56 +0530 Subject: [PATCH] net/cnxk: use ROC errata API 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 Acked-by: Jerin Jacob --- 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.20.1