aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/netdevice.h
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2015-02-04 19:14:29 -0500
committerDavid S. Miller <davem@davemloft.net>2015-02-04 19:14:29 -0500
commitce388fff3aa446d5a4895f8a757345f53daa200a (patch)
tree93990685d6fdba0784d68bf5ca0dbf523c930bb4 /include/linux/netdevice.h
parent251c005a6403933b3405fdc15fca4355e7590b42 (diff)
parentc6215745b66a7fbeeda1a826f94dd864a2ccf654 (diff)
Merge branch 'mlx4-next'
Or Gerlitz says: ==================== Add HA and LAG support to mlx4 RoCE and SRIOV services This series takes advanges of bonding mlx4 Ethernet devices to support a model of High-Availability and Link Aggregation for more environments. The mlx4 driver reacts on netdev events generated by bonding when slave state changes happen by programming a HW V2P (Virt-to-Phys) port table. Bonding was extended to expose these state changes through netdev events. When an mlx4 interface such as the mlx4 IB/RoCE driver is subject to this policy, QPs are created over virtual ports which are mapped to one of the two physical ports. When a failure happens, the re-programming of the V2P table allows traffic to keep flowing. The mlx4 Ethernet driver interfaces are not subject to this policy and act as usual. A 2nd use-case for this model would be to add HA and Link Aggregation support to single ported mlx4 Ethernet VFs. In this case, the PF Ethernet intrfaces are bonded, all the VFs see single port devices (which is supported already today), and VF QPs are subject to V2P. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/netdevice.h')
-rw-r--r--include/linux/netdevice.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 1347ac50d2af..ce784d5018e0 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -51,6 +51,7 @@
51#include <linux/netdev_features.h> 51#include <linux/netdev_features.h>
52#include <linux/neighbour.h> 52#include <linux/neighbour.h>
53#include <uapi/linux/netdevice.h> 53#include <uapi/linux/netdevice.h>
54#include <uapi/linux/if_bonding.h>
54 55
55struct netpoll_info; 56struct netpoll_info;
56struct device; 57struct device;
@@ -2056,6 +2057,7 @@ struct pcpu_sw_netstats {
2056#define NETDEV_RESEND_IGMP 0x0016 2057#define NETDEV_RESEND_IGMP 0x0016
2057#define NETDEV_PRECHANGEMTU 0x0017 /* notify before mtu change happened */ 2058#define NETDEV_PRECHANGEMTU 0x0017 /* notify before mtu change happened */
2058#define NETDEV_CHANGEINFODATA 0x0018 2059#define NETDEV_CHANGEINFODATA 0x0018
2060#define NETDEV_BONDING_INFO 0x0019
2059 2061
2060int register_netdevice_notifier(struct notifier_block *nb); 2062int register_netdevice_notifier(struct notifier_block *nb);
2061int unregister_netdevice_notifier(struct notifier_block *nb); 2063int unregister_netdevice_notifier(struct notifier_block *nb);
@@ -3494,6 +3496,19 @@ struct sk_buff *__skb_gso_segment(struct sk_buff *skb,
3494struct sk_buff *skb_mac_gso_segment(struct sk_buff *skb, 3496struct sk_buff *skb_mac_gso_segment(struct sk_buff *skb,
3495 netdev_features_t features); 3497 netdev_features_t features);
3496 3498
3499struct netdev_bonding_info {
3500 ifslave slave;
3501 ifbond master;
3502};
3503
3504struct netdev_notifier_bonding_info {
3505 struct netdev_notifier_info info; /* must be first */
3506 struct netdev_bonding_info bonding_info;
3507};
3508
3509void netdev_bonding_info_change(struct net_device *dev,
3510 struct netdev_bonding_info *bonding_info);
3511
3497static inline 3512static inline
3498struct sk_buff *skb_gso_segment(struct sk_buff *skb, netdev_features_t features) 3513struct sk_buff *skb_gso_segment(struct sk_buff *skb, netdev_features_t features)
3499{ 3514{