From: "Malladi, Meghana" <m-malladi@ti.com>
To: Simon Horman <horms@kernel.org>
Cc: <pabeni@redhat.com>, <kuba@kernel.org>, <edumazet@google.com>,
<davem@davemloft.net>, <andrew+netdev@lunn.ch>,
<bpf@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<netdev@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org>,
<kory.maincent@bootlin.com>, <javier.carrasco.cruz@gmail.com>,
<diogo.ivo@siemens.com>, <jacob.e.keller@intel.com>,
<john.fastabend@gmail.com>, <hawk@kernel.org>,
<daniel@iogearbox.net>, <ast@kernel.org>, <srk@ti.com>,
Vignesh Raghavendra <vigneshr@ti.com>,
Roger Quadros <rogerq@kernel.org>, <danishanwar@ti.com>
Subject: Re: [PATCH net-next 1/3] net: ti: prueth: Fix kernel warning while bringing down network interface
Date: Fri, 21 Mar 2025 13:31:29 +0530 [thread overview]
Message-ID: <48519536-6756-4d3d-9bb1-09197248df36@ti.com> (raw)
In-Reply-To: <20250320125349.GN280585@kernel.org>
Hi Simon,
Thanks for reviewing the patch series.
On 3/20/2025 6:23 PM, Simon Horman wrote:
> On Mon, Mar 17, 2025 at 03:45:48PM +0530, Meghana Malladi wrote:
>> During network interface initialization, the NIC driver needs to register
>> its Rx queue with the XDP, to ensure the incoming XDP buffer carries a
>> pointer reference to this info and is stored inside xdp_rxq_info.
>>
>> While this struct isn't tied to XDP prog, if there are any changes in
>> Rx queue, the NIC driver needs to stop the Rx queue by unregistering
>> with XDP before purging and reallocating memory. Drop page_pool destroy
>> during Rx channel reset and this is already handled by XDP during
>> xdp_rxq_info_unreg (Rx queue unregister), failing to do will cause the
>> following warning:
>>
>> [ 271.494611] ------------[ cut here ]------------
>> [ 271.494629] WARNING: CPU: 0 PID: 2453 at /net/core/page_pool.c:1108 0xffff8000808d5f60
>
> I think it would be nice to include a bit more of the stack trace here.
>
Sure, I will attach a link to the warning logs in v2.
>>
>> Fixes: 46eeb90f03e0 ("net: ti: icssg-prueth: Use page_pool API for RX buffer allocation")
>> Signed-off-by: Meghana Malladi <m-malladi@ti.com>
>
> It is a shame that we now have more asymmetry regarding
> the allocation of the pool and unwind on error prueth_prepare_rx_chan().
>
> But if I see things correctly the freeing of the pool via
> xdp_rxq_info_unreg() is unconditional. And with that in mind
> I agree the approach taken by this patch makes sense.
>
Agreed on the asymmetry part, but I am not quite convinced on why
xdp_rxq_info_unreg() is freeing the pool unconditionally, when the
driver is the one which is allocating the pool. If xdp_rxq_info_unreg()
is freeing it, then shouldn't xdp_rxq_info_reg() be allocating it ?
> Reviewed-by: Simon Horman <horms@kernel.org>
>
> ...
next prev parent reply other threads:[~2025-03-21 8:02 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-17 10:15 [PATCH net-next 0/3] Bug fixes from XDP and perout series Meghana Malladi
2025-03-17 10:15 ` [PATCH net-next 1/3] net: ti: prueth: Fix kernel warning while bringing down network interface Meghana Malladi
2025-03-20 12:53 ` Simon Horman
2025-03-21 8:01 ` Malladi, Meghana [this message]
2025-03-17 10:15 ` [PATCH net-next 2/3] net: ti: prueth: Fix possible NULL pointer dereference inside emac_xmit_xdp_frame() Meghana Malladi
2025-03-20 12:54 ` Simon Horman
2025-03-17 10:15 ` [PATCH net-next 3/3] net: ti: icss-iep: Fix possible NULL pointer dereference for perout request Meghana Malladi
2025-03-20 12:54 ` Simon Horman
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=48519536-6756-4d3d-9bb1-09197248df36@ti.com \
--to=m-malladi@ti.com \
--cc=andrew+netdev@lunn.ch \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=danishanwar@ti.com \
--cc=davem@davemloft.net \
--cc=diogo.ivo@siemens.com \
--cc=edumazet@google.com \
--cc=hawk@kernel.org \
--cc=horms@kernel.org \
--cc=jacob.e.keller@intel.com \
--cc=javier.carrasco.cruz@gmail.com \
--cc=john.fastabend@gmail.com \
--cc=kory.maincent@bootlin.com \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rogerq@kernel.org \
--cc=srk@ti.com \
--cc=vigneshr@ti.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