1. 11 10月, 2007 7 次提交
    • J
      [NET]: Introduce and use print_mac() and DECLARE_MAC_BUF() · 0795af57
      Joe Perches 提交于
      This is nicer than the MAC_FMT stuff.
      Signed-off-by: NJoe Perches <joe@perches.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0795af57
    • J
      [ETHTOOL] Provide default behaviors for a few ethtool sub-ioctls · 88d3aafd
      Jeff Garzik 提交于
      For the operations
      	get-tx-csum
      	get-sg
      	get-tso
      	get-ufo
      the default ethtool_op_xxx behavior is fine for all drivers, so we
      permit op==NULL to imply the default behavior.
      
      This provides a more uniform behavior across all drivers, eliminating
      ethtool(8) "ioctl not supported" errors on older drivers that had
      not been updated for the latest sub-ioctls.
      
      The ethtool_op_xxx() functions are left exported, in case anyone
      wishes to call them directly from a driver-private implementation --
      a not-uncommon case.  Should an ethtool_op_xxx() helper remain unused
      for a while, except by net/core/ethtool.c, we can un-export it at a
      later date.
      
      [ Resolved conflicts with set/get value ethtool patch... -DaveM ]
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      88d3aafd
    • R
      [NET]: Nuke SET_MODULE_OWNER macro. · 10d024c1
      Ralf Baechle 提交于
      It's been a useless no-op for long enough in 2.6 so I figured it's time to
      remove it.  The number of people that could object because they're
      maintaining unified 2.4 and 2.6 drivers is probably rather small.
      
      [ Handled drivers added by netdev tree and some missed IRDA cases... -DaveM ]
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      10d024c1
    • E
      [NET]: Make the device list and device lookups per namespace. · 881d966b
      Eric W. Biederman 提交于
      This patch makes most of the generic device layer network
      namespace safe.  This patch makes dev_base_head a
      network namespace variable, and then it picks up
      a few associated variables.  The functions:
      dev_getbyhwaddr
      dev_getfirsthwbytype
      dev_get_by_flags
      dev_get_by_name
      __dev_get_by_name
      dev_get_by_index
      __dev_get_by_index
      dev_ioctl
      dev_ethtool
      dev_load
      wireless_process_ioctl
      
      were modified to take a network namespace argument, and
      deal with it.
      
      vlan_ioctl_set and brioctl_set were modified so their
      hooks will receive a network namespace argument.
      
      So basically anthing in the core of the network stack that was
      affected to by the change of dev_base was modified to handle
      multiple network namespaces.  The rest of the network stack was
      simply modified to explicitly use &init_net the initial network
      namespace.  This can be fixed when those components of the network
      stack are modified to handle multiple network namespaces.
      
      For now the ifindex generator is left global.
      
      Fundametally ifindex numbers are per namespace, or else
      we will have corner case problems with migration when
      we get that far.
      
      At the same time there are assumptions in the network stack
      that the ifindex of a network device won't change.  Making
      the ifindex number global seems a good compromise until
      the network stack can cope with ifindex changes when
      you change namespaces, and the like.
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      881d966b
    • E
      [NET]: Make device event notification network namespace safe · e9dc8653
      Eric W. Biederman 提交于
      Every user of the network device notifiers is either a protocol
      stack or a pseudo device.  If a protocol stack that does not have
      support for multiple network namespaces receives an event for a
      device that is not in the initial network namespace it quite possibly
      can get confused and do the wrong thing.
      
      To avoid problems until all of the protocol stacks are converted
      this patch modifies all netdev event handlers to ignore events on
      devices that are not in the initial network namespace.
      
      As the rest of the code is made network namespace aware these
      checks can be removed.
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e9dc8653
    • E
      [NET]: Make packet reception network namespace safe · e730c155
      Eric W. Biederman 提交于
      This patch modifies every packet receive function
      registered with dev_add_pack() to drop packets if they
      are not from the initial network namespace.
      
      This should ensure that the various network stacks do
      not receive packets in a anything but the initial network
      namespace until the code has been converted and is ready
      for them.
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e730c155
    • E
      [NET]: Make /proc/net per network namespace · 457c4cbc
      Eric W. Biederman 提交于
      This patch makes /proc/net per network namespace.  It modifies the global
      variables proc_net and proc_net_stat to be per network namespace.
      The proc_net file helpers are modified to take a network namespace argument,
      and all of their callers are fixed to pass &init_net for that argument.
      This ensures that all of the /proc/net files are only visible and
      usable in the initial network namespace until the code behind them
      has been updated to be handle multiple network namespaces.
      
      Making /proc/net per namespace is necessary as at least some files
      in /proc/net depend upon the set of network devices which is per
      network namespace, and even more files in /proc/net have contents
      that are relevant to a single network namespace.
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      457c4cbc
  2. 14 8月, 2007 1 次提交
  3. 01 8月, 2007 1 次提交
    • M
      [NET]: ethtool ops are the only way · 61a44b9c
      Matthew Wilcox 提交于
      During the transition to the ethtool_ops way of doing things, we supported
      calling the device's ->do_ioctl method to allow unconverted drivers to
      continue working.  Those days are long behind us, all in-tree drivers
      use the ethtool_ops way, and so we no longer need to support this.
      
      The bonding driver is the biggest beneficiary of this; it no longer
      needs to call ioctl() as a fallback if ethtool_ops aren't supported.
      
      Also put a proper copyright statement on ethtool.c.
      Signed-off-by: NMatthew Wilcox <matthew@wil.cx>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      61a44b9c
  4. 11 7月, 2007 2 次提交
    • A
      bonding/bond_main.c: make 2 functions static · 4ad072c9
      Adrian Bunk 提交于
      Signed-off-by: NAdrian Bunk <bunk@stusta.de>
      Cc: Chad Tindel <ctindel@users.sourceforge.net>
      Cc: Jay Vosburgh <fubar@us.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      4ad072c9
    • J
      bonding / ipv6: no addrconf for slaves separately from master · c2edacf8
      Jay Vosburgh 提交于
      	At present, when a device is enslaved to bonding, if ipv6 is
      active then addrconf will be initated on the slave (because it is closed
      then opened during the enslavement processing).  This causes DAD and RS
      packets to be sent from the slave.  These packets in turn can confuse
      switches that perform ipv6 snooping, causing them to incorrectly update
      their forwarding tables (if, e.g., the slave being added is an inactve
      backup that won't be used right away) and direct traffic away from the
      active slave to a backup slave (where the incoming packets will be
      dropped).
      
      	This patch alters the behavior so that addrconf will only run on
      the master device itself.  I believe this is logically correct, as it
      prevents slaves from having an IPv6 identity independent from the
      master.  This is consistent with the IPv4 behavior for bonding.
      
      	This is accomplished by (a) having bonding set IFF_SLAVE sooner
      in the enslavement processing than currently occurs (before open, not
      after), and (b) having ipv6 addrconf ignore UP and CHANGE events on
      slave devices.
      
      	The eql driver also uses the IFF_SLAVE flag.  I inspected eql,
      and I believe this change is reasonable for its usage of IFF_SLAVE, but
      I did not test it.
      Signed-off-by: NJay Vosburgh <fubar@us.ibm.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      c2edacf8
  5. 21 6月, 2007 1 次提交
    • J
      bonding: Fix use after free in unregister path · 3201e656
      Jay Vosburgh 提交于
      	The following patch (based on a patch from Stephen Hemminger
      <shemminger@linux-foundation.org>) removes use after free conditions in
      the unregister path for the bonding master.  Without this patch, an
      operation of the form "echo -bond0 > /sys/class/net/bonding_masters"
      would trigger a NULL pointer dereference in sysfs.  I was not able to
      induce the failure with the non-sysfs code path, but for consistency I
      updated that code as well.
      
      	I also did some testing of the bonding /proc file being open
      while the bond is being deleted, and didn't see any problems there.
      Signed-off-by: NJay Vosburgh <fubar@us.ibm.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      3201e656
  6. 09 5月, 2007 1 次提交
  7. 29 4月, 2007 1 次提交
  8. 26 4月, 2007 3 次提交
  9. 06 3月, 2007 3 次提交
    • J
      bonding: Improve IGMP join processing · a816c7c7
      Jay Vosburgh 提交于
      	In active-backup mode, the current bonding code duplicates IGMP
      traffic to all slaves, so that switches are up to date in case of a
      failover from an active to a backup interface.  If bonding then fails
      back to the original active interface, it is likely that the "active
      slave" switch's IGMP forwarding for the port will be out of date until
      some event occurs to refresh the switch (e.g., a membership query).
      
      	This patch alters the behavior of bonding to no longer flood
      IGMP to all ports, and to issue IGMP JOINs to the newly active port at
      the time of a failover.  This insures that switches are kept up to date
      for all cases.
      
      	"GOELLESCH Niels" <niels.goellesch@eurocontrol.int> originally
      reported this problem, and included a patch.  His original patch was
      modified by Jay Vosburgh to additionally remove the existing IGMP flood
      behavior, use RCU, streamline code paths, fix trailing white space, and
      adjust for style.
      Signed-off-by: NJay Vosburgh <fubar@us.ibm.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      a816c7c7
    • J
      bonding: only receive ARPs for us · e245cb71
      Jay Vosburgh 提交于
      	The ARP validation code only needs ARPs for the bonding device.
      Signed-off-by: NJay Vosburgh <fubar@us.ibm.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      e245cb71
    • J
      bonding: fix double dev_add_pack · c4f283b1
      Jay Vosburgh 提交于
      	Bonding can erroneously register the same packet_type to receive
      ARPs (for use by ARP validation): once at device open time, and once via
      sysfs.  Since sysfs can change the validate setting (and thus register
      or unregister) at any time, a flag is needed to synchronize with device
      open in order to avoid double registrations, and the simplest place is
      within the packet_type structure itself.  Double unregister is not an
      issue.
      
      	Bug reported by Ulrich Oelmann <ulrich.oelmann@web.de>.
      Signed-off-by: NJay Vosburgh <fubar@us.ibm.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      c4f283b1
  10. 03 3月, 2007 1 次提交
  11. 15 2月, 2007 1 次提交
    • T
      [PATCH] remove many unneeded #includes of sched.h · cd354f1a
      Tim Schmielau 提交于
      After Al Viro (finally) succeeded in removing the sched.h #include in module.h
      recently, it makes sense again to remove other superfluous sched.h includes.
      There are quite a lot of files which include it but don't actually need
      anything defined in there.  Presumably these includes were once needed for
      macros that used to live in sched.h, but moved to other header files in the
      course of cleaning it up.
      
      To ease the pain, this time I did not fiddle with any header files and only
      removed #includes from .c-files, which tend to cause less trouble.
      
      Compile tested against 2.6.20-rc2 and 2.6.20-rc2-mm2 (with offsets) on alpha,
      arm, i386, ia64, mips, powerpc, and x86_64 with allnoconfig, defconfig,
      allmodconfig, and allyesconfig as well as a few randconfigs on x86_64 and all
      configs in arch/arm/configs on arm.  I also checked that no new warnings were
      introduced by the patch (actually, some warnings are removed that were emitted
      by unnecessarily included header files).
      Signed-off-by: NTim Schmielau <tim@physik3.uni-rostock.de>
      Acked-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      cd354f1a
  12. 13 2月, 2007 1 次提交
  13. 09 2月, 2007 1 次提交
  14. 06 2月, 2007 2 次提交
  15. 05 12月, 2006 1 次提交
  16. 30 11月, 2006 1 次提交
  17. 11 11月, 2006 1 次提交
  18. 29 9月, 2006 1 次提交
  19. 26 9月, 2006 7 次提交
  20. 14 9月, 2006 1 次提交
  21. 01 7月, 2006 1 次提交
  22. 18 6月, 2006 1 次提交