Limit meta aura workaround to CN10K A0.
Also other NIX and Inline related Erratas applicable
for CN10K A1.
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
---
drivers/common/cnxk/roc_errata.h | 7 +++++++
drivers/common/cnxk/roc_nix_inl.c | 10 ++++++----
drivers/net/cnxk/cnxk_ethdev.c | 3 ++-
3 files changed, 15 insertions(+), 5 deletions(-)
@@ -80,6 +80,13 @@ roc_errata_nix_has_perf_issue_on_stats_update(void)
/* Errata IPBUCPT-38726, IPBUCPT-38727 */
static inline bool
roc_errata_cpt_hang_on_x2p_bp(void)
+{
+ return roc_model_is_cn10ka_a0() || roc_model_is_cn10ka_a1();
+}
+
+/* IPBUNIXRX-40400 */
+static inline bool
+roc_errata_nix_no_meta_aura(void)
{
return roc_model_is_cn10ka_a0();
}
@@ -627,18 +627,18 @@ roc_nix_inl_dev_rq_get(struct roc_nix_rq *rq)
inl_rq->first_skip = rq->first_skip;
inl_rq->later_skip = rq->later_skip;
inl_rq->lpb_size = rq->lpb_size;
- inl_rq->lpb_drop_ena = true;
inl_rq->spb_ena = rq->spb_ena;
inl_rq->spb_aura_handle = rq->spb_aura_handle;
inl_rq->spb_size = rq->spb_size;
- inl_rq->spb_drop_ena = !!rq->spb_ena;
- if (!roc_model_is_cn9k()) {
+ if (roc_errata_nix_no_meta_aura()) {
uint64_t aura_limit =
roc_npa_aura_op_limit_get(inl_rq->aura_handle);
uint64_t aura_shift = plt_log2_u32(aura_limit);
uint64_t aura_drop, drop_pc;
+ inl_rq->lpb_drop_ena = true;
+
if (aura_shift < 8)
aura_shift = 0;
else
@@ -653,12 +653,14 @@ roc_nix_inl_dev_rq_get(struct roc_nix_rq *rq)
roc_npa_aura_drop_set(inl_rq->aura_handle, aura_drop, true);
}
- if (inl_rq->spb_ena) {
+ if (roc_errata_nix_no_meta_aura() && inl_rq->spb_ena) {
uint64_t aura_limit =
roc_npa_aura_op_limit_get(inl_rq->spb_aura_handle);
uint64_t aura_shift = plt_log2_u32(aura_limit);
uint64_t aura_drop, drop_pc;
+ inl_rq->spb_drop_ena = true;
+
if (aura_shift < 8)
aura_shift = 0;
else
@@ -617,7 +617,8 @@ cnxk_nix_rx_queue_setup(struct rte_eth_dev *eth_dev, uint16_t qid,
rq->first_skip = first_skip;
rq->later_skip = sizeof(struct rte_mbuf);
rq->lpb_size = mp->elt_size;
- rq->lpb_drop_ena = !(dev->rx_offloads & RTE_ETH_RX_OFFLOAD_SECURITY);
+ if (roc_errata_nix_no_meta_aura())
+ rq->lpb_drop_ena = !(dev->rx_offloads & RTE_ETH_RX_OFFLOAD_SECURITY);
/* Enable Inline IPSec on RQ, will not be used for Poll mode */
if (roc_nix_inl_inb_is_enabled(nix))