Skip to content
Commit ccd4eb49 authored by Iván Briano's avatar Iván Briano Committed by David S. Miller
Browse files

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: d346a3fa

 ("packet: introduce PACKET_QDISC_BYPASS socket option")
Signed-off-by: default avatarIván Briano <ivan.briano@intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 31a4562d
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