1. 18 Jan, 2014 13 commits
    • sfeldma@cumulusnetworks.com's avatar
      bonding: add sysfs /slave dir for bond slave devices. · 07699f9a
      sfeldma@cumulusnetworks.com authored
      Add sub-directory under /sys/class/net/<interface>/slave with
      read-only attributes for slave.  Directory only appears when
      <interface> is a slave.
      
      $ tree /sys/class/net/eth2/slave/
      /sys/class/net/eth2/slave/
      ├── ad_aggregator_id
      ├── link_failure_count
      ├── mii_status
      ├── perm_hwaddr
      ├── queue_id
      └── state
      
      $ cat /sys/class/net/eth2/slave/*
      2
      0
      up
      40:02:10:ef:06:01
      0
      active
      Signed-off-by: default avatarScott Feldman <sfeldma@cumulusnetworks.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      07699f9a
    • Daniel Borkmann's avatar
      net: vxlan: do not use vxlan_net before checking event type · fd27e0d4
      Daniel Borkmann authored
      Jesse Brandeburg reported that commit acaf4e70 caused a panic
      when adding a network namespace while vxlan module was present in
      the system:
      
      [<ffffffff814d0865>] vxlan_lowerdev_event+0xf5/0x100
      [<ffffffff816e9e5d>] notifier_call_chain+0x4d/0x70
      [<ffffffff810912be>] __raw_notifier_call_chain+0xe/0x10
      [<ffffffff810912d6>] raw_notifier_call_chain+0x16/0x20
      [<ffffffff815d9610>] call_netdevice_notifiers_info+0x40/0x70
      [<ffffffff815d9656>] call_netdevice_notifiers+0x16/0x20
      [<ffffffff815e1bce>] register_netdevice+0x1be/0x3a0
      [<ffffffff815e1dce>] register_netdev+0x1e/0x30
      [<ffffffff814cb94a>] loopback_net_init+0x4a/0xb0
      [<ffffffffa016ed6e>] ? lockd_init_net+0x6e/0xb0 [lockd]
      [<ffffffff815d6bac>] ops_init+0x4c/0x150
      [<ffffffff815d6d23>] setup_net+0x73/0x110
      [<ffffffff815d725b>] copy_net_ns+0x7b/0x100
      [<ffffffff81090e11>] create_new_namespaces+0x101/0x1b0
      [<ffffffff81090f45>] copy_namespaces+0x85/0xb0
      [<ffffffff810693d5>] copy_process.part.26+0x935/0x1500
      [<ffffffff811d5186>] ? mntput+0x26/0x40
      [<ffffffff8106a15c>] do_fork+0xbc/0x2e0
      [<ffffffff811b7f2e>] ? ____fput+0xe/0x10
      [<ffffffff81089c5c>] ? task_work_run+0xac/0xe0
      [<ffffffff8106a406>] SyS_clone+0x16/0x20
      [<ffffffff816ee689>] stub_clone+0x69/0x90
      [<ffffffff816ee329>] ? system_call_fastpath+0x16/0x1b
      
      Apparently loopback device is being registered first and thus we
      receive an event notification when vxlan_net is not ready. Hence,
      when we call net_generic() and request vxlan_net_id, we seem to
      access garbage at that point in time. In setup_net() where we set
      up a newly allocated network namespace, we traverse the list of
      pernet ops ...
      
      list_for_each_entry(ops, &pernet_list, list) {
      	error = ops_init(ops, net);
      	if (error < 0)
      		goto out_undo;
      }
      
      ... and loopback_net_init() is invoked first here, so in the middle
      of setup_net() we get this notification in vxlan. As currently we
      only care about devices that unregister, move access through
      net_generic() there. Fix is based on Cong Wang's proposal, but
      only changes what is needed here. It sucks a bit as we only work
      around the actual cure: right now it seems the only way to check if
      a netns actually finished traversing all init ops would be to check
      if it's part of net_namespace_list. But that I find quite expensive
      each time we go through a notifier callback. Anyway, did a couple
      of tests and it seems good for now.
      
      Fixes: acaf4e70 ("net: vxlan: when lower dev unregisters remove vxlan dev as well")
      Reported-by: default avatarJesse Brandeburg <jesse.brandeburg@intel.com>
      Cc: "Eric W. Biederman" <ebiederm@xmission.com>
      Cc: Jesse Brandeburg <jesse.brandeburg@intel.com>
      Signed-off-by: default avatarCong Wang <xiyou.wangcong@gmail.com>
      Signed-off-by: default avatarDaniel Borkmann <dborkman@redhat.com>
      Tested-by: default avatarJesse Brandeburg <jesse.brandeburg@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fd27e0d4
    • David S. Miller's avatar
      Merge branch 'ixgbe' · 7dd40c19
      David S. Miller authored
      Aaron Brown says:
      
      ====================
      Intel Wired LAN Driver Updates
      
      This series contains updates to ixgbe Ethan Zhao.  The first one replaces
      the magic number "63" with a macro, IXGBE_MAX_VFS_DRV_LIMIT, the second
      moves the call to set driver_max_VFS to before SRIOV is enabled.
      
      The code of these patches match the v3 (1/2) and v2 (2/2) versions sent
      to the e1000-devel and netdev mailing lists.  The intermediate versions
      (v4, v5) are from sorting out style issues, mostly tabs to spaces and
      split lines probably introduced via mailer.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7dd40c19
    • ethan.zhao's avatar
      ixgbe: set driver_max_VFs should be done before enabling SRIOV · 31ac910e
      ethan.zhao authored
      commit 43dc4e01 Limit number of reported VFs to device
       specific value It doesn't work and always returns -EBUSY because VFs are
       already enabled.
      
      ixgbe_enable_sriov()
              pci_enable_sriov()
                      sriov_enable()
                      {
                      ... ..
                      iov->ctrl |= PCI_SRIOV_CTRL_VFE | PCI_SRIOV_CTRL_MSE;
                      pci_cfg_access_lock(dev);
                      ... ...
                      }
      
      pci_sriov_set_totalvfs()
      {
      ... ...
      if (dev->sriov->ctrl & PCI_SRIOV_CTRL_VFE)
                      return -EBUSY;
      ...
      }
      
      So should set driver_max_VFs with pci_sriov_set_totalvfs() before
      enable VFs with ixgbe_enable_sriov().
      
      V2: revised for net-next tree.
      Signed-off-by: default avatarEthan Zhao <ethan.kernel@gmail.com>
      Tested-by: default avatarPhil Schmitt <phillip.j.schmitt@intel.com>
      Signed-off-by: default avatarAaron Brown <aaron.f.brown@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      31ac910e
    • ethan.zhao's avatar
      ixgbe: define IXGBE_MAX_VFS_DRV_LIMIT macro and cleanup const 63 · dcc23e3a
      ethan.zhao authored
      Because ixgbe driver limit the max number of VF
       functions could be enabled to 63, so define one macro IXGBE_MAX_VFS_DRV_LIMIT
       and cleanup the const 63 in code.
      
      v3: revised for net-next tree.
      Signed-off-by: default avatarEthan Zhao <ethan.kernel@gmail.com>
      Tested-by: default avatarPhil Schmitt <phillip.j.schmitt@intel.com>
      Signed-off-by: default avatarAaron Brown <aaron.f.brown@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      dcc23e3a
    • Eric Dumazet's avatar
      ipv4: fix a dst leak in tunnels · 6c7e7610
      Eric Dumazet authored
      This patch :
      
      1) Remove a dst leak if DST_NOCACHE was set on dst
         Fix this by holding a reference only if dst really cached.
      
      2) Remove a lockdep warning in __tunnel_dst_set()
          This was reported by Cong Wang.
      
      3) Remove usage of a spinlock where xchg() is enough
      
      4) Remove some spurious inline keywords.
         Let compiler decide for us.
      
      Fixes: 7d442fab ("ipv4: Cache dst in tunnels")
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Cc: Cong Wang <cwang@twopensource.com>
      Cc: Tom Herbert <therbert@google.com>
      Cc: Maciej Żenczykowski <maze@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6c7e7610
    • Simon Horman's avatar
      sh_eth: Add support for r7s72100 · db893473
      Simon Horman authored
      The r7s72100 SoC includes a fast ethernet controller.
      Signed-off-by: default avatarSimon Horman <horms+renesas@verge.net.au>
      Acked-by: default avatarSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      db893473
    • Simon Horman's avatar
      sh_eth: Use bool as return type of sh_eth_is_gether() · 504c8ca5
      Simon Horman authored
      Return a boolean from sh_eth_is_gether() and refactor it as a one-liner.
      Signed-off-by: default avatarSimon Horman <horms+renesas@verge.net.au>
      Acked-by: default avatarSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      504c8ca5
    • Flavio Leitner's avatar
      ipv6: send Change Status Report after DAD is completed · 6a7cc418
      Flavio Leitner authored
      The RFC 3810 defines two type of messages for multicast
      listeners. The "Current State Report" message, as the name
      implies, refreshes the *current* state to the querier.
      Since the querier sends Query messages periodically, there
      is no need to retransmit the report.
      
      On the other hand, any change should be reported immediately
      using "State Change Report" messages. Since it's an event
      triggered by a change and that it can be affected by packet
      loss, the rfc states it should be retransmitted [RobVar] times
      to make sure routers will receive timely.
      
      Currently, we are sending "Current State Reports" after
      DAD is completed.  Before that, we send messages using
      unspecified address (::) which should be silently discarded
      by routers.
      
      This patch changes to send "State Change Report" messages
      after DAD is completed fixing the behavior to be RFC compliant
      and also to pass TAHI IPv6 testsuite.
      Signed-off-by: default avatarFlavio Leitner <fbl@redhat.com>
      Acked-by: default avatarHannes Frederic Sowa <hannes@stressinduktion.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6a7cc418
    • stephen hemminger's avatar
      qlcnic: remove unused code · c3bc40e2
      stephen hemminger authored
      Remove function  qlcnic_enable_eswitch which was defined
      but never used in current code.
      
      Compile tested only.
      Signed-off-by: default avatarStephen Hemminger <stephen@networkplumber.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c3bc40e2
    • stephen hemminger's avatar
      qlcnic: make local functions static · 21041400
      stephen hemminger authored
      Functions only used in one file should be static.
      Found by running make namespacecheck
      
      Compile tested only.
      Signed-off-by: default avatarStephen Hemminger <stephen@networkplumber.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      21041400
    • Florent Fourcot's avatar
      ipv6: tcp: fix flowlabel value in ACK messages send from TIME_WAIT · 1d13a96c
      Florent Fourcot authored
      This patch is following the commit b903d324 (ipv6: tcp: fix TCLASS
      value in ACK messages sent from TIME_WAIT).
      
      For the same reason than tclass, we have to store the flow label in the
      inet_timewait_sock to provide consistency of flow label on the last ACK.
      Signed-off-by: default avatarFlorent Fourcot <florent.fourcot@enst-bretagne.fr>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1d13a96c
    • David S. Miller's avatar
      Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next · d037c4d7
      David S. Miller authored
      John W. Linville says:
      
      ====================
      Please pull this batch of updates for the 3.14 stream!
      
      For the mac80211 bits, Johannes says:
      
      "This time I have uAPSD fixes since I was working on that, hwsim
      improvements to make dynamic radios possible for the test suite, the
      evidently long-overdue channel_change_time removal and a few other small
      collected fix and improvements."
      
      For the iwlwifi bits, Emmanuel says:
      
      "Besides a few trivial patches, I have an important workaround for a HW
      issue that has kept me busy for a long time. Along with it, a fix that
      prevents an error from being printed.
      Eyal fixes our behavior against SISO APs and Ilan fixes an issue with
      multiple interface scenarios.
      Eliad fixes an error path in our init flow.
      We also have a few 'static analyzers' fix."
      
      For the NFC bits, Samuel says:
      
      "It includes:
      
      * A new NFC driver for Marvell's 8897, and a few NCI fixes and
        improvements needed to support this chipset.
      
      * An LLCP fix for how we were setting the default MIU on a p2p link. If
        there is no explicit MIU extension announced at connection time, we
        must use the default one and not the one announced at LLCP link
        establishement time.
      
      * A pn544 EEPROM config update. Some of the currently EEPROM configured
        values are overwriting the firmware ones while other should not be set
        by the driver itself.
      
      * Some NFC digital stack fixes and improvements. Asynchronous functions
        are better documented, RF technologies and CRC functions are set upon
        PSL_REQ reception, and a few minor bugs are fixed.
      
      * Minor and miscelaneous pn533, mei_phy and port100 fixes."
      
      For the ath bits, Kalle says:
      
      "Janusz added Kconfig option for DFS. The DFS code was there already, but
      after fixes to mac80211 we can now enable it.
      
      Bartosz added a runtime firmware feature flag to disable P2P. Our 10.1
      firmware branch doesn't support P2P and ath10k can now disable that. He
      also added a limit for how many clients can connect to ath10k AP.
      
      Michal fixed WEP shared authentication, in case someone still uses it.
      And I added firmware debug log to help the firmware engineers."
      
      Along with that is a small batch of ath9k updates and a few other bits
      here and there.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d037c4d7
  2. 17 Jan, 2014 27 commits