Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
authorDavid S. Miller <davem@davemloft.net>
Thu, 2 Feb 2017 21:54:00 +0000 (16:54 -0500)
committerDavid S. Miller <davem@davemloft.net>
Thu, 2 Feb 2017 21:54:00 +0000 (16:54 -0500)
All merge conflicts were simple overlapping changes.

Signed-off-by: David S. Miller <davem@davemloft.net>
26 files changed:
1  2 
MAINTAINERS
drivers/net/ethernet/cadence/macb.c
drivers/net/ethernet/cadence/macb.h
drivers/net/ethernet/emulex/benet/be_main.c
drivers/net/ethernet/freescale/gianfar.c
drivers/net/ethernet/mellanox/mlx4/mlx4.h
drivers/net/ethernet/mellanox/mlx5/core/en.h
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
drivers/net/ethernet/mellanox/mlx5/core/en_fs.c
drivers/net/ethernet/mellanox/mlx5/core/en_fs_ethtool.c
drivers/net/ethernet/mellanox/mlx5/core/en_main.c
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c
drivers/net/ethernet/mellanox/mlx5/core/fs_core.c
drivers/net/ethernet/mellanox/mlx5/core/main.c
drivers/net/ethernet/mellanox/mlx5/core/port.c
drivers/net/ethernet/mellanox/mlx5/core/vport.c
drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c
drivers/net/wireless/intel/iwlwifi/iwl-8000.c
drivers/net/wireless/intel/iwlwifi/mvm/sta.c
include/linux/netdevice.h
net/ipv4/tcp_output.c
net/sched/cls_flower.c
net/sched/cls_matchall.c

diff --cc MAINTAINERS
Simple merge
Simple merge
index 94ddedd2d83e31ca6e28e014f4fc988d4c5d112b,fc8550a5d47f75df540521c27f07f5c2d03995f9..a2cf9122300318f5ccf8041fc0760daff2f59d10
  /* Bitfields in DCFG6. */
  #define GEM_PBUF_LSO_OFFSET                   27
  #define GEM_PBUF_LSO_SIZE                     1
+ #define GEM_DAW64_OFFSET                      23
+ #define GEM_DAW64_SIZE                                1
  
 +/* Bitfields in TISUBN */
 +#define GEM_SUBNSINCR_OFFSET                  0
 +#define GEM_SUBNSINCR_SIZE                    16
 +
 +/* Bitfields in TI */
 +#define GEM_NSINCR_OFFSET                     0
 +#define GEM_NSINCR_SIZE                               8
 +
 +/* Bitfields in ADJ */
 +#define GEM_ADDSUB_OFFSET                     31
 +#define GEM_ADDSUB_SIZE                               1
  /* Constants for CLK */
  #define MACB_CLK_DIV8                         0
  #define MACB_CLK_DIV16                                1
@@@ -942,7 -885,9 +952,10 @@@ struct macb 
  
        u32                     wol;
  
 +      struct macb_ptp_info    *ptp_info;      /* macb-ptp interface */
+ #ifdef CONFIG_ARCH_DMA_ADDR_T_64BIT
+       enum macb_hw_dma_cap hw_dma_cap;
+ #endif
  };
  
  static inline bool macb_is_gem(struct macb *bp)
index 6236ce95b8e6dfdbd9c70a11e20136a82a55014e,bb67863aa361168a8566349ef356d9a991d411be..cc80522b585429c56c0836e6d1a035573cc146e7
@@@ -1465,9 -1459,11 +1476,9 @@@ static int set_pflag_rx_cqe_compress(st
  {
        struct mlx5e_priv *priv = netdev_priv(netdev);
        struct mlx5_core_dev *mdev = priv->mdev;
 -      int err = 0;
 -      bool reset;
  
        if (!MLX5_CAP_GEN(mdev, cqe_compression))
-               return -ENOTSUPP;
+               return -EOPNOTSUPP;
  
        if (enable && priv->tstamp.hwtstamp_config.rx_filter != HWTSTAMP_FILTER_NONE) {
                netdev_err(netdev, "Can't enable cqe compression while timestamping is enabled.\n");
index 640f10f2e994f462f260ae46a14f5b2add0ce15e,c5282b6aba8baf6a3c8f345c55764110cdfd6ff5..e3cf5f484153089a0a93bc355a8a874c09cb3918
@@@ -684,10 -660,13 +684,11 @@@ static int mlx5e_route_lookup_ipv4(stru
                                   struct net_device **out_dev,
                                   struct flowi4 *fl4,
                                   struct neighbour **out_n,
 -                                 __be32 *saddr,
                                   int *out_ttl)
  {
+       struct mlx5_eswitch *esw = priv->mdev->priv.eswitch;
        struct rtable *rt;
        struct neighbour *n = NULL;
 -      int ttl;
  
  #if IS_ENABLED(CONFIG_INET)
        int ret;
  #else
        return -EOPNOTSUPP;
  #endif
-       if (!switchdev_port_same_parent_id(priv->netdev, rt->dst.dev)) {
-               pr_warn("%s: can't offload, devices not on same HW e-switch\n", __func__);
-               ip_rt_put(rt);
-               return -EOPNOTSUPP;
-       }
+       /* if the egress device isn't on the same HW e-switch, we use the uplink */
+       if (!switchdev_port_same_parent_id(priv->netdev, rt->dst.dev))
+               *out_dev = mlx5_eswitch_get_uplink_netdev(esw);
+       else
+               *out_dev = rt->dst.dev;
  
 -      ttl = ip4_dst_hoplimit(&rt->dst);
 +      *out_ttl = ip4_dst_hoplimit(&rt->dst);
        n = dst_neigh_lookup(&rt->dst, &fl4->daddr);
        ip_rt_put(rt);
        if (!n)
                return -ENOMEM;
  
        *out_n = n;
-       *out_dev = rt->dst.dev;
 -      *saddr = fl4->saddr;
 -      *out_ttl = ttl;
 +      return 0;
 +}
 +
 +static int mlx5e_route_lookup_ipv6(struct mlx5e_priv *priv,
 +                                 struct net_device *mirred_dev,
 +                                 struct net_device **out_dev,
 +                                 struct flowi6 *fl6,
 +                                 struct neighbour **out_n,
 +                                 int *out_ttl)
 +{
 +      struct neighbour *n = NULL;
 +      struct dst_entry *dst;
 +
 +#if IS_ENABLED(CONFIG_INET) && IS_ENABLED(CONFIG_IPV6)
 +      struct mlx5_eswitch *esw = priv->mdev->priv.eswitch;
 +      int ret;
 +
 +      dst = ip6_route_output(dev_net(mirred_dev), NULL, fl6);
 +      if (dst->error) {
 +              ret = dst->error;
 +              dst_release(dst);
 +              return ret;
 +      }
 +
 +      *out_ttl = ip6_dst_hoplimit(dst);
  
 +      /* if the egress device isn't on the same HW e-switch, we use the uplink */
 +      if (!switchdev_port_same_parent_id(priv->netdev, dst->dev))
 +              *out_dev = mlx5_eswitch_get_uplink_netdev(esw);
 +      else
 +              *out_dev = dst->dev;
 +#else
 +      return -EOPNOTSUPP;
 +#endif
 +
 +      n = dst_neigh_lookup(dst, &fl6->daddr);
 +      dst_release(dst);
 +      if (!n)
 +              return -ENOMEM;
 +
 +      *out_n = n;
        return 0;
  }
  
Simple merge
Simple merge
index 9e74b0fa4b896a8a8eb25929760ab51c57c546f1,5752789acc135250c312199c2d6e5e15d05fdea0..23c4d224dcb102f78d815de7951bd706e09d553d
@@@ -585,27 -568,10 +585,27 @@@ static int fl_set_key(struct net *net, 
                               &mask->icmp.type,
                               TCA_FLOWER_KEY_ICMPV6_TYPE_MASK,
                               sizeof(key->icmp.type));
-               fl_set_key_val(tb, &key->icmp.code, TCA_FLOWER_KEY_ICMPV4_CODE,
+               fl_set_key_val(tb, &key->icmp.code, TCA_FLOWER_KEY_ICMPV6_CODE,
                               &mask->icmp.code,
-                              TCA_FLOWER_KEY_ICMPV4_CODE_MASK,
+                              TCA_FLOWER_KEY_ICMPV6_CODE_MASK,
                               sizeof(key->icmp.code));
 +      } else if (key->basic.n_proto == htons(ETH_P_ARP) ||
 +                 key->basic.n_proto == htons(ETH_P_RARP)) {
 +              fl_set_key_val(tb, &key->arp.sip, TCA_FLOWER_KEY_ARP_SIP,
 +                             &mask->arp.sip, TCA_FLOWER_KEY_ARP_SIP_MASK,
 +                             sizeof(key->arp.sip));
 +              fl_set_key_val(tb, &key->arp.tip, TCA_FLOWER_KEY_ARP_TIP,
 +                             &mask->arp.tip, TCA_FLOWER_KEY_ARP_TIP_MASK,
 +                             sizeof(key->arp.tip));
 +              fl_set_key_val(tb, &key->arp.op, TCA_FLOWER_KEY_ARP_OP,
 +                             &mask->arp.op, TCA_FLOWER_KEY_ARP_OP_MASK,
 +                             sizeof(key->arp.op));
 +              fl_set_key_val(tb, key->arp.sha, TCA_FLOWER_KEY_ARP_SHA,
 +                             mask->arp.sha, TCA_FLOWER_KEY_ARP_SHA_MASK,
 +                             sizeof(key->arp.sha));
 +              fl_set_key_val(tb, key->arp.tha, TCA_FLOWER_KEY_ARP_THA,
 +                             mask->arp.tha, TCA_FLOWER_KEY_ARP_THA_MASK,
 +                             sizeof(key->arp.tha));
        }
  
        if (tb[TCA_FLOWER_KEY_ENC_IPV4_SRC] ||
index fcecf5aac666829a8a00b10de31f61f6231e3cca,b12bc2abea931a7defd1e23eb86a20fe09e76388..f2141cb5556235b7520606cb88384c062f3ffbd2
@@@ -141,24 -118,19 +118,24 @@@ static int mall_set_parms(struct net *n
        struct tcf_exts e;
        int err;
  
 -      tcf_exts_init(&e, TCA_MATCHALL_ACT, 0);
 +      err = tcf_exts_init(&e, TCA_MATCHALL_ACT, 0);
 +      if (err)
 +              return err;
        err = tcf_exts_validate(net, tp, tb, est, &e, ovr);
        if (err < 0)
 -              return err;
 +              goto errout;
  
        if (tb[TCA_MATCHALL_CLASSID]) {
-               f->res.classid = nla_get_u32(tb[TCA_MATCHALL_CLASSID]);
-               tcf_bind_filter(tp, &f->res, base);
+               head->res.classid = nla_get_u32(tb[TCA_MATCHALL_CLASSID]);
+               tcf_bind_filter(tp, &head->res, base);
        }
  
-       tcf_exts_change(tp, &f->exts, &e);
+       tcf_exts_change(tp, &head->exts, &e);
  
        return 0;
 +errout:
 +      tcf_exts_destroy(&e);
 +      return err;
  }
  
  static int mall_change(struct net *net, struct sk_buff *in_skb,
                        return -EINVAL;
        }
  
-       f = kzalloc(sizeof(*f), GFP_KERNEL);
-       if (!f)
+       new = kzalloc(sizeof(*new), GFP_KERNEL);
+       if (!new)
                return -ENOBUFS;
  
-       err = tcf_exts_init(&f->exts, TCA_MATCHALL_ACT, 0);
 -      tcf_exts_init(&new->exts, TCA_MATCHALL_ACT, 0);
++      err = tcf_exts_init(&new->exts, TCA_MATCHALL_ACT, 0);
 +      if (err)
 +              goto err_exts_init;
  
        if (!handle)
                handle = 1;
-       f->handle = handle;
-       f->flags = flags;
+       new->handle = handle;
+       new->flags = flags;
  
-       err = mall_set_parms(net, tp, f, base, tb, tca[TCA_RATE], ovr);
+       err = mall_set_parms(net, tp, new, base, tb, tca[TCA_RATE], ovr);
        if (err)
 -              goto errout;
 +              goto err_set_parms;
  
        if (tc_should_offload(dev, tp, flags)) {
-               err = mall_replace_hw_filter(tp, f, (unsigned long) f);
+               err = mall_replace_hw_filter(tp, new, (unsigned long) new);
                if (err) {
                        if (tc_skip_sw(flags))
 -                              goto errout;
 +                              goto err_replace_hw_filter;
                        else
                                err = 0;
                }
        }
  
-       *arg = (unsigned long) f;
-       rcu_assign_pointer(head->filter, f);
+       *arg = (unsigned long) head;
+       rcu_assign_pointer(tp->root, new);
+       if (head)
+               call_rcu(&head->rcu, mall_destroy_rcu);
        return 0;
  
 -errout:
 +err_replace_hw_filter:
 +err_set_parms:
-       tcf_exts_destroy(&f->exts);
++      tcf_exts_destroy(&new->exts);
 +err_exts_init:
-       kfree(f);
+       kfree(new);
        return err;
  }