On 5/23/2018 3:19 PM, Jakub Kicinski wrote:
On Mon, 21 May 2018 14:04:57 -0700, Saeed Mahameed wrote:
diff --git a/include/uapi/linux/dcbnl.h b/include/uapi/linux/dcbnl.h
index 2c0c6453c3f4..1ddc0a44c172 100644
--- a/include/uapi/linux/dcbnl.h
+++ b/include/uapi/linux/dcbnl.h
@@ -163,6 +163,15 @@ struct ieee_pfc {
        __u64   indications[IEEE_8021QAZ_MAX_TCS];
  };
+#define IEEE_8021Q_MAX_PRIORITIES 8
+#define DCBX_MAX_BUFFERS  8
+struct dcbnl_buffer {
+       /* priority to buffer mapping */
+       __u8    prio2buffer[IEEE_8021Q_MAX_PRIORITIES];
+       /* buffer size in Bytes */
+       __u32   buffer_size[DCBX_MAX_BUFFERS];
Could you use IEEE_8021Q_MAX_PRIORITIES to size this array?  The DCBX in
the define name sort of implies this is coming from the standard which
it isn't.

I agree with your standard comment. But since priority is mapped to buffer, I think it is okay to reuse
#define. Let's not have a duplicate #define with the same meaning.

Reply via email to