netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.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>,
	Jakub Kicinski <kuba@kernel.org>, 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>,
	Matthias Brugger <matthias.bgg@gmail.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 v3] wwan: core: Support slicing in port TX flow of WWAN subsystem
Date: Fri, 11 Nov 2022 16:02:05 +0100	[thread overview]
Message-ID: <Y25j7fTdvCRqr26k@kroah.com> (raw)
In-Reply-To: <20221111100840.105305-1-haozhe.chang@mediatek.com>

On Fri, Nov 11, 2022 at 06:08:36PM +0800, haozhe.chang@mediatek.com wrote:
> From: haozhe chang <haozhe.chang@mediatek.com>
> 
> wwan_port_fops_write inputs the SKB parameter to the TX callback of
> the WWAN device driver. However, the WWAN device (e.g., t7xx) may
> have an MTU less than the size of SKB, causing the TX buffer to be
> sliced and copied once more in the WWAN device driver.
> 
> This patch implements the slicing in the WWAN subsystem and gives
> the WWAN devices driver the option to slice(by frag_len) or not. By
> doing so, the additional memory copy is reduced.
> 
> Meanwhile, this patch gives WWAN devices driver the option to reserve
> headroom in fragments for the device-specific metadata.
> 
> Signed-off-by: haozhe chang <haozhe.chang@mediatek.com>
> 
> ---
> Changes in v2
>   -send fragments to device driver by skb frag_list.
> 
> Changes in v3
>   -move frag_len and headroom_len setting to wwan_create_port.
> ---
>  drivers/net/wwan/iosm/iosm_ipc_port.c  |  3 +-
>  drivers/net/wwan/mhi_wwan_ctrl.c       |  2 +-
>  drivers/net/wwan/rpmsg_wwan_ctrl.c     |  2 +-
>  drivers/net/wwan/t7xx/t7xx_port_wwan.c | 34 +++++++--------
>  drivers/net/wwan/wwan_core.c           | 59 ++++++++++++++++++++------
>  drivers/net/wwan/wwan_hwsim.c          |  2 +-
>  drivers/usb/class/cdc-wdm.c            |  2 +-
>  include/linux/wwan.h                   |  6 ++-
>  8 files changed, 73 insertions(+), 37 deletions(-)
> 
> diff --git a/drivers/net/wwan/iosm/iosm_ipc_port.c b/drivers/net/wwan/iosm/iosm_ipc_port.c
> index b6d81c627277..dc43b8f0d1af 100644
> --- a/drivers/net/wwan/iosm/iosm_ipc_port.c
> +++ b/drivers/net/wwan/iosm/iosm_ipc_port.c
> @@ -63,7 +63,8 @@ struct iosm_cdev *ipc_port_init(struct iosm_imem *ipc_imem,
>  	ipc_port->ipc_imem = ipc_imem;
>  
>  	ipc_port->iosm_port = wwan_create_port(ipc_port->dev, port_type,
> -					       &ipc_wwan_ctrl_ops, ipc_port);
> +					       &ipc_wwan_ctrl_ops, 0, 0,
> +					       ipc_port);

How is 0, 0 a valid option here?

and if it is a valid option, shouldn't you just have 2 different
functions, one that needs these values and one that does not?  That
would make it more descriptive as to what those options are, and ensure
that you get them right.

> @@ -112,7 +117,6 @@ void wwan_port_rx(struct wwan_port *port, struct sk_buff *skb);
>   */
>  void wwan_port_txoff(struct wwan_port *port);
>  
> -
>  /**

Unneeded change.

thanks,

greg k-h

  reply	other threads:[~2022-11-11 15:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-11 10:08 [PATCH v3] wwan: core: Support slicing in port TX flow of WWAN subsystem haozhe.chang
2022-11-11 15:02 ` Greg Kroah-Hartman [this message]
2022-11-14 11:23   ` Haozhe Chang (常浩哲)
2022-11-14 11:40     ` gregkh
2022-11-21 11:01       ` 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=Y25j7fTdvCRqr26k@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=chandrashekar.devegowda@intel.com \
    --cc=chiranjeevi.rapolu@linux.intel.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=haijun.liu@mediatek.com \
    --cc=haozhe.chang@mediatek.com \
    --cc=hua.yang@mediatek.com \
    --cc=johannes@sipsolutions.net \
    --cc=kuba@kernel.org \
    --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).