From: Rahul Rameshbabu <rrameshbabu@nvidia.com>
To: Joe Damato <jdamato@fastly.com>
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
tariqt@nvidia.com, Saeed Mahameed <saeedm@nvidia.com>,
Leon Romanovsky <leon@kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
"open list:MELLANOX MLX5 core VPI driver"
<linux-rdma@vger.kernel.org>
Subject: Re: [PATCH net-next v2] eth: mlx5: link NAPI instances to queues and IRQs
Date: Mon, 05 Feb 2024 18:52:45 -0800 [thread overview]
Message-ID: <87o7cul2nf.fsf@nvidia.com> (raw)
In-Reply-To: <20240206024956.226452-1-jdamato@fastly.com>
On Tue, 06 Feb, 2024 02:49:56 +0000 Joe Damato <jdamato@fastly.com> wrote:
> Make mlx5 compatible with the newly added netlink queue GET APIs.
>
> v1 -> v2:
> - Move netlink NULL code to mlx5e_deactivate_channel
> - Move netif_napi_set_irq to mlx5e_open_channel and avoid storing the
> irq, after netif_napi_add which itself sets the IRQ to -1.
> - Fix white space where IRQ is stored in mlx5e_open_channel
>
> Signed-off-by: Joe Damato <jdamato@fastly.com>
> ---
> drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
> index c8e8f512803e..3e74c7de6050 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
> @@ -2560,6 +2560,7 @@ static int mlx5e_open_channel(struct mlx5e_priv *priv, int ix,
> c->lag_port = mlx5e_enumerate_lag_port(priv->mdev, ix);
>
> netif_napi_add(netdev, &c->napi, mlx5e_napi_poll);
> + netif_napi_set_irq(&c->napi, irq);
>
> err = mlx5e_open_queues(c, params, cparam);
> if (unlikely(err))
> @@ -2602,6 +2603,9 @@ static void mlx5e_activate_channel(struct mlx5e_channel *c)
> mlx5e_activate_xsk(c);
> else
> mlx5e_activate_rq(&c->rq);
> +
> + netif_queue_set_napi(c->netdev, c->ix, NETDEV_QUEUE_TYPE_TX, &c->napi);
> + netif_queue_set_napi(c->netdev, c->ix, NETDEV_QUEUE_TYPE_RX, &c->napi);
> }
>
> static void mlx5e_deactivate_channel(struct mlx5e_channel *c)
> @@ -2619,6 +2623,9 @@ static void mlx5e_deactivate_channel(struct mlx5e_channel *c)
> mlx5e_deactivate_txqsq(&c->sq[tc]);
> mlx5e_qos_deactivate_queues(c);
>
> + netif_queue_set_napi(c->netdev, c->ix, NETDEV_QUEUE_TYPE_TX, NULL);
> + netif_queue_set_napi(c->netdev, c->ix, NETDEV_QUEUE_TYPE_RX, NULL);
> +
I think it would be better to clean the associations before actually
deactivating the queues. Your teardown becomes LIFO/flipped order of
what is done in mlx5_activate_channel.
> napi_disable(&c->napi);
> }
In general, the netdev community maintains a rule for not reposting new
versions of patches in 24hr periods to avoid these types of situations.
Lets add the feedback of updating the commit message feedback in the v1
thread into v3.
https://lore.kernel.org/netdev/20240206025153.GA11388@fastly.com/T/#mcbf987c817c0d06c29364410ba8ab10b144c753d
Lets send out that v3 a day from now if that's alright. This way we can
pick up feedback from others if needed, but I think we are converging
here.
--
Thanks,
Rahul Rameshbabu
next prev parent reply other threads:[~2024-02-06 2:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-06 2:49 [PATCH net-next v2] eth: mlx5: link NAPI instances to queues and IRQs Joe Damato
2024-02-06 2:52 ` Rahul Rameshbabu [this message]
2024-02-06 5:09 ` Rahul Rameshbabu
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=87o7cul2nf.fsf@nvidia.com \
--to=rrameshbabu@nvidia.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jdamato@fastly.com \
--cc=kuba@kernel.org \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=saeedm@nvidia.com \
--cc=tariqt@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).