Skip to content

Commit

Permalink
dcbnl : Fix misleading dcb_app->priority explanation
Browse files Browse the repository at this point in the history
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: 3e29027 ("dcbnl: add support for ieee8021Qaz attributes")
Signed-off-by: Anish Bhatt <[email protected]>
Acked-by: John Fastabend <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
anish authored and davem330 committed Jul 31, 2014
1 parent 2d871aa commit 16eecd9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion include/uapi/linux/dcbnl.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions net/dcb/dcbnl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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)
{
Expand Down

0 comments on commit 16eecd9

Please sign in to comment.