data structure
1 | 7913 static const struct net_device_ops ixgbe_netdev_ops = { |
receive skb: record receive queue index
record queue_index +1
, 0 is used as NOT record.
####call trace
1 | > ixgbe_poll |
1 | 1675 static void ixgbe_process_skb_fields(struct ixgbe_ring *rx_ring, |
1 | 3004 static inline void skb_record_rx_queue(struct sk_buff *skb, u16 rx_queue) |
dev_queue_xmit
select queue
KEY: ixgbe driver will first check if queue index is recorded(skb->queue_mapping != 0
),
if record, return turn queue index value(skb->queue_mapping -1
).
the queue index value is stored again to skb->queue_mapping
by skb_set_queue_mapping
in function netdev_pick_tx
.
call trace
1 | > dev_queue_xmit |
1 | 398 struct netdev_queue *netdev_pick_tx(struct net_device *dev, |
1 | 7096 static u16 ixgbe_select_queue(struct net_device *dev, struct sk_buff *skb, |
1 | 2989 static inline void skb_set_queue_mapping(struct sk_buff *skb, u16 queue_mapping) |
1 | 3014 static inline bool skb_rx_queue_recorded(const struct sk_buff *skb) |
xmit skb use selected queue
use the corresponding queue by the queue index skb->queue_mapping
which is based on 0.
1 | 7298 static netdev_tx_t ixgbe_xmit_frame(struct sk_buff *skb, |
1 | 7275 static netdev_tx_t __ixgbe_xmit_frame(struct sk_buff *skb, |