]> git.droids-corp.org - dpdk.git/commitdiff
common/cnxk: remove tracking of mark actions
authorSatha Rao <skoteshwar@marvell.com>
Tue, 22 Feb 2022 19:35:02 +0000 (01:05 +0530)
committerJerin Jacob <jerinj@marvell.com>
Wed, 23 Feb 2022 16:36:38 +0000 (17:36 +0100)
Removed roc NPC APIs which tracks addition and deletion of
mark actions. It was earlier needed to track number of mark
actions added as part of flow rules. If mark actions count
is > 0, then the function pointer for Rx would get updated
to even read mark value from CQE/WQE and populate in mbuf.
Now the same switch is done based on new Rx meta data negotiate
ethdev API.

Signed-off-by: Satha Rao <skoteshwar@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
drivers/common/cnxk/roc_npc.c
drivers/common/cnxk/roc_npc.h
drivers/common/cnxk/roc_npc_priv.h
drivers/common/cnxk/version.map

index 34c393f496c62f243d5980c5953c5490512798be..fc88fd58bc846a39be4c5445971c99b808331a79 100644 (file)
@@ -174,8 +174,6 @@ roc_npc_init(struct roc_npc *roc_npc)
        roc_npc->kex_capability = npc_get_kex_capability(npc);
        roc_npc->rx_parse_nibble = npc->keyx_supp_nmask[NPC_MCAM_RX];
 
-       npc->mark_actions = 0;
-
        npc->mcam_entries = npc_mcam_tot_entries() >> npc->keyw[NPC_MCAM_RX];
 
        /* Free, free_rev, live and live_rev entries */
@@ -331,13 +329,11 @@ npc_parse_actions(struct roc_npc *roc_npc, const struct roc_npc_attr *attr,
                        }
                        mark = act_mark->id + 1;
                        req_act |= ROC_NPC_ACTION_TYPE_MARK;
-                       npc->mark_actions += 1;
                        break;
 
                case ROC_NPC_ACTION_TYPE_FLAG:
                        mark = NPC_FLOW_FLAG_VAL;
                        req_act |= ROC_NPC_ACTION_TYPE_FLAG;
-                       npc->mark_actions += 1;
                        break;
 
                case ROC_NPC_ACTION_TYPE_COUNT:
@@ -820,23 +816,6 @@ npc_rss_action_program(struct roc_npc *roc_npc,
        return 0;
 }
 
-int
-roc_npc_mark_actions_get(struct roc_npc *roc_npc)
-{
-       struct npc *npc = roc_npc_to_npc_priv(roc_npc);
-
-       return npc->mark_actions;
-}
-
-int
-roc_npc_mark_actions_sub_return(struct roc_npc *roc_npc, uint32_t count)
-{
-       struct npc *npc = roc_npc_to_npc_priv(roc_npc);
-
-       npc->mark_actions -= count;
-       return npc->mark_actions;
-}
-
 static int
 npc_vtag_cfg_delete(struct roc_npc *roc_npc, struct roc_npc_flow *flow)
 {
index f9e5028cab6a1d9c381b7e5c4ae438ddd029cc4c..6204139396e4acb7b172e6569b1615208b4571ad 100644 (file)
@@ -339,9 +339,6 @@ int __roc_api roc_npc_mcam_free_all_resources(struct roc_npc *roc_npc);
 void __roc_api roc_npc_flow_dump(FILE *file, struct roc_npc *roc_npc);
 void __roc_api roc_npc_flow_mcam_dump(FILE *file, struct roc_npc *roc_npc,
                                      struct roc_npc_flow *mcam);
-int __roc_api roc_npc_mark_actions_get(struct roc_npc *roc_npc);
-int __roc_api roc_npc_mark_actions_sub_return(struct roc_npc *roc_npc,
-                                             uint32_t count);
 int __roc_api roc_npc_vtag_actions_get(struct roc_npc *roc_npc);
 int __roc_api roc_npc_vtag_actions_sub_return(struct roc_npc *roc_npc,
                                              uint32_t count);
index 23e8675253c472fe3ec537fa8a901ca84316d807..e78d96e876293146b67dfe6d3c2a4dcaf61e8530 100644 (file)
@@ -380,7 +380,6 @@ struct npc {
        uint16_t flow_prealloc_size;            /* Pre allocated mcam size */
        uint16_t flow_max_priority;             /* Max priority for flow */
        uint16_t switch_header_type; /* Supported switch header type */
-       uint32_t mark_actions;       /* Number of mark actions */
        uint32_t vtag_strip_actions; /* vtag insert/strip actions */
        uint16_t pf_func;            /* pf_func of device */
        npc_dxcfg_t prx_dxcfg;       /* intf, lid, lt, extract */
index 1ae8271e6329f9fd5bb651013767b1591c1b2b08..54cc1a040275dbccccfdd4a796d3ebcece2ec6d6 100644 (file)
@@ -310,8 +310,6 @@ INTERNAL {
        roc_npc_flow_parse;
        roc_npc_get_low_priority_mcam;
        roc_npc_init;
-       roc_npc_mark_actions_get;
-       roc_npc_mark_actions_sub_return;
        roc_npc_vtag_actions_get;
        roc_npc_vtag_actions_sub_return;
        roc_npc_mcam_alloc_entries;