diff options
author | Paolo Abeni <pabeni@redhat.com> | 2019-03-20 06:02:05 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-03-20 14:18:55 -0400 |
commit | b71b5837f8711dbc4bc0424cb5c75e5921be055c (patch) | |
tree | 4a731ba20e46226c135ae28213de18152338a2dd /include/linux/netdevice.h | |
parent | 4bd97d51a5e602ea1fbdab8c2d653513dea17115 (diff) |
packet: rework packet_pick_tx_queue() to use common code selection
Currently packet_pick_tx_queue() is the only caller of
ndo_select_queue() using a fallback argument other than
netdev_pick_tx.
Leveraging rx queue, we can obtain a similar queue selection
behavior using core helpers. After this change, ndo_select_queue()
is always invoked with netdev_pick_tx() as fallback.
We can change ndo_select_queue() signature in a followup patch,
dropping an indirect call per transmitted packet in some scenarios
(e.g. TCP syn and XDP generic xmit)
This changes slightly how af packet queue selection happens when
PACKET_QDISC_BYPASS is set. It's now more similar to plan dev_queue_xmit()
tacking in account both XPS and TC mapping.
v1 -> v2:
- rebased after helper name change
RFC -> v1:
- initialize sender_cpu to the expected value
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/netdevice.h')
-rw-r--r-- | include/linux/netdevice.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 57cd2bdd9f78..0ff28db4239f 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -2152,6 +2152,8 @@ static inline void netdev_for_each_tx_queue(struct net_device *dev, | |||
2152 | &qdisc_xmit_lock_key); \ | 2152 | &qdisc_xmit_lock_key); \ |
2153 | } | 2153 | } |
2154 | 2154 | ||
2155 | u16 netdev_pick_tx(struct net_device *dev, struct sk_buff *skb, | ||
2156 | struct net_device *sb_dev); | ||
2155 | struct netdev_queue *netdev_core_pick_tx(struct net_device *dev, | 2157 | struct netdev_queue *netdev_core_pick_tx(struct net_device *dev, |
2156 | struct sk_buff *skb, | 2158 | struct sk_buff *skb, |
2157 | struct net_device *sb_dev); | 2159 | struct net_device *sb_dev); |