From mboxrd@z Thu Jan 1 00:00:00 1970 From: Huy Nguyen Subject: Re: [net-next 1/6] net/dcb: Add dcbnl buffer attribute Date: Thu, 24 May 2018 09:11:43 -0500 Message-ID: <130570f4-25ca-9214-79fa-88ef9b208e32@mellanox.com> References: <20180521210502.11082-1-saeedm@mellanox.com> <20180521210502.11082-2-saeedm@mellanox.com> <20180523131944.3498fd10@cakuba> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: "David S. Miller" , netdev@vger.kernel.org To: Jakub Kicinski , Saeed Mahameed Return-path: Received: from mail-he1eur01on0052.outbound.protection.outlook.com ([104.47.0.52]:4788 "EHLO EUR01-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S970414AbeEXOL6 (ORCPT ); Thu, 24 May 2018 10:11:58 -0400 In-Reply-To: <20180523131944.3498fd10@cakuba> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: 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.