Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 92a129da authored by David S. Miller's avatar David S. Miller
Browse files

Merge branch 'hsr-next'



Arvid Brodin says:

====================
net/hsr: Use list_head+rcu, better frame dispatch, etc.

This patch series is meant to improve the HSR code in several ways:

* Better code readability.
* In general, make the code structure more like the net/bridge code (HSR
  operates similarly to a bridge, but uses the HSR-specific frame headers to
  break up rings, instead of the STP protocol).
* Better handling of HSR ports' net_device features.
* Use list_head and the _rcu list traversing routines instead of array of slave
  devices.
* Make it easy to support HSR Interlink devices (for future Redbox/Quadbox
  support).
* Somewhat better throughput on non-HAVE_EFFICIENT_UNALIGNED_ACCESS archs, due
  to lesser copying of skb data.

The code has been tested in a ring together with other HSR nodes running
unchanged code, on both avr32 and x86_64. There should only be one minor change
in behaviour from a user perspective:

* Anyone using the Netlink HSR_C_GET_NODE_LIST message to dump the internal
  node database will notice that the database now also contains the self node.

All patches pass 'checkpatch.pl --ignore CAMELCASE --max-line-length=83
--strict' with only CHECKs, each of which have been deliberately left in place.

The final code passes sparse checks with no output.
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents b8125404 a718dcc5
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -4,4 +4,5 @@

obj-$(CONFIG_HSR)	+= hsr.o

hsr-y			:= hsr_main.o hsr_framereg.o hsr_device.o hsr_netlink.o
hsr-y			:= hsr_main.o hsr_framereg.o hsr_device.o \
			   hsr_netlink.o hsr_slave.o hsr_forward.o
+242 −338

File changed.

Preview size limit exceeded, changes collapsed.

+4 −8
Original line number Diff line number Diff line
/* Copyright 2011-2013 Autronica Fire and Security AS
/* Copyright 2011-2014 Autronica Fire and Security AS
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the Free
@@ -6,7 +6,7 @@
 * any later version.
 *
 * Author(s):
 *	2011-2013 Arvid Brodin, arvid.brodin@xdin.com
 *	2011-2014 Arvid Brodin, arvid.brodin@alten.se
 */

#ifndef __HSR_DEVICE_H
@@ -18,12 +18,8 @@
void hsr_dev_setup(struct net_device *dev);
int hsr_dev_finalize(struct net_device *hsr_dev, struct net_device *slave[2],
		     unsigned char multicast_spec);
void hsr_set_operstate(struct net_device *hsr_dev, struct net_device *slave1,
		       struct net_device *slave2);
void hsr_set_carrier(struct net_device *hsr_dev, struct net_device *slave1,
		     struct net_device *slave2);
void hsr_check_announce(struct net_device *hsr_dev, int old_operstate);
void hsr_check_carrier_and_operstate(struct hsr_priv *hsr);
bool is_hsr_master(struct net_device *dev);
int hsr_get_max_mtu(struct hsr_priv *hsr_priv);
int hsr_get_max_mtu(struct hsr_priv *hsr);

#endif /* __HSR_DEVICE_H */

net/hsr/hsr_forward.c

0 → 100644
+368 −0

File added.

Preview size limit exceeded, changes collapsed.

net/hsr/hsr_forward.h

0 → 100644
+20 −0
Original line number Diff line number Diff line
/* Copyright 2011-2014 Autronica Fire and Security AS
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the Free
 * Software Foundation; either version 2 of the License, or (at your option)
 * any later version.
 *
 * Author(s):
 *	2011-2014 Arvid Brodin, arvid.brodin@alten.se
 */

#ifndef __HSR_FORWARD_H
#define __HSR_FORWARD_H

#include <linux/netdevice.h>
#include "hsr_main.h"

void hsr_forward_skb(struct sk_buff *skb, struct hsr_port *port);

#endif /* __HSR_FORWARD_H */
Loading