19 Aug, 2011
1 commit
-
It's after all necessary to do reset headers here. The reason is we
cannot depend that it gets reseted in __netif_receive_skb once skb is
reinjected. For incoming vlanids without vlan_dev, vlan_do_receive()
returns false with skb != NULL and __netif_reveive_skb continues, skb is
not reinjected.This might be good material for 3.0-stable as well
Reported-by: Mike Auty
Signed-off-by: Jiri Pirko
Signed-off-by: David S. Miller
28 Jul, 2011
1 commit
-
After the last patch, We are left in a state in which only drivers calling
ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real
hardware call ether_setup for their net_devices and don't hold any state in
their skbs. There are a handful of drivers that violate this assumption of
course, and need to be fixed up. This patch identifies those drivers, and marks
them as not being able to support the safe transmission of skbs by clearning the
IFF_TX_SKB_SHARING flag in priv_flagsSigned-off-by: Neil Horman
CC: Karsten Keil
CC: "David S. Miller"
CC: Jay Vosburgh
CC: Andy Gospodarek
CC: Patrick McHardy
CC: Krzysztof Halasa
CC: "John W. Linville"
CC: Greg Kroah-Hartman
CC: Marcel Holtmann
CC: Johannes Berg
Signed-off-by: David S. Miller
22 Jul, 2011
6 commits
-
there are no users outside vlan code
Signed-off-by: Jiri Pirko
Signed-off-by: David S. Miller -
has no users so remove it
Signed-off-by: Jiri Pirko
Signed-off-by: David S. Miller -
Signed-off-by: Jiri Pirko
Signed-off-by: David S. Miller -
Signed-off-by: Jiri Pirko
Signed-off-by: David S. Miller -
Since vlan_group_get_device and vlan_group is not going to be accessible
from device drivers, introduce function which substitutes it.Signed-off-by: Jiri Pirko
Signed-off-by: David S. Miller -
Conflicts:
net/bluetooth/l2cap_core.c
18 Jul, 2011
1 commit
-
there is only one user of vlan_find_dev outside of the actual vlan code:
qlcnic uses it to iterate over some VLANs it knows.let's just make vlan_find_dev private to the VLAN code and have the
iteration in qlcnic be a bit more direct. (a few rcu dereferences less
too)Signed-off-by: David Lamparter
Cc: Patrick McHardy
Cc: Amit Kumar Salecha
Cc: Anirban Chakraborty
Cc: linux-driver@qlogic.com
Signed-off-by: David S. Miller
15 Jul, 2011
2 commits
-
There is no software fallback implemented for SCTP or FCoE checksumming,
and so it should not be passed on by software devices like bridge or bonding.For VLAN devices, this is different. First, the driver for underlying device
should be prepared to get offloaded packets even when the feature is disabled
(especially if it advertises it in vlan_features). Second, devices under
VLANs do not get replaced without tearing down the VLAN first.This fixes a mess I accidentally introduced while converting bonding to
ndo_fix_features.NETIF_F_SOFT_FEATURES are removed from BOND_VLAN_FEATURES because they
are unused as of commit 712ae51afd.Signed-off-by: Michał Mirosław
Signed-off-by: David S. Miller -
Use the fact that ORing with zero is a no-op.
Signed-off-by: Michał Mirosław
Signed-off-by: David S. Miller
06 Jul, 2011
2 commits
-
If gso/gro feature of underlying device is turned off,
then new created vlan device never can turn gso/gro on.Although underlying device don't support TSO, we still
should use software segments for vlan device.Signed-off-by: Shan Wei
Signed-off-by: David S. Miller
21 Jun, 2011
1 commit
-
Conflicts:
drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
drivers/net/wireless/rtlwifi/pci.c
net/netfilter/ipvs/ip_vs_core.c
17 Jun, 2011
2 commits
-
This patch removes the call to ndo_vlan_rx_register if the underlying
device doesn't have hardware support for VLAN.
Signed-off-by: Antoine Reversat
Signed-off-by: David S. Miller -
Unnecessary casts of void * clutter the code.
These are the remainder casts after several specific
patches to remove netdev_priv and dev_priv.Done via coccinelle script:
$ cat cast_void_pointer.cocci
@@
type T;
T *pt;
void *pv;
@@- pt = (T *)pv;
+ pt = pv;Signed-off-by: Joe Perches
Acked-by: Paul Moore
Signed-off-by: David S. Miller
12 Jun, 2011
1 commit
-
Testing of VLAN_FLAG_REORDER_HDR does not belong in vlan_untag
but rather in vlan_do_receive. Otherwise the vlan header
will not be properly put on the packet in the case of
vlan header accelleration.As we remove the check from vlan_check_reorder_header
rename it vlan_reorder_header to keep the naming clean.Fix up the skb->pkt_type early so we don't look at the packet
after adding the vlan tag, which guarantees we don't goof
and look at the wrong field.Use a simple if statement instead of a complicated switch
statement to decided that we need to increment rx_stats
for a multicast packet.Hopefully at somepoint we will just declare the case where
VLAN_FLAG_REORDER_HDR is cleared as unsupported and remove
the code. Until then this keeps it working correctly.Signed-off-by: Eric W. Biederman
Signed-off-by: Jiri Pirko
Acked-by: Changli Gao
Signed-off-by: David S. Miller
05 Jun, 2011
1 commit
03 Jun, 2011
1 commit
-
Use the current logging style.
Add #define pr_fmt and remove embedded prefix from formats.
Not converting the current pr_ uses to netdev_
because all the output here is nicely prefaced with "8021q: ".Remove __func__ use from proc registration failure message.
Signed-off-by: Joe Perches
Signed-off-by: David S. Miller
02 Jun, 2011
1 commit
-
commit 4af429d29b341bb1735f04c2fb960178ed5d52e7 (vlan: lockless
transmit path) have a typo in vlan_dev_hard_start_xmit(), using
u64_stats_update_begin() to end the stat update, it should be
u64_stats_update_end().Signed-off-by: Wei Yongjun
Reviewed-by: WANG Cong
Acked-by: Eric Dumazet
Signed-off-by: David S. Miller
27 May, 2011
1 commit
-
The below patch removes vlan_buggyright and vlan_copyright from vlan_proto_init,
so that it prints out just the fullname of vlan and the version number.before:
[ 30.438203] 802.1Q VLAN Support v1.8 Ben Greear
[ 30.441542] All bugs added by David S. Millerafter:
[ 31.513910] 802.1Q VLAN Support v1.8
Signed-off-by: Justin P. Mattock
CC: Joe Perches
CC: David S. Miller
CC: Ben Greear
Signed-off-by: David S. Miller
26 May, 2011
1 commit
-
Migrate is_vlan_dev() to if_vlan.h so that core networkig can use it
Signed-off-by: Neil Horman
CC: davem@davemloft.net
CC: bhutchings@solarflare.com
Signed-off-by: David S. Miller
13 May, 2011
1 commit
-
Fix VLAN features propagation for devices which change vlan_features.
For this to work, driver needs to make sure netdev_features_changed()
gets called after the change (it is e.g. after ndo_set_features()).Side effect is that a user might request features that will never
be enabled on a VLAN device.Signed-off-by: Michał Mirosław
Signed-off-by: David S. Miller
12 May, 2011
1 commit
-
Conflicts:
drivers/net/benet/be_main.c
11 May, 2011
1 commit
-
ip link add link eth2 eth2.103 type vlan id 103 gvrp on loose_binding on
ip link set eth2.103 up
rmmod tg3 # driver providing eth2BUG: unable to handle kernel NULL pointer dereference at (null)
IP: [] garp_request_leave+0x3e/0xc0 [garp]
PGD 11d251067 PUD 11b9e0067 PMD 0
Oops: 0000 [#1] SMP
last sysfs file: /sys/devices/virtual/net/eth2.104/ifindex
CPU 0
Modules linked in: tg3(-) 8021q garp nfsd lockd auth_rpcgss sunrpc libphy sg [last unloaded: x_tables]Pid: 11494, comm: rmmod Tainted: G W 2.6.39-rc6-00261-gfd71257-dirty #580 HP ProLiant BL460c G6
RIP: 0010:[] [] garp_request_leave+0x3e/0xc0 [garp]
RSP: 0018:ffff88007a19bae8 EFLAGS: 00010286
RAX: 0000000000000000 RBX: ffff88011b5e2000 RCX: 0000000000000002
RDX: 0000000000000000 RSI: 0000000000000175 RDI: ffffffffa0030d5b
RBP: ffff88007a19bb18 R08: 0000000000000001 R09: ffff88011bd64a00
R10: ffff88011d34ec00 R11: 0000000000000000 R12: 0000000000000002
R13: ffff88007a19bc48 R14: ffff88007a19bb88 R15: 0000000000000001
FS: 0000000000000000(0000) GS:ffff88011fc00000(0063) knlGS:00000000f77d76c0
CS: 0010 DS: 002b ES: 002b CR0: 000000008005003b
CR2: 0000000000000000 CR3: 000000011a675000 CR4: 00000000000006f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process rmmod (pid: 11494, threadinfo ffff88007a19a000, task ffff8800798595c0)
Stack:
ffff88007a19bb36 ffff88011c84b800 ffff88011b5e2000 ffff88007a19bc48
ffff88007a19bb88 0000000000000006 ffff88007a19bb38 ffffffffa003a5f6
ffff88007a19bb38 670088007a19bba8 ffff88007a19bb58 ffffffffa00397e7
Call Trace:
[] vlan_gvrp_request_leave+0x46/0x50 [8021q]
[] vlan_dev_stop+0xb7/0xc0 [8021q]
[] __dev_close_many+0x87/0xe0
[] dev_close_many+0x87/0x110
[] rollback_registered_many+0xa0/0x240
[] unregister_netdevice_many+0x19/0x60
[] vlan_device_event+0x53b/0x550 [8021q]
[] ? ip6mr_device_event+0xa8/0xd0
[] notifier_call_chain+0x53/0x80
[] __raw_notifier_call_chain+0x9/0x10
[] raw_notifier_call_chain+0x11/0x20
[] call_netdevice_notifiers+0x32/0x60
[] rollback_registered_many+0x10f/0x240
[] rollback_registered+0x2f/0x40
[] unregister_netdevice_queue+0x58/0x90
[] unregister_netdev+0x1b/0x30
[] tg3_remove_one+0x6f/0x10b [tg3]We should call vlan_gvrp_request_leave() from unregister_vlan_dev(),
not from vlan_dev_stop(), because vlan_gvrp_uninit_applicant()
is called right after unregister_netdevice_queue(). In batch mode,
unregister_netdevice_queue() doesn’t immediately call vlan_dev_stop().Signed-off-by: Eric Dumazet
Signed-off-by: David S. Miller
10 May, 2011
1 commit
-
At VLAN dismantle phase, unregister_vlan_dev() makes one
synchronize_net() call after vlan_group_set_device(grp, vlan_id, NULL).This call can be safely removed because we are calling
unregister_netdevice_queue() to queue device for deletion, and this
process needs at least one rcu grace period to complete.Signed-off-by: Eric Dumazet
Cc: Ben Greear
Cc: Patrick McHardy
Cc: Paul E. McKenney
Cc: Jesse Gross
Cc: Michał Mirosław
Acked-by: Jesse Gross
Signed-off-by: David S. Miller
18 Apr, 2011
2 commits
-
It is undesirable for the bonding driver to be poking into higher
level protocols, and notifiers provide a way to avoid that. This does
mean removing the ability to configure reptitition of gratuitous ARPs
and unsolicited NAs.Signed-off-by: Ben Hutchings
Signed-off-by: David S. Miller -
The NETDEV_NOTIFY_PEERS notifier indicates that a device moved to a
different physical link; this also applies to any VLAN devices on top
of it.Signed-off-by: Ben Hutchings
Signed-off-by: David S. Miller
13 Apr, 2011
1 commit
-
Now there are 2 paths for rx vlan frames. When rx-vlan-hw-accel is
enabled, skb is untagged by NIC, vlan_tci is set and the skb gets into
vlan code in __netif_receive_skb - vlan_hwaccel_do_receive.For non-rx-vlan-hw-accel however, tagged skb goes thru whole
__netif_receive_skb, it's untagged in ptype_base hander and reinjectedThis incosistency is fixed by this patch. Vlan untagging happens early in
__netif_receive_skb so the rest of code (ptype_all handlers, rx_handlers)
see the skb like it was untagged by hw.Signed-off-by: Jiri Pirko
v1->v2:
remove "inline" from vlan_core.c functions
Signed-off-by: David S. Miller
12 Apr, 2011
1 commit
-
Conflicts:
drivers/net/smsc911x.c
03 Apr, 2011
1 commit
-
Note: get_flags was actually broken, because it should return the
flags capped with vlan_features. This is now done implicitly by
limiting netdev->hw_features.RX checksumming offload control is (and was) broken, as there was no way
before to say whether it's done for tagged packets.Signed-off-by: Michał Mirosław
Signed-off-by: David S. Miller
31 Mar, 2011
1 commit
-
Fixes generated by 'codespell' and manually reviewed.
Signed-off-by: Lucas De Marchi
19 Mar, 2011
1 commit
-
Commit c95b819ad7 (gre: Use needed_headroom)
made gre use needed_headroom instead of hard_header_lenThis uncover a bug in vlan code.
We should make sure vlan devices take into account their
real_dev->needed_headroom or we risk a crash in ipgre_header(), because
we dont have enough room to push IP header in skb.Reported-by: Diddi Oscarsson
Signed-off-by: Eric Dumazet
Cc: Patrick McHardy
Cc: Herbert Xu
Acked-by: Herbert Xu
Signed-off-by: David S. Miller
08 Mar, 2011
1 commit
-
Add the new target ddp offload support ndo_fcoe_ddp_target().
Signed-off-by: Yi Zou
Signed-off-by: Kiran Patil
Signed-off-by: Jeff Kirsher
25 Jan, 2011
1 commit
-
Quoting Ben Hutchings: we presumably won't be defining features that
can only be enabled on 64-bit architectures.Occurences found by `grep -r` on net/, drivers/net, include/
[ Move features and vlan_features next to each other in
struct netdev, as per Eric Dumazet's suggestion -DaveM ]Signed-off-by: Michał Mirosław
Signed-off-by: David S. Miller
29 Nov, 2010
1 commit
-
Now that the vlan device is lockless and single queue do not
transfer the real num queues. This is causing a BUG_ON to occur.kernel BUG at net/8021q/vlan.c:345!
Call Trace:
[] ? fib_rules_event+0x28/0x1b0
[] notifier_call_chain+0x55/0x80
[] raw_notifier_call_chain+0x16/0x20
[] call_netdevice_notifiers+0x37/0x70
[] netdev_features_change+0x16/0x20
[] ixgbe_fcoe_enable+0xae/0x100 [ixgbe]
[] vlan_dev_fcoe_enable+0x2a/0x30 [8021q]
[] fcoe_create+0x163/0x630 [fcoe]
[] ? mmap_region+0x255/0x5a0
[] param_attr_store+0x50/0x80
[] module_attr_store+0x26/0x30
[] sysfs_write_file+0xf2/0x180
[] vfs_write+0xc8/0x190
[] sys_write+0x51/0x90
[] system_call_fastpath+0x16/0x1bSigned-off-by: John Fastabend
Signed-off-by: David S. Miller
17 Nov, 2010
2 commits
-
Now vlan are lockless, we dont need special ndo_select_queue() logic.
dev_pick_tx() will do the multiqueue stuff on the real device transmit.Suggested-by: Jesse Gross
Signed-off-by: Eric Dumazet
Acked-by: Patrick McHardy
Signed-off-by: David S. Miller -
vlan is a stacked device, like tunnels. We should use the lockless
mechanism we are using in tunnels and loopback.This patch completely removes locking in TX path.
tx stat counters are added into existing percpu stat structure, renamed
from vlan_rx_stats to vlan_pcpu_stats.Note : this partially reverts commit 2e59af3dcbdf (vlan: multiqueue vlan
device)Signed-off-by: Eric Dumazet
Cc: Patrick McHardy
Signed-off-by: David S. Miller
16 Nov, 2010
2 commits
-
net/8021q/vlanproc.c: In function 'vlandev_seq_show':
net/8021q/vlanproc.c:283:20: warning: unused variable 'fmt'Signed-off-by: David S. Miller
-
Now that VLAN packets are tagged in dev_hard_start_xmit()
at the bottom of the stack we no longer need to tag them
in the 8021Q module (Except in the !VLAN_FLAG_REORDER_HDR
case).This allows the accel path and non accel paths to be consolidated.
Here the vlan_tci in the skb is always set and we allow the
stack to add the actual tag in dev_hard_start_xmit().Signed-off-by: John Fastabend
Acked-by: Jesse Gross
Signed-off-by: David S. Miller