aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJohn Fastabend <john.r.fastabend@intel.com>2011-06-21 03:34:37 -0400
committerDavid S. Miller <davem@davemloft.net>2011-06-21 19:06:11 -0400
commit314b4778ed579f29b6d46ba90dbf31314c13805f (patch)
tree116b9424343f8261cacfa055e43455b588ce2893 /include
parentc7797baf9f3900996ca800ab6298f95957bb4606 (diff)
net: dcbnl, add multicast group for DCB
Now that dcbnl is being used in many cases by more than a single agent it is beneficial to be notified when some entity either driver or user space has changed the DCB attributes. Today applications either end up polling the interface or relying on a user space database to maintain the DCB state and post events. Polling is a poor solution for obvious reasons. And relying on a user space database has its own downside. Namely it has created strange boot dependencies requiring the database be populated before any applications dependent on DCB attributes starts or the application goes into a polling loop. Populating the database requires negotiating link setting with the peer and can take anywhere from less than a second up to a few seconds depending on the switch implementation. Perhaps more importantly if another application or an embedded agent sets a DCB link attribute the database has no way of knowing other than polling the kernel. This prevents applications from responding quickly to changes in link events which at least in the FCoE case and probably any other protocols expecting a lossless link may result in IO errors. By adding a multicast group for DCB we have clean way to disseminate kernel DCB link attributes up to user space. Avoiding the need for user space to maintain a coherant database and disperse events that potentially do not reflect the current link state. Signed-off-by: John Fastabend <john.r.fastabend@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/linux/rtnetlink.h2
-rw-r--r--include/net/dcbnl.h2
2 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h
index bbad657a372..c81226a9a35 100644
--- a/include/linux/rtnetlink.h
+++ b/include/linux/rtnetlink.h
@@ -585,6 +585,8 @@ enum rtnetlink_groups {
585#define RTNLGRP_PHONET_IFADDR RTNLGRP_PHONET_IFADDR 585#define RTNLGRP_PHONET_IFADDR RTNLGRP_PHONET_IFADDR
586 RTNLGRP_PHONET_ROUTE, 586 RTNLGRP_PHONET_ROUTE,
587#define RTNLGRP_PHONET_ROUTE RTNLGRP_PHONET_ROUTE 587#define RTNLGRP_PHONET_ROUTE RTNLGRP_PHONET_ROUTE
588 RTNLGRP_DCB,
589#define RTNLGRP_DCB RTNLGRP_DCB
588 __RTNLGRP_MAX 590 __RTNLGRP_MAX
589}; 591};
590#define RTNLGRP_MAX (__RTNLGRP_MAX - 1) 592#define RTNLGRP_MAX (__RTNLGRP_MAX - 1)
diff --git a/include/net/dcbnl.h b/include/net/dcbnl.h
index e5983c9053d..b3cf10d9b82 100644
--- a/include/net/dcbnl.h
+++ b/include/net/dcbnl.h
@@ -31,6 +31,8 @@ struct dcb_app_type {
31u8 dcb_setapp(struct net_device *, struct dcb_app *); 31u8 dcb_setapp(struct net_device *, struct dcb_app *);
32u8 dcb_getapp(struct net_device *, struct dcb_app *); 32u8 dcb_getapp(struct net_device *, struct dcb_app *);
33 33
34int dcbnl_notify(struct net_device *dev, int event, int cmd, u32 seq, u32 pid);
35
34/* 36/*
35 * Ops struct for the netlink callbacks. Used by DCB-enabled drivers through 37 * Ops struct for the netlink callbacks. Used by DCB-enabled drivers through
36 * the netdevice struct. 38 * the netdevice struct.