[dpdk-dev] ixgbe: fix LSC callback

Message ID 1441088490-9420-1-git-send-email-jiaxt@sinogrid.com (mailing list archive)
State Rejected, archived
Headers

Commit Message

Shelton Chia Sept. 1, 2015, 6:21 a.m. UTC
  add _rte_eth_dev_callback_process to call callback func

Signed-off-by: Shelton Chia <jiaxt@sinogrid.com>
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 2 ++
 1 file changed, 2 insertions(+)
  

Comments

Wenzhuo Lu Sept. 1, 2015, 7:42 a.m. UTC | #1
Hi Shelton,

> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Shelton Chia
> Sent: Tuesday, September 1, 2015 2:22 PM
> To: dev@dpdk.org
> Cc: letaotor@gmail.com
> Subject: [dpdk-dev] [PATCH] ixgbe: fix LSC callback
> 
> add _rte_eth_dev_callback_process to call callback func
Would you like to give more details about why we need this patch? Thanks.
> 
> Signed-off-by: Shelton Chia <jiaxt@sinogrid.com>
> ---
>  drivers/net/ixgbe/ixgbe_ethdev.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
> index b8ee1e9..4e4c118 100644
> --- a/drivers/net/ixgbe/ixgbe_ethdev.c
> +++ b/drivers/net/ixgbe/ixgbe_ethdev.c
> @@ -2775,6 +2775,8 @@ ixgbe_dev_interrupt_action(struct rte_eth_dev *dev)
> 
>  		ixgbe_dev_link_status_print(dev);
> 
> +		__rte_eth_dev_callback_process(dev,
> RTE_ETH_EVENT_INTR_LSC);
> +
>  		intr_enable_delay = true;
>  	}
> 
> --
> 2.5.0
  
Shelton Chia Sept. 1, 2015, 8:09 a.m. UTC | #2
Hi Wenzhuo,
     I bond 82599 ports with mode 802.3ad, the bonding port can't work 
properly. But bonding with i350 ports works properly. I found the 
registered callback function bond_ethdev_lsc_event_callback by 
__eth_bond_slave_add_lock_free was not executed when link status 
changed. I compared ixgbe driver with igb driver, ixgbe's LSC interrupt 
action without _rte_eth_dev_callback_process.
On 09/01/2015 03:42 PM, Lu, Wenzhuo wrote:
> Hi Shelton,
>
>> -----Original Message-----
>> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Shelton Chia
>> Sent: Tuesday, September 1, 2015 2:22 PM
>> To: dev@dpdk.org
>> Cc: letaotor@gmail.com
>> Subject: [dpdk-dev] [PATCH] ixgbe: fix LSC callback
>>
>> add _rte_eth_dev_callback_process to call callback func
> Would you like to give more details about why we need this patch? Thanks.
>> Signed-off-by: Shelton Chia <jiaxt@sinogrid.com>
>> ---
>>   drivers/net/ixgbe/ixgbe_ethdev.c | 2 ++
>>   1 file changed, 2 insertions(+)
>>
>> diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
>> index b8ee1e9..4e4c118 100644
>> --- a/drivers/net/ixgbe/ixgbe_ethdev.c
>> +++ b/drivers/net/ixgbe/ixgbe_ethdev.c
>> @@ -2775,6 +2775,8 @@ ixgbe_dev_interrupt_action(struct rte_eth_dev *dev)
>>
>>   		ixgbe_dev_link_status_print(dev);
>>
>> +		__rte_eth_dev_callback_process(dev,
>> RTE_ETH_EVENT_INTR_LSC);
>> +
>>   		intr_enable_delay = true;
>>   	}
>>
>> --
>> 2.5.0
  
Shelton Chia Sept. 1, 2015, 8:38 a.m. UTC | #3
Hi Wenzhuo,

I just noticed _rte_eth_dev_callback_process called by 
ixgbe_dev_interrupt_delayed_handler.
This patch was incorrect, please ignore it.
On 09/01/2015 04:09 PM, 贾学涛 wrote:
> Hi Wenzhuo,
>     I bond 82599 ports with mode 802.3ad, the bonding port can't work 
> properly. But bonding with i350 ports works properly. I found the 
> registered callback function bond_ethdev_lsc_event_callback by 
> __eth_bond_slave_add_lock_free was not executed when link status 
> changed. I compared ixgbe driver with igb driver, ixgbe's LSC 
> interrupt action without _rte_eth_dev_callback_process.
> On 09/01/2015 03:42 PM, Lu, Wenzhuo wrote:
>> Hi Shelton,
>>
>>> -----Original Message-----
>>> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Shelton Chia
>>> Sent: Tuesday, September 1, 2015 2:22 PM
>>> To: dev@dpdk.org
>>> Cc: letaotor@gmail.com
>>> Subject: [dpdk-dev] [PATCH] ixgbe: fix LSC callback
>>>
>>> add _rte_eth_dev_callback_process to call callback func
>> Would you like to give more details about why we need this patch? 
>> Thanks.
>>> Signed-off-by: Shelton Chia <jiaxt@sinogrid.com>
>>> ---
>>>   drivers/net/ixgbe/ixgbe_ethdev.c | 2 ++
>>>   1 file changed, 2 insertions(+)
>>>
>>> diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c 
>>> b/drivers/net/ixgbe/ixgbe_ethdev.c
>>> index b8ee1e9..4e4c118 100644
>>> --- a/drivers/net/ixgbe/ixgbe_ethdev.c
>>> +++ b/drivers/net/ixgbe/ixgbe_ethdev.c
>>> @@ -2775,6 +2775,8 @@ ixgbe_dev_interrupt_action(struct rte_eth_dev 
>>> *dev)
>>>
>>>           ixgbe_dev_link_status_print(dev);
>>>
>>> +        __rte_eth_dev_callback_process(dev,
>>> RTE_ETH_EVENT_INTR_LSC);
>>> +
>>>           intr_enable_delay = true;
>>>       }
>>>
>>> -- 
>>> 2.5.0
>
  

Patch

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index b8ee1e9..4e4c118 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -2775,6 +2775,8 @@  ixgbe_dev_interrupt_action(struct rte_eth_dev *dev)
 
 		ixgbe_dev_link_status_print(dev);
 
+		__rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC);
+
 		intr_enable_delay = true;
 	}