diff options
author | John Fastabend <john.r.fastabend@intel.com> | 2012-04-20 05:49:23 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-04-25 19:47:17 -0400 |
commit | 081579840b4b2421e37bc67e3b089b7ca64ef040 (patch) | |
tree | 4af15e68503680089276cc676ea23c10128a3e1c /net/dcb | |
parent | 872f24dbc604ef585ea7eec73020dcdfaffd1956 (diff) |
net: dcb: add CEE notify calls
This adds code to trigger CEE events when an APP change or setall
command is made from user space. This simplifies user space code
significantly by creating a single interface to listen on that
works with both firmware and userland agents.
And if we end up with multiple agents this keeps every thing in
sync userland agents, firmware agents, and kernel notifier consumers.
For an example agent that listens for these events see:
https://github.com/jrfastab/cgdcbxd
cgdcbxd is a daemon used to monitor DCB netlink events and manage
the net_prio control group sub-system.
Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Acked-by: Shmulik Ravid <shmulikr@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dcb')
-rw-r--r-- | net/dcb/dcbnl.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/dcb/dcbnl.c b/net/dcb/dcbnl.c index 8dfa1da7c40d..656c7c75b192 100644 --- a/net/dcb/dcbnl.c +++ b/net/dcb/dcbnl.c | |||
@@ -704,6 +704,7 @@ static int dcbnl_setapp(struct net_device *netdev, struct nlattr **tb, | |||
704 | 704 | ||
705 | ret = dcbnl_reply(err, RTM_SETDCB, DCB_CMD_SAPP, DCB_ATTR_APP, | 705 | ret = dcbnl_reply(err, RTM_SETDCB, DCB_CMD_SAPP, DCB_ATTR_APP, |
706 | pid, seq, flags); | 706 | pid, seq, flags); |
707 | dcbnl_cee_notify(netdev, RTM_SETDCB, DCB_CMD_SAPP, seq, 0); | ||
707 | out: | 708 | out: |
708 | return ret; | 709 | return ret; |
709 | } | 710 | } |
@@ -936,6 +937,7 @@ static int dcbnl_setall(struct net_device *netdev, struct nlattr **tb, | |||
936 | 937 | ||
937 | ret = dcbnl_reply(netdev->dcbnl_ops->setall(netdev), RTM_SETDCB, | 938 | ret = dcbnl_reply(netdev->dcbnl_ops->setall(netdev), RTM_SETDCB, |
938 | DCB_CMD_SET_ALL, DCB_ATTR_SET_ALL, pid, seq, flags); | 939 | DCB_CMD_SET_ALL, DCB_ATTR_SET_ALL, pid, seq, flags); |
940 | dcbnl_cee_notify(netdev, RTM_SETDCB, DCB_CMD_SET_ALL, seq, 0); | ||
939 | 941 | ||
940 | return ret; | 942 | return ret; |
941 | } | 943 | } |