From: Jakub Kicinski <kuba@kernel.org>
To: Guangbin Huang <huangguangbin2@huawei.com>
Cc: <davem@davemloft.net>, <pabeni@redhat.com>, <mkubecek@suse.cz>,
<netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<lipeng321@huawei.com>, <chenhao288@hisilicon.com>,
<wangjie125@huawei.com>
Subject: Re: [PATCH net-next 1/3] net: ethtool: extend ringparam set/get APIs for tx_push
Date: Fri, 8 Apr 2022 14:55:44 -0700 [thread overview]
Message-ID: <20220408145544.141c0799@kernel.org> (raw)
In-Reply-To: <20220408071245.40554-2-huangguangbin2@huawei.com>
On Fri, 8 Apr 2022 15:12:43 +0800 Guangbin Huang wrote:
> From: Jie Wang <wangjie125@huawei.com>
>
> Currently tx push is a standard driver feature which controls use of a fast
> path descriptor push. So this patch extends the ringparam APIs and data
> structures to support set/get tx push by ethtool -G/g.
>
> Signed-off-by: Jie Wang <wangjie125@huawei.com>
> Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com>
> +``ETHTOOL_A_RINGS_TX_PUSH`` flag is used to choose the ordinary path or the fast
> +path to send packets. In ordinary path, driver fills BDs to DDR memory and
> +notifies NIC hardware. In fast path, driver pushes BDs to the device memory
> +directly and thus reducing the sending latencies. Setting tx push attribute "on"
> +will enable tx push mode and send packets in fast path if packet size matches.
> +For those not supported hardwares, this attributes is "off" by default settings.
Since you need to respin to fix the kdoc warning - could you also add
a mention that enabling this feature may increase CPU cost? Unless it's
not the case for your implementation, I thought it usually is..
> RINGS_SET
> =========
> @@ -887,6 +894,7 @@ Request contents:
> ``ETHTOOL_A_RINGS_TX`` u32 size of TX ring
> ``ETHTOOL_A_RINGS_RX_BUF_LEN`` u32 size of buffers on the ring
> ``ETHTOOL_A_RINGS_CQE_SIZE`` u32 Size of TX/RX CQE
> + ``ETHTOOL_A_RINGS_TX_PUSH`` u8 flag of TX Push mode
> ==================================== ====== ===========================
>
> Kernel checks that requested ring sizes do not exceed limits reported by
> diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h
> index 4af58459a1e7..ede4f9154cd2 100644
> --- a/include/linux/ethtool.h
> +++ b/include/linux/ethtool.h
> @@ -71,11 +71,13 @@ enum {
> * struct kernel_ethtool_ringparam - RX/TX ring configuration
> * @rx_buf_len: Current length of buffers on the rx ring.
> * @tcp_data_split: Scatter packet headers and data to separate buffers
> + * @tx_push: The flag of tx push mode
> * @cqe_size: Size of TX/RX completion queue event
> */
> struct kernel_ethtool_ringparam {
> u32 rx_buf_len;
> u8 tcp_data_split;
> + u8 tx_push;
> u32 cqe_size;
> };
>
> @@ -87,6 +89,7 @@ struct kernel_ethtool_ringparam {
> enum ethtool_supported_ring_param {
> ETHTOOL_RING_USE_RX_BUF_LEN = BIT(0),
> ETHTOOL_RING_USE_CQE_SIZE = BIT(1),
> + ETHTOOL_RING_USE_TX_PUSH = BIT(2),
include/linux/ethtool.h:94: warning: Enum value 'ETHTOOL_RING_USE_TX_PUSH' not described in enum 'ethtool_supported_ring_param'
next prev parent reply other threads:[~2022-04-08 21:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-08 7:12 [PATCH net-next 0/3] net: ethool: add support to get/set tx push by ethtool -G/g Guangbin Huang
2022-04-08 7:12 ` [PATCH net-next 1/3] net: ethtool: extend ringparam set/get APIs for tx_push Guangbin Huang
2022-04-08 21:55 ` Jakub Kicinski [this message]
2022-04-11 7:58 ` wangjie (L)
2022-04-08 7:12 ` [PATCH net-next 2/3] net: ethtool: move checks before rtnl_lock() in ethnl_set_rings Guangbin Huang
2022-04-08 21:58 ` Jakub Kicinski
2022-04-11 8:01 ` wangjie (L)
2022-04-08 7:12 ` [PATCH net-next 3/3] net: hns3: add tx push support in hns3 ring param process Guangbin Huang
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=20220408145544.141c0799@kernel.org \
--to=kuba@kernel.org \
--cc=chenhao288@hisilicon.com \
--cc=davem@davemloft.net \
--cc=huangguangbin2@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lipeng321@huawei.com \
--cc=mkubecek@suse.cz \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=wangjie125@huawei.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).