From: "Haozhe Chang (常浩哲)" <Haozhe.Chang@mediatek.com>
To: "kuba@kernel.org" <kuba@kernel.org>
Cc: "stephan@gerhold.net" <stephan@gerhold.net>,
"oneukum@suse.com" <oneukum@suse.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
"linux-remoteproc@vger.kernel.org"
<linux-remoteproc@vger.kernel.org>,
"linuxwwan@intel.com" <linuxwwan@intel.com>,
"m.chetan.kumar@intel.com" <m.chetan.kumar@intel.com>,
"linux-mediatek@lists.infradead.org"
<linux-mediatek@lists.infradead.org>,
"Hua Yang (杨华)" <Hua.Yang@mediatek.com>,
"chiranjeevi.rapolu@linux.intel.com"
<chiranjeevi.rapolu@linux.intel.com>,
"Haijun Liu (刘海军)" <haijun.liu@mediatek.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"ryazanov.s.a@gmail.com" <ryazanov.s.a@gmail.com>,
"Xiayu Zhang (张夏宇)" <Xiayu.Zhang@mediatek.com>,
"loic.poulain@linaro.org" <loic.poulain@linaro.org>,
"pabeni@redhat.com" <pabeni@redhat.com>,
"edumazet@google.com" <edumazet@google.com>,
"chandrashekar.devegowda@intel.com"
<chandrashekar.devegowda@intel.com>,
"johannes@sipsolutions.net" <johannes@sipsolutions.net>,
"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
"shangxiaojing@huawei.com" <shangxiaojing@huawei.com>,
"Lambert Wang (王伟)" <Lambert.Wang@mediatek.com>,
"matthias.bgg@gmail.com" <matthias.bgg@gmail.com>,
"davem@davemloft.net" <davem@davemloft.net>,
"ricardo.martinez@linux.intel.com"
<ricardo.martinez@linux.intel.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"angelogioacchino.delregno@collabora.com"
<angelogioacchino.delregno@collabora.com>
Subject: Re: [PATCH RESEND net-next v7] wwan: core: Support slicing in port TX flow of WWAN subsystem
Date: Thu, 16 Mar 2023 01:17:20 +0000 [thread overview]
Message-ID: <be70562aa153e8de2446dcb3b8052c027e50b0cb.camel@mediatek.com> (raw)
In-Reply-To: <20230313160837.77f4ced0@kernel.org>
Dear Jakub Kicinski
On Mon, 2023-03-13 at 16:08 -0700, Jakub Kicinski wrote:
> On Wed, 8 Mar 2023 16:19:35 +0800 haozhe.chang@mediatek.com wrote:
> > /**
> > * wwan_create_port - Add a new WWAN port
> > * @parent: Device to use as parent and shared by all WWAN ports
> > * @type: WWAN port type
> > * @ops: WWAN port operations
> > + * @frag_len: WWAN port TX fragments length, if WWAN_NO_FRAGMENT
> > is set,
> > + * the WWAN core don't fragment control packages.
> > + * @headroom_len: WWAN port TX fragments reserved headroom length,
> > if WWAN_NO_HEADROOM
> > + * is set, the WWAN core don't reserve headroom in
> > control packages.
> > * @drvdata: Pointer to caller driver data
> > *
> > * Allocate and register a new WWAN port. The port will be
> > automatically exposed
> > @@ -86,6 +100,8 @@ struct wwan_port_ops {
> > struct wwan_port *wwan_create_port(struct device *parent,
> > enum wwan_port_type type,
> > const struct wwan_port_ops *ops,
> > + size_t frag_len,
> > + unsigned int headroom_len,
> > void *drvdata);
> >
>
> Too many arguments, and poor extensibility.
> Please wrap the new params into a capability struct:
>
> struct wwan_port_caps {
> unsigned int frag_len;
> unsigned int headroom_len;
> };
>
> pass a pointer to this kind of structure in.
>
> Next time someone needs to add a quirk they can just add a field and
> won't need to change all the drivers.
Thanks for your suggestion. But the same suggestion has been discussed
in previous patch v2:
https://patchwork.kernel.org/project/netdevbpf/patch/20221108105352.89801-1-haozhe.chang@mediatek.com/
The opinion from Loic: "I think 6 is still fine, if we need more fields
in the future we can always have a port_config struct as a parameter
instead."
BR
prev parent reply other threads:[~2023-03-16 1:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-08 8:19 haozhe.chang
2023-03-13 23:08 ` Jakub Kicinski
2023-03-16 1:17 ` Haozhe Chang (常浩哲) [this message]
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=be70562aa153e8de2446dcb3b8052c027e50b0cb.camel@mediatek.com \
--to=haozhe.chang@mediatek.com \
--cc=Hua.Yang@mediatek.com \
--cc=Lambert.Wang@mediatek.com \
--cc=Xiayu.Zhang@mediatek.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=chandrashekar.devegowda@intel.com \
--cc=chiranjeevi.rapolu@linux.intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=haijun.liu@mediatek.com \
--cc=johannes@sipsolutions.net \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-remoteproc@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=linuxwwan@intel.com \
--cc=loic.poulain@linaro.org \
--cc=m.chetan.kumar@intel.com \
--cc=matthias.bgg@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=oneukum@suse.com \
--cc=pabeni@redhat.com \
--cc=ricardo.martinez@linux.intel.com \
--cc=ryazanov.s.a@gmail.com \
--cc=shangxiaojing@huawei.com \
--cc=stephan@gerhold.net \
/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
all inboxes | Powered by JetHome®