All of lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-wired-lan] [PATCH net] i40e: Fix ATR queue selection
@ 2021-07-19 19:49 Arkadiusz Kubalewski
  2021-07-20  6:27 ` Paul Menzel
  0 siblings, 1 reply; 3+ messages in thread
From: Arkadiusz Kubalewski @ 2021-07-19 19:49 UTC (permalink / raw)
  To: intel-wired-lan

If traffic classes are not configured for PF, then use
netdev_pick_tx function for selecting queue for packet transmission.
Instead of calling i40e_swdcb_skb_tx_hash, call netdev_pick_tx,
which ensures that packet is transmitted/received from CPU that is
running the application.
Without this patch, ATR does not work. Receive/transmit uses queue
selection based on SW DCB hashing method.

Fixes: 821bd0c990ba ("i40e: Fix queue-to-TC mapping on Tx")
Signed-off-by: Przemyslaw Patynowski <przemyslawx.patynowski@intel.com>
Signed-off-by: Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>
---
 drivers/net/ethernet/intel/i40e/i40e_txrx.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
index 3f25bd8..10a83e5 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_txrx.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
@@ -3663,8 +3663,7 @@ u16 i40e_lan_select_queue(struct net_device *netdev,
 
 	/* is DCB enabled at all? */
 	if (vsi->tc_config.numtc == 1)
-		return i40e_swdcb_skb_tx_hash(netdev, skb,
-					      netdev->real_num_tx_queues);
+		return netdev_pick_tx(netdev, skb, sb_dev);
 
 	prio = skb->priority;
 	hw = &vsi->back->hw;

base-commit: e84671cd9648eb1f2b346378c100b4ebfbd1b01c
-- 
2.18.4


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

* [Intel-wired-lan] [PATCH net] i40e: Fix ATR queue selection
  2021-07-19 19:49 [Intel-wired-lan] [PATCH net] i40e: Fix ATR queue selection Arkadiusz Kubalewski
@ 2021-07-20  6:27 ` Paul Menzel
  2021-07-20 10:43   ` Kubalewski, Arkadiusz
  0 siblings, 1 reply; 3+ messages in thread
From: Paul Menzel @ 2021-07-20  6:27 UTC (permalink / raw)
  To: intel-wired-lan

Dear Arkadiusz,


Am 19.07.21 um 21:49 schrieb Arkadiusz Kubalewski:
> If traffic classes are not configured for PF, then use
> netdev_pick_tx function for selecting queue for packet transmission.
> Instead of calling i40e_swdcb_skb_tx_hash, call netdev_pick_tx,
> which ensures that packet is transmitted/received from CPU that is
> running the application.
> Without this patch, ATR does not work. Receive/transmit uses queue
> selection based on SW DCB hashing method.

For the future, the problem statement should go first in my opinion.

Do you have a recipe, how to reproduce the problem?


Kind regards,

Paul

> Fixes: 821bd0c990ba ("i40e: Fix queue-to-TC mapping on Tx")
> Signed-off-by: Przemyslaw Patynowski <przemyslawx.patynowski@intel.com>
> Signed-off-by: Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>
> ---
>   drivers/net/ethernet/intel/i40e/i40e_txrx.c | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
> index 3f25bd8..10a83e5 100644
> --- a/drivers/net/ethernet/intel/i40e/i40e_txrx.c
> +++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
> @@ -3663,8 +3663,7 @@ u16 i40e_lan_select_queue(struct net_device *netdev,
>   
>   	/* is DCB enabled at all? */
>   	if (vsi->tc_config.numtc == 1)
> -		return i40e_swdcb_skb_tx_hash(netdev, skb,
> -					      netdev->real_num_tx_queues);
> +		return netdev_pick_tx(netdev, skb, sb_dev);
>   
>   	prio = skb->priority;
>   	hw = &vsi->back->hw;
> 
> base-commit: e84671cd9648eb1f2b346378c100b4ebfbd1b01c
> 

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

* [Intel-wired-lan] [PATCH net] i40e: Fix ATR queue selection
  2021-07-20  6:27 ` Paul Menzel
@ 2021-07-20 10:43   ` Kubalewski, Arkadiusz
  0 siblings, 0 replies; 3+ messages in thread
From: Kubalewski, Arkadiusz @ 2021-07-20 10:43 UTC (permalink / raw)
  To: intel-wired-lan

>Dear Arkadiusz,
>
>
>Am 19.07.21 um 21:49 schrieb Arkadiusz Kubalewski:
>> If traffic classes are not configured for PF, then use netdev_pick_tx 
>> function for selecting queue for packet transmission.
>> Instead of calling i40e_swdcb_skb_tx_hash, call netdev_pick_tx, which 
>> ensures that packet is transmitted/received from CPU that is running 
>> the application.
>> Without this patch, ATR does not work. Receive/transmit uses queue 
>> selection based on SW DCB hashing method.
>
>For the future, the problem statement should go first in my opinion.
>
>Do you have a recipe, how to reproduce the problem?
>
>
>Kind regards,
>
>Paul

Hi Paul,

Yes, of course I have reproduction steps.
I will fix your findings in next patch.

Thank you!
BR, 
Arkadiusz

>
>> Fixes: 821bd0c990ba ("i40e: Fix queue-to-TC mapping on Tx")
>> Signed-off-by: Przemyslaw Patynowski 
>> <przemyslawx.patynowski@intel.com>
>> Signed-off-by: Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>
>> ---
>>   drivers/net/ethernet/intel/i40e/i40e_txrx.c | 3 +--
>>   1 file changed, 1 insertion(+), 2 deletions(-)
>> 
>> diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c 
>> b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
>> index 3f25bd8..10a83e5 100644
>> --- a/drivers/net/ethernet/intel/i40e/i40e_txrx.c
>> +++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
>> @@ -3663,8 +3663,7 @@ u16 i40e_lan_select_queue(struct net_device 
>> *netdev,
>>   
>>   	/* is DCB enabled at all? */
>>   	if (vsi->tc_config.numtc == 1)
>> -		return i40e_swdcb_skb_tx_hash(netdev, skb,
>> -					      netdev->real_num_tx_queues);
>> +		return netdev_pick_tx(netdev, skb, sb_dev);
>>   
>>   	prio = skb->priority;
>>   	hw = &vsi->back->hw;
>> 
>> base-commit: e84671cd9648eb1f2b346378c100b4ebfbd1b01c
>> 
>

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

end of thread, other threads:[~2021-07-20 10:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-19 19:49 [Intel-wired-lan] [PATCH net] i40e: Fix ATR queue selection Arkadiusz Kubalewski
2021-07-20  6:27 ` Paul Menzel
2021-07-20 10:43   ` Kubalewski, Arkadiusz

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.