[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CH3PR11MB831368FB5B682650AB612C6DEAE82@CH3PR11MB8313.namprd11.prod.outlook.com>
Date: Fri, 31 Jan 2025 00:30:22 +0000
From: "Rout, ChandanX" <chandanx.rout@...el.com>
To: "Fijalkowski, Maciej" <maciej.fijalkowski@...el.com>,
"intel-wired-lan@...ts.osuosl.org" <intel-wired-lan@...ts.osuosl.org>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>, "xudu@...hat.com"
<xudu@...hat.com>, "Nguyen, Anthony L" <anthony.l.nguyen@...el.com>, "Simon
Horman" <horms@...nel.org>, "Kitszel, Przemyslaw"
<przemyslaw.kitszel@...el.com>, "Keller, Jacob E" <jacob.e.keller@...el.com>,
"Maxwell, Jon" <jmaxwell@...hat.com>, "Karlsson, Magnus"
<magnus.karlsson@...el.com>, "Kuruvinakunnel, George"
<george.kuruvinakunnel@...el.com>, "Pandey, Atul" <atul.pandey@...el.com>,
"Nagraj, Shravan" <shravan.nagraj@...el.com>
Subject: RE: [Intel-wired-lan] [PATCH v5 iwl-net 2/3] ice: gather
page_count()'s of each frag right before XDP prog call
>-----Original Message-----
>From: Intel-wired-lan <intel-wired-lan-bounces@...osl.org> On Behalf Of
>Fijalkowski, Maciej
>Sent: Thursday, January 23, 2025 8:31 PM
>To: intel-wired-lan@...ts.osuosl.org
>Cc: Fijalkowski, Maciej <maciej.fijalkowski@...el.com>;
>netdev@...r.kernel.org; xudu@...hat.com; Nguyen, Anthony L
><anthony.l.nguyen@...el.com>; Simon Horman <horms@...nel.org>; Kitszel,
>Przemyslaw <przemyslaw.kitszel@...el.com>; Keller, Jacob E
><jacob.e.keller@...el.com>; Maxwell, Jon <jmaxwell@...hat.com>; Karlsson,
>Magnus <magnus.karlsson@...el.com>
>Subject: [Intel-wired-lan] [PATCH v5 iwl-net 2/3] ice: gather page_count()'s of
>each frag right before XDP prog call
>
>If we store the pgcnt on few fragments while being in the middle of gathering
>the whole frame and we stumbled upon DD bit not being set, we terminate the
>NAPI Rx processing loop and come back later on. Then on next NAPI execution
>we work on previously stored pgcnt.
>
>Imagine that second half of page was used actively by networking stack and by
>the time we came back, stack is not busy with this page anymore and
>decremented the refcnt. The page reuse algorithm in this case should be good
>to reuse the page but given the old refcnt it will not do so and attempt to
>release the page via page_frag_cache_drain() with pagecnt_bias used as an arg.
>This in turn will result in negative refcnt on struct page, which was initially
>observed by Xu Du.
>
>Therefore, move the page count storage from ice_get_rx_buf() to a place where
>we are sure that whole frame has been collected, but before calling XDP
>program as it internally can also change the page count of fragments belonging
>to xdp_buff.
>
>Fixes: ac0753391195 ("ice: Store page count inside ice_rx_buf")
>Reported-and-tested-by: Xu Du <xudu@...hat.com>
>Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@...el.com>
>Reviewed-by: Simon Horman <horms@...nel.org>
>Co-developed-by: Jacob Keller <jacob.e.keller@...el.com>
>Signed-off-by: Jacob Keller <jacob.e.keller@...el.com>
>Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@...el.com>
>---
> drivers/net/ethernet/intel/ice/ice_txrx.c | 27 ++++++++++++++++++++++-
> 1 file changed, 26 insertions(+), 1 deletion(-)
>
Tested-by: Chandan Kumar Rout <chandanx.rout@...el.com> (A Contingent Worker at Intel)
Powered by blists - more mailing lists