netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Lobakin <alexandr.lobakin@intel.com>
To: "huangguangbin (A)" <huangguangbin2@huawei.com>
Cc: Alexander Lobakin <alexandr.lobakin@intel.com>,
	davem@davemloft.net, kuba@kernel.org, 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, gtzalik@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 0/6] ethtool: add support to set/get tx copybreak buf size and rx buf len
Date: Wed, 20 Oct 2021 12:02:29 +0200	[thread overview]
Message-ID: <20211020100229.183-1-alexandr.lobakin@intel.com> (raw)
In-Reply-To: <e6d91f02-702c-e1b2-ffdd-15f317508443@huawei.com>

From: huangguangbin (A) <huangguangbin2@huawei.com>
Date: Tue, 19 Oct 2021 21:54:24 +0800

> On 2021/10/14 21:14, Alexander Lobakin wrote:
> > From: Guangbin Huang <huangguangbin2@huawei.com>
> > Date: Thu, 14 Oct 2021 19:39:37 +0800
> > 
> > Hi there,
> > 
> >> From: Hao Chen <chenhao288@hisilicon.com>
> >>
> >> This series add support to set/get tx copybreak buf size and rx buf len via
> >> ethtool and hns3 driver implements them.
> >>
> >> Tx copybreak buf size is used for tx copybreak feature which for small size
> >> packet or frag. Use ethtool --get-tunable command to get it, and ethtool
> >> --set-tunable command to set it, examples are as follow:
> >>
> >> 1. set tx spare buf size to 102400:
> >> $ ethtool --set-tunable eth1 tx-buf-size 102400
> >>
> >> 2. get tx spare buf size:
> >> $ ethtool --get-tunable eth1 tx-buf-size
> >> tx-buf-size: 102400
> > 
> > Isn't that supposed to be changed on changing Tx copybreak value
> > itsef?
> > And what if I set Tx copybreak buf size value lower than Tx
> > copybreak? I see no sanity checks for this.
> > 
> Hi Alexander,

Hi,

> HNS3 driver still execute the previous packet sending process
> when tx copybreak buf size is lower than tx copybreak,
> So, we have no check for tx copybreak buf size when set it.

So it doesn't make sense then to have two separate parameters
I believe? Just change Tx copybreak buffer size according to
the current Tx copybreak value. Any usecases when it's really
handy to have them differing in values?

> >> Rx buf len is buffer length of each rx BD. Use ethtool -g command to get
> >> it, and ethtool -G command to set it, examples are as follow:
> >>
> >> 1. set rx buf len to 4096
> >> $ ethtool -G eth1 rx-buf-len 4096
> >>
> >> 2. get rx buf len
> >> $ ethtool -g eth1
> >> ...
> >> RX Buf Len:     4096
> > 
> > Isn't that supposed to be changed on changing MTU?
> > And what if I set Rx buf len value lower than MTU? I see no checks
> > as well.
> > 
> > That means, do we _really_ need two new tunables?
> > 
> When MTU remains unchanged and rx buf len changes from 2048 to 4096.
> TCP packet receiving bandwidth of single thread changes from 34.1 Gbps to 48.6 Gbps(improve 42.5%).
> it means that when we enable hardware GRO, it make sense to change rx buf len.
> 
> And if we set rx buf len(only support 2k, 4k) which is lower than MTU,

You say your HW only supports 2k and 4k buffer size, would it
make sense if you just set it automatically depending on MTU
and NETIF_F_GRO_HW (or _LRO) to keep performance in its best
not depending on any side priv parameters that user is likely
not aware of?

> it will split packages into smaller chunks to rx bd, and in general situations,
> rx buf len is greater than MTU.
> 
> >> Change log:
> >> V3 -> V4
> >> 1.Fix a few allmodconfig compile warning.
> >> 2.Add more '=' synbol to ethtool-netlink.rst to refine format.
> >> 3.Move definement of struct ethtool_ringparam_ext to include/linux/ethtool.h.
> >> 4.Move related modify of rings_fill_reply() from patch 4/6 to patch 3/6.
> >>
> >> V2 -> V3
> >> 1.Remove documentation for tx copybreak buf size, there is description for
> >> it in userspace ethtool.
> >> 2.Move extending parameters for get/set_ringparam function from patch3/6
> >> to patch 4/6.
> >>
> >> V1 -> V2
> >> 1.Add documentation for rx buf len and tx copybreak buf size.
> >> 2.Extend structure ringparam_ext for extenal ring params.
> >> 3.Change type of ETHTOOL_A_RINGS_RX_BUF_LEN from NLA_U32 to
> >>    NLA_POLICY_MIN(NLA_U32, 1).
> >> 4.Add supported_ring_params in ethtool_ops to indicate if support external
> >>    params.
> >>
> > 
> > [snip]
> > 
> > Thanks,
> > Al

Thanks,
Al

  reply	other threads:[~2021-10-20 10:02 UTC|newest]

Thread overview: 22+ 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)
2021-10-26 14:55             ` Jakub Kicinski
2021-10-27 18:59             ` Andrew Lunn
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 [this message]
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=20211020100229.183-1-alexandr.lobakin@intel.com \
    --to=alexandr.lobakin@intel.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=gtzalik@amazon.com \
    --cc=haiyangz@microsoft.com \
    --cc=hca@linux.ibm.com \
    --cc=huangguangbin2@huawei.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=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).