23 May, 2008
1 commit
-
Herbert Xu points out that the use of seperate feature bits for features
to be propagated to VLAN devices is going to get messy real soon.
Replace the VLAN feature bits by a bitmask of feature flags to be
propagated and restore the old GSO_SHIFT/MASK values.Signed-off-by: Patrick McHardy
Acked-by: Herbert Xu
Signed-off-by: David S. Miller
21 May, 2008
2 commits
-
Propagate feature bits from the NETDEV_FEAT_CHANGE notifier. For now
only TSO is propagated for devices that announce their ability to
support TSO in combination with VLAN accel by setting the NETIF_F_VLAN_TSO
flag.Signed-off-by: Patrick McHardy
Signed-off-by: David S. Miller -
Commit 30688a9 ([VLAN]: Handle vlan devices net namespace changing)
changed the device notifier to special-case notifications for VLAN
devices, effectively disabling state propagation to underlying VLAN
devices. This is needed for layered VLANs though, so restore the
original behaviour.Signed-off-by: Patrick McHardy
Acked-by: Pavel Emelyanov
Signed-off-by: David S. Miller
02 May, 2008
1 commit
-
Simply replace proc_create and further data assigned with proc_create_data.
Signed-off-by: Denis V. Lunev
Acked-by: Patrick McHardy
Signed-off-by: David S. Miller
16 Apr, 2008
8 commits
-
When van device is moved to another namespace proc files,
related to this device, should also change one.Use the netdev REGISTER and UNREGISTER event handlers for this.
Signed-off-by: Pavel Emelyanov
Acked-by: Patrick McHardy
Signed-off-by: David S. Miller -
This one is similar to what I've done for TUN - set the proper
net after device allocation and clean VLANs on net exit (use the
rtnl_kill_links helper finally).Plus, drop explicit init_net usage and net != &init_net checks.
Signed-off-by: Pavel Emelyanov
Acked-by: Patrick McHardy
Signed-off-by: David S. Miller -
This includes moving one on the struct vlan_net and
s/vlan_name_type/vn->name_type/ over the code.Signed-off-by: Pavel Emelyanov
Acked-by: Patrick McHardy
Signed-off-by: David S. Miller -
It is created in a proper net, so make is show info, related
to this particular net.Signed-off-by: Pavel Emelyanov
Acked-by: Patrick McHardy
Signed-off-by: David S. Miller -
The proc_vlan_dir and proc_vlan_conf migrate on the struct
vlan_net and their creation uses the struct net.The devices' entries use the corresponding device's net.
Signed-off-by: Pavel Emelyanov
Acked-by: Patrick McHardy
Signed-off-by: David S. Miller -
All proc files will be created in each net, so prepare them for
this change now, not to mess it with real creation patch.The net != &init_net checks in them are for git-bisect sanity,
but I will drop them soon.Signed-off-by: Pavel Emelyanov
Acked-by: Patrick McHardy
Signed-off-by: David S. Miller -
Unlike TUN, it is empty from the very beginning, and will
be eventually populated later.Signed-off-by: Pavel Emelyanov
Acked-by: Patrick McHardy
Signed-off-by: David S. Miller -
Currently vlan group is searched using one key - the ifindex.
We'll have to lookup the vlan_group by two keys - ifindex and
net. Turning the vlan_group lookup key to struct net_device
pointer will make this process easier.Besides, this will eliminate one more place in the networking,
that assumes that indexes are unique in the kernel.Signed-off-by: Pavel Emelyanov
Acked-by: Patrick McHardy
Signed-off-by: David S. Miller
14 Apr, 2008
1 commit
-
Conflicts:
drivers/net/ehea/ehea_main.c
drivers/net/wireless/iwlwifi/Kconfig
drivers/net/wireless/rt2x00/rt61pci.c
net/ipv4/inet_timewait_sock.c
net/ipv6/raw.c
net/mac80211/ieee80211_sta.c
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
03 Apr, 2008
1 commit
-
Conflicts:
drivers/net/s2io.c
02 Apr, 2008
1 commit
-
This may lead to situations, when each of two proc entries produce
data for the other's device.Looks like a BUG, so this patch is for net-2.6. It will not apply to
net-2.6.26 since dev->nd_net access is replaced with dev_net(dev)
one.Signed-off-by: Pavel Emelyanov
Signed-off-by: David S. Miller
28 Mar, 2008
1 commit
-
Conflicts:
drivers/net/usb/rndis_host.c
drivers/net/wireless/b43/dma.c
net/ipv6/ndisc.c
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
26 Mar, 2008
2 commits
-
Changing these flags requires to use dev_set_allmulti/dev_set_promiscuity
or dev_change_flags. Setting it directly causes two unwanted effects:- the next dev_change_flags call will notice a difference between
dev->gflags and the actual flags, enable promisc/allmulti
mode and incorrectly update dev->gflags- this keeps the underlying device in promisc/allmulti mode until
the VLAN device is deletedSigned-off-by: Patrick McHardy
Signed-off-by: David S. Miller -
Introduce per-net_device inlines: dev_net(), dev_net_set().
Without CONFIG_NET_NS, no namespace other than &init_net exists.
Let's explicitly define them to help compiler optimizations.Signed-off-by: YOSHIFUJI Hideaki
18 Mar, 2008
2 commits
-
Conflicts:
drivers/net/wireless/rt2x00/rt2x00dev.c
net/8021q/vlan_dev.c -
Signed-off-by: Al Viro
Signed-off-by: David S. Miller
06 Mar, 2008
1 commit
-
__FUNCTION__ is gcc-specific, use __func__
Signed-off-by: Harvey Harrison
Signed-off-by: David S. Miller
29 Feb, 2008
1 commit
-
Use proc_create() to make sure that ->proc_fops be setup before gluing
PDE to main tree.Signed-off-by: Wang Chen
Signed-off-by: David S. Miller
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
18 Feb, 2008
1 commit
-
Remove direct use of MAC_FMT
Signed-off-by: Joe Perches
Signed-off-by: David S. Miller
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
29 Jan, 2008
13 commits
-
Minor sparse warning fix.
Signed-off-by: Stephen Hemminger
Signed-off-by: David S. Miller -
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 -
- remove three instances of identical code
- remove unnecessary NULL initialization
- remove obvious and unnecessary commentsSigned-off-by: Patrick McHardy
Signed-off-by: David S. Miller -
VLAN related mail should go to netdev.
Signed-off-by: Patrick McHardy
Signed-off-by: David S. Miller -
Checkpatch cleanups, consisting mainly of overly long lines and
missing spaces.Signed-off-by: Patrick McHardy
Signed-off-by: David S. Miller -
Signed-off-by: Patrick McHardy
Signed-off-by: David S. Miller -
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 -
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 -
- 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 thereSigned-off-by: Patrick McHardy
Signed-off-by: David S. Miller -
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 -
- 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 callerSigned-off-by: Patrick McHardy
Signed-off-by: David S. Miller -
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 -
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