From: John Fastabend <john.r.fastabend@intel.com>
To: davem@davemloft.net
Cc: john.r.fastabend@intel.com, netdev@vger.kernel.org
Subject: [net-2.6 PATCH 3/3] net: dcb: application priority is per net_device
Date: Mon, 31 Jan 2011 14:00:59 -0800 [thread overview]
Message-ID: <20110131220059.29758.17857.stgit@jf-dev1-dcblab> (raw)
In-Reply-To: <20110131220048.29758.22379.stgit@jf-dev1-dcblab>
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(-)
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);
next prev parent reply other threads:[~2011-01-31 22:05 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-31 22:00 [net-2.6 PATCH 1/3] net: dcb: match dcb_app protocol field with 802.1Qaz spec John Fastabend
2011-01-31 22:00 ` [net-2.6 PATCH 2/3] net: dcb: use _safe() version of list iterators John Fastabend
2011-02-01 4:42 ` David Miller
2011-02-05 19:40 ` John Fastabend
2011-01-31 22:00 ` John Fastabend [this message]
2011-02-01 4:43 ` [net-2.6 PATCH 3/3] net: dcb: application priority is per net_device David Miller
2011-02-13 19:03 ` David Miller
2011-02-01 4:41 ` [net-2.6 PATCH 1/3] net: dcb: match dcb_app protocol field with 802.1Qaz spec David Miller
2011-02-05 19:39 ` John Fastabend
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=20110131220059.29758.17857.stgit@jf-dev1-dcblab \
--to=john.r.fastabend@intel.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
/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).