From: Jakub Kicinski <kuba@kernel.org>
To: Jinjian Song <jinjian.song@fibocom.com>
Cc: andrew+netdev@lunn.ch, angelogioacchino.delregno@collabora.com,
chandrashekar.devegowda@intel.com,
chiranjeevi.rapolu@linux.intel.com, corbet@lwn.net,
danielwinkler@google.com, davem@davemloft.net,
edumazet@google.com, haijun.liu@mediatek.com, helgaas@kernel.org,
horms@kernel.org, johannes@sipsolutions.net, korneld@google.com,
linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org,
loic.poulain@linaro.org, m.chetan.kumar@linux.intel.com,
matthias.bgg@gmail.com, netdev@vger.kernel.org,
pabeni@redhat.com, rafael.wang@fibocom.com,
ricardo.martinez@linux.intel.com, ryazanov.s.a@gmail.com
Subject: Re: [net-next v1] net: wwan: t7xx: Parameterize data plane RX BAT and FAG count
Date: Fri, 16 May 2025 08:43:20 -0700 [thread overview]
Message-ID: <20250516084320.66998caf@kernel.org> (raw)
In-Reply-To: <20250515180858.2568d930@kernel.org>
On Fri, 16 May 2025 11:46:57 +0800 Jinjian Song wrote:
> >Module parameters are discouraged, they are pretty poor as an API since
> >they apply to all devices in the system. Can you describe what "frg"
> >and "bat" are ? One of the existing APIs likely covers them.
> >Please also describe the scope (are they per netdev or some sort of
> >device level params)?
>
> MTK t7xx data plane hardware use BAT (Buffer Address Table) and FRG (Fragment) BAT
> to describle and manager RX buffer, these buffers will apply for a fixed size after
> the driver probe, and accompany the life cycle of the driver.
>
> On some platforms, especially those that use swiotlb to manager buffers, without
> changing the buffer pool provided by swiotlb, it's needed to adjust the buffers
> used by the driver to meet the requirements.
> So parameterize these buffers applicable to the MTK t7xx driver to facilitate
> different platforms to work with different configurations.
Have you looked at
https://docs.kernel.org/networking/ethtool-netlink.html#rings-set
?
WARNING: multiple messages have this Message-ID (diff)
From: Jinjian Song <jinjian.song@fibocom.com>
To: kuba@kernel.org
Cc: andrew+netdev@lunn.ch, angelogioacchino.delregno@collabora.com,
chandrashekar.devegowda@intel.com,
chiranjeevi.rapolu@linux.intel.com, corbet@lwn.net,
danielwinkler@google.com, davem@davemloft.net,
edumazet@google.com, haijun.liu@mediatek.com, helgaas@kernel.org,
horms@kernel.org, jinjian.song@fibocom.com,
johannes@sipsolutions.net, korneld@google.com,
linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org,
loic.poulain@linaro.org, m.chetan.kumar@linux.intel.com,
matthias.bgg@gmail.com, netdev@vger.kernel.org,
pabeni@redhat.com, rafael.wang@fibocom.com,
ricardo.martinez@linux.intel.com, ryazanov.s.a@gmail.com
Subject: Re: [net-next v1] net: wwan: t7xx: Parameterize data plane RX BAT and FAG count
Date: Tue, 20 May 2025 10:59:34 +0800 [thread overview]
Message-ID: <20250516084320.66998caf@kernel.org> (raw)
Message-ID: <20250520025934.f22GRoQylqZeJah4YriZ5YYy03Cn2wXZOqrpwHuNdmY@z> (raw)
In-Reply-To: <20250516084320.66998caf@kernel.org>
>On Fri, 16 May 2025 11:46:57 +0800 Jinjian Song wrote:
>> >Module parameters are discouraged, they are pretty poor as an API since
>> >they apply to all devices in the system. Can you describe what "frg"
>> >and "bat" are ? One of the existing APIs likely covers them.
>> >Please also describe the scope (are they per netdev or some sort of
>> >device level params)?
>>
>> MTK t7xx data plane hardware use BAT (Buffer Address Table) and FRG (Fragment) BAT
>> to describle and manager RX buffer, these buffers will apply for a fixed size after
>> the driver probe, and accompany the life cycle of the driver.
>>
>> On some platforms, especially those that use swiotlb to manager buffers, without
>> changing the buffer pool provided by swiotlb, it's needed to adjust the buffers
>> used by the driver to meet the requirements.
>> So parameterize these buffers applicable to the MTK t7xx driver to facilitate
>> different platforms to work with different configurations.
>
>Have you looked at
>https://docs.kernel.org/networking/ethtool-netlink.html#rings-set
>?
>
Hi Jakub,
Thanks, I've just learned this content.
I think ETHTOOL_STRINGPARAM is a good summary of the ring parameters and can
be referred to and applied to WWAN. However, it seemes that this can't be configured
when the driver is loaded and requires an application through ioctrl. In addition,
directly using this parameter can't well correspond to the multiple buffer representing
BAT in the t7xx driver.
If it's not feasible to directly add parameters for configuring this RX buffer(BAT/FAG) to
the mtk_t7xx driver, would it be allowed to add aparameter for a default configuration
ratio (1/2, 1/4)? Or is it not recommended to use driver parameters for mtk_t7xx driver.
Thanks,
Best Regards.
next prev parent reply other threads:[~2025-05-16 15:43 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-14 10:47 [net-next v1] net: wwan: t7xx: Parameterize data plane RX BAT and FAG count Jinjian Song
2025-05-16 1:08 ` Jakub Kicinski
2025-05-16 3:46 ` Jinjian Song
2025-05-16 15:43 ` Jakub Kicinski [this message]
2025-05-20 2:59 ` Jinjian Song
2025-05-20 19:21 ` Jakub Kicinski
2025-06-04 9:17 ` Jinjian Song
2025-06-05 14:12 ` Jakub Kicinski
2025-06-06 10:00 ` Jinjian Song
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=20250516084320.66998caf@kernel.org \
--to=kuba@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=angelogioacchino.delregno@collabora.com \
--cc=chandrashekar.devegowda@intel.com \
--cc=chiranjeevi.rapolu@linux.intel.com \
--cc=corbet@lwn.net \
--cc=danielwinkler@google.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=haijun.liu@mediatek.com \
--cc=helgaas@kernel.org \
--cc=horms@kernel.org \
--cc=jinjian.song@fibocom.com \
--cc=johannes@sipsolutions.net \
--cc=korneld@google.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=loic.poulain@linaro.org \
--cc=m.chetan.kumar@linux.intel.com \
--cc=matthias.bgg@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rafael.wang@fibocom.com \
--cc=ricardo.martinez@linux.intel.com \
--cc=ryazanov.s.a@gmail.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;
as well as URLs for NNTP newsgroup(s).