common/mlx5: move to formal ASO action API
[dpdk.git] / drivers / net / bnxt / bnxt_ethdev.c
index 64a5278..81c8f8d 100644 (file)
@@ -848,6 +848,10 @@ uint32_t bnxt_get_speed_capabilities(struct bnxt *bp)
        uint32_t link_speed = bp->link_info->support_speeds;
        uint32_t speed_capa = 0;
 
+       /* If PAM4 is configured, use PAM4 supported speed */
+       if (link_speed == 0 && bp->link_info->support_pam4_speeds > 0)
+               link_speed = bp->link_info->support_pam4_speeds;
+
        if (link_speed & HWRM_PORT_PHY_QCFG_OUTPUT_LINK_SPEED_100MB)
                speed_capa |= ETH_LINK_SPEED_100M;
        if (link_speed & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_100MBHD)
@@ -5147,21 +5151,21 @@ bnxt_parse_dev_args(struct bnxt *bp, struct rte_devargs *devargs)
 
        /*
         * Handler for "truflow" devarg.
-        * Invoked as for ex: "-w 0000:00:0d.0,host-based-truflow=1"
+        * Invoked as for ex: "-a 0000:00:0d.0,host-based-truflow=1"
         */
        rte_kvargs_process(kvlist, BNXT_DEVARG_TRUFLOW,
                           bnxt_parse_devarg_truflow, bp);
 
        /*
         * Handler for "flow_xstat" devarg.
-        * Invoked as for ex: "-w 0000:00:0d.0,flow_xstat=1"
+        * Invoked as for ex: "-a 0000:00:0d.0,flow_xstat=1"
         */
        rte_kvargs_process(kvlist, BNXT_DEVARG_FLOW_XSTAT,
                           bnxt_parse_devarg_flow_xstat, bp);
 
        /*
         * Handler for "max_num_kflows" devarg.
-        * Invoked as for ex: "-w 000:00:0d.0,max_num_kflows=32"
+        * Invoked as for ex: "-a 000:00:0d.0,max_num_kflows=32"
         */
        rte_kvargs_process(kvlist, BNXT_DEVARG_MAX_NUM_KFLOWS,
                           bnxt_parse_devarg_max_num_kflows, bp);
@@ -5505,7 +5509,7 @@ static int bnxt_init_rep_info(struct bnxt *bp)
 }
 
 static int bnxt_rep_port_probe(struct rte_pci_device *pci_dev,
-                              struct rte_eth_devargs eth_da,
+                              struct rte_eth_devargs *eth_da,
                               struct rte_eth_dev *backing_eth_dev,
                               const char *dev_args)
 {
@@ -5516,7 +5520,7 @@ static int bnxt_rep_port_probe(struct rte_pci_device *pci_dev,
        int i, ret = 0;
        struct rte_kvargs *kvlist = NULL;
 
-       num_rep = eth_da.nb_representor_ports;
+       num_rep = eth_da->nb_representor_ports;
        if (num_rep > BNXT_MAX_VF_REPS) {
                PMD_DRV_LOG(ERR, "nb_representor_ports = %d > %d MAX VF REPS\n",
                            num_rep, BNXT_MAX_VF_REPS);
@@ -5546,7 +5550,7 @@ static int bnxt_rep_port_probe(struct rte_pci_device *pci_dev,
 
        for (i = 0; i < num_rep; i++) {
                struct bnxt_representor representor = {
-                       .vf_id = eth_da.representor_ports[i],
+                       .vf_id = eth_da->representor_ports[i],
                        .switch_domain_id = backing_bp->switch_domain_id,
                        .parent_dev = backing_eth_dev
                };
@@ -5559,13 +5563,13 @@ static int bnxt_rep_port_probe(struct rte_pci_device *pci_dev,
 
                /* representor port net_bdf_port */
                snprintf(name, sizeof(name), "net_%s_representor_%d",
-                        pci_dev->device.name, eth_da.representor_ports[i]);
+                        pci_dev->device.name, eth_da->representor_ports[i]);
 
                kvlist = rte_kvargs_parse(dev_args, bnxt_dev_args);
                if (kvlist) {
                        /*
                         * Handler for "rep_is_pf" devarg.
-                        * Invoked as for ex: "-w 000:00:0d.0,
+                        * Invoked as for ex: "-a 000:00:0d.0,
                         * rep-based-pf=<pf index> rep-is-pf=<VF=0 or PF=1>"
                         */
                        ret = rte_kvargs_process(kvlist, BNXT_DEVARG_REP_IS_PF,
@@ -5577,7 +5581,7 @@ static int bnxt_rep_port_probe(struct rte_pci_device *pci_dev,
                        }
                        /*
                         * Handler for "rep_based_pf" devarg.
-                        * Invoked as for ex: "-w 000:00:0d.0,
+                        * Invoked as for ex: "-a 000:00:0d.0,
                         * rep-based-pf=<pf index> rep-is-pf=<VF=0 or PF=1>"
                         */
                        ret = rte_kvargs_process(kvlist,
@@ -5590,7 +5594,7 @@ static int bnxt_rep_port_probe(struct rte_pci_device *pci_dev,
                        }
                        /*
                         * Handler for "rep_based_pf" devarg.
-                        * Invoked as for ex: "-w 000:00:0d.0,
+                        * Invoked as for ex: "-a 000:00:0d.0,
                         * rep-based-pf=<pf index> rep-is-pf=<VF=0 or PF=1>"
                         */
                        ret = rte_kvargs_process(kvlist, BNXT_DEVARG_REP_Q_R2F,
@@ -5602,7 +5606,7 @@ static int bnxt_rep_port_probe(struct rte_pci_device *pci_dev,
                        }
                        /*
                         * Handler for "rep_based_pf" devarg.
-                        * Invoked as for ex: "-w 000:00:0d.0,
+                        * Invoked as for ex: "-a 000:00:0d.0,
                         * rep-based-pf=<pf index> rep-is-pf=<VF=0 or PF=1>"
                         */
                        ret = rte_kvargs_process(kvlist, BNXT_DEVARG_REP_Q_F2R,
@@ -5614,7 +5618,7 @@ static int bnxt_rep_port_probe(struct rte_pci_device *pci_dev,
                        }
                        /*
                         * Handler for "rep_based_pf" devarg.
-                        * Invoked as for ex: "-w 000:00:0d.0,
+                        * Invoked as for ex: "-a 000:00:0d.0,
                         * rep-based-pf=<pf index> rep-is-pf=<VF=0 or PF=1>"
                         */
                        ret = rte_kvargs_process(kvlist, BNXT_DEVARG_REP_FC_R2F,
@@ -5626,7 +5630,7 @@ static int bnxt_rep_port_probe(struct rte_pci_device *pci_dev,
                        }
                        /*
                         * Handler for "rep_based_pf" devarg.
-                        * Invoked as for ex: "-w 000:00:0d.0,
+                        * Invoked as for ex: "-a 000:00:0d.0,
                         * rep-based-pf=<pf index> rep-is-pf=<VF=0 or PF=1>"
                         */
                        ret = rte_kvargs_process(kvlist, BNXT_DEVARG_REP_FC_F2R,
@@ -5722,7 +5726,7 @@ static int bnxt_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
                return ret;
 
        /* probe representor ports now */
-       ret = bnxt_rep_port_probe(pci_dev, eth_da, backing_eth_dev,
+       ret = bnxt_rep_port_probe(pci_dev, &eth_da, backing_eth_dev,
                                  pci_dev->device.devargs->args);
 
        return ret;