Re: [PATCH net-next v3 1/3] ethtool: Implement ethtool_puts()

2023-10-27 Thread Justin Stitt
On Fri, Oct 27, 2023 at 4:43 PM Andrew Lunn wrote: > > > +/** > > + * ethtool_puts - Write string to ethtool string data > > + * @data: Pointer to start of string to update > > Isn't it actually a pointer to a pointer to the start of string to > update? I suppose. FWIW, I just copy-pasted the

Re: [PATCH net-next v3 1/3] ethtool: Implement ethtool_puts()

2023-10-27 Thread Andrew Lunn
> +/** > + * ethtool_puts - Write string to ethtool string data > + * @data: Pointer to start of string to update Isn't it actually a pointer to a pointer to the start of string to update? > +extern void ethtool_puts(u8 **data, const char *str); Andrew

Re: [PATCH net-next v3 3/3] net: Convert some ethtool_sprintf() to ethtool_puts()

2023-10-27 Thread Andrew Lunn
On Fri, Oct 27, 2023 at 10:05:35PM +, Justin Stitt wrote: > This patch converts some basic cases of ethtool_sprintf() to > ethtool_puts(). > > The conversions are used in cases where ethtool_sprintf() was being used > with just two arguments: > | ethtool_sprintf(, buffer[i].name); > or

Re: [PATCH net-next] Use xdp_set_features_flag instead of direct assignment

2023-10-27 Thread Jakub Kicinski
On Fri, 27 Oct 2023 11:06:51 -0700 Haiyang Zhang wrote: > From: Konstantin Taranov > > This patch uses a helper function for assignment of xdp_features. > This change simplifies backports. Generally making backports is not a strong enough reason to change upstream code, but using the helper

[PATCH net-next v3 3/3] net: Convert some ethtool_sprintf() to ethtool_puts()

2023-10-27 Thread Justin Stitt
This patch converts some basic cases of ethtool_sprintf() to ethtool_puts(). The conversions are used in cases where ethtool_sprintf() was being used with just two arguments: | ethtool_sprintf(, buffer[i].name); or when it's used with format string: "%s" | ethtool_sprintf(, "%s",

[PATCH net-next v3 2/3] checkpatch: add ethtool_sprintf rules

2023-10-27 Thread Justin Stitt
Add some warnings for using ethtool_sprintf() where a simple ethtool_puts() would suffice. The two cases are: 1) Use ethtool_sprintf() with just two arguments: | ethtool_sprintf(, driver[i].name); or 2) Use ethtool_sprintf() with a standalone "%s" fmt string: | ethtool_sprintf(,

[PATCH net-next v3 0/3] ethtool: Add ethtool_puts()

2023-10-27 Thread Justin Stitt
Hi, This series aims to implement ethtool_puts() and send out a wave 1 of conversions from ethtool_sprintf(). There's also a checkpatch patch included to check for the cases listed below. This was sparked from recent discussion here [1] The conversions are used in cases where ethtool_sprintf()

[PATCH net-next v3 1/3] ethtool: Implement ethtool_puts()

2023-10-27 Thread Justin Stitt
Use strscpy() to implement ethtool_puts(). Functionally the same as ethtool_sprintf() when it's used with two arguments or with just "%s" format specifier. Signed-off-by: Justin Stitt --- include/linux/ethtool.h | 13 + net/ethtool/ioctl.c | 7 +++ 2 files changed, 20

RE: [Patch v7 1/5] RDMA/mana_ib: Rename all mana_ib_dev type variables to mib_dev

2023-10-27 Thread Long Li
> Subject: Re: [Patch v7 1/5] RDMA/mana_ib: Rename all mana_ib_dev type > variables to mib_dev > > On Mon, Oct 16, 2023 at 03:11:58PM -0700, > sharmaa...@linuxonhyperv.com wrote: > > From: Ajay Sharma > > > > This patch does not introduce any functional changes. It creates > > naming convention

RE: [Patch v7 2/5] RDMA/mana_ib: Register Mana IB device with Management SW

2023-10-27 Thread Long Li
> Subject: Re: [Patch v7 2/5] RDMA/mana_ib: Register Mana IB device with > Management SW > > On Mon, Oct 16, 2023 at 03:11:59PM -0700, > sharmaa...@linuxonhyperv.com wrote: > > > diff --git a/drivers/infiniband/hw/mana/device.c > > b/drivers/infiniband/hw/mana/device.c > > index

Re: [PATCH next v2 2/3] checkpatch: add ethtool_sprintf rules

2023-10-27 Thread Joe Perches
On 2023-10-27 12:40, Justin Stitt wrote: Yeah you can push it but it's not really a standalone so perhaps I'll just steal the diff and wrap into v3? Fine by me. No need for my sign off.

RE: [EXTERNAL] Re: [Patch v7 5/5] RDMA/mana_ib: Send event to qp

2023-10-27 Thread Long Li
> Subject: RE: [EXTERNAL] Re: [Patch v7 5/5] RDMA/mana_ib: Send event to qp > > > > -Original Message- > > From: Jason Gunthorpe > > Sent: Monday, October 23, 2023 11:24 AM > > To: sharmaa...@linuxonhyperv.com > > Cc: Long Li ; Leon Romanovsky ; > > Dexuan Cui ; Wei Liu ; David S. > >

[Patch v2] hv_netvsc: Mark VF as slave before exposing it to user-mode

2023-10-27 Thread longli
From: Long Li When a VF is being exposed form the kernel, it should be marked as "slave" before exposing to the user-mode. The VF is not usable without netvsc running as master. The user-mode should never see a VF without the "slave" flag. This commit moves the code of setting the slave flag to

[PATCH] hv_utils: Allow implicit ICTIMESYNCFLAG_SYNC

2023-10-27 Thread Peter Martincic
>From 529fcea5d296c22b1dc6c23d55bd6417794b3cda Mon Sep 17 00:00:00 2001 From: Peter Martincic Date: Mon, 16 Oct 2023 16:41:10 -0700 Subject: [PATCH] hv_utils: Allow implicit ICTIMESYNCFLAG_SYNC Windows hosts can omit the _SYNC flag to due a bug on resume from modern suspend. If the guest is

Re: [PATCH next v2 2/3] checkpatch: add ethtool_sprintf rules

2023-10-27 Thread Justin Stitt
On Thu, Oct 26, 2023 at 3:39 PM Joe Perches wrote: > > On Thu, 2023-10-26 at 21:56 +, Justin Stitt wrote: > > Add some warnings for using ethtool_sprintf() where a simple > > ethtool_puts() would suffice. > [] > > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl > [] > > @@ -7011,6

Re: [PATCH next v2 1/3] ethtool: Implement ethtool_puts()

2023-10-27 Thread Justin Stitt
On Thu, Oct 26, 2023 at 3:25 PM Vladimir Oltean wrote: > > On Thu, Oct 26, 2023 at 03:09:59PM -0700, Justin Stitt wrote: > > Should I undo this? I want my patch against next since it's targeting > > some stuff in-flight over there. BUT, I also want ethtool_puts() to be > > directly below

Re: [PATCH next v2 0/3] ethtool: Add ethtool_puts()

2023-10-27 Thread Justin Stitt
On Thu, Oct 26, 2023 at 5:25 PM Andrew Lunn wrote: > > > Changes in v2: > > - wrap lines better in replacement (thanks Joe, Kees) > > - add --fix to checkpatch (thanks Joe) > > - clean up checkpatch formatting (thanks Joe, et al.) > > - rebase against next > > Please could you explain the rebase

[PATCH net-next] Use xdp_set_features_flag instead of direct assignment

2023-10-27 Thread Haiyang Zhang
From: Konstantin Taranov This patch uses a helper function for assignment of xdp_features. This change simplifies backports. Signed-off-by: Konstantin Taranov Signed-off-by: Haiyang Zhang --- drivers/net/ethernet/microsoft/mana/mana_en.c | 4 ++-- 1 file changed, 2 insertions(+), 2

Re: [PATCH net,v2] hv_netvsc: fix race of netvsc and VF register_netdevice

2023-10-27 Thread Wojciech Drewek
On 26.10.2023 23:22, Haiyang Zhang wrote: > The rtnl lock also needs to be held before rndis_filter_device_add() > which advertises nvsp_2_vsc_capability / sriov bit, and triggers > VF NIC offering and registering. If VF NIC finished register_netdev() > earlier it may cause name based config