summaryrefslogtreecommitdiffstats
path: root/drivers/net/team/team_mode_loadbalance.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-09-05 08:04:07 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-09-05 08:04:07 +0200
commitfbc1ec2efe665c07c8c71f9f19edb018f7984107 (patch)
treee7df9dac12c640a83ce8859300e061f1f8913ecd /drivers/net/team/team_mode_loadbalance.c
parent02baff325462cc7e81241b21959c5e62e7ca575e (diff)
parentc6935931c1894ff857616ff8549b61236a19148f (diff)
downloadop-kernel-dev-fbc1ec2efe665c07c8c71f9f19edb018f7984107.zip
op-kernel-dev-fbc1ec2efe665c07c8c71f9f19edb018f7984107.tar.gz
Merge 4.8-rc5 into char-misc-next
We want the fixes in here for merging and testing. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/net/team/team_mode_loadbalance.c')
-rw-r--r--drivers/net/team/team_mode_loadbalance.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/net/team/team_mode_loadbalance.c b/drivers/net/team/team_mode_loadbalance.c
index cdb19b3..b228bea 100644
--- a/drivers/net/team/team_mode_loadbalance.c
+++ b/drivers/net/team/team_mode_loadbalance.c
@@ -14,9 +14,23 @@
#include <linux/init.h>
#include <linux/errno.h>
#include <linux/netdevice.h>
+#include <linux/etherdevice.h>
#include <linux/filter.h>
#include <linux/if_team.h>
+static rx_handler_result_t lb_receive(struct team *team, struct team_port *port,
+ struct sk_buff *skb)
+{
+ if (unlikely(skb->protocol == htons(ETH_P_SLOW))) {
+ /* LACPDU packets should go to exact delivery */
+ const unsigned char *dest = eth_hdr(skb)->h_dest;
+
+ if (is_link_local_ether_addr(dest) && dest[5] == 0x02)
+ return RX_HANDLER_EXACT;
+ }
+ return RX_HANDLER_ANOTHER;
+}
+
struct lb_priv;
typedef struct team_port *lb_select_tx_port_func_t(struct team *,
@@ -652,6 +666,7 @@ static const struct team_mode_ops lb_mode_ops = {
.port_enter = lb_port_enter,
.port_leave = lb_port_leave,
.port_disabled = lb_port_disabled,
+ .receive = lb_receive,
.transmit = lb_transmit,
};
OpenPOWER on IntegriCloud