Merge branch 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[firefly-linux-kernel-4.4.55.git] / net / core / flow_dissector.c
index 45084938c403b82b23d45ed66d9871348baeadc7..2c35c02a931e227fa368cd346873596d4b037a3d 100644 (file)
@@ -178,6 +178,20 @@ ipv6:
                        return false;
                }
        }
+       case htons(ETH_P_TIPC): {
+               struct {
+                       __be32 pre[3];
+                       __be32 srcnode;
+               } *hdr, _hdr;
+               hdr = __skb_header_pointer(skb, nhoff, sizeof(_hdr), data, hlen, &_hdr);
+               if (!hdr)
+                       return false;
+               flow->src = hdr->srcnode;
+               flow->dst = 0;
+               flow->n_proto = proto;
+               flow->thoff = (u16)nhoff;
+               return true;
+       }
        case htons(ETH_P_FCOE):
                flow->thoff = (u16)(nhoff + FCOE_HEADER_LEN);
                /* fall through */
@@ -408,7 +422,7 @@ static inline int get_xps_queue(struct net_device *dev, struct sk_buff *skb)
        dev_maps = rcu_dereference(dev->xps_maps);
        if (dev_maps) {
                map = rcu_dereference(
-                   dev_maps->cpu_map[raw_smp_processor_id()]);
+                   dev_maps->cpu_map[skb->sender_cpu - 1]);
                if (map) {
                        if (map->len == 1)
                                queue_index = map->queues[0];
@@ -454,6 +468,11 @@ struct netdev_queue *netdev_pick_tx(struct net_device *dev,
 {
        int queue_index = 0;
 
+#ifdef CONFIG_XPS
+       if (skb->sender_cpu == 0)
+               skb->sender_cpu = raw_smp_processor_id() + 1;
+#endif
+
        if (dev->real_num_tx_queues != 1) {
                const struct net_device_ops *ops = dev->netdev_ops;
                if (ops->ndo_select_queue)