[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAMArcTXa+15aQ77HAMx5y4HenV6a4kCHVZkERf=DcfCdC-on1Q@mail.gmail.com>
Date: Wed, 19 Feb 2025 11:37:29 +0900
From: Taehee Yoo <ap420073@...il.com>
To: David Wei <dw@...idwei.uk>
Cc: Mina Almasry <almasrymina@...gle.com>, davem@...emloft.net, kuba@...nel.org,
pabeni@...hat.com, edumazet@...gle.com, donald.hunter@...il.com,
corbet@....net, michael.chan@...adcom.com, andrew+netdev@...n.ch,
hawk@...nel.org, ilias.apalodimas@...aro.org, ast@...nel.org,
daniel@...earbox.net, john.fastabend@...il.com, sdf@...ichev.me,
asml.silence@...il.com, brett.creeley@....com, linux-doc@...r.kernel.org,
netdev@...r.kernel.org, kory.maincent@...tlin.com,
maxime.chevallier@...tlin.com, danieller@...dia.com, hengqi@...ux.alibaba.com,
ecree.xilinx@...il.com, przemyslaw.kitszel@...el.com, hkallweit1@...il.com,
ahmed.zaki@...el.com, rrameshbabu@...dia.com, idosch@...dia.com,
jiri@...nulli.us, bigeasy@...utronix.de, lorenzo@...nel.org,
jdamato@...tly.com, aleksander.lobakin@...el.com, kaiyuanz@...gle.com,
willemb@...gle.com, daniel.zahka@...il.com
Subject: Re: [PATCH net-next v4 8/8] bnxt_en: add support for device memory tcp
On Wed, Feb 19, 2025 at 9:16 AM David Wei <dw@...idwei.uk> wrote:
>
> On 2024-11-01 11:24, Taehee Yoo wrote:
> > On Fri, Nov 1, 2024 at 11:53 PM Mina Almasry <almasrymina@...gle.com> wrote:
> >>
> >> On Tue, Oct 22, 2024 at 9:25 AM Taehee Yoo <ap420073@...il.com> wrote:
> >>>
> >>> Currently, bnxt_en driver satisfies the requirements of Device memory
> >>> TCP, which is tcp-data-split.
> >>> So, it implements Device memory TCP for bnxt_en driver.
> >>>
> >>> From now on, the aggregation ring handles netmem_ref instead of page
> >>> regardless of the on/off of netmem.
> >>> So, for the aggregation ring, memory will be handled with the netmem
> >>> page_pool API instead of generic page_pool API.
> >>>
> >>> If Devmem is enabled, netmem_ref is used as-is and if Devmem is not
> >>> enabled, netmem_ref will be converted to page and that is used.
> >>>
> >>> Driver recognizes whether the devmem is set or unset based on the
> >>> mp_params.mp_priv is not NULL.
> >>> Only if devmem is set, it passes PP_FLAG_ALLOW_UNREADABLE_NETMEM.
> >>
> >> Looks like in the latest version, you pass
> >> PP_FLAG_ALLOW_UNREADABLE_NETMEM unconditionally, so this line is
> >> obsolete.
> >
> > Okay, I will remove this line.
> >
> >>
> >> However, I think you should only pass PP_FLAG_ALLOW_UNREADABLE_NETMEM
> >> if hds_thresh==0 and tcp-data-split==1, because otherwise the driver
> >> is not configured well enough to handle unreadable netmem, right? I
> >> know that we added checks in the devmem binding to detect hds_thresh
> >> and tcp-data-split, but we should keep another layer of protection in
> >> the driver. The driver should not set PP_FLAG_ALLOW_UNREADABLE_NETMEM
> >> unless it's configured to be able to handle unreadable netmem.
> >
> > Okay, I agree, I will pass PP_FLAG_ALLOW_UNREADABLE_NETMEM
> > only when hds_thresh==0 and tcp-data-split==1.
> >
> >>
> >>>
> >>> Tested-by: Stanislav Fomichev <sdf@...ichev.me>
> >>> Signed-off-by: Taehee Yoo <ap420073@...il.com>
> >>> ---
> >>>
> >>> v4:
> >>> - Do not select NET_DEVMEM in Kconfig.
> >>> - Pass PP_FLAG_ALLOW_UNREADABLE_NETMEM flag unconditionally.
> >>> - Add __bnxt_rx_agg_pages_xdp().
> >>> - Use gfp flag in __bnxt_alloc_rx_netmem().
> >>> - Do not add *offset in the __bnxt_alloc_rx_netmem().
> >>> - Do not pass queue_idx to bnxt_alloc_rx_page_pool().
> >>> - Add Test tag from Stanislav.
> >>> - Add page_pool_recycle_direct_netmem() helper.
> >>>
> >>> v3:
> >>> - Patch added.
> >>>
> >>> drivers/net/ethernet/broadcom/bnxt/bnxt.c | 182 ++++++++++++++++------
> >>> drivers/net/ethernet/broadcom/bnxt/bnxt.h | 2 +-
> >>> include/net/page_pool/helpers.h | 6 +
> >>> 3 files changed, 142 insertions(+), 48 deletions(-)
>
> Hi Taehee, what is your plan with this patch? Are you still working on
> it? I noticed that you dropped it in later versions of this series. With
> io_uring zero copy Rx now merged I also need bnxt support, but I don't
> want to duplicate efforts. Please let me know, thanks!
Hi David,
Sorry for the late! I'm still working on it.
I implemented a working patch, but there are several bugs.
So I'm thinking about how to deal with it.
And then, I would like to send this patch after fixing bugs.
Thanks a lot!
Taehee Yoo
Powered by blists - more mailing lists