]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
net/packet: Fix Tx queue selection for AF_PACKET
authorIván Briano <ivan.briano@intel.com>
Thu, 13 Jul 2017 16:46:58 +0000 (09:46 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 14 Jul 2017 15:20:28 +0000 (08:20 -0700)
commitccd4eb49f3392ebf989d58bd013a7bf44cdca4d6
tree11a5591bb0e15a09f49ce46d24b7161aaed750be
parent31a4562d7408493c6377933ff2f7d7302dbdea80
net/packet: Fix Tx queue selection for AF_PACKET

When PACKET_QDISC_BYPASS is not used, Tx queue selection will be done
before the packet is enqueued, taking into account any mappings set by
a queuing discipline such as mqprio without hardware offloading. This
selection may be affected by a previously saved queue_mapping, either on
the Rx path, or done before the packet reaches the device, as it's
currently the case for AF_PACKET.

In order for queue selection to work as expected when using traffic
control, there can't be another selection done before that point is
reached, so move the call to packet_pick_tx_queue to
packet_direct_xmit, leaving the default xmit path as it was before
PACKET_QDISC_BYPASS was introduced.

A forward declaration of packet_pick_tx_queue() is introduced to avoid
the need to reorder the functions within the file.

Fixes: d346a3fae3ff ("packet: introduce PACKET_QDISC_BYPASS socket option")
Signed-off-by: Iván Briano <ivan.briano@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/packet/af_packet.c