diff options
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/flow_dissector.c | 7 | ||||
-rw-r--r-- | net/core/skbuff.c | 4 |
2 files changed, 10 insertions, 1 deletions
diff --git a/net/core/flow_dissector.c b/net/core/flow_dissector.c index beb83d1ac1c6..2c35c02a931e 100644 --- a/net/core/flow_dissector.c +++ b/net/core/flow_dissector.c | |||
@@ -422,7 +422,7 @@ static inline int get_xps_queue(struct net_device *dev, struct sk_buff *skb) | |||
422 | dev_maps = rcu_dereference(dev->xps_maps); | 422 | dev_maps = rcu_dereference(dev->xps_maps); |
423 | if (dev_maps) { | 423 | if (dev_maps) { |
424 | map = rcu_dereference( | 424 | map = rcu_dereference( |
425 | dev_maps->cpu_map[raw_smp_processor_id()]); | 425 | dev_maps->cpu_map[skb->sender_cpu - 1]); |
426 | if (map) { | 426 | if (map) { |
427 | if (map->len == 1) | 427 | if (map->len == 1) |
428 | queue_index = map->queues[0]; | 428 | queue_index = map->queues[0]; |
@@ -468,6 +468,11 @@ struct netdev_queue *netdev_pick_tx(struct net_device *dev, | |||
468 | { | 468 | { |
469 | int queue_index = 0; | 469 | int queue_index = 0; |
470 | 470 | ||
471 | #ifdef CONFIG_XPS | ||
472 | if (skb->sender_cpu == 0) | ||
473 | skb->sender_cpu = raw_smp_processor_id() + 1; | ||
474 | #endif | ||
475 | |||
471 | if (dev->real_num_tx_queues != 1) { | 476 | if (dev->real_num_tx_queues != 1) { |
472 | const struct net_device_ops *ops = dev->netdev_ops; | 477 | const struct net_device_ops *ops = dev->netdev_ops; |
473 | if (ops->ndo_select_queue) | 478 | if (ops->ndo_select_queue) |
diff --git a/net/core/skbuff.c b/net/core/skbuff.c index a5bff2767f15..88c613eab142 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c | |||
@@ -825,6 +825,9 @@ static void __copy_skb_header(struct sk_buff *new, const struct sk_buff *old) | |||
825 | #ifdef CONFIG_NET_RX_BUSY_POLL | 825 | #ifdef CONFIG_NET_RX_BUSY_POLL |
826 | CHECK_SKB_FIELD(napi_id); | 826 | CHECK_SKB_FIELD(napi_id); |
827 | #endif | 827 | #endif |
828 | #ifdef CONFIG_XPS | ||
829 | CHECK_SKB_FIELD(sender_cpu); | ||
830 | #endif | ||
828 | #ifdef CONFIG_NET_SCHED | 831 | #ifdef CONFIG_NET_SCHED |
829 | CHECK_SKB_FIELD(tc_index); | 832 | CHECK_SKB_FIELD(tc_index); |
830 | #ifdef CONFIG_NET_CLS_ACT | 833 | #ifdef CONFIG_NET_CLS_ACT |
@@ -4169,6 +4172,7 @@ void skb_scrub_packet(struct sk_buff *skb, bool xnet) | |||
4169 | skb->ignore_df = 0; | 4172 | skb->ignore_df = 0; |
4170 | skb_dst_drop(skb); | 4173 | skb_dst_drop(skb); |
4171 | skb->mark = 0; | 4174 | skb->mark = 0; |
4175 | skb->sender_cpu = 0; | ||
4172 | skb_init_secmark(skb); | 4176 | skb_init_secmark(skb); |
4173 | secpath_reset(skb); | 4177 | secpath_reset(skb); |
4174 | nf_reset(skb); | 4178 | nf_reset(skb); |