18 Jul, 2012
1 commit
-
Signed-off-by: Jiri Pirko
Signed-off-by: David S. Miller
11 Jul, 2012
1 commit
-
In driver reload test there is a memory leak.
The structure vlan_info was not freed when the driver was removed.
It was not released since the nr_vids var is one after last vlan was removed.
The nr_vids is one, since vlan zero is added to the interface when the interface
is being set, but the vlan zero is not deleted at unregister.
Fix - delete vlan zero when we unregister the device.Signed-off-by: Amir Hanania
Acked-by: John Fastabend
Tested-by: Aaron Brown
Signed-off-by: Jeff Kirsher
Signed-off-by: David S. Miller
17 May, 2012
1 commit
11 May, 2012
1 commit
-
This reverts commit 8a83a00b0735190384a348156837918271034144.
It causes regressions for S390 devices, because it does an
unconditional DST drop on SKBs for vlans and the QETH device
needs the neighbour entry hung off the DST for certain things
on transmit.Arnd can't remember exactly why he even needed this change.
Conflicts:
drivers/net/macvlan.c
net/8021q/vlan_dev.c
net/core/dev.cSigned-off-by: David S. Miller
10 May, 2012
1 commit
-
Use the new bool function ether_addr_equal to add
some clarity and reduce the likelihood for misuse
of compare_ether_addr for sorting.Done via cocci script:
$ cat compare_ether_addr.cocci
@@
expression a,b;
@@
- !compare_ether_addr(a, b)
+ ether_addr_equal(a, b)@@
expression a,b;
@@
- compare_ether_addr(a, b)
+ !ether_addr_equal(a, b)@@
expression a,b;
@@
- !ether_addr_equal(a, b) == 0
+ ether_addr_equal(a, b)@@
expression a,b;
@@
- !ether_addr_equal(a, b) != 0
+ !ether_addr_equal(a, b)@@
expression a,b;
@@
- ether_addr_equal(a, b) == 0
+ !ether_addr_equal(a, b)@@
expression a,b;
@@
- ether_addr_equal(a, b) != 0
+ ether_addr_equal(a, b)@@
expression a,b;
@@
- !!ether_addr_equal(a, b)
+ ether_addr_equal(a, b)Signed-off-by: Joe Perches
Signed-off-by: David S. Miller
02 Apr, 2012
1 commit
-
These macros contain a hidden goto, and are thus extremely error
prone and make code hard to audit.Signed-off-by: David S. Miller
14 Dec, 2011
2 commits
-
commit 6d4cdf47d2 (vlan: add 802.1q netpoll support) forgot to declare
as static some private functions.Signed-off-by: Eric Dumazet
CC: Benjamin LaHaise
Signed-off-by: David S. Miller -
The original code generates a Sparse warning:
net/8021q/vlan_core.c:336:9:
error: incompatible types in comparison expression (different address spaces)It's ok to dereference __rcu pointers here because we are holding the
RTNL lock. I've added some calls to rtnl_dereference() to silence the
warning.Signed-off-by: Dan Carpenter
Acked-by: Eric Dumazet
Acked-by: Jiri Pirko
Signed-off-by: David S. Miller
09 Dec, 2011
5 commits
-
Add netpoll support to 802.1q vlan devices. Based on the netpoll support
in the bridging code. Tested on a forced_eth device with netconsole.Signed-off-by: Benjamin LaHaise
Signed-off-by: David S. Miller -
Introduce functions handy to copy vlan ids from one driver's list to
another.Signed-off-by: Jiri Pirko
Signed-off-by: David S. Miller -
This allows to keep track of vids needed to be in rx vlan filters of
devices even if they are used in bond/team etc.vlan_info as well as vlan_group previously was, is allocated when first
vid is added and dealocated whan last vid is deleted.vlan_group definition is moved to private header.
Signed-off-by: Jiri Pirko
Signed-off-by: David S. Miller -
This patch adds wrapper for ndo_vlan_rx_add_vid/ndo_vlan_rx_kill_vid
functions. Check for NETIF_F_HW_VLAN_FILTER feature is done in this
wrapper.Signed-off-by: Jiri Pirko
Signed-off-by: David S. Miller -
As this structure is priv, name it approprietely. Also for pointer to it
use name "vlan".Signed-off-by: Jiri Pirko
Signed-off-by: David S. Miller
04 Dec, 2011
1 commit
-
Open vSwitch needs this function for vlan handling.
Signed-off-by: Pravin B Shelar
Signed-off-by: Jesse Gross
17 Nov, 2011
2 commits
-
v2: add couple missing conversions in drivers
split unexporting netdev_fix_features()
implemented %pNF
convert sock::sk_route_(no?)capsSigned-off-by: Michał Mirosław
Signed-off-by: David S. Miller -
As all drivers are converted, we may now remove discrete offload setting
callback handling.Signed-off-by: Michał Mirosław
Acked-by: Ben Hutchings
Signed-off-by: David S. Miller
07 Nov, 2011
1 commit
-
* 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux: (230 commits)
Revert "tracing: Include module.h in define_trace.h"
irq: don't put module.h into irq.h for tracking irqgen modules.
bluetooth: macroize two small inlines to avoid module.h
ip_vs.h: fix implicit use of module_get/module_put from module.h
nf_conntrack.h: fix up fallout from implicit moduleparam.h presence
include: replace linux/module.h with "struct module" wherever possible
include: convert various register fcns to macros to avoid include chaining
crypto.h: remove unused crypto_tfm_alg_modname() inline
uwb.h: fix implicit use of asm/page.h for PAGE_SIZE
pm_runtime.h: explicitly requires notifier.h
linux/dmaengine.h: fix implicit use of bitmap.h and asm/page.h
miscdevice.h: fix up implicit use of lists and types
stop_machine.h: fix implicit use of smp.h for smp_processor_id
of: fix implicit use of errno.h in include/linux/of.h
of_platform.h: delete needless include
acpi: remove module.h include from platform/aclinux.h
miscdevice.h: delete unnecessary inclusion of module.h
device_cgroup.h: delete needless include
net: sch_generic remove redundant use of
net: inet_timewait_sock doesnt need
...Fix up trivial conflicts (other header files, and removal of the ab3550 mfd driver) in
- drivers/media/dvb/frontends/dibx000_common.c
- drivers/media/video/{mt9m111.c,ov6650.c}
- drivers/mfd/ab3550-core.c
- include/linux/dmaengine.h
02 Nov, 2011
1 commit
-
When (de)configuring a vlan interface, the IFF_ALLMULTI ans IFF_PROMISC
flags are cleared or set on the underlying interface. So, if these flags
are changed on a vlan interface that is not up, the flags underlying
interface might be set or cleared twice.Only propagating flag changes when a device is up makes sure this does
not happen. It also makes sure that an underlying device is not set to
promiscuous or allmulti mode for a vlan device that is down.Signed-off-by: Matthijs Kooijman
Signed-off-by: David S. Miller
01 Nov, 2011
2 commits
-
These files are non modular, but need to export symbols using
the macros now living in export.h -- call out the include so
that things won't break when we remove the implicit presence
of module.h from everywhere.Signed-off-by: Paul Gortmaker
-
With calls to modular infrastructure, these files really
needs the full module.h header. Call it out so some of the
cleanups of implicit and unrequired includes elsewhere can be
cleaned up.Signed-off-by: Paul Gortmaker
30 Oct, 2011
1 commit
-
commit 2425717b27eb (net: allow vlan traffic to be received under bond)
broke ARP processing on vlan on top of bonding.+-------+
eth0 --| bond0 |---bond0.103
eth1 --| |
+-------+52870.115435: skb_gro_reset_offset
Reviewed-by: Jiri Pirko
Signed-off-by: David S. Miller
16 Sep, 2011
1 commit
-
This patch does several things:
- introduces __ethtool_get_settings which is called from ethtool code and
from drivers as well. Put ASSERT_RTNL there.
- dev_ethtool_get_settings() is replaced by __ethtool_get_settings()
- changes calling in drivers so rtnl locking is respected. In
iboe_get_rate was previously ->get_settings() called unlocked. This
fixes it. Also prb_calc_retire_blk_tmo() in af_packet.c had the same
problem. Also fixed by calling __dev_get_by_index() instead of
dev_get_by_index() and holding rtnl_lock for both calls.
- introduces rtnl_lock in bnx2fc_vport_create() and fcoe_vport_create()
so bnx2fc_if_create() and fcoe_if_create() are called locked as they
are from other places.
- use __ethtool_get_settings() in bonding codeSigned-off-by: Jiri Pirko
v2->v3:
-removed dev_ethtool_get_settings()
-added ASSERT_RTNL into __ethtool_get_settings()
-prb_calc_retire_blk_tmo - use __dev_get_by_index() and lock
around it and __ethtool_get_settings() call
v1->v2:
add missing export_symbol
Reviewed-by: Ben Hutchings [except FCoE bits]
Acked-by: Ralf Baechle
Signed-off-by: David S. Miller
21 Aug, 2011
1 commit
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
18 Aug, 2011
1 commit
-
replace it by ndo_set_rx_mode
Signed-off-by: Jiri Pirko
Signed-off-by: David S. Miller
02 Aug, 2011
1 commit
-
When assigning a NULL value to an RCU protected pointer, no barrier
is needed. The rcu_assign_pointer, used to handle that but will soon
change to not handle the special case.Convert all rcu_assign_pointer of NULL value.
//smpl
@@ expression P; @@- rcu_assign_pointer(P, NULL)
+ RCU_INIT_POINTER(P, NULL)//
Signed-off-by: Stephen Hemminger
Acked-by: Paul E. McKenney
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
1 commit
-
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