From: Andy Gospodarek <andrew.gospodarek@broadcom.com>
To: Taehee Yoo <ap420073@gmail.com>
Cc: davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com,
edumazet@google.com, almasrymina@google.com,
donald.hunter@gmail.com, corbet@lwn.net,
michael.chan@broadcom.com, andrew+netdev@lunn.ch,
hawk@kernel.org, ilias.apalodimas@linaro.org, ast@kernel.org,
daniel@iogearbox.net, john.fastabend@gmail.com, dw@davidwei.uk,
sdf@fomichev.me, asml.silence@gmail.com, brett.creeley@amd.com,
linux-doc@vger.kernel.org, netdev@vger.kernel.org,
kory.maincent@bootlin.com, maxime.chevallier@bootlin.com,
danieller@nvidia.com, hengqi@linux.alibaba.com,
ecree.xilinx@gmail.com, przemyslaw.kitszel@intel.com,
hkallweit1@gmail.com, ahmed.zaki@intel.com,
rrameshbabu@nvidia.com, idosch@nvidia.com, jiri@resnulli.us,
bigeasy@linutronix.de, lorenzo@kernel.org, jdamato@fastly.com,
aleksander.lobakin@intel.com, kaiyuanz@google.com,
willemb@google.com, daniel.zahka@gmail.com
Subject: Re: [PATCH net-next v5 5/7] bnxt_en: add support for header-data-split-thresh ethtool command
Date: Thu, 14 Nov 2024 17:54:49 -0500 [thread overview]
Message-ID: <ZzZ_ub26phtVNmnK@JRM7P7Q02P> (raw)
In-Reply-To: <20241113173222.372128-6-ap420073@gmail.com>
On Wed, Nov 13, 2024 at 05:32:19PM +0000, Taehee Yoo wrote:
> The bnxt_en driver has configured the hds_threshold value automatically
> when TPA is enabled based on the rx-copybreak default value.
> Now the header-data-split-thresh ethtool command is added, so it adds an
> implementation of header-data-split-thresh option.
>
> Configuration of the header-data-split-thresh is allowed only when
> the header-data-split is enabled. The default value of
> header-data-split-thresh is 256, which is the default value of
> rx-copybreak, which used to be the hds_thresh value.
>
> # Example:
> # ethtool -G enp14s0f0np0 tcp-data-split on header-data-split-thresh 256
> # ethtool -g enp14s0f0np0
> Ring parameters for enp14s0f0np0:
> Pre-set maximums:
> ...
> Header data split thresh: 256
> Current hardware settings:
> ...
> TCP data split: on
> Header data split thresh: 256
>
> Tested-by: Stanislav Fomichev <sdf@fomichev.me>
> Signed-off-by: Taehee Yoo <ap420073@gmail.com>
Tested-by: Andy Gospodarek <gospo@broadcom.com>
> ---
>
> v5:
> - No changes.
>
> v4:
> - Reduce hole in struct bnxt.
> - Add ETHTOOL_RING_USE_HDS_THRS to indicate bnxt_en driver support
> header-data-split-thresh option.
> - Add Test tag from Stanislav.
>
> v3:
> - Drop validation logic tcp-data-split and tcp-data-split-thresh.
>
> v2:
> - Patch added.
>
> drivers/net/ethernet/broadcom/bnxt/bnxt.c | 3 ++-
> drivers/net/ethernet/broadcom/bnxt/bnxt.h | 2 ++
> drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 7 ++++++-
> 3 files changed, 10 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
> index 608bcca71676..27d6bac3a69a 100644
> --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
> +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
> @@ -4454,6 +4454,7 @@ void bnxt_set_tpa_flags(struct bnxt *bp)
> static void bnxt_init_ring_params(struct bnxt *bp)
> {
> bp->rx_copybreak = BNXT_DEFAULT_RX_COPYBREAK;
> + bp->hds_threshold = BNXT_DEFAULT_RX_COPYBREAK;
> }
>
> /* bp->rx_ring_size, bp->tx_ring_size, dev->mtu, BNXT_FLAG_{G|L}RO flags must
> @@ -6429,7 +6430,7 @@ static int bnxt_hwrm_vnic_set_hds(struct bnxt *bp, struct bnxt_vnic_info *vnic)
> VNIC_PLCMODES_CFG_REQ_FLAGS_HDS_IPV6);
> req->enables |=
> cpu_to_le32(VNIC_PLCMODES_CFG_REQ_ENABLES_HDS_THRESHOLD_VALID);
> - req->hds_threshold = cpu_to_le16(bp->rx_copybreak);
> + req->hds_threshold = cpu_to_le16(bp->hds_threshold);
> }
> req->vnic_id = cpu_to_le32(vnic->fw_vnic_id);
> return hwrm_req_send(bp, req);
> diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.h b/drivers/net/ethernet/broadcom/bnxt/bnxt.h
> index 3a7d2f3ebb2a..058db26fb255 100644
> --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.h
> +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.h
> @@ -2362,6 +2362,8 @@ struct bnxt {
> u8 q_ids[BNXT_MAX_QUEUE];
> u8 max_q;
> u8 num_tc;
> +#define BNXT_HDS_THRESHOLD_MAX 256
> + u16 hds_threshold;
>
> unsigned int current_interval;
> #define BNXT_TIMER_INTERVAL HZ
> diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
> index b0054eef389b..a51a4cedecb9 100644
> --- a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
> +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
> @@ -833,6 +833,9 @@ static void bnxt_get_ringparam(struct net_device *dev,
> ering->rx_pending = bp->rx_ring_size;
> ering->rx_jumbo_pending = bp->rx_agg_ring_size;
> ering->tx_pending = bp->tx_ring_size;
> +
> + kernel_ering->hds_thresh = bp->hds_threshold;
> + kernel_ering->hds_thresh_max = BNXT_HDS_THRESHOLD_MAX;
> }
>
> static int bnxt_set_ringparam(struct net_device *dev,
> @@ -868,6 +871,7 @@ static int bnxt_set_ringparam(struct net_device *dev,
> else if (tcp_data_split == ETHTOOL_TCP_DATA_SPLIT_UNKNOWN)
> bp->flags &= ~BNXT_FLAG_HDS;
>
> + bp->hds_threshold = (u16)kernel_ering->hds_thresh;
> bp->rx_ring_size = ering->rx_pending;
> bp->tx_ring_size = ering->tx_pending;
> bnxt_set_ring_params(bp);
> @@ -5363,7 +5367,8 @@ const struct ethtool_ops bnxt_ethtool_ops = {
> ETHTOOL_COALESCE_STATS_BLOCK_USECS |
> ETHTOOL_COALESCE_USE_ADAPTIVE_RX |
> ETHTOOL_COALESCE_USE_CQE,
> - .supported_ring_params = ETHTOOL_RING_USE_TCP_DATA_SPLIT,
> + .supported_ring_params = ETHTOOL_RING_USE_TCP_DATA_SPLIT |
> + ETHTOOL_RING_USE_HDS_THRS,
> .get_link_ksettings = bnxt_get_link_ksettings,
> .set_link_ksettings = bnxt_set_link_ksettings,
> .get_fec_stats = bnxt_get_fec_stats,
> --
> 2.34.1
>
next prev parent reply other threads:[~2024-11-14 22:54 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-13 17:32 [PATCH net-next v5 0/7] bnxt_en: implement tcp-data-split and thresh option Taehee Yoo
2024-11-13 17:32 ` [PATCH net-next v5 1/7] bnxt_en: add support for rx-copybreak ethtool command Taehee Yoo
2024-11-14 22:54 ` Andy Gospodarek
2024-11-15 0:22 ` Michael Chan
2024-11-13 17:32 ` [PATCH net-next v5 2/7] net: ethtool: add tcp_data_split_mod member in kernel_ethtool_ringparam Taehee Yoo
2024-11-15 4:22 ` Jakub Kicinski
2024-11-15 17:17 ` Taehee Yoo
2024-11-15 20:07 ` Saeed Mahameed
2024-11-13 17:32 ` [PATCH net-next v5 3/7] bnxt_en: add support for tcp-data-split ethtool command Taehee Yoo
2024-11-14 22:54 ` Andy Gospodarek
2024-11-15 4:15 ` Jakub Kicinski
2024-11-15 17:12 ` Taehee Yoo
2024-11-13 17:32 ` [PATCH net-next v5 4/7] net: ethtool: add support for configuring header-data-split-thresh Taehee Yoo
2024-11-15 4:24 ` Jakub Kicinski
2024-11-15 18:05 ` Taehee Yoo
2024-11-15 19:18 ` Jakub Kicinski
2024-11-17 12:31 ` Taehee Yoo
2024-11-15 20:27 ` Saeed Mahameed
2024-11-17 14:26 ` Taehee Yoo
2024-11-13 17:32 ` [PATCH net-next v5 5/7] bnxt_en: add support for header-data-split-thresh ethtool command Taehee Yoo
2024-11-14 22:54 ` Andy Gospodarek [this message]
2024-11-15 0:27 ` Michael Chan
2024-11-15 16:18 ` Taehee Yoo
2024-11-13 17:32 ` [PATCH net-next v5 6/7] net: devmem: add ring parameter filtering Taehee Yoo
2024-11-13 17:32 ` [PATCH net-next v5 7/7] net: ethtool: " Taehee Yoo
2024-11-14 22:55 ` [PATCH net-next v5 0/7] bnxt_en: implement tcp-data-split and thresh option Andy Gospodarek
2024-12-17 16:30 ` Jakub Kicinski
2024-12-18 13:34 ` Taehee Yoo
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=ZzZ_ub26phtVNmnK@JRM7P7Q02P \
--to=andrew.gospodarek@broadcom.com \
--cc=ahmed.zaki@intel.com \
--cc=aleksander.lobakin@intel.com \
--cc=almasrymina@google.com \
--cc=andrew+netdev@lunn.ch \
--cc=ap420073@gmail.com \
--cc=asml.silence@gmail.com \
--cc=ast@kernel.org \
--cc=bigeasy@linutronix.de \
--cc=brett.creeley@amd.com \
--cc=corbet@lwn.net \
--cc=daniel.zahka@gmail.com \
--cc=daniel@iogearbox.net \
--cc=danieller@nvidia.com \
--cc=davem@davemloft.net \
--cc=donald.hunter@gmail.com \
--cc=dw@davidwei.uk \
--cc=ecree.xilinx@gmail.com \
--cc=edumazet@google.com \
--cc=hawk@kernel.org \
--cc=hengqi@linux.alibaba.com \
--cc=hkallweit1@gmail.com \
--cc=idosch@nvidia.com \
--cc=ilias.apalodimas@linaro.org \
--cc=jdamato@fastly.com \
--cc=jiri@resnulli.us \
--cc=john.fastabend@gmail.com \
--cc=kaiyuanz@google.com \
--cc=kory.maincent@bootlin.com \
--cc=kuba@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=lorenzo@kernel.org \
--cc=maxime.chevallier@bootlin.com \
--cc=michael.chan@broadcom.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=przemyslaw.kitszel@intel.com \
--cc=rrameshbabu@nvidia.com \
--cc=sdf@fomichev.me \
--cc=willemb@google.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.