Netdev List
 help / color / mirror / Atom feed
From: Dragos Tatulea <dtatulea@nvidia.com>
To: Etienne AUJAMES <eaujames@ddn.com>
Cc: Tariq Toukan <tariqt@nvidia.com>,
	Saeed Mahameed <saeedm@nvidia.com>,
	Leon Romanovsky <leon@kernel.org>, Mark Bloch <mbloch@nvidia.com>,
	netdev@vger.kernel.org, linux-rdma@vger.kernel.org,
	Feng Liu <feliu@nvidia.com>,
	"David S. Miller" <davem@davemloft.net>,
	COURRIER Guillaume <guillaume.courrier@cea.fr>
Subject: Re: [PATCH net] net/mlx5e: guard child PKEY channel stats lookup in rx path
Date: Fri, 27 Nov 2026 14:56:31 +0100	[thread overview]
Message-ID: <5e95879a-0b9f-41b9-be6d-c91a1c5c0666@nvidia.com> (raw)
In-Reply-To: <awljlARPJweYKIZb@eaujamesFR0130>

On 27.11.26 12:03, Etienne AUJAMES wrote:
> Hi Dragos,
> 
> Thanks for your reply.
> 
> On 26/11/26, Dragos Tatulea wrote:
>> There are 2 issues here, each needs its own fix:
>>
>> a) Packets shouldn't be steered to the parent RQ before the pkey netdev
>> channel stats are allocated. Fix by moving the flow steering setup
>> (mlx5_fs_add_rx_underlay_qpn()) after the channel open in
>> mlx5i_pkey_open().
> Ok, I will try to make this change.
> 
Thanks!

>> b) The thing with the resizing of the parent channels. Can be fixed
>> by allocating the max number of channels for the pkey netdev. AFAIU,
>> `priv->channels.params.num_channels = priv->max_nch` in
>> mlx5i_pkey_init() should do the trick.
> I don't believe that's possible. The following commit prevents
> changing the parent channel count once child interfaces are initialized:
> 
> commit 806a8df7126a8c05d60411eeb81057c2a8bbe7a7
> Author: Dragos Tatulea <dtatulea@nvidia.com>
> Date:   Thu Dec 15 13:02:38 2022 +0200
> 
>     net/mlx5e: IPoIB, Block queue count configuration when sub interfaces are present
> 
>     PKEY sub interfaces share the receive queues with the parent interface.
>     While setting the sub interface queue count is not supported, it is
>     currently possible to change the number of queues of the parent interface.
>     Thus we can end up with inconsistent queue sizes between the parent and its
>     sub interfaces.
> 
>     This change disallows setting the queue count on the parent interface when
>     sub interfaces are present.
> 
> +       if (ipriv->num_sub_interfaces > 0) {
> +               mlx5_core_warn(epriv->mdev,
> +                              "can't change number of channels for interfaces with sub interfaces (%u)\n",
> +                              ipriv->num_sub_interfaces);
> +               return -EINVAL;
> 
> Can you confirm that the parent channel count cannot be resized while
> a sub-interface is present (whether UP or DOWN)?"
>
True. I had forgotten about this change. However, it is still possible to have
a parent created with > 128 channels and the pkeys created afterwards. And then
you can run into the issue again...

Thanks,
Dragos

  reply	other threads:[~2026-11-27 13:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-25 18:24 [PATCH net] net/mlx5e: guard child PKEY channel stats lookup in rx path Etienne AUJAMES
2026-11-25 18:27 ` netdev-bot+sinfo
2026-11-25 19:17   ` Etienne AUJAMES
2026-11-26 14:41 ` Dragos Tatulea
2026-11-27 11:03   ` Etienne AUJAMES
2026-11-27 13:56     ` Dragos Tatulea [this message]
2026-11-27 20:31       ` Etienne AUJAMES
2026-11-26 18:27 ` netdev-bot+sashiko

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=5e95879a-0b9f-41b9-be6d-c91a1c5c0666@nvidia.com \
    --to=dtatulea@nvidia.com \
    --cc=davem@davemloft.net \
    --cc=eaujames@ddn.com \
    --cc=feliu@nvidia.com \
    --cc=guillaume.courrier@cea.fr \
    --cc=leon@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=mbloch@nvidia.com \
    --cc=netdev@vger.kernel.org \
    --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