aboutsummaryrefslogtreecommitdiffstats
path: root/net/dcb
diff options
context:
space:
mode:
authorJohn Fastabend <john.r.fastabend@intel.com>2011-01-31 07:00:59 -0500
committerDavid S. Miller <davem@davemloft.net>2011-02-13 14:02:39 -0500
commit7ec79270d7de0c8ca602c47cb25a9652ec28f37f (patch)
tree77386b7e90fa4891589ec139790579fb8b791d01 /net/dcb
parent8a870178c0ad1bae9994c99bd01eb10c9903e616 (diff)
net: dcb: application priority is per net_device
The app_data priority may not be the same for all net devices. In order for stacks with application notifiers to identify the specific net device dcb_app_type should be passed in the ptr. This allows handlers to use dev_get_by_name() to pin priority to net devices. Signed-off-by: John Fastabend <john.r.fastabend@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dcb')
-rw-r--r--net/dcb/dcbnl.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/net/dcb/dcbnl.c b/net/dcb/dcbnl.c
index 6b03f561caec..712ca026040a 100644
--- a/net/dcb/dcbnl.c
+++ b/net/dcb/dcbnl.c
@@ -1613,6 +1613,10 @@ EXPORT_SYMBOL(dcb_getapp);
1613u8 dcb_setapp(struct net_device *dev, struct dcb_app *new) 1613u8 dcb_setapp(struct net_device *dev, struct dcb_app *new)
1614{ 1614{
1615 struct dcb_app_type *itr; 1615 struct dcb_app_type *itr;
1616 struct dcb_app_type event;
1617
1618 memcpy(&event.name, dev->name, sizeof(event.name));
1619 memcpy(&event.app, new, sizeof(event.app));
1616 1620
1617 spin_lock(&dcb_lock); 1621 spin_lock(&dcb_lock);
1618 /* Search for existing match and replace */ 1622 /* Search for existing match and replace */
@@ -1644,7 +1648,7 @@ u8 dcb_setapp(struct net_device *dev, struct dcb_app *new)
1644 } 1648 }
1645out: 1649out:
1646 spin_unlock(&dcb_lock); 1650 spin_unlock(&dcb_lock);
1647 call_dcbevent_notifiers(DCB_APP_EVENT, new); 1651 call_dcbevent_notifiers(DCB_APP_EVENT, &event);
1648 return 0; 1652 return 0;
1649} 1653}
1650EXPORT_SYMBOL(dcb_setapp); 1654EXPORT_SYMBOL(dcb_setapp);