All of lore.kernel.org
 help / color / mirror / Atom feed
From: "huangguangbin (A)" <huangguangbin2@huawei.com>
To: Marc Kleine-Budde <mkl@pengutronix.de>, Jakub Kicinski <kuba@kernel.org>
Cc: <davem@davemloft.net>, <mkubecek@suse.cz>, <andrew@lunn.ch>,
	<amitc@mellanox.com>, <idosch@idosch.org>, <danieller@nvidia.com>,
	<jesse.brandeburg@intel.com>, <anthony.l.nguyen@intel.com>,
	<jdike@addtoit.com>, <richard@nod.at>,
	<anton.ivanov@cambridgegreys.com>, <netanel@amazon.com>,
	<akiyano@amazon.com>, <saeedb@amazon.com>,
	<chris.snook@gmail.com>, <ulli.kroll@googlemail.com>,
	<linus.walleij@linaro.org>, <jeroendb@google.com>,
	<csully@google.com>, <awogbemila@google.com>, <jdmason@kudzu.us>,
	<rain.1986.08.12@gmail.com>, <zyjzyj2000@gmail.com>,
	<kys@microsoft.com>, <haiyangz@microsoft.com>, <mst@redhat.com>,
	<jasowang@redhat.com>, <doshir@vmware.com>,
	<pv-drivers@vmware.com>, <jwi@linux.ibm.com>,
	<kgraul@linux.ibm.com>, <hca@linux.ibm.com>, <gor@linux.ibm.com>,
	<johannes@sipsolutions.net>, <netdev@vger.kernel.org>,
	<lipeng321@huawei.com>, <chenhao288@hisilicon.com>,
	<linux-s390@vger.kernel.org>
Subject: Re: [PATCH V4 net-next 4/6] ethtool: extend ringparam setting uAPI with rx_buf_len
Date: Tue, 26 Oct 2021 22:41:19 +0800	[thread overview]
Message-ID: <8ce654b8-4a31-2d43-df7e-607528ba44d5@huawei.com> (raw)
In-Reply-To: <20211025190114.zbqgzsfiv7zav7aq@pengutronix.de>



On 2021/10/26 3:01, Marc Kleine-Budde wrote:
> On 25.10.2021 10:45:05, Jakub Kicinski wrote:
>>> The approach Andrew suggested is two-fold. First introduce a "struct
>>> ethtool_kringparam" that's only used inside the kernel, as "struct
>>> ethtool_ringparam" is ABI. Then extend "struct ethtool_kringparam" as
>>> needed.
>>
>> Indeed, there are different ways to extend the API for drivers,
>> I think it comes down to personal taste. I find the "inheritance"
>> models in C (kstruct usually contains the old struct as some "base")
>> awkward.
>>
>> I don't think we have agreed-on best practice in the area.
> 
>  From my point of view, if there already is an extension mainline:
> 
> | https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/commit/?id=f3ccfda19319
> 
> I'm more in the flavor for modeling other extensions the same way. Would
> be more consistent to name the new struct "kernel_"ethtool_ringparam,
> following the coalescing example:
> 
> | struct kernel_ethtool_ringparam {
> |        __u32   rx_buf_len;
> | };
> 
> regards,
> Marc
> 
We think ethtool_ringparam_ext is more easy to understand it is extension of
struct ethtool_ringparam. However, we don't mind to keep the same way and modify
to the name kernel_ethtool_ringparam if everyone agrees.

Does anyone have other opinions?

  reply	other threads:[~2021-10-26 14:41 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-14 11:39 [PATCH V4 net-next 0/6] ethtool: add support to set/get tx copybreak buf size and rx buf len Guangbin Huang
2021-10-14 11:39 ` [PATCH V4 net-next 1/6] ethtool: add support to set/get tx copybreak buf size via ethtool Guangbin Huang
2021-10-14 13:58   ` Eric Dumazet
2021-10-19 13:44     ` huangguangbin (A)
2021-10-14 11:39 ` [PATCH V4 net-next 2/6] net: hns3: add support to set/get tx copybreak buf size via ethtool for hns3 driver Guangbin Huang
2021-10-14 11:39 ` [PATCH V4 net-next 3/6] ethtool: add support to set/get rx buf len via ethtool Guangbin Huang
2021-10-14 11:39 ` [PATCH V4 net-next 4/6] ethtool: extend ringparam setting uAPI with rx_buf_len Guangbin Huang
2021-10-25 13:11   ` Marc Kleine-Budde
2021-10-25 13:27     ` Marc Kleine-Budde
2021-10-25 17:45       ` Jakub Kicinski
2021-10-25 18:50         ` Marc Kleine-Budde
2021-10-25 19:01         ` Marc Kleine-Budde
2021-10-26 14:41           ` huangguangbin (A) [this message]
2021-10-26 14:55             ` Jakub Kicinski
2021-10-27 18:59             ` Andrew Lunn
2021-10-27  6:32   ` kernel test robot
2021-10-14 11:39 ` [PATCH V4 net-next 5/6] net: hns3: add support to set/get rx buf len via ethtool for hns3 driver Guangbin Huang
2021-10-14 11:39 ` [PATCH V4 net-next 6/6] net: hns3: remove the way to set tx spare buf via module parameter Guangbin Huang
2021-10-14 13:14 ` [PATCH V4 net-next 0/6] ethtool: add support to set/get tx copybreak buf size and rx buf len Alexander Lobakin
2021-10-15  2:41   ` Jakub Kicinski
2021-10-19 13:54   ` huangguangbin (A)
2021-10-20 10:02     ` Alexander Lobakin
2021-10-23  8:46       ` huangguangbin (A)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8ce654b8-4a31-2d43-df7e-607528ba44d5@huawei.com \
    --to=huangguangbin2@huawei.com \
    --cc=akiyano@amazon.com \
    --cc=amitc@mellanox.com \
    --cc=andrew@lunn.ch \
    --cc=anthony.l.nguyen@intel.com \
    --cc=anton.ivanov@cambridgegreys.com \
    --cc=awogbemila@google.com \
    --cc=chenhao288@hisilicon.com \
    --cc=chris.snook@gmail.com \
    --cc=csully@google.com \
    --cc=danieller@nvidia.com \
    --cc=davem@davemloft.net \
    --cc=doshir@vmware.com \
    --cc=gor@linux.ibm.com \
    --cc=haiyangz@microsoft.com \
    --cc=hca@linux.ibm.com \
    --cc=idosch@idosch.org \
    --cc=jasowang@redhat.com \
    --cc=jdike@addtoit.com \
    --cc=jdmason@kudzu.us \
    --cc=jeroendb@google.com \
    --cc=jesse.brandeburg@intel.com \
    --cc=johannes@sipsolutions.net \
    --cc=jwi@linux.ibm.com \
    --cc=kgraul@linux.ibm.com \
    --cc=kuba@kernel.org \
    --cc=kys@microsoft.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=lipeng321@huawei.com \
    --cc=mkl@pengutronix.de \
    --cc=mkubecek@suse.cz \
    --cc=mst@redhat.com \
    --cc=netanel@amazon.com \
    --cc=netdev@vger.kernel.org \
    --cc=pv-drivers@vmware.com \
    --cc=rain.1986.08.12@gmail.com \
    --cc=richard@nod.at \
    --cc=saeedb@amazon.com \
    --cc=ulli.kroll@googlemail.com \
    --cc=zyjzyj2000@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.