1. 21 7月, 2014 7 次提交
    • D
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next · a8138f42
      David S. Miller 提交于
      Pablo Neira Ayuso says:
      
      ====================
      Netfilter updates for net-next
      
      The following patchset contains updates for your net-next tree,
      they are:
      
      1) Use kvfree() helper function from x_tables, from Eric Dumazet.
      
      2) Remove extra timer from the conntrack ecache extension, use a
         workqueue instead to redeliver lost events to userspace instead,
         from Florian Westphal.
      
      3) Removal of the ulog targets for ebtables and iptables. The nflog
         infrastructure superseded this almost 9 years ago, time to get rid
         of this code.
      
      4) Replace the list of loggers by an array now that we can only have
         two possible non-overlapping logger flavours, ie. kernel ring buffer
         and netlink logging.
      
      5) Move Eric Dumazet's log buffer code to nf_log to reuse it from
         all of the supported per-family loggers.
      
      6) Consolidate nf_log_packet() as an unified interface for packet logging.
         After this patch, if the struct nf_loginfo is available, it explicitly
         selects the logger that is used.
      
      7) Move ip and ip6 logging code from xt_LOG to the corresponding
         per-family loggers. Thus, x_tables and nf_tables share the same code
         for packet logging.
      
      8) Add generic ARP packet logger, which is used by nf_tables. The
         format aims to be consistent with the output of xt_LOG.
      
      9) Add generic bridge packet logger. Again, this is used by nf_tables
         and it routes the packets to the real family loggers. As a result,
         we get consistent logging format for the bridge family. The ebt_log
         logging code has been intentionally left in place not to break
         backward compatibility since the logging output differs from xt_LOG.
      
      10) Update nft_log to explicitly request the required family logger when
          needed.
      
      11) Finish nft_log so it supports arp, ip, ip6, bridge and inet families.
          Allowing selection between netlink and kernel buffer ring logging.
      
      12) Several fixes coming after the netfilter core logging changes spotted
          by robots.
      
      13) Use IS_ENABLED() macros whenever possible in the netfilter tree,
          from Duan Jiong.
      
      14) Removal of a couple of unnecessary branch before kfree, from Fabian
          Frederick.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a8138f42
    • V
      net: print a notification on device rename · 6fe82a39
      Veaceslav Falico 提交于
      Currently it's done silently (from the kernel part), and thus it might be
      hard to track the renames from logs.
      
      Add a simple netdev_info() to notify the rename, but only in case the
      previous name was valid.
      
      CC: "David S. Miller" <davem@davemloft.net>
      CC: Eric Dumazet <edumazet@google.com>
      CC: Vlad Yasevich <vyasevic@redhat.com>
      CC: stephen hemminger <stephen@networkplumber.org>
      CC: Jerry Chu <hkchu@google.com>
      CC: Ben Hutchings <bhutchings@solarflare.com>
      CC: David Laight <David.Laight@ACULAB.COM>
      Signed-off-by: NVeaceslav Falico <vfalico@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6fe82a39
    • D
      Merge branch 'netdev_print' · 4ec68378
      David S. Miller 提交于
      Veaceslav Falico says:
      
      ====================
      net: print net_device name/state more often
      
      Currently we use net_device->name only if it's the NETREG_REGISTERED
      reg_state, otherwise we return "(unregistered device)".
      
      However, we always populate net_device->name on creation, so it's always
      available to us for use. The only caveat is that we might have a name like
      "eth%d", in which case we cannot use it as it might change in the future.
      
      Also, the net_device might not be NETREG_UNREGISTERED when the function is
      called (_UNINITIALIZED, _UNREGISTERING, _RELEASED, _DUMMY), so it's
      misleading.
      
      So, a better way would be to always return the dev->name in netdev_name(),
      unless it's in the form of "eth%d" or it's empty, then return
      "unnamed net_device". This way we'll always return the name in
      NETREG_REGISTERED reg_state, and also return it in other states, when
      possible.
      
      Also, to be more verbose on non-NETREG_REGISTERED states, add a function
      netdev_reg_state(), which returns a string describing the state, and use it
      in netdev_printk()-related functions. If the dev is in NETREG_REGISTERED
      state then a void string is regurned and, thus, nothing changes.
      
      After these two patches we'll have the same behaviour in the usual cases,
      and more verbose in non-standardad/buggy ones.
      
      v2->v3:
      Correct the string for _UNINITIALIZED and warn on a bad reg_state,
      per Joe Perches's comments.
      
      v1->v2:
      As Tom Gundersen suggested, there might be a case when we have an empty
      string as a name for a device, so account this also and return "unnamed
      device" for that case too.
      ====================
      Signed-off-by: NVeaceslav Falico <vfalico@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4ec68378
    • V
      net: print net_device reg_state in netdev_* unless it's registered · ccc7f496
      Veaceslav Falico 提交于
      This way we'll always know in what status the device is, unless it's
      running normally (i.e. NETDEV_REGISTERED).
      
      Also, emit a warning once in case of a bad reg_state.
      
      CC: "David S. Miller" <davem@davemloft.net>
      CC: Jason Baron <jbaron@akamai.com>
      CC: Eric Dumazet <edumazet@google.com>
      CC: Vlad Yasevich <vyasevic@redhat.com>
      CC: stephen hemminger <stephen@networkplumber.org>
      CC: Jerry Chu <hkchu@google.com>
      CC: Ben Hutchings <bhutchings@solarflare.com>
      CC: Joe Perches <joe@perches.com>
      Signed-off-by: NVeaceslav Falico <vfalico@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ccc7f496
    • V
      net: use dev->name in netdev_pr* when it's available · c6f854d5
      Veaceslav Falico 提交于
      netdev_name() returns dev->name only when the net_device is in
      NETREG_REGISTERED state.
      
      However, dev->name is always populated on creation, so we can easily use
      it.
      
      There are two cases when there's no real name - when it's an empty string
      or when the name is in form of "eth%d", then netdev_name() returns "unnamed
      net_device".
      
      CC: "David S. Miller" <davem@davemloft.net>
      CC: Tom Gundersen <teg@jklm.no>
      Signed-off-by: NVeaceslav Falico <vfalico@gmail.com>
      Acked-by: NTom Gundersen <teg@jklm.no>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c6f854d5
    • V
      bonding: make it possible to have unlimited nested upper vlans · 3e403a77
      Veaceslav Falico 提交于
      Currently we're limited by a constant level of vlan nestings, and fail to
      find anything beyound that level (currently 2).
      
      To fix this - remove the limit of nestings when going through device tree,
      and when the end device is found - allocate the needed amount of vlan tags
      and return them, instead of found/not found.
      
      CC: Jay Vosburgh <j.vosburgh@gmail.com>
      CC: Andy Gospodarek <andy@greyhouse.net>
      Signed-off-by: NVeaceslav Falico <vfalico@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3e403a77
    • C
      net_sched: hold tcf_lock in netdevice notifier · 224e923c
      Cong Wang 提交于
      We modify mirred action (m->tcfm_dev) in netdev event, we need to
      prevent on-going mirred actions from reading freed m->tcfm_dev.
      So we need to acquire this spin lock.
      
      Cc: Jamal Hadi Salim <jhs@mojatatu.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Signed-off-by: NCong Wang <cwang@twopensource.com>
      Signed-off-by: NCong Wang <xiyou.wangcong@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      224e923c
  2. 20 7月, 2014 1 次提交
  3. 18 7月, 2014 28 次提交
  4. 17 7月, 2014 4 次提交
    • D
      Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next · 4bbe3f5c
      David S. Miller 提交于
      Jeff Kirsher says:
      
      ====================
      Intel Wired LAN Driver Updates 2014-07-16
      
      This series contains updates to i40e only.
      
      Neerav adds support to get the port MAC address from firmware and adds
      support to the ndo_get_phys_port_id() callback to provide port specific
      unique ids to the netdev layer.
      
      Jakub Kicinski provides 2 fixes, first fixes i40e to never generate a software
      time stamp if the hardware time stamp is provided.  Second fixes a race
      condition on queueing skb for hardware time by using a simple bit lock to
      avoid race conditions and leaking skbs when multiple transmit rings try
      to claim time stamping.
      
      Paul does some general cleanup of the driver to remove unneeded spaces,
      comments that are no longer valid, and break that will never get touched.
      
      Jacob Keller adds a verbose warning message when the incorrect PF attempts
      to control timestamping for a port to which it was not assigned.  The primary
      intent of this message is to help debugging the reason why the SIOCSHWSTAMP
      ioctl has failed and to help narrow the cause of the issue.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4bbe3f5c
    • S
      openvswitch: make generic netlink group const · 48e48a70
      stephen hemminger 提交于
      Generic netlink tables can be const.
      Signed-off-by: NStephen Hemminger <stephen@networkplumber.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      48e48a70
    • M
      bonding: Do not try to send packets over dead link in TLB mode. · 6b794c1c
      Mahesh Bandewar 提交于
      In TLB mode if tlb_dynamic_lb is NOT set, slaves from the bond
      group are selected based on the hash distribution. This does not
      exclude dead links which are part of the bond. Also if there is a
      temporary link event which brings down the interface, packets
      hashed on that interface would be dropped too.
      
      This patch fixes these issues and distributes flows across the
      UP links only. Also the array construction of links which are
      capable of sending packets happen in the control path leaving
      only link-selection during the data-path.
      
      One possible side effect of this is - at a link event; all
      flows will be shuffled to get good distribution. But impact of
      this should be minimum with the assumption that a member or
      members of the bond group are not available is a very temporary
      situation.
      Signed-off-by: NMahesh Bandewar <maheshb@google.com>
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6b794c1c
    • D
      Merge branch 'davinci_mdio' · f7be2cba
      David S. Miller 提交于
      Grygorii Strashko says:
      
      ====================
      net: davinci_mdio: reuse for keystone2 arch
      
      The similar MDIO HW blocks is used by keystone 2 SoCs as
      in Davinci SoCs:
      - one in Gigabit Ethernet (GbE) Switch Subsystem
        See http://www.ti.com/lit/ug/sprugv9d/sprugv9d.pdf
      - one in 10 Gigabit Ethernet Subsystem
        See http://www.ti.com/lit/ug/spruhj5/spruhj5.pdf
      
      Hence, reuse Davinci MDIO driver for Keystone 2 and
      enable TI networking for Keystone 2 devices.
      
      Also, as part of this series, enable PHY's creation from DT, because
      Keystone 2 supports DT boot mode only.
      
      Changes in v2:
      - review comments applied.
        Keystone 2 compatibility string changed to "ti,keystone_mdio".
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f7be2cba