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:37:39 -0500 Message-ID: <79cf2934-1671-8216-5f6a-2611168846a4@mellanox.com> References: <20180521210502.11082-1-saeedm@mellanox.com> <20180521210502.11082-2-saeedm@mellanox.com> <20180521222026.4f54f479@cakuba> <20180523094331.GC3046@nanopsycho> <653806e9-8416-d1e9-8666-abeea8eb7f15@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Cc: Saeed Mahameed , "David S. Miller" , netdev@vger.kernel.org, Or Gerlitz To: John Fastabend , Jiri Pirko , Jakub Kicinski Return-path: Received: from mail-eopbgr00055.outbound.protection.outlook.com ([40.107.0.55]:27520 "EHLO EUR02-AM5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S965438AbeEXOh7 (ORCPT ); Thu, 24 May 2018 10:37:59 -0400 In-Reply-To: <653806e9-8416-d1e9-8666-abeea8eb7f15@gmail.com> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 5/23/2018 11:03 AM, John Fastabend wrote: > On 05/23/2018 08:37 AM, Huy Nguyen wrote: >> >> On 5/23/2018 8:52 AM, John Fastabend wrote: >>> It would be nice though if the API gave us some hint on max/min/stride >>> of allowed values. Could the get API return these along with current >>> value? Presumably the allowed max size could change with devlink buffer >>> changes in how the global buffer is divided up as well. >> Acked. I will add Max. Let's skip min/stride since it is too hardware specific. > At minimum then we need to document for driver writers what to do > with a value that falls between strides. Round-up or round-down. > > .John V2 still under internal review. But here are the changes in patch #1 and patch #6. patch #1 Changes in V2:     Add total_size in dcbnl_buffer to report the total available buffer size of the netdev.     Code changes are in patch #1 and #6. patch #6 commit message Changes in V2:     Report total available buffer size of the netdev.     Comment on buffer stride:     Mellanox HCA buffer stride is 128 Bytes. If the     buffer size is not multiple of 128, the buffer size will be rounded down     to the nearest multiple of 128.