From: Jay Vosburgh <fubar@us.ibm.com>
To: netdev@vger.kernel.org
Cc: Jeff Garzik <jgarzik@pobox.com>,
David Miller <davem@davemloft.net>,
Or Gerlitz <ogerlitz@voltaire.com>,
Jay Vosburgh <fubar@us.ibm.com>
Subject: [PATCH 1/5] net/core: add NETDEV_BONDING_FAILOVER event
Date: Fri, 13 Jun 2008 18:12:00 -0700 [thread overview]
Message-ID: <12134059253135-git-send-email-fubar@us.ibm.com> (raw)
In-Reply-To: <12134059242107-git-send-email-fubar@us.ibm.com>
From: Or Gerlitz <ogerlitz@voltaire.com>
Add NETDEV_BONDING_FAILOVER event to be used in a successive patch
by bonding to announce fail-over for the active-backup mode through the
netdev events notifier chain mechanism. Such an event can be of use for the
RDMA CM (communication manager) to let native RDMA ULPs (eg NFS-RDMA, iSER)
always be aligned with the IP stack, in the sense that they use the same
ports/links as the stack does. More usages can be done to allow monitoring
tools based on netlink events being aware to bonding fail-over.
Signed-off-by: Or Gerlitz <ogerlitz@voltaire.com>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
---
include/linux/netdevice.h | 1 +
include/linux/notifier.h | 1 +
net/core/dev.c | 6 ++++++
3 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index f27fd20..e92fc83 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -1479,6 +1479,7 @@ extern void __dev_addr_unsync(struct dev_addr_list **to, int *to_count, struct
extern void dev_set_promiscuity(struct net_device *dev, int inc);
extern void dev_set_allmulti(struct net_device *dev, int inc);
extern void netdev_state_change(struct net_device *dev);
+extern void netdev_bonding_change(struct net_device *dev);
extern void netdev_features_change(struct net_device *dev);
/* Load a device via the kmod */
extern void dev_load(struct net *net, const char *name);
diff --git a/include/linux/notifier.h b/include/linux/notifier.h
index 0ff6224..bd3d72d 100644
--- a/include/linux/notifier.h
+++ b/include/linux/notifier.h
@@ -197,6 +197,7 @@ static inline int notifier_to_errno(int ret)
#define NETDEV_GOING_DOWN 0x0009
#define NETDEV_CHANGENAME 0x000A
#define NETDEV_FEAT_CHANGE 0x000B
+#define NETDEV_BONDING_FAILOVER 0x000C
#define SYS_DOWN 0x0001 /* Notify of system down */
#define SYS_RESTART SYS_DOWN
diff --git a/net/core/dev.c b/net/core/dev.c
index 5829630..da8367c 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -960,6 +960,12 @@ void netdev_state_change(struct net_device *dev)
}
}
+void netdev_bonding_change(struct net_device *dev)
+{
+ call_netdevice_notifiers(NETDEV_BONDING_FAILOVER, dev);
+}
+EXPORT_SYMBOL(netdev_bonding_change);
+
/**
* dev_load - load a network module
* @net: the applicable net namespace
--
1.5.2.4
next prev parent reply other threads:[~2008-06-14 1:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-14 1:11 [PATCH net-next-2.6 0/5] bonding: Fixes and updates Jay Vosburgh
2008-06-14 1:12 ` Jay Vosburgh [this message]
2008-06-14 1:12 ` [PATCH 2/5] bonding: bond_change_active_slave() cleanup under active-backup Jay Vosburgh
2008-06-14 1:12 ` [PATCH 3/5] bonding: deliver netdev event for fail-over under the active-backup mode Jay Vosburgh
2008-06-14 1:12 ` [PATCH 4/5] bonding: Rework / fix multiple gratuitous ARP support Jay Vosburgh
2008-06-14 1:12 ` [PATCH 5/5] bonding: Allow setting max_bonds to zero Jay Vosburgh
2008-06-18 3:31 ` Jeff Garzik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=12134059253135-git-send-email-fubar@us.ibm.com \
--to=fubar@us.ibm.com \
--cc=davem@davemloft.net \
--cc=jgarzik@pobox.com \
--cc=netdev@vger.kernel.org \
--cc=ogerlitz@voltaire.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).