[v3,05/51] net/bnxt: modify port db dev interface
diff mbox series

Message ID 20200702041134.43198-6-ajit.khaparde@broadcom.com
State Superseded, archived
Delegated to: Ajit Khaparde
Headers show
Series
  • add features for host-based flow management
Related show

Checks

Context Check Description
ci/Intel-compilation success Compilation OK
ci/checkpatch success coding style OK

Commit Message

Ajit Khaparde July 2, 2020, 4:10 a.m. UTC
From: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>

Modify ulp_port_db_dev_port_intf_update prototype to take
"struct rte_eth_dev *" as the second parameter.

Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/tf_ulp/bnxt_ulp.c    | 4 ++--
 drivers/net/bnxt/tf_ulp/ulp_port_db.c | 5 +++--
 drivers/net/bnxt/tf_ulp/ulp_port_db.h | 2 +-
 3 files changed, 6 insertions(+), 5 deletions(-)

Patch
diff mbox series

diff --git a/drivers/net/bnxt/tf_ulp/bnxt_ulp.c b/drivers/net/bnxt/tf_ulp/bnxt_ulp.c
index 0c3c638ce..c7281ab9a 100644
--- a/drivers/net/bnxt/tf_ulp/bnxt_ulp.c
+++ b/drivers/net/bnxt/tf_ulp/bnxt_ulp.c
@@ -548,7 +548,7 @@  bnxt_ulp_init(struct bnxt *bp)
 		}
 
 		/* update the port database */
-		rc = ulp_port_db_dev_port_intf_update(bp->ulp_ctx, bp);
+		rc = ulp_port_db_dev_port_intf_update(bp->ulp_ctx, bp->eth_dev);
 		if (rc) {
 			BNXT_TF_DBG(ERR,
 				    "Failed to update port database\n");
@@ -584,7 +584,7 @@  bnxt_ulp_init(struct bnxt *bp)
 	}
 
 	/* update the port database */
-	rc = ulp_port_db_dev_port_intf_update(bp->ulp_ctx, bp);
+	rc = ulp_port_db_dev_port_intf_update(bp->ulp_ctx, bp->eth_dev);
 	if (rc) {
 		BNXT_TF_DBG(ERR, "Failed to update port database\n");
 		goto jump_to_error;
diff --git a/drivers/net/bnxt/tf_ulp/ulp_port_db.c b/drivers/net/bnxt/tf_ulp/ulp_port_db.c
index e3b924289..66b584026 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_port_db.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_port_db.c
@@ -104,10 +104,11 @@  int32_t	ulp_port_db_deinit(struct bnxt_ulp_context *ulp_ctxt)
  * Returns 0 on success or negative number on failure.
  */
 int32_t	ulp_port_db_dev_port_intf_update(struct bnxt_ulp_context *ulp_ctxt,
-					 struct bnxt *bp)
+					 struct rte_eth_dev *eth_dev)
 {
 	struct bnxt_ulp_port_db *port_db;
-	uint32_t port_id = bp->eth_dev->data->port_id;
+	struct bnxt *bp = eth_dev->data->dev_private;
+	uint32_t port_id = eth_dev->data->port_id;
 	uint32_t ifindex;
 	struct ulp_interface_info *intf;
 	int32_t rc;
diff --git a/drivers/net/bnxt/tf_ulp/ulp_port_db.h b/drivers/net/bnxt/tf_ulp/ulp_port_db.h
index 271c29a47..929a5a510 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_port_db.h
+++ b/drivers/net/bnxt/tf_ulp/ulp_port_db.h
@@ -71,7 +71,7 @@  int32_t	ulp_port_db_deinit(struct bnxt_ulp_context *ulp_ctxt);
  * Returns 0 on success or negative number on failure.
  */
 int32_t	ulp_port_db_dev_port_intf_update(struct bnxt_ulp_context *ulp_ctxt,
-					 struct bnxt *bp);
+					 struct rte_eth_dev *eth_dev);
 
 /*
  * Api to get the ulp ifindex for a given device port.