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 <rbhansali@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
This commit is contained in:
Rahul Bhansali 2022-03-30 14:13:56 +05:30 committed by Jerin Jacob
parent 1f997c06c3
commit 5a75f63818
2 changed files with 2 additions and 4 deletions

View File

@ -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;
}

View File

@ -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;
}