1. 13 2月, 2010 1 次提交
  2. 12 2月, 2010 1 次提交
  3. 11 2月, 2010 1 次提交
  4. 09 2月, 2010 1 次提交
  5. 05 2月, 2010 1 次提交
  6. 04 2月, 2010 1 次提交
  7. 26 1月, 2010 1 次提交
  8. 23 1月, 2010 1 次提交
  9. 21 1月, 2010 1 次提交
  10. 20 1月, 2010 1 次提交
  11. 18 1月, 2010 1 次提交
  12. 15 1月, 2010 1 次提交
  13. 14 1月, 2010 1 次提交
  14. 08 1月, 2010 1 次提交
  15. 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
  16. 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
  17. 24 12月, 2009 2 次提交
  18. 16 12月, 2009 1 次提交
  19. 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
  20. 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
  21. 04 12月, 2009 8 次提交
  22. 03 12月, 2009 1 次提交
  23. 02 12月, 2009 4 次提交
    • E
      net: Simplfy default_device_exit and improve batching. · e008b5fc
      Eric W. Biederman 提交于
      - Defer dellink to net_cleanup() allowing for batching.
      - Fix comment.
      - Use for_each_netdev_safe again as dev_change_net_namespace touches
        at most one network device (unlike veth dellink).
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e008b5fc
    • E
      net: Automatically allocate per namespace data. · f875bae0
      Eric W. Biederman 提交于
      To get the full benefit of batched network namespace cleanup netowrk
      device deletion needs to be performed by the generic code.  When
      using register_pernet_gen_device and freeing the data in exit_net
      it is impossible to delay allocation until after exit_net has called
      as the device uninit methods are no longer safe.
      
      To correct this, and to simplify working with per network namespace data
      I have moved allocation and deletion of per network namespace data into
      the network namespace core.  The core now frees the data only after
      all of the network namespace exit routines have run.
      
      Now it is only required to set the new fields .id and .size
      in the pernet_operations structure if you want network namespace
      data to be managed for you automatically.
      
      This makes the current register_pernet_gen_device and
      register_pernet_gen_subsys routines unnecessary.  For the moment
      I have left them as compatibility wrappers in net_namespace.h
      They will be removed once all of the users have been updated.
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f875bae0
    • E
      net: Batch network namespace destruction. · 2b035b39
      Eric W. Biederman 提交于
      It is fairly common to kill several network namespaces at once.  Either
      because they are nested one inside the other or because they are cooperating
      in multiple machine networking experiments.  As the network stack control logic
      does not parallelize easily batch up multiple network namespaces existing
      together.
      
      To get the full benefit of batching the virtual network devices to be
      removed must be all removed in one batch.  For that purpose I have added
      a loop after the last network device operations have run that batches
      up all remaining network devices and deletes them.
      
      An extra benefit is that the reorganization slightly shrinks the size
      of the per network namespace data structures replaceing a work_struct
      with a list_head.
      
      In a trivial test with 4K namespaces this change reduced the cost of
      a destroying 4K namespaces from 7+ minutes (at 12% cpu) to 44 seconds
      (at 60% cpu).  The bulk of that 44s was spent in inet_twsk_purge.
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2b035b39
    • E
      net: NETDEV_UNREGISTER_PERNET -> NETDEV_UNREGISTER_BATCH · a5ee1551
      Eric W. Biederman 提交于
      The motivation for an additional notifier in batched netdevice
      notification (rt_do_flush) only needs to be called once per batch not
      once per namespace.
      
      For further batching improvements I need a guarantee that the
      netdevices are unregistered in order allowing me to unregister an all
      of the network devices in a network namespace at the same time with
      the guarantee that the loopback device is really and truly
      unregistered last.
      
      Additionally it appears that we moved the route cache flush after
      the final synchronize_net, which seems wrong and there was no
      explanation.  So I have restored the original location of the final
      synchronize_net.
      
      Cc: Octavian Purdila <opurdila@ixiacom.com>
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a5ee1551
  24. 30 11月, 2009 1 次提交
  25. 29 11月, 2009 1 次提交
    • E
      pktgen: NUMA aware · 3291b9db
      Eric Dumazet 提交于
      pktgen threads are bound to given CPU, we can allocate memory for
      these threads in a NUMA aware way.
      
      After a pktgen session on two threads, we can check flows memory was
      allocated on right node, instead of a not related one.
      
      # grep pktgen_thread_write /proc/vmallocinfo
      0xffffc90007204000-0xffffc90007385000 1576960 pktgen_thread_write+0x3a4/0x6b0 [pktgen] pages=384 vmalloc N0=384
      0xffffc90007386000-0xffffc90007507000 1576960 pktgen_thread_write+0x3a4/0x6b0 [pktgen] pages=384 vmalloc N1=384
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3291b9db
  26. 27 11月, 2009 1 次提交
  27. 26 11月, 2009 1 次提交
  28. 25 11月, 2009 1 次提交