From: Simon Horman <horms@kernel.org>
To: Louis Peens <louis.peens@corigine.com>
Cc: David Miller <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Jiri Pirko <jiri@resnulli.us>, Fei Qin <fei.qin@corigine.com>,
netdev@vger.kernel.org, oss-drivers@corigine.com,
Tal Gilboa <talgi@nvidia.com>
Subject: Re: [PATCH net-next v4 3/4] dim: introduce a specific dim profile for better latency
Date: Mon, 8 Apr 2024 14:12:51 +0100 [thread overview]
Message-ID: <20240408131251.GD26556@kernel.org> (raw)
In-Reply-To: <20240405081547.20676-4-louis.peens@corigine.com>
+ Tal Gilboa
On Fri, Apr 05, 2024 at 10:15:46AM +0200, Louis Peens wrote:
> From: Fei Qin <fei.qin@corigine.com>
>
> The current profile is not well-adaptive to NFP NICs in
> terms of latency, so introduce a specific profile for better
> latency.
>
> Signed-off-by: Fei Qin <fei.qin@corigine.com>
> Signed-off-by: Louis Peens <louis.peens@corigine.com>
Noting that this is consistent of review of v1 [1], this looks good to me.
Reviewed-by: Simon Horman <horms@kernel.org>
[1] https://lore.kernel.org/all/20240131085426.45374-3-louis.peens@corigine.com/
> ---
> include/linux/dim.h | 2 ++
> lib/dim/net_dim.c | 18 ++++++++++++++++++
> 2 files changed, 20 insertions(+)
>
> diff --git a/include/linux/dim.h b/include/linux/dim.h
> index f343bc9aa2ec..edd6d7bceb28 100644
> --- a/include/linux/dim.h
> +++ b/include/linux/dim.h
> @@ -119,11 +119,13 @@ struct dim {
> *
> * @DIM_CQ_PERIOD_MODE_START_FROM_EQE: Start counting from EQE
> * @DIM_CQ_PERIOD_MODE_START_FROM_CQE: Start counting from CQE (implies timer reset)
> + * @DIM_CQ_PERIOD_MODE_SPECIFIC_0: Specific mode to improve latency
> * @DIM_CQ_PERIOD_NUM_MODES: Number of modes
> */
> enum dim_cq_period_mode {
> DIM_CQ_PERIOD_MODE_START_FROM_EQE = 0x0,
> DIM_CQ_PERIOD_MODE_START_FROM_CQE = 0x1,
> + DIM_CQ_PERIOD_MODE_SPECIFIC_0 = 0x2,
> DIM_CQ_PERIOD_NUM_MODES
> };
>
> diff --git a/lib/dim/net_dim.c b/lib/dim/net_dim.c
> index 4e32f7aaac86..2b5dccb6242c 100644
> --- a/lib/dim/net_dim.c
> +++ b/lib/dim/net_dim.c
> @@ -33,6 +33,14 @@
> {.usec = 64, .pkts = 64,} \
> }
>
> +#define NET_DIM_RX_SPECIFIC_0_PROFILES { \
> + {.usec = 0, .pkts = 1,}, \
> + {.usec = 4, .pkts = 32,}, \
> + {.usec = 64, .pkts = 64,}, \
> + {.usec = 128, .pkts = 256,}, \
> + {.usec = 256, .pkts = 256,} \
> +}
> +
> #define NET_DIM_TX_EQE_PROFILES { \
> {.usec = 1, .pkts = NET_DIM_DEFAULT_TX_CQ_PKTS_FROM_EQE,}, \
> {.usec = 8, .pkts = NET_DIM_DEFAULT_TX_CQ_PKTS_FROM_EQE,}, \
> @@ -49,16 +57,26 @@
> {.usec = 64, .pkts = 32,} \
> }
>
> +#define NET_DIM_TX_SPECIFIC_0_PROFILES { \
> + {.usec = 0, .pkts = 1,}, \
> + {.usec = 4, .pkts = 16,}, \
> + {.usec = 32, .pkts = 64,}, \
> + {.usec = 64, .pkts = 128,}, \
> + {.usec = 128, .pkts = 128,} \
> +}
> +
> static const struct dim_cq_moder
> rx_profile[DIM_CQ_PERIOD_NUM_MODES][NET_DIM_PARAMS_NUM_PROFILES] = {
> NET_DIM_RX_EQE_PROFILES,
> NET_DIM_RX_CQE_PROFILES,
> + NET_DIM_RX_SPECIFIC_0_PROFILES,
> };
>
> static const struct dim_cq_moder
> tx_profile[DIM_CQ_PERIOD_NUM_MODES][NET_DIM_PARAMS_NUM_PROFILES] = {
> NET_DIM_TX_EQE_PROFILES,
> NET_DIM_TX_CQE_PROFILES,
> + NET_DIM_TX_SPECIFIC_0_PROFILES,
> };
>
> struct dim_cq_moder
> --
> 2.34.1
>
>
next prev parent reply other threads:[~2024-04-08 13:12 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-05 8:15 [PATCH net-next v4 0/4] nfp: series of minor driver improvements Louis Peens
2024-04-05 8:15 ` [PATCH net-next v4 1/4] devlink: add a new info version tag Louis Peens
2024-04-08 13:20 ` Simon Horman
2024-04-05 8:15 ` [PATCH net-next v4 2/4] nfp: update devlink device info output Louis Peens
2024-04-08 13:18 ` Simon Horman
2024-04-09 2:58 ` Jakub Kicinski
2024-04-09 7:31 ` Louis Peens
2024-04-05 8:15 ` [PATCH net-next v4 3/4] dim: introduce a specific dim profile for better latency Louis Peens
2024-04-08 13:12 ` Simon Horman [this message]
2024-04-09 2:55 ` Jakub Kicinski
2024-04-09 7:33 ` Louis Peens
2024-04-05 8:15 ` [PATCH net-next v4 4/4] nfp: use new dim profiles " Louis Peens
2024-04-08 13:13 ` Simon Horman
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=20240408131251.GD26556@kernel.org \
--to=horms@kernel.org \
--cc=davem@davemloft.net \
--cc=fei.qin@corigine.com \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=louis.peens@corigine.com \
--cc=netdev@vger.kernel.org \
--cc=oss-drivers@corigine.com \
--cc=pabeni@redhat.com \
--cc=talgi@nvidia.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.