]> git.droids-corp.org - dpdk.git/commitdiff
common/cnxk: fix base rule merge
authorSatheesh Paul <psatheesh@marvell.com>
Tue, 25 Jan 2022 04:17:59 +0000 (09:47 +0530)
committerJerin Jacob <jerinj@marvell.com>
Thu, 17 Feb 2022 08:12:08 +0000 (09:12 +0100)
Egress rules do not have a base steering rule and the
current base steering rule is applicable only for ingress
rules. Hence, when creating a flow rule, merge base steering
rule only for ingress rules.

Fixes: f9af90807466 ("common/cnxk: add mcam utility API")
Cc: stable@dpdk.org
Signed-off-by: Satheesh Paul <psatheesh@marvell.com>
Reviewed-by: Kiran Kumar K <kirankumark@marvell.com>
drivers/common/cnxk/roc_npc_mcam.c

index b251f643bca4a173bac8ed6bb6d5ce902f229caa..7a3a8944f55c3eb7489b75719679db2a27564600 100644 (file)
@@ -752,7 +752,7 @@ npc_program_mcam(struct npc *npc, struct npc_parse_state *pst, bool mcam_alloc)
        if (pst->set_ipv6ext_ltype_mask)
                npc_set_ipv6ext_ltype_mask(pst);
 
-       if (pst->is_vf) {
+       if (pst->is_vf && pst->flow->nix_intf == NIX_INTF_RX) {
                (void)mbox_alloc_msg_npc_read_base_steer_rule(npc->mbox);
                rc = mbox_process_msg(npc->mbox, (void *)&base_rule_rsp);
                if (rc) {