All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Rahul Rameshbabu <rrameshbabu@nvidia.com>
Cc: saeedm@nvidia.com, netdev@vger.kernel.org
Subject: Re: [PATCH net-next] net/mlx5e: simplify condition after napi budget handling change
Date: Tue, 30 May 2023 22:19:43 -0700	[thread overview]
Message-ID: <20230530221943.63300b4c@kernel.org> (raw)
In-Reply-To: <87sfbd9p4z.fsf@nvidia.com>

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,

  reply	other threads:[~2023-05-31  5:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-31  2:00 [PATCH net-next] net/mlx5e: simplify condition after napi budget handling change Jakub Kicinski
2023-05-31  3:05 ` Rahul Rameshbabu
2023-05-31  5:19   ` Jakub Kicinski [this message]
2023-05-31 22:04     ` Saeed Mahameed

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=20230530221943.63300b4c@kernel.org \
    --to=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=rrameshbabu@nvidia.com \
    --cc=saeedm@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.