[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CH3PR11MB831365B031718C0DBF32FDB0EA872@CH3PR11MB8313.namprd11.prod.outlook.com>
Date: Wed, 14 Aug 2024 02:42:34 +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>, "bjorn@...nel.org"
<bjorn@...nel.org>, "Nguyen, Anthony L" <anthony.l.nguyen@...el.com>,
"Karlsson, Magnus" <magnus.karlsson@...el.com>, "luizcap@...hat.com"
<luizcap@...hat.com>, "Kuruvinakunnel, George"
<george.kuruvinakunnel@...el.com>, "Nagraj, Shravan"
<shravan.nagraj@...el.com>, "Pandey, Atul" <atul.pandey@...el.com>
Subject: RE: [Intel-wired-lan] [PATCH iwl-net 3/3] ice: fix truesize
operations for PAGE_SIZE >= 8192
>-----Original Message-----
>From: Intel-wired-lan <intel-wired-lan-bounces@...osl.org> On Behalf Of
>Fijalkowski, Maciej
>Sent: Wednesday, August 7, 2024 4:23 PM
>To: intel-wired-lan@...ts.osuosl.org
>Cc: Fijalkowski, Maciej <maciej.fijalkowski@...el.com>;
>netdev@...r.kernel.org; bjorn@...nel.org; Nguyen, Anthony L
><anthony.l.nguyen@...el.com>; Karlsson, Magnus
><magnus.karlsson@...el.com>; luizcap@...hat.com
>Subject: [Intel-wired-lan] [PATCH iwl-net 3/3] ice: fix truesize operations for
>PAGE_SIZE >= 8192
>
>When working on multi-buffer packet on arch that has PAGE_SIZE >= 8192,
>truesize is calculated and stored in xdp_buff::frame_sz per each processed Rx
>buffer. This means that frame_sz will contain the truesize based on last received
>buffer, but commit 1dc1a7e7f410 ("ice:
>Centrallize Rx buffer recycling") assumed this value will be constant for each
>buffer, which breaks the page recycling scheme and mess up the way we
>update the page::page_offset.
>
>To fix this, let us work on constant truesize when PAGE_SIZE >= 8192 instead of
>basing this on size of a packet read from Rx descriptor. This way we can simplify
>the code and avoid calculating truesize per each received frame and on top of
>that when using xdp_update_skb_shared_info(), current formula for truesize
>update will be valid.
>
>This means ice_rx_frame_truesize() can be removed altogether.
>Furthermore, first call to it within ice_clean_rx_irq() for 4k PAGE_SIZE was
>redundant as xdp_buff::frame_sz is initialized via xdp_init_buff() in
>ice_vsi_cfg_rxq(). This should have been removed at the point where xdp_buff
>struct started to be a member of ice_rx_ring and it was no longer a stack based
>variable.
>
>There are two fixes tags as my understanding is that the first one exposed us to
>broken truesize and page_offset handling and then second introduced broken
>skb_shared_info update in ice_{construct,build}_skb().
>
>Reported-and-tested-by: Luiz Capitulino <luizcap@...hat.com>
>Closes: https://lore.kernel.org/netdev/8f9e2a5c-fd30-4206-9311-
>946a06d031bb@...hat.com/
>Fixes: 1dc1a7e7f410 ("ice: Centrallize Rx buffer recycling")
>Fixes: 2fba7dc5157b ("ice: Add support for XDP multi-buffer on Rx side")
>Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@...el.com>
>---
> drivers/net/ethernet/intel/ice/ice_base.c | 21 ++++++++++++++-
>drivers/net/ethernet/intel/ice/ice_txrx.c | 33 -----------------------
> 2 files changed, 20 insertions(+), 34 deletions(-)
>
Tested-by: Chandan Kumar Rout <chandanx.rout@...el.com> (A Contingent Worker at Intel)
Powered by blists - more mailing lists