diff mbox series

[36/58] net/bnxt: set shared handle for generic table

Message ID 20210530085929.29695-37-venkatkumar.duvvuru@broadcom.com (mailing list archive)
State Superseded, archived
Delegated to: Ajit Khaparde
Headers show
Series enhancements to host based flow table management | expand

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Venkat Duvvuru May 30, 2021, 8:59 a.m. UTC
From: Kishore Padmanabha <kishore.padmanabha@broadcom.com>

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: Michael Baucom <michael.baucom@broadcom.com>
---
 drivers/net/bnxt/tf_ulp/ulp_mapper.c | 1 +
 drivers/net/bnxt/tf_ulp/ulp_mapper.h | 1 +
 2 files changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/drivers/net/bnxt/tf_ulp/ulp_mapper.c b/drivers/net/bnxt/tf_ulp/ulp_mapper.c
index ad5fde9730..73a6a4cdb5 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 {