* [PATCH net-next] dcbnl : Fix misleading dcb_app->priority explanation
@ 2014-07-29 3:57 Anish Bhatt
2014-07-29 4:03 ` John Fastabend
2014-07-31 0:21 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Anish Bhatt @ 2014-07-29 3:57 UTC (permalink / raw)
To: netdev; +Cc: davem, john.fastabend, Anish Bhatt
Current explanation of dcb_app->priority is wrong. It says priority is
expected to be a 3-bit unsigned integer which is only true when working with
DCBx-IEEE. Use of dcb_app->priority by DCBx-CEE expects it to be 802.1p user
priority bitmap. Updated accordingly
This affects the cxgb4 driver, but I will post those changes as part of a
larger changeset shortly.
Fixes: 3e29027af4372 ("dcbnl: add support for ieee8021Qaz attributes")
Signed-off-by: Anish Bhatt <anish@chelsio.com>
---
include/uapi/linux/dcbnl.h | 3 ++-
net/dcb/dcbnl.c | 5 +++--
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/include/uapi/linux/dcbnl.h b/include/uapi/linux/dcbnl.h
index 6bb43382f3f3..e711f20dc522 100644
--- a/include/uapi/linux/dcbnl.h
+++ b/include/uapi/linux/dcbnl.h
@@ -148,7 +148,8 @@ struct cee_pfc {
*
* @selector: protocol identifier type
* @protocol: protocol of type indicated
- * @priority: 3-bit unsigned integer indicating priority
+ * @priority: 3-bit unsigned integer indicating priority for IEEE
+ * 8-bit 802.1p user priority bitmap for CEE
*
* ----
* Selector field values
diff --git a/net/dcb/dcbnl.c b/net/dcb/dcbnl.c
index c34af7a1d2d4..ca11d283bbeb 100644
--- a/net/dcb/dcbnl.c
+++ b/net/dcb/dcbnl.c
@@ -1776,7 +1776,7 @@ EXPORT_SYMBOL(dcb_getapp);
*
* Priority 0 is an invalid priority in CEE spec. This routine
* removes applications from the app list if the priority is
- * set to zero.
+ * set to zero. Priority is expected to be 8-bit 802.1p user priority bitmap
*/
int dcb_setapp(struct net_device *dev, struct dcb_app *new)
{
@@ -1837,7 +1837,8 @@ EXPORT_SYMBOL(dcb_ieee_getapp_mask);
*
* This adds Application data to the list. Multiple application
* entries may exists for the same selector and protocol as long
- * as the priorities are different.
+ * as the priorities are different. Priority is expected to be a
+ * 3-bit unsigned integer
*/
int dcb_ieee_setapp(struct net_device *dev, struct dcb_app *new)
{
--
2.0.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] dcbnl : Fix misleading dcb_app->priority explanation
2014-07-29 3:57 [PATCH net-next] dcbnl : Fix misleading dcb_app->priority explanation Anish Bhatt
@ 2014-07-29 4:03 ` John Fastabend
2014-07-31 0:21 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: John Fastabend @ 2014-07-29 4:03 UTC (permalink / raw)
To: Anish Bhatt; +Cc: netdev, davem
On 07/28/2014 08:57 PM, Anish Bhatt wrote:
> Current explanation of dcb_app->priority is wrong. It says priority is
> expected to be a 3-bit unsigned integer which is only true when working with
> DCBx-IEEE. Use of dcb_app->priority by DCBx-CEE expects it to be 802.1p user
> priority bitmap. Updated accordingly
>
> This affects the cxgb4 driver, but I will post those changes as part of a
> larger changeset shortly.
>
> Fixes: 3e29027af4372 ("dcbnl: add support for ieee8021Qaz attributes")
> Signed-off-by: Anish Bhatt <anish@chelsio.com>
> ---
Thanks for catching and fixing this.
Acked-by: John Fastabend <john.r.fastabend@intel.com>
--
John Fastabend Intel Corporation
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] dcbnl : Fix misleading dcb_app->priority explanation
2014-07-29 3:57 [PATCH net-next] dcbnl : Fix misleading dcb_app->priority explanation Anish Bhatt
2014-07-29 4:03 ` John Fastabend
@ 2014-07-31 0:21 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2014-07-31 0:21 UTC (permalink / raw)
To: anish; +Cc: netdev, john.fastabend
From: Anish Bhatt <anish@chelsio.com>
Date: Mon, 28 Jul 2014 20:57:07 -0700
> Current explanation of dcb_app->priority is wrong. It says priority is
> expected to be a 3-bit unsigned integer which is only true when working with
> DCBx-IEEE. Use of dcb_app->priority by DCBx-CEE expects it to be 802.1p user
> priority bitmap. Updated accordingly
>
> This affects the cxgb4 driver, but I will post those changes as part of a
> larger changeset shortly.
>
> Fixes: 3e29027af4372 ("dcbnl: add support for ieee8021Qaz attributes")
> Signed-off-by: Anish Bhatt <anish@chelsio.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-07-31 0:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-29 3:57 [PATCH net-next] dcbnl : Fix misleading dcb_app->priority explanation Anish Bhatt
2014-07-29 4:03 ` John Fastabend
2014-07-31 0:21 ` David Miller
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).