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
  /* 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)
@@@ -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");
@@@ -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
@@@ -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] ||
@@@ -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;
  }