1. 08 7月, 2008 3 次提交
  2. 06 7月, 2008 3 次提交
  3. 23 5月, 2008 1 次提交
  4. 21 5月, 2008 2 次提交
  5. 16 4月, 2008 6 次提交
  6. 02 4月, 2008 1 次提交
  7. 27 3月, 2008 1 次提交
    • P
      [VLAN]: Reduce memory consumed by vlan_groups · 67727184
      Pavel Emelyanov 提交于
      Currently each vlan_groupd contains 8 pointers on arrays with 512
      pointers on struct net_device each  :)  Such a construction "in many
      cases ... wastes memory".
      
      My proposal is to allow for some of these arrays pointers be NULL,
      meaning that there are no devices in it. When a new device is added
      to the vlan_group, the appropriate array is allocated.
      
      The check in vlan_group_get_device's is safe, since the pointer
      vg->vlan_devices_arrays[x] can only switch from NULL to not-NULL.
      The vlan_group_prealloc_vid() is guarded with rtnl lock and is
      also safe.
      
      I've checked (I hope that) all the places, that use these arrays
      and found, that the register_vlan_dev is the only place, that can
      put a vlan device on an empty vlan_group.
      
      Rough calculations shows, that after the patch a setup with a
      single vlan dev (or up to 512 vlans with sequential vids) will
      occupy approximately 8 times less memory.
      
      The question I have is - does this patch makes sense, or a totally
      new structures are required to store the vlan_devs?
      Signed-off-by: NPavel Emelyanov <xemul@openvz.org>
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      67727184
  8. 26 3月, 2008 1 次提交
  9. 29 1月, 2008 11 次提交
  10. 11 1月, 2008 1 次提交
  11. 11 12月, 2007 1 次提交
  12. 07 12月, 2007 1 次提交
  13. 11 11月, 2007 2 次提交
  14. 07 11月, 2007 1 次提交
    • P
      [VLAN]: Fix SET_VLAN_INGRESS_PRIORITY_CMD ioctl · fffe470a
      Patrick McHardy 提交于
      Based on report and patch by Doug Kehn <rdkehn@yahoo.com>:
      
      vconfig returns the following error when attempting to execute the
      set_ingress_map command:
      
      vconfig: socket or ioctl error for set_ingress_map: Operation not permitted
      
      In vlan.c, vlan_ioctl_handler for SET_VLAN_INGRESS_PRIORITY_CMD
      sets err = -EPERM and calls vlan_dev_set_ingress_priority.
      vlan_dev_set_ingress_priority is a void function so err remains
      at -EPERM and results in the vconfig error (even though the ingress
      map was set).
      
      Fix by setting err = 0 after the vlan_dev_set_ingress_priority call.
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fffe470a
  15. 11 10月, 2007 5 次提交
    • U
      [8021Q]: transfer dev_id from real device · 3607c446
      Ursula Braun 提交于
      A net_device struct provides field dev_id. It is used for
      unique ipv6 generation in case of shared network cards
      (as for the OSA network cards of IBM System z).
      If VLAN devices are built on top of such shared network cards,
      this dev_id information needs to be transferred to the VLAN device.
      Signed-off-by: NUrsula Braun <braunu@de.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3607c446
    • S
      [NET]: Move hardware header operations out of netdevice. · 3b04ddde
      Stephen Hemminger 提交于
      Since hardware header operations are part of the protocol class
      not the device instance, make them into a separate object and
      save memory.
      Signed-off-by: NStephen Hemminger <shemminger@linux-foundation.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3b04ddde
    • 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