08 Oct, 2011
1 commit
-
Conflicts:
net/batman-adv/soft-interface.c
07 Oct, 2011
2 commits
-
This is based on an earlier patch by Nick Carter with comments
by David Lamparter but with some refinements. Thanks for their patience
this is a confusing area with overlap of standards, user requirements,
and compatibility with earlier releases.It adds a new sysfs attribute
/sys/class/net/brX/bridge/group_fwd_mask
that controls forwarding of frames with address of: 01-80-C2-00-00-0X
The default setting has no forwarding to retain compatibility.One change from earlier releases is that forwarding of group
addresses is not dependent on STP being enabled or disabled. This
choice was made based on interpretation of tie 802.1 standards.
I expect complaints will arise because of this, but better to follow
the standard than continue acting incorrectly by default.The filtering mask is writeable, but only values that don't forward
known control frames are allowed. It intentionally blocks attempts
to filter control protocols. For example: writing a 8 allows
forwarding 802.1X PAE addresses which is the most common request.Reported-by: David Lamparter
Original-patch-by: Nick Carter
Signed-off-by: Stephen Hemminger
Tested-by: Benjamin Poirier
Signed-off-by: David S. Miller -
This resolves a regression seen by some users of bridging.
Some users use the bridge like a dummy device.
They expect to be able to put an IPv6 address on the device
with no ports attached. Although there are better ways of doing
this, there is no reason to not allow it.Note: the bridge still will reflect the state of ports in the
bridge if there are any added.Signed-off-by: Stephen Hemminger
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
06 Jul, 2011
1 commit
-
As is_multicast_ether_addr returns true on broadcast packets as
well, we need to explicitly exclude broadcast packets so that
they're always flooded. This wasn't an issue before as broadcast
packets were considered to be an unregistered multicast group,
which were always flooded. However, as we now only flood such
packets to router ports, this is no longer acceptable.Reported-by: Michael Guntsche
Signed-off-by: Herbert Xu
Signed-off-by: David S. Miller
20 Jun, 2011
1 commit
-
Otherwise we will not see the name of the slave dev in error
message:[ 388.469446] (null): doesn't support polling, aborting.
Signed-off-by: WANG Cong
Signed-off-by: David S. Miller
29 Apr, 2011
1 commit
-
Note: netdev_update_features() needs only rtnl_lock as br->port_list
is only changed while holding it.Signed-off-by: Michał Mirosław
Signed-off-by: David S. Miller
05 Apr, 2011
1 commit
-
Add netlink device ops to allow creating bridge device via netlink.
This works in a manner similar to vlan, macvlan and bonding.Example:
# ip link add link dev br0 type bridge
# ip link del dev br0The change required rearranging initializtion code to deal with
being called by create link. Most of the initialization happens
in br_dev_setup, but allocation of stats is done in ndo_init callback
to deal with allocation failure. Sysfs setup has to wait until
after the network device kobject is registered.Signed-off-by: Stephen Hemminger
Signed-off-by: David S. Miller
15 Mar, 2011
1 commit
-
This makes the bridge device behave like a physical device.
In earlier releases the bridge always asserted carrier. This
changes the behavior so that bridge device carrier is on only
if one or more ports are in the forwarding state. This
should help IPv6 autoconfiguration, DHCP, and routing daemons.I did brief testing with Network and Virt manager and they
seem fine, but since this changes behavior of bridge, it should
wait until net-next (2.6.39).Signed-off-by: Stephen Hemminger
Reviewed-by: Nicolas de Pesloüan
Tested-By: Adam Majer
Signed-off-by: David S. Miller
14 Feb, 2011
1 commit
-
add possibility to addif/delif via rtnetlink
Signed-off-by: Jiri Pirko
Signed-off-by: David S. Miller
10 Dec, 2010
1 commit
-
Use helper functions to hide all direct accesses, especially writes,
to dst_entry metrics values.This will allow us to:
1) More easily change how the metrics are stored.
2) Implement COW for metrics.
In particular this will help us put metrics into the inetpeer
cache if that is what we end up doing. We can make the _metrics
member a pointer instead of an array, initially have it point
at the read-only metrics in the FIB, and then on the first set
grab an inetpeer entry and point the _metrics member there.Signed-off-by: David S. Miller
Acked-by: Eric Dumazet
21 Oct, 2010
1 commit
-
If some of the underlying devices support it, enable vlan offload on
transmit for bridge devices. This allows senders to take advantage of the
hardware support, similar to other forms of acceleration.Signed-off-by: Jesse Gross
Signed-off-by: David S. Miller
03 Aug, 2010
1 commit
-
Conflicts:
drivers/net/e1000e/hw.h
net/bridge/br_device.c
net/bridge/br_input.c
31 Jul, 2010
1 commit
-
On the bridge TX path we're leaking an skb when br_multicast_rcv
returns an error.Reported-by: David Lamparter
Signed-off-by: Herbert Xu
Signed-off-by: David S. Miller
29 Jul, 2010
1 commit
-
Long ago, when bridge was converted to RCU, rcu lock was equivalent
to having preempt disabled. RCU has changed a lot since then and
bridge code was still assuming the since transmit was called with
bottom half disabled, it was RCU safe.Signed-off-by: Stephen Hemminger
Tested-by: Johannes Berg
Signed-off-by: David S. Miller
20 Jul, 2010
1 commit
-
The new netpoll code in bridging contains use-after-free bugs
that are non-trivial to fix.This patch fixes this by removing the code that uses skbs after
they're freed.As a consequence, this means that we can no longer call bridge
from the netpoll path, so this patch also removes the controller
function in order to disable netpoll.Signed-off-by: Herbert Xu
Thanks,
Signed-off-by: David S. Miller
08 Jul, 2010
1 commit
-
There is a small possibility that a reader gets incorrect values on 32
bit arches. SNMP applications could catch incorrect counters when a
32bit high part is changed by another stats consumer/provider.One way to solve this is to add a rtnl_link_stats64 param to all
ndo_get_stats64() methods, and also add such a parameter to
dev_get_stats().Rule is that we are not allowed to use dev->stats64 as a temporary
storage for 64bit stats, but a caller provided area (usually on stack)Old drivers (only providing get_stats() method) need no changes.
Signed-off-by: Eric Dumazet
Signed-off-by: David S. Miller
24 Jun, 2010
1 commit
-
Use u64_stats_sync infrastructure to provide 64bit rx/tx
counters even on 32bit hosts.It is safe to use a single u64_stats_sync for rx and tx,
because BH is disabled on both, and we use per_cpu data.Signed-off-by: Eric Dumazet
Signed-off-by: David S. Miller
16 Jun, 2010
2 commits
-
There are multiple problems with the newly added netpoll support:
1) Use-after-free on each netpoll packet.
2) Invoking unsafe code on netpoll/IRQ path.
3) Breaks when netpoll is enabled on the underlying device.This patch fixes all of these problems. In particular, we now
allocate proper netpoll structures for each underlying device.We only allow netpoll to be enabled on the bridge when all the
devices underneath it support netpoll. Once it is enabled, we
do not allow non-netpoll devices to join the bridge (until netpoll
is disabled again).This allows us to do away with the npinfo juggling that caused
problem number 1.Incidentally this patch fixes number 2 by bypassing unsafe code
such as multicast snooping and netfilter.Reported-by: Qianfeng Zhang
Signed-off-by: Herbert Xu
Signed-off-by: David S. Miller -
Now that netpoll always zaps npinfo we no longer need to do it
in bridge.Signed-off-by: Herbert Xu
Signed-off-by: David S. Miller
11 Jun, 2010
1 commit
-
remove useless union keyword in rtable, rt6_info and dn_route.
Since there is only one member in a union, the union keyword isn't useful.
Signed-off-by: Changli Gao
Signed-off-by: Eric Dumazet
Signed-off-by: David S. Miller
16 May, 2010
2 commits
-
Use one set of macro's for all bridge messages.
Note: can't use netdev_XXX macro's because bridge is purely
virtual and has no device parent.Signed-off-by: Stephen Hemminger
Signed-off-by: David S. Miller -
Move code around so that the ifdef for NETPOLL_CONTROLLER don't have to
show up in main code path. The control functions should be in helpers
that are only compiled if needed.Signed-off-by: Stephen Hemminger
Signed-off-by: David S. Miller
11 May, 2010
1 commit
-
Conflicts:
net/bridge/br_device.c
net/bridge/br_forward.cSigned-off-by: Patrick McHardy
06 May, 2010
1 commit
-
Based on the previous patch, make bridge support netpoll by:
1) implement the 2 methods to support netpoll for bridge;
2) modify netpoll during forwarding packets via bridge;
3) disable netpoll support of bridge when a netpoll-unabled device
is added to bridge;4) enable netpoll support when all underlying devices support netpoll.
Cc: David Miller
Cc: Neil Horman
Cc: Stephen Hemminger
Cc: Matt Mackall
Signed-off-by: WANG Cong
Signed-off-by: David S. Miller
28 Apr, 2010
1 commit
-
Use existing inline function.
Signed-off-by: Stephen Hemminger
Signed-off-by: David S. Miller
15 Apr, 2010
1 commit
-
Remove br_netfilter.c::br_nf_local_out(). The function
br_nf_local_out() was needed because the PF_BRIDGE::LOCAL_OUT hook
could be called when IP DNAT happens on to-be-bridged traffic. The
new scheme eliminates this mess.Signed-off-by: Bart De Schuymer
Signed-off-by: Patrick McHardy
17 Mar, 2010
2 commits
-
The shared packet statistics are a potential source of slow down
on bridged traffic. Convert to per-cpu array, but only keep those
statistics which change per-packet.Signed-off-by: Stephen Hemminger
Signed-off-by: Eric Dumazet
Signed-off-by: David S. Miller -
Without CONFIG_BRIDGE_IGMP_SNOOPING,
BR_INPUT_SKB_CB(skb)->mrouters_only is not appropriately
initialized, so we can see garbage.A clear option to fix this is to set it even without that
config, but we cannot optimize out the branch.Let's introduce a macro that returns value of mrouters_only
and let it return 0 without CONFIG_BRIDGE_IGMP_SNOOPING.Signed-off-by: YOSHIFUJI Hideaki
Signed-off-by: David S. Miller
28 Feb, 2010
3 commits
-
This patch finally hooks up the multicast snooping module to the
data path. In particular, all multicast packets passing through
the bridge are fed into the module and switched by it.Signed-off-by: Herbert Xu
Signed-off-by: David S. Miller -
This patch hooks up the bridge start/stop and add/delete/disable
port functions to the new multicast module.Signed-off-by: Herbert Xu
Signed-off-by: David S. Miller -
this patch makes BR_INPUT_SKB_CB available on the xmit path so
that we could avoid passing the br pointer around for the purpose
of collecting device statistics.Signed-off-by: Herbert Xu
Signed-off-by: David S. Miller
08 Oct, 2009
1 commit
-
Allow enable/disable UFO on bridge device via ethtool
Signed-off-by: Sridhar Samudrala
Signed-off-by: David S. Miller
01 Sep, 2009
1 commit
-
Signed-off-by: Stephen Hemminger
Signed-off-by: David S. Miller
06 Jul, 2009
1 commit
-
This patch is the result of an automatic spatch transformation to convert
all ndo_start_xmit() return values of 0 to NETDEV_TX_OK.Some occurences are missed by the automatic conversion, those will be
handled in a seperate patch.Signed-off-by: Patrick McHardy
Signed-off-by: David S. Miller
21 Nov, 2008
1 commit
-
This patch moves neigh_setup and hard_start_xmit into the network device ops
structure. For bisection, fix all the previously converted drivers as well.
Bonding driver took the biggest hit on this.Added a prefetch of the hard_start_xmit in the fast path to try and reduce
any impact this would have.Signed-off-by: Stephen Hemminger
Signed-off-by: David S. Miller
20 Nov, 2008
1 commit
-
Convert to net_device_ops function table.
Signed-off-by: Stephen Hemminger
Signed-off-by: David S. Miller
23 Oct, 2008
1 commit
-
My change
commit e2a6b85247aacc52d6ba0d9b37a99b8d1a3e0d83
net: Enable TSO if supported by at least one devicedidn't do what was intended because the netdev_compute_features
function was designed for conjunctions. So what happened was that
it would simply take the TSO status of the last constituent device.This patch extends it to support both conjunctions and disjunctions
under the new name of netdev_increment_features.It also adds a new function netdev_fix_features which does the
sanity checking that usually occurs upon registration. This ensures
that the computation doesn't result in an illegal combination
since this checking is absent when the change is initiated via
ethtool.The two users of netdev_compute_features have been converted.
Signed-off-by: Herbert Xu
Signed-off-by: David S. Miller
09 Sep, 2008
1 commit
-
Bridge as netdevice doesn't cross netns boundaries.
Bridge ports and bridge itself live in same netns.
Notifiers are fixed.
netns propagated from userspace socket for setup and teardown.
Signed-off-by: Alexey Dobriyan
Acked-by: Stephen Hemminger
Signed-off-by: David S. Miller
16 Aug, 2008
1 commit
-
Add more ethtool generic operations to dump the bridge offload
settings.Signed-off-by: Stephen Hemminger
Signed-off-by: David S. Miller