Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
authorDavid S. Miller <davem@davemloft.net>
Sat, 23 May 2015 05:22:35 +0000 (01:22 -0400)
committerDavid S. Miller <davem@davemloft.net>
Sat, 23 May 2015 05:22:35 +0000 (01:22 -0400)
Conflicts:
drivers/net/ethernet/cadence/macb.c
drivers/net/phy/phy.c
include/linux/skbuff.h
net/ipv4/tcp.c
net/switchdev/switchdev.c

Switchdev was a case of RTNH_H_{EXTERNAL --> OFFLOAD}
renaming overlapping with net-next changes of various
sorts.

phy.c was a case of two changes, one adding a local
variable to a function whilst the second was removing
one.

tcp.c overlapped a deadlock fix with the addition of new tcp_info
statistic values.

macb.c involved the addition of two zyncq device entries.

skbuff.h involved adding back ipv4_daddr to nf_bridge_info
whilst net-next changes put two other existing members of
that struct into a union.

Signed-off-by: David S. Miller <davem@davemloft.net>
27 files changed:
1  2 
MAINTAINERS
drivers/net/bonding/bond_options.c
drivers/net/ethernet/cadence/macb.c
drivers/net/ethernet/cadence/macb.h
drivers/net/phy/phy.c
drivers/net/vxlan.c
drivers/staging/vt6655/device_main.c
include/linux/gfp.h
include/linux/skbuff.h
include/linux/tcp.h
lib/rhashtable.c
net/bridge/br_multicast.c
net/bridge/br_netfilter.c
net/bridge/netfilter/ebtables.c
net/core/ethtool.c
net/core/rtnetlink.c
net/ipv4/fib_trie.c
net/ipv4/route.c
net/ipv4/tcp.c
net/ipv4/tcp_input.c
net/ipv4/tcp_minisocks.c
net/ipv6/route.c
net/ipv6/tcp_ipv6.c
net/netfilter/Kconfig
net/netfilter/nfnetlink_queue_core.c
net/netlink/af_netlink.c
net/switchdev/switchdev.c

diff --cc MAINTAINERS
Simple merge
Simple merge
index 5fca3093747c6f417aedb7ed2b8dbf6bc85bbfd6,fc646a41d5481406400bb4013ced8f96cf236092..740d04fd222333c8a70fa0a579f4c408b995a093
@@@ -2723,15 -2702,14 +2732,24 @@@ static const struct macb_config emac_co
        .init = at91ether_init,
  };
  
++
 +static const struct macb_config zynqmp_config = {
 +      .caps = MACB_CAPS_SG_DISABLED | MACB_CAPS_GIGABIT_MODE_AVAILABLE |
 +              MACB_CAPS_JUMBO,
 +      .dma_burst_length = 16,
 +      .clk_init = macb_clk_init,
 +      .init = macb_init,
 +      .jumbo_max_len = 10240,
 +};
 +
+ static const struct macb_config zynq_config = {
+       .caps = MACB_CAPS_SG_DISABLED | MACB_CAPS_GIGABIT_MODE_AVAILABLE |
+               MACB_CAPS_NO_GIGABIT_HALF,
+       .dma_burst_length = 16,
+       .clk_init = macb_clk_init,
+       .init = macb_init,
+ };
  static const struct of_device_id macb_dt_ids[] = {
        { .compatible = "cdns,at32ap7000-macb" },
        { .compatible = "cdns,at91sam9260-macb", .data = &at91sam9260_config },
        { .compatible = "atmel,sama5d4-gem", .data = &sama5d4_config },
        { .compatible = "cdns,at91rm9200-emac", .data = &emac_config },
        { .compatible = "cdns,emac", .data = &emac_config },
 +      { .compatible = "cdns,zynqmp-gem", .data = &zynqmp_config},
+       { .compatible = "cdns,zynq-gem", .data = &zynq_config },
        { /* sentinel */ }
  };
  MODULE_DEVICE_TABLE(of, macb_dt_ids);
Simple merge
index 1457ecf75dcc72dfb6c234a62a2ac72df7096345,47cd578052fc2328169fcc9df304be79e7af9ac5..377d2db04d33be594babb74a6b58479df480f82d
@@@ -794,8 -783,7 +808,8 @@@ void phy_state_machine(struct work_stru
        struct delayed_work *dwork = to_delayed_work(work);
        struct phy_device *phydev =
                        container_of(dwork, struct phy_device, state_queue);
-       bool needs_aneg = false, do_suspend = false, do_resume = false;
+       bool needs_aneg = false, do_suspend = false;
 +      enum phy_state old_state;
        int err = 0;
  
        mutex_lock(&phydev->lock);
Simple merge
Simple merge
Simple merge
index 40960fece0b206351304f779beb8eb9c00cd3c5d,f15154a879c711870ba649f867fc6eeb47212f14..b617095adb88b8d85f569d940261cd4d22c6c3c5
@@@ -174,10 -174,9 +174,11 @@@ struct nf_bridge_info 
        bool                    pkt_otherhost;
        unsigned int            mask;
        struct net_device       *physindev;
 -      struct net_device       *physoutdev;
 -      char                    neigh_header[8];
 +      union {
 +              struct net_device *physoutdev;
 +              char neigh_header[8];
 +      };
+       __be32                  ipv4_daddr;
  };
  #endif
  
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index 03444c6ae3426fac1e7c5060a069e3ec7aa15f63,09b62e17dd8cba4b1041de5f208180d278010604..5a5d9bdeaeb4d71e8fd6854a894676f76615a573
@@@ -1164,14 -1164,15 +1164,15 @@@ int fib_table_insert(struct fib_table *
                        state = fa->fa_state;
                        new_fa->fa_state = state & ~FA_S_ACCESSED;
                        new_fa->fa_slen = fa->fa_slen;
+                       new_fa->tb_id = tb->tb_id;
  
 -                      err = netdev_switch_fib_ipv4_add(key, plen, fi,
 -                                                       new_fa->fa_tos,
 -                                                       cfg->fc_type,
 -                                                       cfg->fc_nlflags,
 -                                                       tb->tb_id);
 +                      err = switchdev_fib_ipv4_add(key, plen, fi,
 +                                                   new_fa->fa_tos,
 +                                                   cfg->fc_type,
 +                                                   cfg->fc_nlflags,
 +                                                   tb->tb_id);
                        if (err) {
 -                              netdev_switch_fib_ipv4_abort(fi);
 +                              switchdev_fib_ipv4_abort(fi);
                                kmem_cache_free(fn_alias_kmem, new_fa);
                                goto out;
                        }
@@@ -1762,12 -1765,13 +1763,12 @@@ void fib_table_flush_external(struct fi
                        /* record local slen */
                        slen = fa->fa_slen;
  
-                       if (!fi || !(fi->fib_flags & RTNH_F_EXTERNAL))
+                       if (!fi || !(fi->fib_flags & RTNH_F_OFFLOAD))
                                continue;
  
 -                      netdev_switch_fib_ipv4_del(n->key,
 -                                                 KEYLENGTH - fa->fa_slen,
 -                                                 fi, fa->fa_tos,
 -                                                 fa->fa_type, tb->tb_id);
 +                      switchdev_fib_ipv4_del(n->key, KEYLENGTH - fa->fa_slen,
 +                                             fi, fa->fa_tos, fa->fa_type,
 +                                             tb->tb_id);
                }
  
                /* update leaf slen */
Simple merge
diff --cc net/ipv4/tcp.c
index 7f3e721b9e69c25dbac01f65d2c3521e95867148,f1377f2a0472ec26e88b92be2346cbc3c8a69b41..90afcec3f4273d6a2750c6cb615b2c668cc8c490
@@@ -2692,12 -2667,11 +2694,13 @@@ void tcp_get_info(struct sock *sk, stru
        rate = READ_ONCE(sk->sk_max_pacing_rate);
        info->tcpi_max_pacing_rate = rate != ~0U ? rate : ~0ULL;
  
-       spin_lock_bh(&sk->sk_lock.slock);
-       info->tcpi_bytes_acked = tp->bytes_acked;
-       info->tcpi_bytes_received = tp->bytes_received;
+       do {
+               start = u64_stats_fetch_begin_irq(&tp->syncp);
+               info->tcpi_bytes_acked = tp->bytes_acked;
+               info->tcpi_bytes_received = tp->bytes_received;
+       } while (u64_stats_fetch_retry_irq(&tp->syncp, start));
 +      info->tcpi_segs_out = tp->segs_out;
 +      info->tcpi_segs_in = tp->segs_in;
-       spin_unlock_bh(&sk->sk_lock.slock);
  }
  EXPORT_SYMBOL_GPL(tcp_get_info);
  
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index 136056f0c62c99c536872f23b78c8ec0faba349d,bf6e76643f7876d8dee4df261baf077aad837be3..69d67c300b80de2963e1ec23621b13ac4f66377f
@@@ -87,10 -86,10 +87,10 @@@ struct listeners 
  
  static inline int netlink_is_kernel(struct sock *sk)
  {
 -      return nlk_sk(sk)->flags & NETLINK_KERNEL_SOCKET;
 +      return nlk_sk(sk)->flags & NETLINK_F_KERNEL_SOCKET;
  }
  
- struct netlink_table *nl_table;
+ struct netlink_table *nl_table __read_mostly;
  EXPORT_SYMBOL_GPL(nl_table);
  
  static DECLARE_WAIT_QUEUE_HEAD(nl_table_wait);
index d4c8cf8282409a64cc0823cd994a1d2fe6d9c537,055453d486683ec19433961db220292e4f60571d..ac853acbe21181eb3a80317faebd040e5f76b4a6
@@@ -845,13 -328,18 +845,13 @@@ int switchdev_fib_ipv4_add(u32 dst, in
        if (fi->fib_net->ipv4.fib_offload_disabled)
                return 0;
  
 -      dev = netdev_switch_get_dev_by_nhs(fi);
 +      dev = switchdev_get_dev_by_nhs(fi);
        if (!dev)
                return 0;
 -      ops = dev->swdev_ops;
 -
 -      if (ops->swdev_fib_ipv4_add) {
 -              err = ops->swdev_fib_ipv4_add(dev, htonl(dst), dst_len,
 -                                            fi, tos, type, nlflags,
 -                                            tb_id);
 -              if (!err)
 -                      fi->fib_flags |= RTNH_F_OFFLOAD;
 -      }
 +
 +      err = switchdev_port_obj_add(dev, &fib_obj);
 +      if (!err)
-               fi->fib_flags |= RTNH_F_EXTERNAL;
++              fi->fib_flags |= RTNH_F_OFFLOAD;
  
        return err;
  }
@@@ -869,34 -357,27 +869,34 @@@ EXPORT_SYMBOL_GPL(switchdev_fib_ipv4_ad
   *
   *    Delete IPv4 route entry from switch device.
   */
 -int netdev_switch_fib_ipv4_del(u32 dst, int dst_len, struct fib_info *fi,
 -                             u8 tos, u8 type, u32 tb_id)
 +int switchdev_fib_ipv4_del(u32 dst, int dst_len, struct fib_info *fi,
 +                         u8 tos, u8 type, u32 tb_id)
  {
 +      struct switchdev_obj fib_obj = {
 +              .id = SWITCHDEV_OBJ_IPV4_FIB,
 +              .u.ipv4_fib = {
 +                      .dst = dst,
 +                      .dst_len = dst_len,
 +                      .fi = fi,
 +                      .tos = tos,
 +                      .type = type,
 +                      .nlflags = 0,
 +                      .tb_id = tb_id,
 +              },
 +      };
        struct net_device *dev;
 -      const struct swdev_ops *ops;
        int err = 0;
  
-       if (!(fi->fib_flags & RTNH_F_EXTERNAL))
+       if (!(fi->fib_flags & RTNH_F_OFFLOAD))
                return 0;
  
 -      dev = netdev_switch_get_dev_by_nhs(fi);
 +      dev = switchdev_get_dev_by_nhs(fi);
        if (!dev)
                return 0;
 -      ops = dev->swdev_ops;
  
 -      if (ops->swdev_fib_ipv4_del) {
 -              err = ops->swdev_fib_ipv4_del(dev, htonl(dst), dst_len,
 -                                            fi, tos, type, tb_id);
 -              if (!err)
 -                      fi->fib_flags &= ~RTNH_F_OFFLOAD;
 -      }
 +      err = switchdev_port_obj_del(dev, &fib_obj);
 +      if (!err)
-               fi->fib_flags &= ~RTNH_F_EXTERNAL;
++              fi->fib_flags &= ~RTNH_F_OFFLOAD;
  
        return err;
  }