Message ID | 20110131220059.29758.17857.stgit@jf-dev1-dcblab |
---|---|
State | Accepted, archived |
Delegated to: | David Miller |
Headers | show |
From: John Fastabend <john.r.fastabend@intel.com> Date: Mon, 31 Jan 2011 14:00:59 -0800 > 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> Given your track record with the previous two patches (ie. they need work or are nonsense) I want someone who understands this dcbnl stuff to review this third patch before I'm willing to apply it. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
From: John Fastabend <john.r.fastabend@intel.com> Date: Mon, 31 Jan 2011 14:00:59 -0800 > 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> Applied. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/net/dcb/dcbnl.c b/net/dcb/dcbnl.c index e3399d6..249bcec 100644 --- a/net/dcb/dcbnl.c +++ b/net/dcb/dcbnl.c @@ -1613,6 +1613,10 @@ EXPORT_SYMBOL(dcb_getapp); u8 dcb_setapp(struct net_device *dev, struct dcb_app *new) { struct dcb_app_type *itr, *tmp; + struct dcb_app_type event; + + memcpy(&event.name, dev->name, sizeof(event.name)); + memcpy(&event.app, new, sizeof(event.app)); spin_lock(&dcb_lock); /* Search for existing match and replace */ @@ -1644,7 +1648,7 @@ u8 dcb_setapp(struct net_device *dev, struct dcb_app *new) } out: spin_unlock(&dcb_lock); - call_dcbevent_notifiers(DCB_APP_EVENT, new); + call_dcbevent_notifiers(DCB_APP_EVENT, &event); return 0; } EXPORT_SYMBOL(dcb_setapp);
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> --- net/dcb/dcbnl.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html