From 642e5ab3cd8ffc3510443316ed46ff591ed85a29 Mon Sep 17 00:00:00 2001 From: Kishore Padmanabha Date: Sun, 30 May 2021 14:29:07 +0530 Subject: [PATCH] net/bnxt: set shared handle for generic table 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 Signed-off-by: Venkat Duvvuru Reviewed-by: Mike Baucom Reviewed-by: Ajit Khaparde --- drivers/net/bnxt/tf_ulp/ulp_mapper.c | 1 + drivers/net/bnxt/tf_ulp/ulp_mapper.h | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/net/bnxt/tf_ulp/ulp_mapper.c b/drivers/net/bnxt/tf_ulp/ulp_mapper.c index dc21b2a4c6..45c17cffeb 100644 --- a/drivers/net/bnxt/tf_ulp/ulp_mapper.c +++ b/drivers/net/bnxt/tf_ulp/ulp_mapper.c @@ -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); diff --git a/drivers/net/bnxt/tf_ulp/ulp_mapper.h b/drivers/net/bnxt/tf_ulp/ulp_mapper.h index bef72696d3..b7399b8949 100644 --- a/drivers/net/bnxt/tf_ulp/ulp_mapper.h +++ b/drivers/net/bnxt/tf_ulp/ulp_mapper.h @@ -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 { -- 2.20.1