All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drivers/net/bonding: fix updating the slave link status
@ 2017-04-25  6:30 wang wei
  2017-04-27 14:28 ` Declan Doherty
  0 siblings, 1 reply; 4+ messages in thread
From: wang wei @ 2017-04-25  6:30 UTC (permalink / raw)
  To: dev

we need to update dev->data->dev_link before handling lsc event.
Otherwise it will still have the initial value after the startup of
the program before interrupt callback was executed.

Signed-off-by: wang wei <lnykww@gmail.com>
---
 drivers/net/bonding/rte_eth_bond_pmd.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index c94071ffb..57b1012c4 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -1435,9 +1435,11 @@ slave_configure(struct rte_eth_dev *bonded_eth_dev,
 	}
 
 	/* If lsc interrupt is set, check initial slave's link status */
-	if (slave_eth_dev->data->dev_flags & RTE_ETH_DEV_INTR_LSC)
+	if (slave_eth_dev->data->dev_flags & RTE_ETH_DEV_INTR_LSC) {
+		slave_eth_dev->dev_ops->link_update(slave_eth_dev, 0);
 		bond_ethdev_lsc_event_callback(slave_eth_dev->data->port_id,
 			RTE_ETH_EVENT_INTR_LSC, &bonded_eth_dev->data->port_id);
+	}
 
 	return 0;
 }
-- 
2.11.0 (Apple Git-81)

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] drivers/net/bonding: fix updating the slave link status
  2017-04-25  6:30 [PATCH] drivers/net/bonding: fix updating the slave link status wang wei
@ 2017-04-27 14:28 ` Declan Doherty
  2017-04-28  5:15   ` Ferruh Yigit
  0 siblings, 1 reply; 4+ messages in thread
From: Declan Doherty @ 2017-04-27 14:28 UTC (permalink / raw)
  To: wang wei, dev; +Cc: ferruh.yigit

On 25/04/2017 7:30 AM, wang wei wrote:
> we need to update dev->data->dev_link before handling lsc event.
> Otherwise it will still have the initial value after the startup of
> the program before interrupt callback was executed.
>
> Signed-off-by: wang wei <lnykww@gmail.com>
> ---
>  drivers/net/bonding/rte_eth_bond_pmd.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
> index c94071ffb..57b1012c4 100644
> --- a/drivers/net/bonding/rte_eth_bond_pmd.c
> +++ b/drivers/net/bonding/rte_eth_bond_pmd.c
> @@ -1435,9 +1435,11 @@ slave_configure(struct rte_eth_dev *bonded_eth_dev,
>  	}
>
>  	/* If lsc interrupt is set, check initial slave's link status */
> -	if (slave_eth_dev->data->dev_flags & RTE_ETH_DEV_INTR_LSC)
> +	if (slave_eth_dev->data->dev_flags & RTE_ETH_DEV_INTR_LSC) {
> +		slave_eth_dev->dev_ops->link_update(slave_eth_dev, 0);
>  		bond_ethdev_lsc_event_callback(slave_eth_dev->data->port_id,
>  			RTE_ETH_EVENT_INTR_LSC, &bonded_eth_dev->data->port_id);
> +	}
>
>  	return 0;
>  }
>

Acked-by: Declan Doherty <declan.doherty@intel.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] drivers/net/bonding: fix updating the slave link status
  2017-04-27 14:28 ` Declan Doherty
@ 2017-04-28  5:15   ` Ferruh Yigit
  0 siblings, 0 replies; 4+ messages in thread
From: Ferruh Yigit @ 2017-04-28  5:15 UTC (permalink / raw)
  To: Declan Doherty, wang wei, dev

On 4/27/2017 3:28 PM, Declan Doherty wrote:
> On 25/04/2017 7:30 AM, wang wei wrote:
>> we need to update dev->data->dev_link before handling lsc event.
>> Otherwise it will still have the initial value after the startup of
>> the program before interrupt callback was executed.
>>
>> Signed-off-by: wang wei <lnykww@gmail.com>
>> ---
>>  drivers/net/bonding/rte_eth_bond_pmd.c | 4 +++-
>>  1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
>> index c94071ffb..57b1012c4 100644
>> --- a/drivers/net/bonding/rte_eth_bond_pmd.c
>> +++ b/drivers/net/bonding/rte_eth_bond_pmd.c
>> @@ -1435,9 +1435,11 @@ slave_configure(struct rte_eth_dev *bonded_eth_dev,
>>  	}
>>
>>  	/* If lsc interrupt is set, check initial slave's link status */
>> -	if (slave_eth_dev->data->dev_flags & RTE_ETH_DEV_INTR_LSC)
>> +	if (slave_eth_dev->data->dev_flags & RTE_ETH_DEV_INTR_LSC) {
>> +		slave_eth_dev->dev_ops->link_update(slave_eth_dev, 0);
>>  		bond_ethdev_lsc_event_callback(slave_eth_dev->data->port_id,
>>  			RTE_ETH_EVENT_INTR_LSC, &bonded_eth_dev->data->port_id);
>> +	}
>>
>>  	return 0;
>>  }
>>
> 
> Acked-by: Declan Doherty <declan.doherty@intel.com>

Applied to dpdk-next-net/master, thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] drivers/net/bonding: fix updating the slave link status
@ 2017-04-25  6:11 wang wei
  0 siblings, 0 replies; 4+ messages in thread
From: wang wei @ 2017-04-25  6:11 UTC (permalink / raw)
  To: dev

we need to update dev->data->dev_link before handling lsc event.
Otherwise it will still have the initial value after the startup of
the program before interrupt callback was executed.

Signed-off-by: wang wei <lnykww@gmail.com>
---
 drivers/net/bonding/rte_eth_bond_pmd.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index c94071ffb..57b1012c4 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -1435,9 +1435,11 @@ slave_configure(struct rte_eth_dev *bonded_eth_dev,
 	}
 
 	/* If lsc interrupt is set, check initial slave's link status */
-	if (slave_eth_dev->data->dev_flags & RTE_ETH_DEV_INTR_LSC)
+	if (slave_eth_dev->data->dev_flags & RTE_ETH_DEV_INTR_LSC) {
+        slave_eth_dev->dev_ops->link_update(slave_eth_dev, 0);
 		bond_ethdev_lsc_event_callback(slave_eth_dev->data->port_id,
 			RTE_ETH_EVENT_INTR_LSC, &bonded_eth_dev->data->port_id);
+    }
 
 	return 0;
 }
-- 
2.11.0 (Apple Git-81)

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-04-28  5:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-25  6:30 [PATCH] drivers/net/bonding: fix updating the slave link status wang wei
2017-04-27 14:28 ` Declan Doherty
2017-04-28  5:15   ` Ferruh Yigit
  -- strict thread matches above, loose matches on Subject: below --
2017-04-25  6:11 wang wei

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.