Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dcbnl : Fix misleading dcb_app->priority explanation

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>

authored by

Anish Bhatt and committed by
David S. Miller
16eecd9b 2d871aa0

+5 -3
+2 -1
include/uapi/linux/dcbnl.h
··· 148 148 * 149 149 * @selector: protocol identifier type 150 150 * @protocol: protocol of type indicated 151 - * @priority: 3-bit unsigned integer indicating priority 151 + * @priority: 3-bit unsigned integer indicating priority for IEEE 152 + * 8-bit 802.1p user priority bitmap for CEE 152 153 * 153 154 * ---- 154 155 * Selector field values
+3 -2
net/dcb/dcbnl.c
··· 1776 1776 * 1777 1777 * Priority 0 is an invalid priority in CEE spec. This routine 1778 1778 * removes applications from the app list if the priority is 1779 - * set to zero. 1779 + * set to zero. Priority is expected to be 8-bit 802.1p user priority bitmap 1780 1780 */ 1781 1781 int dcb_setapp(struct net_device *dev, struct dcb_app *new) 1782 1782 { ··· 1837 1837 * 1838 1838 * This adds Application data to the list. Multiple application 1839 1839 * entries may exists for the same selector and protocol as long 1840 - * as the priorities are different. 1840 + * as the priorities are different. Priority is expected to be a 1841 + * 3-bit unsigned integer 1841 1842 */ 1842 1843 int dcb_ieee_setapp(struct net_device *dev, struct dcb_app *new) 1843 1844 {