lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240408131251.GD26556@kernel.org>
Date: Mon, 8 Apr 2024 14:12:51 +0100
From: Simon Horman <horms@...nel.org>
To: Louis Peens <louis.peens@...igine.com>
Cc: David Miller <davem@...emloft.net>, Jakub Kicinski <kuba@...nel.org>,
	Paolo Abeni <pabeni@...hat.com>, Jiri Pirko <jiri@...nulli.us>,
	Fei Qin <fei.qin@...igine.com>, netdev@...r.kernel.org,
	oss-drivers@...igine.com, Tal Gilboa <talgi@...dia.com>
Subject: Re: [PATCH net-next v4 3/4] dim: introduce a specific dim profile
 for better latency

+ Tal Gilboa

On Fri, Apr 05, 2024 at 10:15:46AM +0200, Louis Peens wrote:
> From: Fei Qin <fei.qin@...igine.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@...igine.com>
> Signed-off-by: Louis Peens <louis.peens@...igine.com>

Noting that this is consistent of review of v1 [1], this looks good to me.

Reviewed-by: Simon Horman <horms@...nel.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
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ