From: Jakub Kicinski <kuba@kernel.org>
To: <haozhe.chang@mediatek.com>
Cc: M Chetan Kumar <m.chetan.kumar@intel.com>,
Intel Corporation <linuxwwan@intel.com>,
Loic Poulain <loic.poulain@linaro.org>,
Sergey Ryazanov <ryazanov.s.a@gmail.com>,
Johannes Berg <johannes@sipsolutions.net>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>,
Stephan Gerhold <stephan@gerhold.net>,
Chandrashekar Devegowda <chandrashekar.devegowda@intel.com>,
Chiranjeevi Rapolu <chiranjeevi.rapolu@linux.intel.com>,
Liu Haijun <haijun.liu@mediatek.com>,
Ricardo Martinez <ricardo.martinez@linux.intel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Matthias Brugger <matthias.bgg@gmail.com>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
Oliver Neukum <oneukum@suse.com>,
Shang XiaoJing <shangxiaojing@huawei.com>,
"open list:INTEL WWAN IOSM DRIVER" <netdev@vger.kernel.org>,
open list <linux-kernel@vger.kernel.org>,
"open list:REMOTE PROCESSOR MESSAGING (RPMSG) WWAN CONTROL..."
<linux-remoteproc@vger.kernel.org>,
"open list:USB SUBSYSTEM" <linux-usb@vger.kernel.org>,
"moderated list:ARM/Mediatek SoC support"
<linux-arm-kernel@lists.infradead.org>,
"moderated list:ARM/Mediatek SoC support"
<linux-mediatek@lists.infradead.org>, <lambert.wang@mediatek.com>,
<xiayu.zhang@mediatek.com>, <hua.yang@mediatek.com>
Subject: Re: [PATCH RESEND net-next v7] wwan: core: Support slicing in port TX flow of WWAN subsystem
Date: Mon, 13 Mar 2023 16:08:37 -0700 [thread overview]
Message-ID: <20230313160837.77f4ced0@kernel.org> (raw)
In-Reply-To: <20230308081939.5512-1-haozhe.chang@mediatek.com>
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.
next prev parent reply other threads:[~2023-03-13 23:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-08 8:19 [PATCH RESEND net-next v7] wwan: core: Support slicing in port TX flow of WWAN subsystem haozhe.chang
2023-03-13 23:08 ` Jakub Kicinski [this message]
2023-03-16 1:17 ` Haozhe Chang (常浩哲)
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=20230313160837.77f4ced0@kernel.org \
--to=kuba@kernel.org \
--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=haozhe.chang@mediatek.com \
--cc=hua.yang@mediatek.com \
--cc=johannes@sipsolutions.net \
--cc=lambert.wang@mediatek.com \
--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 \
--cc=xiayu.zhang@mediatek.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).