diff mbox series

[v4,2/9] net/dpaa2: fix 10g port negotiation issue

Message ID 20200507104645.31990-3-hemant.agrawal@nxp.com
State Superseded
Headers show
Series NXP DPAAx fixes and enhancements | expand

Commit Message

Hemant Agrawal May 7, 2020, 10:46 a.m. UTC
From: Rohit Raj <rohit.raj@nxp.com>


Fixed 10g port negotiation issue with another 10G/non 10G port.
Initialize the port link speed.

Fixes: c5acbb5ea20e ("net/dpaa2: support link status event")
Cc: stable@dpdk.org

Signed-off-by: Rohit Raj <rohit.raj@nxp.com>

---
 drivers/net/dpaa2/dpaa2_ethdev.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

-- 
2.17.1

Comments

Ferruh Yigit May 7, 2020, 2:36 p.m. UTC | #1
On 5/7/2020 11:46 AM, Hemant Agrawal wrote:
> From: Rohit Raj <rohit.raj@nxp.com>

> 


s/10g/10G in the title

> Fixed 10g port negotiation issue with another 10G/non 10G port.


Can be good to explain how it is fixed.

> Initialize the port link speed.

> 

> Fixes: c5acbb5ea20e ("net/dpaa2: support link status event")

> Cc: stable@dpdk.org

> 

> Signed-off-by: Rohit Raj <rohit.raj@nxp.com>

> ---

>  drivers/net/dpaa2/dpaa2_ethdev.c | 4 +---

>  1 file changed, 1 insertion(+), 3 deletions(-)

> 

> diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c

> index 2cde55e7cc..4fc550a885 100644

> --- a/drivers/net/dpaa2/dpaa2_ethdev.c

> +++ b/drivers/net/dpaa2/dpaa2_ethdev.c

> @@ -553,9 +553,6 @@ dpaa2_eth_dev_configure(struct rte_eth_dev *dev)

>  	if (rx_offloads & DEV_RX_OFFLOAD_VLAN_FILTER)

>  		dpaa2_vlan_offload_set(dev, ETH_VLAN_FILTER_MASK);

>  

> -	/* update the current status */

> -	dpaa2_dev_link_update(dev, 0);

> -

>  	return 0;

>  }

>  

> @@ -1757,6 +1754,7 @@ dpaa2_dev_set_link_up(struct rte_eth_dev *dev)

>  	/* changing tx burst function to start enqueues */

>  	dev->tx_pkt_burst = dpaa2_dev_tx;

>  	dev->data->dev_link.link_status = state.up;

> +	dev->data->dev_link.link_speed = state.rate;

>  

>  	if (state.up)

>  		DPAA2_PMD_INFO("Port %d Link is Up", dev->data->port_id);

>
diff mbox series

Patch

diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c
index 2cde55e7cc..4fc550a885 100644
--- a/drivers/net/dpaa2/dpaa2_ethdev.c
+++ b/drivers/net/dpaa2/dpaa2_ethdev.c
@@ -553,9 +553,6 @@  dpaa2_eth_dev_configure(struct rte_eth_dev *dev)
 	if (rx_offloads & DEV_RX_OFFLOAD_VLAN_FILTER)
 		dpaa2_vlan_offload_set(dev, ETH_VLAN_FILTER_MASK);
 
-	/* update the current status */
-	dpaa2_dev_link_update(dev, 0);
-
 	return 0;
 }
 
@@ -1757,6 +1754,7 @@  dpaa2_dev_set_link_up(struct rte_eth_dev *dev)
 	/* changing tx burst function to start enqueues */
 	dev->tx_pkt_burst = dpaa2_dev_tx;
 	dev->data->dev_link.link_status = state.up;
+	dev->data->dev_link.link_speed = state.rate;
 
 	if (state.up)
 		DPAA2_PMD_INFO("Port %d Link is Up", dev->data->port_id);