lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 11 Nov 2022 16:02:05 +0100
From:   Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To:     haozhe.chang@...iatek.com
Cc:     M Chetan Kumar <m.chetan.kumar@...el.com>,
        Intel Corporation <linuxwwan@...el.com>,
        Loic Poulain <loic.poulain@...aro.org>,
        Sergey Ryazanov <ryazanov.s.a@...il.com>,
        Johannes Berg <johannes@...solutions.net>,
        "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>,
        Stephan Gerhold <stephan@...hold.net>,
        Chandrashekar Devegowda <chandrashekar.devegowda@...el.com>,
        Chiranjeevi Rapolu <chiranjeevi.rapolu@...ux.intel.com>,
        Liu Haijun <haijun.liu@...iatek.com>,
        Ricardo Martinez <ricardo.martinez@...ux.intel.com>,
        Matthias Brugger <matthias.bgg@...il.com>,
        Oliver Neukum <oneukum@...e.com>,
        Shang XiaoJing <shangxiaojing@...wei.com>,
        "open list:INTEL WWAN IOSM DRIVER" <netdev@...r.kernel.org>,
        open list <linux-kernel@...r.kernel.org>,
        "open list:REMOTE PROCESSOR MESSAGING (RPMSG) WWAN CONTROL..." 
        <linux-remoteproc@...r.kernel.org>,
        "open list:USB SUBSYSTEM" <linux-usb@...r.kernel.org>,
        "moderated list:ARM/Mediatek SoC support" 
        <linux-arm-kernel@...ts.infradead.org>,
        "moderated list:ARM/Mediatek SoC support" 
        <linux-mediatek@...ts.infradead.org>, lambert.wang@...iatek.com,
        xiayu.zhang@...iatek.com, hua.yang@...iatek.com
Subject: Re: [PATCH v3] wwan: core: Support slicing in port TX flow of WWAN
 subsystem

On Fri, Nov 11, 2022 at 06:08:36PM +0800, haozhe.chang@...iatek.com wrote:
> From: haozhe chang <haozhe.chang@...iatek.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@...iatek.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ