Thread (129 messages) 129 messages, 3 authors, 2021-07-08

[dpdk-dev] [PATCH 36/58] net/bnxt: set shared handle for generic table

From: Venkat Duvvuru <hidden>
Date: 2021-05-30 09:05:23
Subsystem: networking drivers, the rest · Maintainers: Andrew Lunn, "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Torvalds

From: Kishore Padmanabha <redacted>

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 <redacted>
Signed-off-by: Venkat Duvvuru <redacted>
Reviewed-by: Michael Baucom <redacted>
---
 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 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 {
-- 
2.17.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help