lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 14 Oct 2021 14:24:06 +0800
From:   "huangguangbin (A)" <huangguangbin2@...wei.com>
To:     Jakub Kicinski <kuba@...nel.org>
CC:     <davem@...emloft.net>, <mkubecek@...e.cz>, <andrew@...n.ch>,
        <amitc@...lanox.com>, <idosch@...sch.org>, <danieller@...dia.com>,
        <jesse.brandeburg@...el.com>, <anthony.l.nguyen@...el.com>,
        <jdike@...toit.com>, <richard@....at>,
        <anton.ivanov@...bridgegreys.com>, <netanel@...zon.com>,
        <akiyano@...zon.com>, <gtzalik@...zon.com>, <saeedb@...zon.com>,
        <chris.snook@...il.com>, <ulli.kroll@...glemail.com>,
        <linus.walleij@...aro.org>, <jeroendb@...gle.com>,
        <csully@...gle.com>, <awogbemila@...gle.com>, <jdmason@...zu.us>,
        <rain.1986.08.12@...il.com>, <zyjzyj2000@...il.com>,
        <kys@...rosoft.com>, <haiyangz@...rosoft.com>, <mst@...hat.com>,
        <jasowang@...hat.com>, <doshir@...are.com>,
        <pv-drivers@...are.com>, <jwi@...ux.ibm.com>,
        <kgraul@...ux.ibm.com>, <hca@...ux.ibm.com>, <gor@...ux.ibm.com>,
        <johannes@...solutions.net>, <netdev@...r.kernel.org>,
        <lipeng321@...wei.com>, <chenhao288@...ilicon.com>,
        <linux-s390@...r.kernel.org>
Subject: Re: [PATCH V3 net-next 3/6] ethtool: add support to set/get rx buf
 len via ethtool



On 2021/10/13 2:26, Jakub Kicinski wrote:
> On Tue, 12 Oct 2021 21:41:24 +0800 Guangbin Huang wrote:
>> From: Hao Chen <chenhao288@...ilicon.com>
>>
>> Add support to set rx buf len via ethtool -G parameter and get
>> rx buf len via ethtool -g parameter.
>>
>> Signed-off-by: Hao Chen <chenhao288@...ilicon.com>
>> Signed-off-by: Guangbin Huang <huangguangbin2@...wei.com>
> 
>> +  ``ETHTOOL_A_RINGS_RX_BUF_LEN``        u32     size of buffers on the ring
>>     ====================================  ======  ==========================
> 
> Does the documentation build without warnings?
> 
Hi Jakub, there is no warning when we build documentation. It seems that the third
column needs more '=' symbol, we add it in next version.

>> diff --git a/include/uapi/linux/ethtool.h b/include/uapi/linux/ethtool.h
>> index 266e95e4fb33..83544186cbb5 100644
>> --- a/include/uapi/linux/ethtool.h
>> +++ b/include/uapi/linux/ethtool.h
>> @@ -535,6 +535,14 @@ struct ethtool_ringparam {
>>   	__u32	tx_pending;
>>   };
>>   
>> +/**
>> + * struct ethtool_ringparam_ext - RX/TX ring configuration
>> + * @rx_buf_len: Current length of buffers on the rx ring.
>> + */
>> +struct ethtool_ringparam_ext {
>> +	__u32	rx_buf_len;
>> +};
> 
> This can be moved to include/linux/ethtool.h, user space does not need
> to know about this structure.
> 
Ok.

>> +	if (ringparam_ext.rx_buf_len != 0 &&
>> +	    !(ops->supported_ring_params & ETHTOOL_RING_USE_RX_BUF_LEN)) {
>> +		ret = -EOPNOTSUPP;
>> +		NL_SET_ERR_MSG_ATTR(info->extack,
>> +				    tb[ETHTOOL_A_RINGS_RX_BUF_LEN],
>> +				    "setting not supported rx buf len");
> 
> "setting rx buf len not supported" sounds better
> 
Ok.

>> +		goto out_ops;
>> +	}
>> +
>>   	ret = dev->ethtool_ops->set_ringparam(dev, &ringparam);
>>   	if (ret < 0)
>>   		goto out_ops;
> 
> .
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ