net/bnxt: set shared handle for generic table
authorKishore Padmanabha <kishore.padmanabha@broadcom.com>
Sun, 30 May 2021 08:59:07 +0000 (14:29 +0530)
committerAjit Khaparde <ajit.khaparde@broadcom.com>
Thu, 8 Jul 2021 00:02:02 +0000 (02:02 +0200)
The shared handle is set in the mapper params when generic resource
are created, this shall be used by application as a handle to the
shared resource like mirror handle.

Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Mike Baucom <michael.baucom@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
drivers/net/bnxt/tf_ulp/ulp_mapper.c
drivers/net/bnxt/tf_ulp/ulp_mapper.h

index dc21b2a..45c17cf 100644 (file)
@@ -2403,6 +2403,7 @@ ulp_mapper_gen_tbl_process(struct bnxt_ulp_mapper_parms *parms,
                /* increment the reference count */
                ULP_GEN_TBL_REF_CNT_INC(&gen_tbl_ent);
                fdb_write = 1;
+               parms->shared_hndl = (uint64_t)tbl_idx << 32 | ckey;
                break;
        default:
                BNXT_TF_DBG(ERR, "Invalid table opcode %x\n", tbl->tbl_opcode);
index bef7269..b7399b8 100644 (file)
@@ -57,6 +57,7 @@ struct bnxt_ulp_mapper_parms {
        uint32_t                                parent_flow;
        uint8_t                                 tun_idx;
        uint32_t                                app_priority;
+       uint64_t                                shared_hndl;
 };
 
 struct bnxt_ulp_mapper_create_parms {