RE: [PATCH 2/3] mlx4: Don't bother using skb_tx_hash in mlx4_en_select_queue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>-----Original Message-----
>From: linux-rdma-owner@xxxxxxxxxxxxxxx [mailto:linux-rdma-
>owner@xxxxxxxxxxxxxxx] On Behalf Of Alexander Duyck
>Sent: Friday, April 27, 2018 2:07 PM
>To: netdev@xxxxxxxxxxxxxxx; davem@xxxxxxxxxxxxx
>Cc: linux-rdma@xxxxxxxxxxxxxxx; Dalessandro, Dennis
><dennis.dalessandro@xxxxxxxxx>; Vishwanathapura, Niranjana
><niranjana.vishwanathapura@xxxxxxxxx>; tariqt@xxxxxxxxxxxx
>Subject: [PATCH 2/3] mlx4: Don't bother using skb_tx_hash in
>mlx4_en_select_queue
>
>The code in the fallback path has supported XDP in conjunction with the Tx
>traffic classification for TCs for over a year now. So instead of just
>calling skb_tx_hash for every packet we are better off using the fallback
>since that will record the Tx queue to the socket and then that can be used
>instead of having to recompute the hash every time.
>
>Signed-off-by: Alexander Duyck <alexander.h.duyck@xxxxxxxxx>
>---
> drivers/net/ethernet/mellanox/mlx4/en_tx.c |    2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/drivers/net/ethernet/mellanox/mlx4/en_tx.c
>b/drivers/net/ethernet/mellanox/mlx4/en_tx.c
>index 6b68537..0227786 100644
>--- a/drivers/net/ethernet/mellanox/mlx4/en_tx.c
>+++ b/drivers/net/ethernet/mellanox/mlx4/en_tx.c
>@@ -694,7 +694,7 @@ u16 mlx4_en_select_queue(struct net_device *dev,
>struct sk_buff *skb,
> 	u16 rings_p_up = priv->num_tx_rings_p_up;
>
> 	if (netdev_get_num_tc(dev))
>-		return skb_tx_hash(dev, skb);
>+		return fallback(dev, skb);
>
> 	return fallback(dev, skb) % rings_p_up;

Hi Alexander,

The final return fallback() call is doing a % rings_p_up.

Do you need to do that for the new fallback() call?

Maybe you can get rid of the netdev_get_num_tc() call altogether?

Thanks,

Mike

> }
>
>--
>To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
>the body of a message to majordomo@xxxxxxxxxxxxxxx
>More majordomo info at  http://vger.kernel.org/majordomo-info.html
��.n��������+%������w��{.n�����{���fk��ܨ}���Ơz�j:+v�����w����ޙ��&�)ߡ�a����z�ޗ���ݢj��w�f




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux