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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230530221943.63300b4c@kernel.org>
Date: Tue, 30 May 2023 22:19:43 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Rahul Rameshbabu <rrameshbabu@...dia.com>
Cc: saeedm@...dia.com, netdev@...r.kernel.org
Subject: Re: [PATCH net-next] net/mlx5e: simplify condition after napi
 budget handling change

reminder: please avoid top posting on the list

On Tue, 30 May 2023 20:05:32 -0700 Rahul Rameshbabu wrote:
> You might want to clean up
> drivers/net/ethernet/mellanox/mlx5/core/en/ptp.c as well in the
> mlx5e_ptp_napi_poll function as well.
> 
>   static int mlx5e_ptp_napi_poll(struct napi_struct *napi, int budget)

This is a separate NAPI instance, I don't think I should be touching
this. I can remove a check from TLS, tho, it seems:

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls_txrx.h b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls_txrx.h
index 2dd78dd4ad65..5eadd47cee40 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls_txrx.h
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls_txrx.h
@@ -44,9 +44,9 @@ mlx5e_ktls_tx_try_handle_resync_dump_comp(struct mlx5e_txqsq *sq,
 bool mlx5e_ktls_rx_handle_resync_list(struct mlx5e_channel *c, int budget);
 
 static inline bool
-mlx5e_ktls_rx_pending_resync_list(struct mlx5e_channel *c, int budget)
+mlx5e_ktls_rx_pending_resync_list(struct mlx5e_channel *c)
 {
-	return budget && test_bit(MLX5E_SQ_STATE_PENDING_TLS_RX_RESYNC, &c->async_icosq.state);
+	return test_bit(MLX5E_SQ_STATE_PENDING_TLS_RX_RESYNC, &c->async_icosq.state);
 }
 
 static inline bool mlx5e_ktls_skb_offloaded(struct sk_buff *skb)
@@ -76,7 +76,7 @@ mlx5e_ktls_rx_handle_resync_list(struct mlx5e_channel *c, int budget)
 }
 
 static inline bool
-mlx5e_ktls_rx_pending_resync_list(struct mlx5e_channel *c, int budget)
+mlx5e_ktls_rx_pending_resync_list(struct mlx5e_channel *c)
 {
 	return false;
 }
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_txrx.c b/drivers/net/ethernet/mellanox/mlx5/core/en_txrx.c
index a7d9b7cb4297..5012a5610353 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_txrx.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_txrx.c
@@ -186,7 +186,7 @@ int mlx5e_napi_poll(struct napi_struct *napi, int budget)
 		clear_bit(MLX5E_SQ_STATE_PENDING_XSK_TX, &c->async_icosq.state);
 
 	/* Keep after async ICOSQ CQ poll */
-	if (unlikely(mlx5e_ktls_rx_pending_resync_list(c, budget)))
+	if (unlikely(mlx5e_ktls_rx_pending_resync_list(c)))
 		busy |= mlx5e_ktls_rx_handle_resync_list(c, budget);
 
 	busy |= INDIRECT_CALL_2(rq->post_wqes,

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ