Message ID | 20110131220048.29758.22379.stgit@jf-dev1-dcblab |
---|---|
State | Changes Requested, archived |
Delegated to: | David Miller |
Headers | show |
From: John Fastabend <john.r.fastabend@intel.com> Date: Mon, 31 Jan 2011 14:00:49 -0800 > The dcb_app protocol field is a __u32 however the 802.1Qaz > specification defines it as a 16 bit field. This patch brings > the structure inline with the spec making it a __u16. > > Signed-off-by: John Fastabend <john.r.fastabend@intel.com> ... > @@ -101,7 +101,7 @@ struct ieee_pfc { > */ > struct dcb_app { > __u8 selector; > - __u32 protocol; > + __u16 protocol; > __u8 priority; > }; > If we're going to do this, please fix this wasteful structure layout. Put the "protocol" either first, or last, so that the structure size is 4 bytes, rather than something like 8. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 1/31/2011 8:41 PM, David Miller wrote: > From: John Fastabend <john.r.fastabend@intel.com> > Date: Mon, 31 Jan 2011 14:00:49 -0800 > >> The dcb_app protocol field is a __u32 however the 802.1Qaz >> specification defines it as a 16 bit field. This patch brings >> the structure inline with the spec making it a __u16. >> >> Signed-off-by: John Fastabend <john.r.fastabend@intel.com> > ... >> @@ -101,7 +101,7 @@ struct ieee_pfc { >> */ >> struct dcb_app { >> __u8 selector; >> - __u32 protocol; >> + __u16 protocol; >> __u8 priority; >> }; >> > > If we're going to do this, please fix this wasteful structure > layout. Put the "protocol" either first, or last, so that the > structure size is 4 bytes, rather than something like 8. OK I will fix this. Thanks -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/include/linux/dcbnl.h b/include/linux/dcbnl.h index 68cd248..bdc7ef4 100644 --- a/include/linux/dcbnl.h +++ b/include/linux/dcbnl.h @@ -101,7 +101,7 @@ struct ieee_pfc { */ struct dcb_app { __u8 selector; - __u32 protocol; + __u16 protocol; __u8 priority; };
The dcb_app protocol field is a __u32 however the 802.1Qaz specification defines it as a 16 bit field. This patch brings the structure inline with the spec making it a __u16. Signed-off-by: John Fastabend <john.r.fastabend@intel.com> --- include/linux/dcbnl.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html