]> git.baikalelectronics.ru Git - kernel.git/commit
net: Fix Tx hash bound checking
authorAmritha Nambiar <amritha.nambiar@intel.com>
Mon, 24 Feb 2020 18:56:00 +0000 (10:56 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 Apr 2020 07:08:46 +0000 (09:08 +0200)
commitbb8c568215575f9cac34a85f531b63752a32218f
tree8dc6dff3d84ecafbc245370c1a70583b2f79dee7
parent825449881fe704d68de0a5421e91e8b7a4f2bbba
net: Fix Tx hash bound checking

commit 15b3b6f26e9d8ba7815d347bfba624af9f1a799d upstream.

Fixes the lower and upper bounds when there are multiple TCs and
traffic is on the the same TC on the same device.

The lower bound is represented by 'qoffset' and the upper limit for
hash value is 'qcount + qoffset'. This gives a clean Rx to Tx queue
mapping when there are multiple TCs, as the queue indices for upper TCs
will be offset by 'qoffset'.

v2: Fixed commit description based on comments.

Fixes: 79cca800c7ef ("net: Revoke export for __skb_tx_hash, update it to just be static skb_tx_hash")
Fixes: eef64f64be1b ("net: Add support for subordinate traffic classes to netdev_pick_tx")
Signed-off-by: Amritha Nambiar <amritha.nambiar@intel.com>
Reviewed-by: Alexander Duyck <alexander.h.duyck@linux.intel.com>
Reviewed-by: Sridhar Samudrala <sridhar.samudrala@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/core/dev.c