23 May, 2008

1 commit


21 May, 2008

2 commits


02 May, 2008

1 commit


16 Apr, 2008

8 commits


14 Apr, 2008

1 commit


05 Apr, 2008

1 commit

  • These entries are allocated in vlan_dev_set_egress_priority,
    but are never released and leaks on vlan device removal.

    Drop these in vlan's ->uninit callback - after the device is
    brought down and everyone is notified about it is going to
    be unregistered.

    Found during testing vlan netnsization patchset.

    Signed-off-by: Pavel Emelyanov
    Acked-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Pavel Emelyanov
     

03 Apr, 2008

1 commit


02 Apr, 2008

1 commit


28 Mar, 2008

1 commit


27 Mar, 2008

1 commit

  • 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: Pavel Emelyanov
    Signed-off-by: Patrick McHardy

    Pavel Emelyanov
     

26 Mar, 2008

2 commits


18 Mar, 2008

2 commits


06 Mar, 2008

1 commit


29 Feb, 2008

1 commit


24 Feb, 2008

1 commit

  • MAC_FMT had only one user and we tried to get rid of
    that, but this created more problems than it solved.

    As a result, this reverts three commits:

    235365f3aaaa10b7056293877c0ead50425f25c7 ("net/8021q/vlan_dev.c: Use
    print_mac."), fea5fa875eb235dc186b1f5184eb36abc63e26cc ("[NET]: Remove
    MAC_FMT"), and 8f789c48448aed74fe1c07af76de8f04adacec7d ("[NET]:
    Elminate spurious print_mac() calls.")

    Signed-off-by: David S. Miller

    David S. Miller
     

18 Feb, 2008

1 commit


01 Feb, 2008

1 commit

  • Reuse the existing logic for multicast list synchronization for the
    unicast address list. The core of dev_mc_sync/unsync are split out as
    __dev_addr_sync/unsync and moved from dev_mcast.c to dev.c. These are
    then used to implement dev_unicast_sync/unsync as well.

    I'm working on cleaning up Intel's FCoE stack, which generates new MAC
    addresses from the fibre channel device id assigned by the fabric as
    per the current draft specification in T11. When using such a
    protocol in a VLAN environment it would be nice to not always be
    forced into promiscuous mode, assuming the underlying Ethernet driver
    supports multiple unicast addresses as well.

    Signed-off-by: Chris Leech
    Signed-off-by: Patrick McHardy

    Chris Leech
     

29 Jan, 2008

13 commits

  • Minor sparse warning fix.

    Signed-off-by: Stephen Hemminger
    Signed-off-by: David S. Miller

    Stephen Hemminger
     
  • I think, that we can make this code flow easier to understand
    by introducing the vlan_set_encap_proto() function (I hope the
    name is good) to setup the skb proto and merge the paths calling
    netif_rx() together.

    [Patrick: Modified to apply on top of my previous patches]

    Signed-off-by: Pavel Emelyanov
    Signed-off-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Pavel Emelyanov
     
  • - remove three instances of identical code
    - remove unnecessary NULL initialization
    - remove obvious and unnecessary comments

    Signed-off-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Patrick McHardy
     
  • VLAN related mail should go to netdev.

    Signed-off-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Patrick McHardy
     
  • Checkpatch cleanups, consisting mainly of overly long lines and
    missing spaces.

    Signed-off-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Patrick McHardy
     
  • Signed-off-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Patrick McHardy
     
  • Keep track of the number of VLAN devices in a vlan group. This allows
    to have the caller sense when the group is going to be destroyed and
    stop using it, which in turn allows to remove the wrapper around
    unregister_vlan_dev for the NETDEV_UNREGISTER notifier and avoid
    iterating over all possible VLAN ids whenever a device in unregistered.

    Also fix what looks like a use-after-free (but is actually safe since
    we're holding the RTNL), the real_dev reference should not be dropped
    while we still use it.

    Signed-off-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Patrick McHardy
     
  • Save two levels of indentation by aborting on error conditions,
    remove unnecessary initialization to NULL and remove two obvious
    comments.

    Signed-off-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Patrick McHardy
     
  • - move module init/exit functions to end of file, remove some now unnecessary
    forward declarations
    - remove some obvious comments
    - clean up proc init function and move a proc-related printk there

    Signed-off-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Patrick McHardy
     
  • The GET_VLAN_INGRESS_PRIORITY_CMD/GET_VLAN_EGRESS_PRIORITY_CMD ioctls are
    not implemented and won't be, new functionality will be added to the netlink
    interface. Remove the code and make the ioctl handler return -EOPNOTSUPP
    for unknown commands instead of -EINVAL.

    Also remove a comment about passing unknown commands to the underlying
    device, that doesn't make any sense since its a VLAN specific ioctl and
    if its not implemented here, its implemented nowhere.

    Signed-off-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Patrick McHardy
     
  • - use pr_* functions and common prefix for non-device related messages

    - remove VLAN_ printk levels

    - kill lots of useless debugging statements

    - remove a few unnecessary printks like for double VID registration (already
    returns -EEXIST) and kill of a number of unnecessary checks in
    vlan_proc_{add,rem}_dev() that are already performed by the caller

    Signed-off-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Patrick McHardy
     
  • vlan->real_dev is always equal to the device since thats what we used
    for the lookup. It doesn't even seem worth a WARN_ON or BUG_ON.

    Signed-off-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Patrick McHardy
     
  • Move device setup to vlan_dev.c and make all the VLAN device methods
    static.

    Signed-off-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Patrick McHardy