Skip to content
Commit 513de11b authored by David S. Miller's avatar David S. Miller
Browse files

net: Avoid modulus in skb_tx_hash() for forwarding case.



Based almost entirely upon a patch by Eric Dumazet.

The common case is to have num-tx-queues <= num_rx_queues
and even if num_tx_queues is larger it will not be significantly
larger.

Therefore, a subtraction loop is always going to be faster than
modulus.

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent accc5b4f
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment