1. 13 2月, 2010 1 次提交
  2. 11 2月, 2010 1 次提交
  3. 04 2月, 2010 1 次提交
  4. 26 1月, 2010 1 次提交
  5. 21 1月, 2010 1 次提交
  6. 20 1月, 2010 1 次提交
  7. 07 1月, 2010 2 次提交
    • J
      net: Make it easier to parse /proc/net/dev contents. · 2d13bafe
      Jesper Dangaard Brouer 提交于
      The contents of /proc/net/dev is annoying to parse, because
      it changes whether there is a space after the "ethX:" or not.
      It depends upon the size of the "Receive bytes" counter,
      if the number is below 7 digits, then there is whitespaces
      else if the number is 8 digits or above there is no space
      between the ":" and the number.
      
      This patch changes the output to assure there is always a space
      between the ":" and the number.  Given that all existing userspace
      application already need to handle the whitespaces, I see
      no breakage of existing tools.
      Signed-off-by: NJesper Dangaard Brouer <hawk@comx.dk>
      Acked-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2d13bafe
    • A
      fix bonding: allow arp_ip_targets on separate vlans to use arp validation · ca8d9ea3
      Andy Gospodarek 提交于
      On Wed, Jan 06, 2010 at 10:10:03PM +0100, Eric Dumazet wrote:
      > Le 06/01/2010 19:38, Eric Dumazet a écrit :
      > >
      > > (net-next-2.6 doesnt work well on my bond/vlan setup, I suspect I need a bisection)
      >
      > David, I had to revert 1f3c8804
      > (bonding: allow arp_ip_targets on separate vlans to use arp validation)
      >
      > Or else, my vlan devices dont work (unfortunatly I dont have much time
      > these days to debug the thing)
      >
      > My config :
      >
      >               +---------+
      > vlan.103 -----+ bond0   +--- eth1 (bnx2)
      >               |         +
      > vlan.825 -----+         +--- eth2 (tg3)
      >               +---------+
      >
      > $ cat /proc/net/bonding/bond0
      > Ethernet Channel Bonding Driver: v3.6.0 (September 26, 2009)
      >
      > Bonding Mode: fault-tolerance (active-backup)
      > Primary Slave: None
      > Currently Active Slave: eth2
      > MII Status: up
      > MII Polling Interval (ms): 100
      > Up Delay (ms): 0
      > Down Delay (ms): 0
      >
      > Slave Interface: eth1  (bnx2)
      > MII Status: down
      > Link Failure Count: 1
      > Permanent HW addr: 00:1e:0b:ec:d3:d2
      >
      > Slave Interface: eth2   (tg3)
      > MII Status: up
      > Link Failure Count: 0
      > Permanent HW addr: 00:1e:0b:92:78:50
      >
      
      This patch fixes up a problem with found with commit
      1f3c8804.  The original change
      overloaded null_or_orig, but doing that prevented any packet handlers
      that were not tied to a specific device (i.e. ptype->dev == NULL) from
      ever receiving any frames.
      
      The null_or_orig variable cannot be overloaded, and must be kept as NULL
      to prevent the frame from being ignored by packet handlers designed to
      accept frames on any interface.
      Signed-off-by: NAndy Gospodarek <andy@greyhouse.net>
      Signed-off-by: NJay Vosburgh <fubar@us.ibm.com>
      Acked-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ca8d9ea3
  8. 04 1月, 2010 1 次提交
    • A
      bonding: allow arp_ip_targets on separate vlans to use arp validation · 1f3c8804
      Andy Gospodarek 提交于
      This allows a bond device to specify an arp_ip_target as a host that is
      not on the same vlan as the base bond device and still use arp
      validation.  A configuration like this, now works:
      
      BONDING_OPTS="mode=active-backup arp_interval=1000 arp_ip_target=10.0.100.1 arp_validate=3"
      
      1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue
          link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
          inet 127.0.0.1/8 scope host lo
          inet6 ::1/128 scope host
             valid_lft forever preferred_lft forever
      2: eth1: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master bond0 qlen 1000
          link/ether 00:13:21:be:33:e9 brd ff:ff:ff:ff:ff:ff
      3: eth0: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master bond0 qlen 1000
          link/ether 00:13:21:be:33:e9 brd ff:ff:ff:ff:ff:ff
      8: bond0: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue
          link/ether 00:13:21:be:33:e9 brd ff:ff:ff:ff:ff:ff
          inet6 fe80::213:21ff:febe:33e9/64 scope link
             valid_lft forever preferred_lft forever
      9: bond0.100@bond0: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue
          link/ether 00:13:21:be:33:e9 brd ff:ff:ff:ff:ff:ff
          inet 10.0.100.2/24 brd 10.0.100.255 scope global bond0.100
          inet6 fe80::213:21ff:febe:33e9/64 scope link
             valid_lft forever preferred_lft forever
      
      Ethernet Channel Bonding Driver: v3.6.0 (September 26, 2009)
      
      Bonding Mode: fault-tolerance (active-backup)
      Primary Slave: None
      Currently Active Slave: eth1
      MII Status: up
      MII Polling Interval (ms): 0
      Up Delay (ms): 0
      Down Delay (ms): 0
      ARP Polling Interval (ms): 1000
      ARP IP target/s (n.n.n.n form): 10.0.100.1
      
      Slave Interface: eth1
      MII Status: up
      Link Failure Count: 1
      Permanent HW addr: 00:40:05:30:ff:30
      
      Slave Interface: eth0
      MII Status: up
      Link Failure Count: 0
      Permanent HW addr: 00:13:21:be:33:e9
      Signed-off-by: NAndy Gospodarek <andy@greyhouse.net>
      Signed-off-by: NJay Vosburgh <fubar@us.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1f3c8804
  9. 24 12月, 2009 1 次提交
  10. 14 12月, 2009 1 次提交
    • E
      net: Fix userspace RTM_NEWLINK notifications. · d90a909e
      Eric W. Biederman 提交于
      I received some bug reports about userspace programs having problems
      because after RTM_NEWLINK was received they could not immediate access
      files under /proc/sys/net/ because they had not been registered yet.
      
      The original problem was trivially fixed by moving the userspace
      notification from rtnetlink_event() to the end of
      register_netdevice().
      
      When testing that change I discovered I was still getting RTM_NEWLINK
      events before I could access proc and I was also getting RTM_NEWLINK
      events after I was seeing RTM_DELLINK.  Things practically guaranteed
      to confuse userspace.
      
      After a little more investigation these extra notifications proved to
      be from the new notifiers NETDEV_POST_INIT and NETDEV_UNREGISTER_BATCH
      hitting the default case in rtnetlink_event, and triggering
      unnecessary RTM_NEWLINK messages.
      
      rtnetlink_event now explicitly handles NETDEV_UNREGISTER_BATCH and
      NETDEV_POST_INIT to avoid sending the incorrect userspace
      notifications.
      Signed-off-by: NEric W. Biederman <ebiederm@aristanetworks.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d90a909e
  11. 12 12月, 2009 1 次提交
    • K
      net: Handle NETREG_UNINITIALIZED devices correctly · e93737b0
      Krishna Kumar 提交于
      Fix two problems:
      
      1. If unregister_netdevice_many() is called with both registered
         and unregistered devices, rollback_registered_many() bails out
         when it reaches the first unregistered device. The processing
         of the prior registered devices is unfinished, and the
         remaining devices are skipped, and possible registered netdev's
         are leaked/unregistered.
      
      2. System hangs or panics depending on how the devices are passed,
         since when netdev_run_todo() runs, some devices were not fully
         processed.
      
      Tested by passing intermingled unregistered and registered vlan
      devices to unregister_netdevice_many() as follows:
      	1. dev, fake_dev1, fake_dev2: hangs in run_todo
      	   ("unregister_netdevice: waiting for eth1.100 to become
      	    free. Usage count = 1")
      	2. fake_dev1, dev, fake_dev2: failure during de-registration
      	   and next registration, followed by a vlan driver Oops
      	   during subsequent registration.
      
      Confirmed that the patch fixes both cases.
      Signed-off-by: NKrishna Kumar <krkumar2@in.ibm.com>
      Acked-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e93737b0
  12. 04 12月, 2009 2 次提交
  13. 02 12月, 2009 2 次提交
  14. 30 11月, 2009 1 次提交
  15. 27 11月, 2009 1 次提交
  16. 26 11月, 2009 1 次提交
  17. 23 11月, 2009 1 次提交
  18. 21 11月, 2009 1 次提交
  19. 18 11月, 2009 4 次提交
    • O
      d9031024
    • E
      linkwatch: linkwatch_forget_dev() to speedup device dismantle · e014debe
      Eric Dumazet 提交于
      Herbert Xu a écrit :
      > On Tue, Nov 17, 2009 at 04:26:04AM -0800, David Miller wrote:
      >> Really, the link watch stuff is just due for a redesign.  I don't
      >> think a simple hack is going to cut it this time, sorry Eric :-)
      >
      > I have no objections against any redesigns, but since the only
      > caller of linkwatch_forget_dev runs in process context with the
      > RTNL, it could also legally emit those events.
      
      Thanks guys, here an updated version then, before linkwatch surgery ?
      
      In this version, I force the event to be sent synchronously.
      
      [PATCH net-next-2.6] linkwatch: linkwatch_forget_dev() to speedup device dismantle
      
      time ip link del eth3.103 ; time ip link del eth3.104 ; time ip link del eth3.105
      
      real	0m0.266s
      user	0m0.000s
      sys	0m0.001s
      
      real	0m0.770s
      user	0m0.000s
      sys	0m0.000s
      
      real	0m1.022s
      user	0m0.000s
      sys	0m0.000s
      
      One problem of current schem in vlan dismantle phase is the
      holding of device done by following chain :
      
      vlan_dev_stop() ->
      	netif_carrier_off(dev) ->
      		linkwatch_fire_event(dev) ->
      			dev_hold() ...
      
      And __linkwatch_run_queue() runs up to one second later...
      
      A generic fix to this problem is to add a linkwatch_forget_dev() method
      to unlink the device from the list of watched devices.
      
      dev->link_watch_next becomes dev->link_watch_list (and use a bit more memory),
      to be able to unlink device in O(1).
      
      After patch :
      time ip link del eth3.103 ; time ip link del eth3.104 ; time ip link del eth3.105
      
      real    0m0.024s
      user    0m0.000s
      sys     0m0.000s
      
      real    0m0.032s
      user    0m0.000s
      sys     0m0.001s
      
      real    0m0.033s
      user    0m0.000s
      sys     0m0.000s
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e014debe
    • O
      net: introduce NETDEV_UNREGISTER_PERNET · 395264d5
      Octavian Purdila 提交于
      This new event is called once for each unique net namespace in batched
      unregister operations (with the argument set to a random device from
      that namespace) and once per device in non-batched unregister
      operations.
      
      It allows us to factorize some device unregister work such as clearing the
      routing cache.
      Signed-off-by: NOctavian Purdila <opurdila@ixiacom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      395264d5
    • E
      net: add dev_txq_stats_fold() helper · d83345ad
      Eric Dumazet 提交于
      Some drivers ndo_get_stats() method need to perform txqueue stats folding.
      
      Move folding from dev_get_stats() to a new dev_txq_stats_fold() function
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d83345ad
  20. 16 11月, 2009 3 次提交
  21. 14 11月, 2009 1 次提交
    • P
      net: allow to propagate errors through ->ndo_hard_start_xmit() · 572a9d7b
      Patrick McHardy 提交于
      Currently the ->ndo_hard_start_xmit() callbacks are only permitted to return
      one of the NETDEV_TX codes. This prevents any kind of error propagation for
      virtual devices, like queue congestion of the underlying device in case of
      layered devices, or unreachability in case of tunnels.
      
      This patches changes the NET_XMIT codes to avoid clashes with the NETDEV_TX
      codes and changes the two callers of dev_hard_start_xmit() to expect either
      errno codes, NET_XMIT codes or NETDEV_TX codes as return value.
      
      In case of qdisc_restart(), all non NETDEV_TX codes are mapped to NETDEV_TX_OK
      since no error propagation is possible when using qdiscs. In case of
      dev_queue_xmit(), the error is propagated upwards.
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      572a9d7b
  22. 12 11月, 2009 1 次提交
  23. 04 11月, 2009 1 次提交
  24. 02 11月, 2009 3 次提交
  25. 30 10月, 2009 3 次提交
  26. 29 10月, 2009 1 次提交
  27. 28 10月, 2009 2 次提交