Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
authorDavid S. Miller <davem@davemloft.net>
Mon, 4 Nov 2013 18:48:30 +0000 (13:48 -0500)
committerDavid S. Miller <davem@davemloft.net>
Mon, 4 Nov 2013 18:48:30 +0000 (13:48 -0500)
Conflicts:
drivers/net/ethernet/emulex/benet/be.h
drivers/net/netconsole.c
net/bridge/br_private.h

Three mostly trivial conflicts.

The net/bridge/br_private.h conflict was a function signature (argument
addition) change overlapping with the extern removals from Joe Perches.

In drivers/net/netconsole.c we had one change adjusting a printk message
whilst another changed "printk(KERN_INFO" into "pr_info(".

Lastly, the emulex change was a new inline function addition overlapping
with Joe Perches's extern removals.

Signed-off-by: David S. Miller <davem@davemloft.net>
25 files changed:
1  2 
MAINTAINERS
drivers/net/ethernet/broadcom/bgmac.c
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
drivers/net/ethernet/emulex/benet/be.h
drivers/net/ethernet/emulex/benet/be_main.c
drivers/net/ethernet/mellanox/mlx4/cmd.c
drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c
drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c
drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
drivers/net/netconsole.c
drivers/net/virtio_net.c
drivers/net/xen-netback/common.h
drivers/net/xen-netback/interface.c
drivers/net/xen-netback/netback.c
include/net/ip6_fib.h
mm/memcontrol.c
net/bridge/br_multicast.c
net/bridge/br_private.h
net/core/flow_dissector.c
net/ipv4/tcp_input.c
net/ipv4/tcp_offload.c
net/ipv6/route.c
net/sctp/ipv6.c
net/xfrm/xfrm_ipcomp.c

diff --cc MAINTAINERS
Simple merge
Simple merge
index 2c88ac295eea497102a8455f45abf769634a15a5,c99dac6a9ddf22131ed9f68e1fe22e018a0c8fcc..f4825db5d1792419924bab4f9d08e17abbfd6128
@@@ -732,114 -696,23 +732,124 @@@ static inline int qnq_async_evt_rcvd(st
        return adapter->flags & BE_FLAGS_QNQ_ASYNC_EVT_RCVD;
  }
  
 -extern void be_cq_notify(struct be_adapter *adapter, u16 qid, bool arm,
 -              u16 num_popped);
 -extern void be_link_status_update(struct be_adapter *adapter, u8 link_status);
 -extern void be_parse_stats(struct be_adapter *adapter);
 -extern int be_load_fw(struct be_adapter *adapter, u8 *func);
 -extern bool be_is_wol_supported(struct be_adapter *adapter);
 -extern bool be_pause_supported(struct be_adapter *adapter);
 -extern u32 be_get_fw_log_level(struct be_adapter *adapter);
 +#ifdef CONFIG_NET_RX_BUSY_POLL
 +static inline bool be_lock_napi(struct be_eq_obj *eqo)
 +{
 +      bool status = true;
 +
 +      spin_lock(&eqo->lock); /* BH is already disabled */
 +      if (eqo->state & BE_EQ_LOCKED) {
 +              WARN_ON(eqo->state & BE_EQ_NAPI);
 +              eqo->state |= BE_EQ_NAPI_YIELD;
 +              status = false;
 +      } else {
 +              eqo->state = BE_EQ_NAPI;
 +      }
 +      spin_unlock(&eqo->lock);
 +      return status;
 +}
 +
 +static inline void be_unlock_napi(struct be_eq_obj *eqo)
 +{
 +      spin_lock(&eqo->lock); /* BH is already disabled */
 +
 +      WARN_ON(eqo->state & (BE_EQ_POLL | BE_EQ_NAPI_YIELD));
 +      eqo->state = BE_EQ_IDLE;
 +
 +      spin_unlock(&eqo->lock);
 +}
 +
 +static inline bool be_lock_busy_poll(struct be_eq_obj *eqo)
 +{
 +      bool status = true;
 +
 +      spin_lock_bh(&eqo->lock);
 +      if (eqo->state & BE_EQ_LOCKED) {
 +              eqo->state |= BE_EQ_POLL_YIELD;
 +              status = false;
 +      } else {
 +              eqo->state |= BE_EQ_POLL;
 +      }
 +      spin_unlock_bh(&eqo->lock);
 +      return status;
 +}
 +
 +static inline void be_unlock_busy_poll(struct be_eq_obj *eqo)
 +{
 +      spin_lock_bh(&eqo->lock);
 +
 +      WARN_ON(eqo->state & (BE_EQ_NAPI));
 +      eqo->state = BE_EQ_IDLE;
 +
 +      spin_unlock_bh(&eqo->lock);
 +}
 +
 +static inline void be_enable_busy_poll(struct be_eq_obj *eqo)
 +{
 +      spin_lock_init(&eqo->lock);
 +      eqo->state = BE_EQ_IDLE;
 +}
 +
 +static inline void be_disable_busy_poll(struct be_eq_obj *eqo)
 +{
 +      local_bh_disable();
 +
 +      /* It's enough to just acquire napi lock on the eqo to stop
 +       * be_busy_poll() from processing any queueus.
 +       */
 +      while (!be_lock_napi(eqo))
 +              mdelay(1);
 +
 +      local_bh_enable();
 +}
 +
 +#else /* CONFIG_NET_RX_BUSY_POLL */
 +
 +static inline bool be_lock_napi(struct be_eq_obj *eqo)
 +{
 +      return true;
 +}
 +
 +static inline void be_unlock_napi(struct be_eq_obj *eqo)
 +{
 +}
 +
 +static inline bool be_lock_busy_poll(struct be_eq_obj *eqo)
 +{
 +      return false;
 +}
 +
 +static inline void be_unlock_busy_poll(struct be_eq_obj *eqo)
 +{
 +}
 +
 +static inline void be_enable_busy_poll(struct be_eq_obj *eqo)
 +{
 +}
 +
 +static inline void be_disable_busy_poll(struct be_eq_obj *eqo)
 +{
 +}
 +#endif /* CONFIG_NET_RX_BUSY_POLL */
 +
 +void be_cq_notify(struct be_adapter *adapter, u16 qid, bool arm,
 +                u16 num_popped);
 +void be_link_status_update(struct be_adapter *adapter, u8 link_status);
 +void be_parse_stats(struct be_adapter *adapter);
 +int be_load_fw(struct be_adapter *adapter, u8 *func);
 +bool be_is_wol_supported(struct be_adapter *adapter);
 +bool be_pause_supported(struct be_adapter *adapter);
 +u32 be_get_fw_log_level(struct be_adapter *adapter);
++
+ static inline int fw_major_num(const char *fw_ver)
+ {
+       int fw_major = 0;
+       sscanf(fw_ver, "%d.", &fw_major);
+       return fw_major;
+ }
  int be_update_queues(struct be_adapter *adapter);
  int be_poll(struct napi_struct *napi, int budget);
  
index a8ef4c4b94bed593a2423878041de3ed926567e7,c9a15925a1f757bf1da6ceef594389df15315f24..ba2f5e710af12cc7587f0503ea8dc177d2aba4ed
@@@ -336,14 -333,18 +335,18 @@@ static ssize_t store_enabled(struct net
                netpoll_print_options(&nt->np);
  
                err = netpoll_setup(&nt->np);
-               if (err) {
-                       mutex_unlock(&nt->mutex);
+               if (err)
                        return err;
-               }
-               pr_info("network logging started\n");
  
 -              printk(KERN_INFO "netconsole: network logging started\n");
++              pr_info("netconsole: network logging started\n");
        } else {        /* 0 */
+               /* We need to disable the netconsole before cleaning it up
+                * otherwise we might end up in write_msg() with
+                * nt->np.dev == NULL and nt->enabled == 1
+                */
+               spin_lock_irqsave(&target_list_lock, flags);
+               nt->enabled = 0;
+               spin_unlock_irqrestore(&target_list_lock, flags);
                netpoll_cleanup(&nt->np);
        }
  
Simple merge
Simple merge
index e4aa26748f806f175808564180d6e593d8b92954,459935a6bfae3ab31c634feff974e64f8f93cf3d..b78ee10a956a199e8d5e1a1615d5a6e1cbe94acd
@@@ -316,14 -312,11 +316,13 @@@ struct xenvif *xenvif_alloc(struct devi
        vif->credit_bytes = vif->remaining_credit = ~0UL;
        vif->credit_usec  = 0UL;
        init_timer(&vif->credit_timeout);
-       /* Initialize 'expires' now: it's used to track the credit window. */
-       vif->credit_timeout.expires = jiffies;
+       vif->credit_window_start = get_jiffies_64();
  
        dev->netdev_ops = &xenvif_netdev_ops;
 -      dev->hw_features = NETIF_F_SG | NETIF_F_IP_CSUM | NETIF_F_TSO;
 -      dev->features = dev->hw_features;
 +      dev->hw_features = NETIF_F_SG |
 +              NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM |
 +              NETIF_F_TSO | NETIF_F_TSO6;
 +      dev->features = dev->hw_features | NETIF_F_RXCSUM;
        SET_ETHTOOL_OPS(dev, &xenvif_ethtool_ops);
  
        dev->tx_queue_len = XENVIF_QUEUE_LENGTH;
index 828fdab4f1a4b08ae456f8223e02218486cfc43c,900da4b243ad7a0a4eb21ae992d52912650f4c5c..919b6509455cfbaf45ba63c7d8b378fa13a8e758
        return err;
  }
  
 +static int checksum_setup_ipv6(struct xenvif *vif, struct sk_buff *skb,
 +                             int recalculate_partial_csum)
 +{
 +      int err = -EPROTO;
 +      struct ipv6hdr *ipv6h = (void *)skb->data;
 +      u8 nexthdr;
 +      unsigned int header_size;
 +      unsigned int off;
 +      bool fragment;
 +      bool done;
 +
 +      done = false;
 +
 +      off = sizeof(struct ipv6hdr);
 +
 +      header_size = skb->network_header + off;
 +      maybe_pull_tail(skb, header_size);
 +
 +      nexthdr = ipv6h->nexthdr;
 +
 +      while ((off <= sizeof(struct ipv6hdr) + ntohs(ipv6h->payload_len)) &&
 +             !done) {
 +              switch (nexthdr) {
 +              case IPPROTO_DSTOPTS:
 +              case IPPROTO_HOPOPTS:
 +              case IPPROTO_ROUTING: {
 +                      struct ipv6_opt_hdr *hp = (void *)(skb->data + off);
 +
 +                      header_size = skb->network_header +
 +                              off +
 +                              sizeof(struct ipv6_opt_hdr);
 +                      maybe_pull_tail(skb, header_size);
 +
 +                      nexthdr = hp->nexthdr;
 +                      off += ipv6_optlen(hp);
 +                      break;
 +              }
 +              case IPPROTO_AH: {
 +                      struct ip_auth_hdr *hp = (void *)(skb->data + off);
 +
 +                      header_size = skb->network_header +
 +                              off +
 +                              sizeof(struct ip_auth_hdr);
 +                      maybe_pull_tail(skb, header_size);
 +
 +                      nexthdr = hp->nexthdr;
 +                      off += (hp->hdrlen+2)<<2;
 +                      break;
 +              }
 +              case IPPROTO_FRAGMENT:
 +                      fragment = true;
 +                      /* fall through */
 +              default:
 +                      done = true;
 +                      break;
 +              }
 +      }
 +
 +      if (!done) {
 +              if (net_ratelimit())
 +                      netdev_err(vif->dev, "Failed to parse packet header\n");
 +              goto out;
 +      }
 +
 +      if (fragment) {
 +              if (net_ratelimit())
 +                      netdev_err(vif->dev, "Packet is a fragment!\n");
 +              goto out;
 +      }
 +
 +      switch (nexthdr) {
 +      case IPPROTO_TCP:
 +              if (!skb_partial_csum_set(skb, off,
 +                                        offsetof(struct tcphdr, check)))
 +                      goto out;
 +
 +              if (recalculate_partial_csum) {
 +                      struct tcphdr *tcph = tcp_hdr(skb);
 +
 +                      header_size = skb->network_header +
 +                              off +
 +                              sizeof(struct tcphdr);
 +                      maybe_pull_tail(skb, header_size);
 +
 +                      tcph->check = ~csum_ipv6_magic(&ipv6h->saddr,
 +                                                     &ipv6h->daddr,
 +                                                     skb->len - off,
 +                                                     IPPROTO_TCP, 0);
 +              }
 +              break;
 +      case IPPROTO_UDP:
 +              if (!skb_partial_csum_set(skb, off,
 +                                        offsetof(struct udphdr, check)))
 +                      goto out;
 +
 +              if (recalculate_partial_csum) {
 +                      struct udphdr *udph = udp_hdr(skb);
 +
 +                      header_size = skb->network_header +
 +                              off +
 +                              sizeof(struct udphdr);
 +                      maybe_pull_tail(skb, header_size);
 +
 +                      udph->check = ~csum_ipv6_magic(&ipv6h->saddr,
 +                                                     &ipv6h->daddr,
 +                                                     skb->len - off,
 +                                                     IPPROTO_UDP, 0);
 +              }
 +              break;
 +      default:
 +              if (net_ratelimit())
 +                      netdev_err(vif->dev,
 +                                 "Attempting to checksum a non-TCP/UDP packet, "
 +                                 "dropping a protocol %d packet\n",
 +                                 nexthdr);
 +              goto out;
 +      }
 +
 +      err = 0;
 +
 +out:
 +      return err;
 +}
 +
 +static int checksum_setup(struct xenvif *vif, struct sk_buff *skb)
 +{
 +      int err = -EPROTO;
 +      int recalculate_partial_csum = 0;
 +
 +      /* A GSO SKB must be CHECKSUM_PARTIAL. However some buggy
 +       * peers can fail to set NETRXF_csum_blank when sending a GSO
 +       * frame. In this case force the SKB to CHECKSUM_PARTIAL and
 +       * recalculate the partial checksum.
 +       */
 +      if (skb->ip_summed != CHECKSUM_PARTIAL && skb_is_gso(skb)) {
 +              vif->rx_gso_checksum_fixup++;
 +              skb->ip_summed = CHECKSUM_PARTIAL;
 +              recalculate_partial_csum = 1;
 +      }
 +
 +      /* A non-CHECKSUM_PARTIAL SKB does not require setup. */
 +      if (skb->ip_summed != CHECKSUM_PARTIAL)
 +              return 0;
 +
 +      if (skb->protocol == htons(ETH_P_IP))
 +              err = checksum_setup_ip(vif, skb, recalculate_partial_csum);
 +      else if (skb->protocol == htons(ETH_P_IPV6))
 +              err = checksum_setup_ipv6(vif, skb, recalculate_partial_csum);
 +
 +      return err;
 +}
 +
  static bool tx_credit_exceeded(struct xenvif *vif, unsigned size)
  {
-       unsigned long now = jiffies;
-       unsigned long next_credit =
-               vif->credit_timeout.expires +
+       u64 now = get_jiffies_64();
+       u64 next_credit = vif->credit_window_start +
                msecs_to_jiffies(vif->credit_usec / 1000);
  
        /* Timer could already be pending in rare cases. */
Simple merge
diff --cc mm/memcontrol.c
Simple merge
Simple merge
index d1ca6d9566332055591b96979805748a4c76e6c5,2e8244efb262d54362bd36a12b9c3000c4388260..229d820bdf0b06453cb43058020d54e33f210297
@@@ -434,40 -449,44 +434,40 @@@ int br_ioctl_deviceless_stub(struct ne
  /* br_multicast.c */
  #ifdef CONFIG_BRIDGE_IGMP_SNOOPING
  extern unsigned int br_mdb_rehash_seq;
 -extern int br_multicast_rcv(struct net_bridge *br,
 -                          struct net_bridge_port *port,
 -                          struct sk_buff *skb,
 -                          u16 vid);
 -extern struct net_bridge_mdb_entry *br_mdb_get(struct net_bridge *br,
 -                                             struct sk_buff *skb, u16 vid);
 -extern void br_multicast_add_port(struct net_bridge_port *port);
 -extern void br_multicast_del_port(struct net_bridge_port *port);
 -extern void br_multicast_enable_port(struct net_bridge_port *port);
 -extern void br_multicast_disable_port(struct net_bridge_port *port);
 -extern void br_multicast_init(struct net_bridge *br);
 -extern void br_multicast_open(struct net_bridge *br);
 -extern void br_multicast_stop(struct net_bridge *br);
 -extern void br_multicast_deliver(struct net_bridge_mdb_entry *mdst,
 -                               struct sk_buff *skb);
 -extern void br_multicast_forward(struct net_bridge_mdb_entry *mdst,
 -                               struct sk_buff *skb, struct sk_buff *skb2);
 -extern int br_multicast_set_router(struct net_bridge *br, unsigned long val);
 -extern int br_multicast_set_port_router(struct net_bridge_port *p,
 -                                      unsigned long val);
 -extern int br_multicast_toggle(struct net_bridge *br, unsigned long val);
 -extern int br_multicast_set_querier(struct net_bridge *br, unsigned long val);
 -extern int br_multicast_set_hash_max(struct net_bridge *br, unsigned long val);
 -extern struct net_bridge_mdb_entry *br_mdb_ip_get(
 -                              struct net_bridge_mdb_htable *mdb,
 -                              struct br_ip *dst);
 -extern struct net_bridge_mdb_entry *br_multicast_new_group(struct net_bridge *br,
 -                              struct net_bridge_port *port, struct br_ip *group);
 -extern void br_multicast_free_pg(struct rcu_head *head);
 -extern struct net_bridge_port_group *br_multicast_new_port_group(
 -                              struct net_bridge_port *port,
 -                              struct br_ip *group,
 -                              struct net_bridge_port_group __rcu *next,
 -                              unsigned char state);
 -extern void br_mdb_init(void);
 -extern void br_mdb_uninit(void);
 -extern void br_mdb_notify(struct net_device *dev, struct net_bridge_port *port,
 -                        struct br_ip *group, int type);
 +int br_multicast_rcv(struct net_bridge *br, struct net_bridge_port *port,
-                    struct sk_buff *skb);
++                   struct sk_buff *skb, u16 vid);
 +struct net_bridge_mdb_entry *br_mdb_get(struct net_bridge *br,
 +                                      struct sk_buff *skb, u16 vid);
 +void br_multicast_add_port(struct net_bridge_port *port);
 +void br_multicast_del_port(struct net_bridge_port *port);
 +void br_multicast_enable_port(struct net_bridge_port *port);
 +void br_multicast_disable_port(struct net_bridge_port *port);
 +void br_multicast_init(struct net_bridge *br);
 +void br_multicast_open(struct net_bridge *br);
 +void br_multicast_stop(struct net_bridge *br);
 +void br_multicast_deliver(struct net_bridge_mdb_entry *mdst,
 +                        struct sk_buff *skb);
 +void br_multicast_forward(struct net_bridge_mdb_entry *mdst,
 +                        struct sk_buff *skb, struct sk_buff *skb2);
 +int br_multicast_set_router(struct net_bridge *br, unsigned long val);
 +int br_multicast_set_port_router(struct net_bridge_port *p, unsigned long val);
 +int br_multicast_toggle(struct net_bridge *br, unsigned long val);
 +int br_multicast_set_querier(struct net_bridge *br, unsigned long val);
 +int br_multicast_set_hash_max(struct net_bridge *br, unsigned long val);
 +struct net_bridge_mdb_entry *
 +br_mdb_ip_get(struct net_bridge_mdb_htable *mdb, struct br_ip *dst);
 +struct net_bridge_mdb_entry *
 +br_multicast_new_group(struct net_bridge *br, struct net_bridge_port *port,
 +                     struct br_ip *group);
 +void br_multicast_free_pg(struct rcu_head *head);
 +struct net_bridge_port_group *
 +br_multicast_new_port_group(struct net_bridge_port *port, struct br_ip *group,
 +                          struct net_bridge_port_group __rcu *next,
 +                          unsigned char state);
 +void br_mdb_init(void);
 +void br_mdb_uninit(void);
 +void br_mdb_notify(struct net_device *dev, struct net_bridge_port *port,
 +                 struct br_ip *group, int type);
  
  #define mlock_dereference(X, br) \
        rcu_dereference_protected(X, lockdep_is_held(&br->multicast_lock))
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc net/sctp/ipv6.c
Simple merge
Simple merge