From: Venkat Duvvuru Date: Thu, 2 Jul 2020 23:27:52 +0000 (-0700) Subject: net/bnxt: modify port DB dev interface X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=410e5b8bed1d5216f1e5008af1266ae3ae8e7af3;p=dpdk.git net/bnxt: modify port DB dev interface Modify ulp_port_db_dev_port_intf_update prototype to take "struct rte_eth_dev *" as the second parameter. Signed-off-by: Venkat Duvvuru Signed-off-by: Somnath Kotur Reviewed-by: Kishore Padmanabha Reviewed-by: Ajit Khaparde --- diff --git a/drivers/net/bnxt/tf_ulp/bnxt_ulp.c b/drivers/net/bnxt/tf_ulp/bnxt_ulp.c index 0c3c638ce8..c7281ab9a9 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 e3b9242891..66b5840263 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 271c29a475..929a5a5108 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.