net/bnxt: modify port DB dev interface
authorVenkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Thu, 2 Jul 2020 23:27:52 +0000 (16:27 -0700)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 7 Jul 2020 21:38:26 +0000 (23:38 +0200)
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
drivers/net/bnxt/tf_ulp/ulp_port_db.c
drivers/net/bnxt/tf_ulp/ulp_port_db.h

index 0c3c638..c7281ab 100644 (file)
@@ -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;
index e3b9242..66b5840 100644 (file)
@@ -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;
index 271c29a..929a5a5 100644 (file)
@@ -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.