]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
dcbnl : Fix misleading dcb_app->priority explanation
authorAnish Bhatt <anish@chelsio.com>
Tue, 29 Jul 2014 03:57:07 +0000 (20:57 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 31 Jul 2014 00:21:05 +0000 (17:21 -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>
Acked-by: John Fastabend <john.r.fastabend@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/uapi/linux/dcbnl.h
net/dcb/dcbnl.c

index 6bb43382f3f3d92d376ba83bbf24024c38d00407..e711f20dc522ee22c728a338a203b6ce4c27d22a 100644 (file)
@@ -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
index c34af7a1d2d47f3f79fb604a9dedc21e8aee97ef..ca11d283bbebe3ae02345ecd72cb022ae7c43667 100644 (file)
@@ -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)
 {