File tree 1 file changed +8
-2
lines changed 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -105,15 +105,21 @@ static void queue_process(struct work_struct *work)
105
105
while ((skb = skb_dequeue (& npinfo -> txq ))) {
106
106
struct net_device * dev = skb -> dev ;
107
107
struct netdev_queue * txq ;
108
+ unsigned int q_index ;
108
109
109
110
if (!netif_device_present (dev ) || !netif_running (dev )) {
110
111
kfree_skb (skb );
111
112
continue ;
112
113
}
113
114
114
- txq = skb_get_tx_queue (dev , skb );
115
-
116
115
local_irq_save (flags );
116
+ /* check if skb->queue_mapping is still valid */
117
+ q_index = skb_get_queue_mapping (skb );
118
+ if (unlikely (q_index >= dev -> real_num_tx_queues )) {
119
+ q_index = q_index % dev -> real_num_tx_queues ;
120
+ skb_set_queue_mapping (skb , q_index );
121
+ }
122
+ txq = netdev_get_tx_queue (dev , q_index );
117
123
HARD_TX_LOCK (dev , txq , smp_processor_id ());
118
124
if (netif_xmit_frozen_or_stopped (txq ) ||
119
125
netpoll_start_xmit (skb , dev , txq ) != NETDEV_TX_OK ) {
You can’t perform that action at this time.
0 commit comments