Re: [PATCH net-next v6 0/4] virtio-net: Link queues to NAPIs

2025-03-06 Thread Xuan Zhuo
Reviewed-by: Xuan Zhuo On Fri, 7 Mar 2025 01:12:08 +, Joe Damato wrote: > Greetings: > > Welcome to v6. Only patch updated is patch 3. See changelog below. > > Jakub recently commented [1] that I should not hold this series on > virtio-net linking queues to NAPIs behind other important work

Re: [PATCH net-next 2/2] vsock/test: Add test for null ptr deref when transport changes

2025-03-06 Thread Stefano Garzarella
On Thu, Mar 06, 2025 at 05:09:33PM +0100, Luigi Leonardi wrote: Add a new test to ensure that when the transport changes a null pointer dereference does not occur[1]. Note that this test does not fail, but it may hang on the client side if it triggers a kernel oops. This works by creating a soc

[PATCH net-next v6 4/4] virtio_net: Use persistent NAPI config

2025-03-06 Thread Joe Damato
Use persistent NAPI config so that NAPI IDs are not renumbered as queue counts change. $ sudo ethtool -l ens4 | tail -5 | egrep -i '(current|combined)' Current hardware settings: Combined: 4 $ ./tools/net/ynl/pyynl/cli.py \ --spec Documentation/netlink/specs/netdev.yaml \ --dump qu

[PATCH net-next v6 2/4] virtio-net: Refactor napi_disable paths

2025-03-06 Thread Joe Damato
Create virtnet_napi_disable helper and refactor virtnet_napi_tx_disable to take a struct send_queue. Signed-off-by: Joe Damato Acked-by: Michael S. Tsirkin Acked-by: Jason Wang Tested-by: Lei Yang --- drivers/net/virtio_net.c | 25 + 1 file changed, 17 insertions(+), 8

[PATCH net-next v6 0/4] virtio-net: Link queues to NAPIs

2025-03-06 Thread Joe Damato
Greetings: Welcome to v6. Only patch updated is patch 3. See changelog below. Jakub recently commented [1] that I should not hold this series on virtio-net linking queues to NAPIs behind other important work that is on-going and suggested I re-spin, so here we are :) As per the discussion on th

[PATCH net-next v6 1/4] virtio-net: Refactor napi_enable paths

2025-03-06 Thread Joe Damato
Refactor virtnet_napi_enable and virtnet_napi_tx_enable to take a struct receive_queue. Create a helper, virtnet_napi_do_enable, which contains the logic to enable a NAPI. Signed-off-by: Joe Damato Acked-by: Michael S. Tsirkin Acked-by: Jason Wang Tested-by: Lei Yang --- drivers/net/virtio_ne

[PATCH net-next 2/2] vsock/test: Add test for null ptr deref when transport changes

2025-03-06 Thread Luigi Leonardi
Add a new test to ensure that when the transport changes a null pointer dereference does not occur[1]. Note that this test does not fail, but it may hang on the client side if it triggers a kernel oops. This works by creating a socket, trying to connect to a server, and then executing a second co

Re: [PATCH net-next v4 0/4] ieee802154: ca8210: Sparse fix and GPIOd conversion

2025-03-06 Thread Stefan Schmidt
Hello Andy Shevchenko. On Wed, 05 Mar 2025 12:55:33 +0200, Andy Shevchenko wrote: > The main part is the patch 3 that converts the driver to GPIO descriptor APIs, > the first one is just an ad-hoc fix WRT sparse complains on the bitwise > types misuse. The second one is a small cleanup that helps

Re: [PATCH net-next v5 3/4] virtio-net: Map NAPIs to queues

2025-03-06 Thread Joe Damato
On Wed, Mar 05, 2025 at 06:21:18PM -0800, Jakub Kicinski wrote: > On Wed, 5 Mar 2025 17:42:35 -0800 Joe Damato wrote: > > Two spots that come to mind are: > > - in virtnet_probe where all the other netdev ops are plumbed > >through, or > > - above virtnet_disable_queue_pair which I assume a f

Re: [PATCH net-next v5 3/4] virtio-net: Map NAPIs to queues

2025-03-06 Thread Jakub Kicinski
On Thu, 6 Mar 2025 09:00:02 -0800 Joe Damato wrote: > +* - wrap all of the work in a lock (perhaps > vi->refill_lock?) > +* - check netif_running() and return early to avoid a race > +*/ probably netdev instance lock is better here, as it will a

[PATCH net-next 0/2] vsock/test: check for null-ptr-deref when transport changes

2025-03-06 Thread Luigi Leonardi
This series introduces a new test that checks for a null pointer dereference that may happen when there is a transport change[1]. This bug was fixed in [2] First commit introduces a new utility function that checks whether a timeout has expired or not without exiting the test. This is required

[PATCH net-next 1/2] vsock/test: Add new function to check for timeout

2025-03-06 Thread Luigi Leonardi
Add `timeout_check_expired` function that returns true if the timeout counter has expired. This is useful in situations where a timeout does not necessarily mean a failure. Signed-off-by: Luigi Leonardi --- tools/testing/vsock/timeout.c | 7 ++- tools/testing/vsock/timeout.h | 3 +++ 2 file

Re: [PATCH net-next v5 3/4] virtio-net: Map NAPIs to queues

2025-03-05 Thread Jakub Kicinski
On Wed, 5 Mar 2025 17:42:35 -0800 Joe Damato wrote: > Two spots that come to mind are: > - in virtnet_probe where all the other netdev ops are plumbed >through, or > - above virtnet_disable_queue_pair which I assume a future queue >API implementor would need to call for ndo_queue_stop I'

Re: [PATCH net-next v5 3/4] virtio-net: Map NAPIs to queues

2025-03-05 Thread Joe Damato
On Mon, Mar 03, 2025 at 04:03:55PM -0800, Jakub Kicinski wrote: > On Mon, 3 Mar 2025 13:33:10 -0500 Joe Damato wrote: > > > > How about we don't use the API at all from refill_work? > > > > Patch 4 adds consistent NAPI config state and refill_work isn't a > > queue resize maybe we don't need to c

Re: [PATCH net-next v5 3/4] virtio-net: Map NAPIs to queues

2025-03-05 Thread Jason Wang
On Thu, Mar 6, 2025 at 12:34 AM Joe Damato wrote: > > On Wed, Mar 05, 2025 at 01:11:55PM +0800, Jason Wang wrote: > > On Tue, Mar 4, 2025 at 11:09 PM Joe Damato wrote: > > > > > > On Mon, Mar 03, 2025 at 04:03:55PM -0800, Jakub Kicinski wrote: > > > > On Mon, 3 Mar 2025 13:33:10 -0500 Joe Damato

Re: [PATCH net-next v5 3/4] virtio-net: Map NAPIs to queues

2025-03-05 Thread Joe Damato
On Wed, Mar 05, 2025 at 01:11:55PM +0800, Jason Wang wrote: > On Tue, Mar 4, 2025 at 11:09 PM Joe Damato wrote: > > > > On Mon, Mar 03, 2025 at 04:03:55PM -0800, Jakub Kicinski wrote: > > > On Mon, 3 Mar 2025 13:33:10 -0500 Joe Damato wrote: [...] > > > Middle ground would be to do what you sugg

Re: [PATCH net-next v4 4/4] dt-bindings: ieee802154: ca8210: Update polarity of the reset pin

2025-03-05 Thread Conor Dooley
On Wed, Mar 05, 2025 at 12:55:37PM +0200, Andy Shevchenko wrote: > The code has been updated to follow what datasheet says about > the polarity of the reset pin, which is active-low. Update > the device tree bindings accordingly. > > Signed-off-by: Andy Shevchenko > --- > Documentation/devicetre

[PATCH net-next v4 0/4] ieee802154: ca8210: Sparse fix and GPIOd conversion

2025-03-05 Thread Andy Shevchenko
The main part is the patch 3 that converts the driver to GPIO descriptor APIs, the first one is just an ad-hoc fix WRT sparse complains on the bitwise types misuse. The second one is a small cleanup that helps patch 3 to be nicer. In v4: - split DT patch (Krzysztof) - collected tags (Miquel) In v

[PATCH net-next v4 3/4] ieee802154: ca8210: Switch to using gpiod API

2025-03-05 Thread Andy Shevchenko
This updates the driver to gpiod API, and removes yet another use of of_get_named_gpio(). With this, invert the logic of the reset pin which is active-low and add a quirk for the legacy and incorrect device tree descriptions. Reviewed-by: Linus Walleij Reviewed-by: Miquel Raynal Signed-off-by:

[PATCH net-next v4 4/4] dt-bindings: ieee802154: ca8210: Update polarity of the reset pin

2025-03-05 Thread Andy Shevchenko
The code has been updated to follow what datasheet says about the polarity of the reset pin, which is active-low. Update the device tree bindings accordingly. Signed-off-by: Andy Shevchenko --- Documentation/devicetree/bindings/net/ieee802154/ca8210.txt | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH net-next v4 1/4] ieee802154: ca8210: Use proper setters and getters for bitwise types

2025-03-05 Thread Andy Shevchenko
Sparse complains that the driver doesn't respect the bitwise types: drivers/net/ieee802154/ca8210.c:1796:27: warning: incorrect type in assignment (different base types) drivers/net/ieee802154/ca8210.c:1796:27:expected restricted __le16 [addressable] [assigned] [usertype] pan_id drivers/net/

[PATCH net-next v4 2/4] ieee802154: ca8210: Get platform data via dev_get_platdata()

2025-03-05 Thread Andy Shevchenko
Access to platform data via dev_get_platdata() getter to make code cleaner. Reviewed-by: Linus Walleij Reviewed-by: Miquel Raynal Signed-off-by: Andy Shevchenko --- drivers/net/ieee802154/ca8210.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/net/ieee

Re: [PATCH net-next v3 3/3] ieee802154: ca8210: Switch to using gpiod API

2025-03-05 Thread Andy Shevchenko
On Wed, Mar 05, 2025 at 08:04:17AM +0100, Krzysztof Kozlowski wrote: > On Tue, Mar 04, 2025 at 01:22:34PM +0200, Andy Shevchenko wrote: > > This updates the driver to gpiod API, and removes yet another use of > > of_get_named_gpio(). > > > > With this, invert the logic of the reset pin which is ac

Re: [PATCH net-next v2 3/3] ieee802154: ca8210: Switch to using gpiod API

2025-03-04 Thread Linus Walleij
On Tue, Mar 4, 2025 at 12:13 PM Andy Shevchenko wrote: > On Tue, Mar 04, 2025 at 01:03:41AM +0100, Linus Walleij wrote: > > On Mon, Mar 3, 2025 at 9:39 PM Andy Shevchenko > > wrote: > > > > > > Maybe add a comment in the code that this is wrong and the > > > > driver and DTS files should be fixed

Re: [PATCH net-next v3 3/3] ieee802154: ca8210: Switch to using gpiod API

2025-03-04 Thread Krzysztof Kozlowski
On Tue, Mar 04, 2025 at 01:22:34PM +0200, Andy Shevchenko wrote: > This updates the driver to gpiod API, and removes yet another use of > of_get_named_gpio(). > > With this, invert the logic of the reset pin which is active low > and add a quirk for the legacy and incorrect device tree description

Re: [PATCH net-next v5 3/4] virtio-net: Map NAPIs to queues

2025-03-04 Thread Jason Wang
On Tue, Mar 4, 2025 at 11:09 PM Joe Damato wrote: > > On Mon, Mar 03, 2025 at 04:03:55PM -0800, Jakub Kicinski wrote: > > On Mon, 3 Mar 2025 13:33:10 -0500 Joe Damato wrote: > > > > > @@ -2880,6 +2880,13 @@ static void refill_work(struct work_struct > > > > > *work) > > > > > bool still_e

Re: [PATCH net-next 0/5] mptcp: improve code coverage and small optimisations

2025-03-04 Thread patchwork-bot+netdevbpf
Hello: This series was applied to netdev/net-next.git (main) by Jakub Kicinski : On Fri, 28 Feb 2025 15:38:34 +0100 you wrote: > This small series have various unrelated patches: > > - Patch 1 and 2: improve code coverage by validating mptcp_diag_dump_one > thanks to a new tool displaying MPTC

Re: [PATCH net-next v5 3/4] virtio-net: Map NAPIs to queues

2025-03-04 Thread Joe Damato
On Mon, Mar 03, 2025 at 04:03:55PM -0800, Jakub Kicinski wrote: > On Mon, 3 Mar 2025 13:33:10 -0500 Joe Damato wrote: > > > > @@ -2880,6 +2880,13 @@ static void refill_work(struct work_struct *work) > > > > bool still_empty; > > > > int i; > > > > > > > > + spin_lock(&vi->ref

Re: [PATCH net-next v3 3/3] ieee802154: ca8210: Switch to using gpiod API

2025-03-04 Thread Miquel Raynal
On 04/03/2025 at 13:22:34 +02, Andy Shevchenko wrote: > This updates the driver to gpiod API, and removes yet another use of > of_get_named_gpio(). > > With this, invert the logic of the reset pin which is active low > and add a quirk for the legacy and incorrect device tree descriptions. > > Re

[PATCH net-next v3 3/3] ieee802154: ca8210: Switch to using gpiod API

2025-03-04 Thread Andy Shevchenko
This updates the driver to gpiod API, and removes yet another use of of_get_named_gpio(). With this, invert the logic of the reset pin which is active low and add a quirk for the legacy and incorrect device tree descriptions. Reviewed-by: Linus Walleij Signed-off-by: Andy Shevchenko --- .../bi

[PATCH net-next v3 0/3] ieee802154: ca8210: Sparse fix and GPIOd conversion

2025-03-04 Thread Andy Shevchenko
The main part is the patch 3 that converts the driver to GPIO descriptor APIs, the first one is just an ad-hoc fix WRT sparse complains on the bitwise types misuse. The second one is a small cleanup that helps patch 3 to be nicer. In v3: - inverted polarity of the reset line in accordance with dat

[PATCH net-next v3 1/3] ieee802154: ca8210: Use proper setter and getters for bitwise types

2025-03-04 Thread Andy Shevchenko
Sparse complains that the driver doesn't respect the bitwise types: drivers/net/ieee802154/ca8210.c:1796:27: warning: incorrect type in assignment (different base types) drivers/net/ieee802154/ca8210.c:1796:27:expected restricted __le16 [addressable] [assigned] [usertype] pan_id drivers/net/

[PATCH net-next v3 2/3] ieee802154: ca8210: Get platform data via dev_get_platdata()

2025-03-04 Thread Andy Shevchenko
Access to platform data via dev_get_platdata() getter to make code cleaner. Reviewed-by: Linus Walleij Reviewed-by: Miquel Raynal Signed-off-by: Andy Shevchenko --- drivers/net/ieee802154/ca8210.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/net/ieee

Re: [PATCH net-next v2 3/3] ieee802154: ca8210: Switch to using gpiod API

2025-03-04 Thread Andy Shevchenko
On Tue, Mar 04, 2025 at 01:03:41AM +0100, Linus Walleij wrote: > On Mon, Mar 3, 2025 at 9:39 PM Andy Shevchenko > wrote: > > > > Maybe add a comment in the code that this is wrong and the > > > driver and DTS files should be fixed. > > > > Or maybe fix in the driver and schema and add a quirk to

Re: [PATCH net-next v8 0/8] Some pktgen fixes/improvments (part II)

2025-03-04 Thread patchwork-bot+netdevbpf
Hello: This series was applied to netdev/net-next.git (main) by Paolo Abeni : On Thu, 27 Feb 2025 14:55:56 +0100 you wrote: > While taking a look at '[PATCH net] pktgen: Avoid out-of-range in > get_imix_entries' ([1]) and '[PATCH net v2] pktgen: Avoid out-of-bounds > ac

Re: [PATCH net-next v2 2/3] ieee802154: ca8210: Get platform data via dev_get_platdata()

2025-03-04 Thread Miquel Raynal
On 03/03/2025 at 18:49:09 +02, Andy Shevchenko wrote: > Access to platform data via dev_get_platdata() getter to make code cleaner. Reviewed-by: Miquel Raynal Thanks, Miquèl

Re: [PATCH net-next v5 3/4] virtio-net: Map NAPIs to queues

2025-03-03 Thread Jakub Kicinski
On Mon, 3 Mar 2025 13:33:10 -0500 Joe Damato wrote: > > > @@ -2880,6 +2880,13 @@ static void refill_work(struct work_struct *work) > > > bool still_empty; > > > int i; > > > > > > + spin_lock(&vi->refill_lock); > > > + if (!vi->refill_enabled) { > > > + sp

Re: [PATCH net-next v2 3/3] ieee802154: ca8210: Switch to using gpiod API

2025-03-03 Thread Linus Walleij
On Mon, Mar 3, 2025 at 9:39 PM Andy Shevchenko wrote: > > Maybe add a comment in the code that this is wrong and the > > driver and DTS files should be fixed. > > Or maybe fix in the driver and schema and add a quirk to gpiolib-of.c? Even better! Yours, Linus Walleij

Re: [PATCH net-next v2 3/3] ieee802154: ca8210: Switch to using gpiod API

2025-03-03 Thread Andy Shevchenko
Mon, Mar 03, 2025 at 09:00:39PM +0100, Linus Walleij kirjoitti: > On Mon, Mar 3, 2025 at 5:49 PM Andy Shevchenko > wrote: ... > > reinit_completion(&priv->ca8210_is_awake); > > msleep(ms); > > - gpio_set_value(pdata->gpio_reset, 1); > > + gpiod_set_value(pdata->reset_

Re: [PATCH net-next v2 1/3] ieee802154: ca8210: Use proper setter and getters for bitwise types

2025-03-03 Thread Linus Walleij
On Mon, Mar 3, 2025 at 5:49 PM Andy Shevchenko wrote: > Sparse complains that the driver doesn't respect the bitwise types: > > drivers/net/ieee802154/ca8210.c:1796:27: warning: incorrect type in > assignment (different base types) > drivers/net/ieee802154/ca8210.c:1796:27:expected restricte

Re: [PATCH net-next v2 3/3] ieee802154: ca8210: Switch to using gpiod API

2025-03-03 Thread Linus Walleij
On Mon, Mar 3, 2025 at 5:49 PM Andy Shevchenko wrote: > This updates the driver to gpiod API, and removes yet another use of > of_get_named_gpio(). > > Signed-off-by: Andy Shevchenko Reviewed-by: Linus Walleij But note: > @@ -632,10 +630,10 @@ static void ca8210_reset_send(struct spi_device

Re: [PATCH net-next v2 2/3] ieee802154: ca8210: Get platform data via dev_get_platdata()

2025-03-03 Thread Linus Walleij
On Mon, Mar 3, 2025 at 5:49 PM Andy Shevchenko wrote: > Access to platform data via dev_get_platdata() getter to make code cleaner. > > Signed-off-by: Andy Shevchenko Reviewed-by: Linus Walleij Yours, Linus Walleij

Re: [PATCH net-next v5 3/4] virtio-net: Map NAPIs to queues

2025-03-03 Thread Joe Damato
On Mon, Mar 03, 2025 at 12:00:10PM -0500, Joe Damato wrote: > On Mon, Mar 03, 2025 at 11:46:10AM -0500, Joe Damato wrote: > > On Fri, Feb 28, 2025 at 06:27:59PM -0800, Jakub Kicinski wrote: > > > On Thu, 27 Feb 2025 18:50:13 + Joe Damato wrote: > > > > @@ -2870,9 +2883,15 @@ static void refill_

Re: [PATCH net-next v1 2/2] ieee802154: ca8210: Switch to using gpiod API

2025-03-03 Thread Miquel Raynal
Hi Andy, > @@ -350,8 +348,8 @@ struct work_priv_container { > * @extclockenable: true if the external clock is to be enabled > * @extclockfreq: frequency of the external clock > * @extclockgpio: ca8210 output gpio of the external clock > - * @gpio_reset: gpio number of ca8210 reset l

Re: [PATCH net-next v5 3/4] virtio-net: Map NAPIs to queues

2025-03-03 Thread Joe Damato
On Mon, Mar 03, 2025 at 11:46:10AM -0500, Joe Damato wrote: > On Fri, Feb 28, 2025 at 06:27:59PM -0800, Jakub Kicinski wrote: > > On Thu, 27 Feb 2025 18:50:13 + Joe Damato wrote: > > > @@ -2870,9 +2883,15 @@ static void refill_work(struct work_struct *work) > > > for (i = 0; i < vi->curr_queu

[PATCH net-next v2 3/3] ieee802154: ca8210: Switch to using gpiod API

2025-03-03 Thread Andy Shevchenko
This updates the driver to gpiod API, and removes yet another use of of_get_named_gpio(). Signed-off-by: Andy Shevchenko --- drivers/net/ieee802154/ca8210.c | 57 +++-- 1 file changed, 19 insertions(+), 38 deletions(-) diff --git a/drivers/net/ieee802154/ca8210.c b/d

[PATCH net-next v2 2/3] ieee802154: ca8210: Get platform data via dev_get_platdata()

2025-03-03 Thread Andy Shevchenko
Access to platform data via dev_get_platdata() getter to make code cleaner. Signed-off-by: Andy Shevchenko --- drivers/net/ieee802154/ca8210.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/net/ieee802154/ca8210.c b/drivers/net/ieee802154/ca8210.c index

[PATCH net-next v2 1/3] ieee802154: ca8210: Use proper setter and getters for bitwise types

2025-03-03 Thread Andy Shevchenko
Sparse complains that the driver doesn't respect the bitwise types: drivers/net/ieee802154/ca8210.c:1796:27: warning: incorrect type in assignment (different base types) drivers/net/ieee802154/ca8210.c:1796:27:expected restricted __le16 [addressable] [assigned] [usertype] pan_id drivers/net/

Re: [PATCH net-next v5 3/4] virtio-net: Map NAPIs to queues

2025-03-03 Thread Joe Damato
On Fri, Feb 28, 2025 at 06:27:59PM -0800, Jakub Kicinski wrote: > On Thu, 27 Feb 2025 18:50:13 + Joe Damato wrote: > > @@ -2870,9 +2883,15 @@ static void refill_work(struct work_struct *work) > > for (i = 0; i < vi->curr_queue_pairs; i++) { > > struct receive_queue *rq = &vi->rq

Re: [PATCH net-next v1 2/2] ieee802154: ca8210: Switch to using gpiod API

2025-03-03 Thread Miquel Raynal
On 03/03/2025 at 18:28:41 +02, Andy Shevchenko wrote: > On Mon, Mar 03, 2025 at 05:20:59PM +0100, Miquel Raynal wrote: > > ... > >> > - * @gpio_reset: gpio number of ca8210 reset line >> > - * @gpio_irq: gpio number of ca8210 interrupt line >> > + * @reset_gpio: GPIO of ca8210 rese

Re: [PATCH net-next v1 2/2] ieee802154: ca8210: Switch to using gpiod API

2025-03-03 Thread Andy Shevchenko
On Mon, Mar 03, 2025 at 05:20:59PM +0100, Miquel Raynal wrote: ... > > - * @gpio_reset: gpio number of ca8210 reset line > > - * @gpio_irq: gpio number of ca8210 interrupt line > > + * @reset_gpio: GPIO of ca8210 reset line > > What about "CA8210 Reset GPIO line"? Or Just "Reset GP

Re: [PATCH net-next v1 1/2] ieee802154: ca8210: Use proper setter and getters for bitwise types

2025-03-03 Thread Andy Shevchenko
On Mon, Mar 03, 2025 at 05:06:32PM +0100, Miquel Raynal wrote: > On 03/03/2025 at 17:07:39 +02, Andy Shevchenko > wrote: > > > Sparse complains that the driver doesn't respect the bitwise types: > > > > drivers/net/ieee802154/ca8210.c:1796:27: warning: incorrect type in > > assignment (differen

Re: [PATCH net-next v1 1/2] ieee802154: ca8210: Use proper setter and getters for bitwise types

2025-03-03 Thread Miquel Raynal
Hello, On 03/03/2025 at 17:07:39 +02, Andy Shevchenko wrote: > Sparse complains that the driver doesn't respect the bitwise types: > > drivers/net/ieee802154/ca8210.c:1796:27: warning: incorrect type in > assignment (different base types) > drivers/net/ieee802154/ca8210.c:1796:27:expected

Re: [PATCH net-next v20 12/25] ovpn: implement TCP transport

2025-03-03 Thread Antonio Quartulli
On 03/03/2025 16:08, Sabrina Dubroca wrote: 2025-02-27, 02:21:37 +0100, Antonio Quartulli wrote: @@ -94,11 +96,23 @@ void ovpn_socket_release(struct ovpn_peer *peer) * detached before it can be picked by a concurrent reader. */ lock_sock(sock->sock->sk); - ovpn_so

Re: [PATCH net-next v20 15/25] ovpn: implement multi-peer support

2025-03-03 Thread Sabrina Dubroca
2025-03-03, 15:45:23 +0100, Antonio Quartulli wrote: > On 03/03/2025 14:08, Sabrina Dubroca wrote: > > > + if (ovpn_sock && ovpn_sock->sock->sk == sk) > > > + skip = false; > > > + rcu_read_unlock(); > > > + > > > + if (skip) >

[PATCH net-next v1 0/2] ieee802154: ca8210: Sparse fix and GPIOd conversion

2025-03-03 Thread Andy Shevchenko
The main part is the patch 2 that converts the driver to GPIO descriptor APIs, the first one is just an ad-hoc fix WRT sparse complains on the bitwise types misuse. Andy Shevchenko (2): ieee802154: ca8210: Use proper setter and getters for bitwise types ieee802154: ca8210: Switch to using gpio

[PATCH net-next v1 1/2] ieee802154: ca8210: Use proper setter and getters for bitwise types

2025-03-03 Thread Andy Shevchenko
Sparse complains that the driver doesn't respect the bitwise types: drivers/net/ieee802154/ca8210.c:1796:27: warning: incorrect type in assignment (different base types) drivers/net/ieee802154/ca8210.c:1796:27:expected restricted __le16 [addressable] [assigned] [usertype] pan_id drivers/net/

Re: [PATCH net-next v20 12/25] ovpn: implement TCP transport

2025-03-03 Thread Sabrina Dubroca
2025-02-27, 02:21:37 +0100, Antonio Quartulli wrote: > @@ -94,11 +96,23 @@ void ovpn_socket_release(struct ovpn_peer *peer) >* detached before it can be picked by a concurrent reader. >*/ > lock_sock(sock->sock->sk); > - ovpn_socket_put(peer, sock); > + released = ovpn

[PATCH net-next v1 2/2] ieee802154: ca8210: Switch to using gpiod API

2025-03-03 Thread Andy Shevchenko
This updates the driver to gpiod API, and removes yet another use of of_get_named_gpio(). Signed-off-by: Andy Shevchenko --- drivers/net/ieee802154/ca8210.c | 63 - 1 file changed, 22 insertions(+), 41 deletions(-) diff --git a/drivers/net/ieee802154/ca8210.c b/d

Re: [PATCH net-next v20 09/25] ovpn: implement basic RX path (UDP)

2025-03-03 Thread Antonio Quartulli
On 28/02/2025 16:25, Sabrina Dubroca wrote: (I'm still reviewing how everything fits together, but one small thing here:) 2025-02-27, 02:21:34 +0100, Antonio Quartulli wrote: +static void ovpn_udp_close(struct sock *sk, long timeout) +{ + struct ovpn_socket *sock; + struct ovpn_priv

Re: [PATCH net-next v20 15/25] ovpn: implement multi-peer support

2025-03-03 Thread Antonio Quartulli
On 03/03/2025 14:08, Sabrina Dubroca wrote: Hello, a few minor coding style nits on this patch. 2025-02-27, 02:21:40 +0100, Antonio Quartulli wrote: @@ -197,9 +254,16 @@ static int ovpn_netdev_notifier_call(struct notifier_block *nb, netif_carrier_off(dev); ovpn

Re: [PATCH net-next v20 15/25] ovpn: implement multi-peer support

2025-03-03 Thread Sabrina Dubroca
Hello, a few minor coding style nits on this patch. 2025-02-27, 02:21:40 +0100, Antonio Quartulli wrote: > @@ -197,9 +254,16 @@ static int ovpn_netdev_notifier_call(struct > notifier_block *nb, > netif_carrier_off(dev); > ovpn->registered = false; > > - i

Re: [PATCH net-next v20 20/25] ovpn: implement peer add/get/dump/delete via netlink

2025-03-02 Thread Antonio Quartulli
On 02/03/2025 19:24, Sabrina Dubroca wrote: 2025-02-27, 02:21:45 +0100, Antonio Quartulli wrote: @@ -1310,9 +1329,12 @@ void ovpn_peer_keepalive_work(struct work_struct *work) if (next_run > 0 && ovpn->registered) { netdev_dbg(ovpn->dev, "sch

Re: [PATCH net-next v20 12/25] ovpn: implement TCP transport

2025-03-02 Thread Antonio Quartulli
On 02/03/2025 19:59, Sabrina Dubroca wrote: 2025-02-27, 02:21:37 +0100, Antonio Quartulli wrote: Moreover export tcp_release_cb by means of EXPORT_SYMBOL instead of EXPORT_IPV6_MOD, so that other modules can use it, even if IPV6 is not compiled in. Is that really needed? You're saving tcp.sk_c

Re: [PATCH net-next v20 12/25] ovpn: implement TCP transport

2025-03-02 Thread Sabrina Dubroca
2025-02-27, 02:21:37 +0100, Antonio Quartulli wrote: > Moreover export tcp_release_cb by means of EXPORT_SYMBOL instead of > EXPORT_IPV6_MOD, so that other modules can use it, even if IPV6 is > not compiled in. Is that really needed? You're saving tcp.sk_cb.prot, so you could just call peer->tcp.s

Re: [PATCH net-next v20 20/25] ovpn: implement peer add/get/dump/delete via netlink

2025-03-02 Thread Sabrina Dubroca
2025-02-27, 02:21:45 +0100, Antonio Quartulli wrote: > @@ -1310,9 +1329,12 @@ void ovpn_peer_keepalive_work(struct work_struct *work) > if (next_run > 0 && ovpn->registered) { > netdev_dbg(ovpn->dev, > "scheduling keepalive work: now=%llu next_run=%llu

Re: [PATCH net-next v5 3/4] virtio-net: Map NAPIs to queues

2025-02-28 Thread Jakub Kicinski
On Thu, 27 Feb 2025 18:50:13 + Joe Damato wrote: > @@ -2870,9 +2883,15 @@ static void refill_work(struct work_struct *work) > for (i = 0; i < vi->curr_queue_pairs; i++) { > struct receive_queue *rq = &vi->rq[i]; > > + rtnl_lock(); > virtnet_napi_d

Re: [PATCH net-next v20 09/25] ovpn: implement basic RX path (UDP)

2025-02-28 Thread Sabrina Dubroca
(I'm still reviewing how everything fits together, but one small thing here:) 2025-02-27, 02:21:34 +0100, Antonio Quartulli wrote: > +static void ovpn_udp_close(struct sock *sk, long timeout) > +{ > + struct ovpn_socket *sock; > + struct ovpn_priv *ovpn; > + > + rcu_read_lock(); > +

Re: [PATCH net-next v5 0/4] virtio-net: Link queues to NAPIs

2025-02-28 Thread Lei Yang
I also tested this series of patches v5 with virtio-net regression tests, everything works fine. Tested-by: Lei Yang On Fri, Feb 28, 2025 at 2:50 AM Joe Damato wrote: > > Greetings: > > Welcome to v5. Patches 1, 2, and 4 have no functional changes only > updated tags. Patch 3 was refactored as

[PATCH net-next 5/5] mptcp: pm: exit early with ADD_ADDR echo if possible

2025-02-28 Thread Matthieu Baerts (NGI0)
When the userspace PM is used, or when the in-kernel limits are reached, there will be no need to schedule the PM worker to signal new addresses. That corresponds to pm->work_pending set to 0. In this case, an early exit can be done in mptcp_pm_add_addr_echoed() not to hold the PM lock, and iterat

[PATCH net-next 4/5] mptcp: pm: in-kernel: reduce parameters of set_flags

2025-02-28 Thread Matthieu Baerts (NGI0)
From: Geliang Tang The number of parameters in mptcp_nl_set_flags() can be reduced. Only need to pass a "local" parameter to it instead of "local->addr" and "local->flags". Signed-off-by: Geliang Tang Reviewed-by: Matthieu Baerts (NGI0) Signed-off-by: Matthieu Baerts (NGI0) --- net/mptcp/pm_

[PATCH net-next 3/5] mptcp: pm: in-kernel: avoid access entry without lock

2025-02-28 Thread Matthieu Baerts (NGI0)
From: Geliang Tang In mptcp_pm_nl_set_flags(), "entry" is copied to "local" when pernet->lock is held to avoid direct access to entry without pernet->lock. Therefore, "local->flags" should be passed to mptcp_nl_set_flags instead of "entry->flags" when pernet->lock is not held, so as to avoid acc

[PATCH net-next 2/5] selftests: mptcp: add a test for mptcp_diag_dump_one

2025-02-28 Thread Matthieu Baerts (NGI0)
From: Gang Yan This patch introduces a new 'chk_diag' test in diag.sh. It retrieves the token for a specified MPTCP socket (msk) using the 'ss' command and then accesses the 'mptcp_diag_dump_one' in kernel via ./mptcp_diag to verify if the correct token is returned. Link: https://github.com/mult

[PATCH net-next 1/5] selftests: mptcp: Add a tool to get specific msk_info

2025-02-28 Thread Matthieu Baerts (NGI0)
From: Gang Yan This patch enables the retrieval of the mptcp_info structure corresponding to a specified MPTCP socket (msk). When multiple MPTCP connections are present, specific information can be obtained for a given connection through the 'mptcp_diag_dump_one' by using the 'token' associated w

[PATCH net-next 0/5] mptcp: improve code coverage and small optimisations

2025-02-28 Thread Matthieu Baerts (NGI0)
This small series have various unrelated patches: - Patch 1 and 2: improve code coverage by validating mptcp_diag_dump_one thanks to a new tool displaying MPTCP info for a specific token. - Patch 3: a fix for a commit which is only in net-next. - Patch 4: reduce parameters for one in-kernel PM

Re: [PATCH net-next v20 00/25] Introducing OpenVPN Data Channel Offload

2025-02-28 Thread Antonio Quartulli
On 2/27/25 5:21 PM, Jakub Kicinski wrote: On Thu, 27 Feb 2025 02:21:25 +0100 Antonio Quartulli wrote: After some time of struggle trying to fix all hidden bugs that Sabrina has found...here is v20! Please note that some patches were already reviewed/tested by a few people. These patches have

Re: [PATCH net-next] virtio-net: tweak for better TX performance in NAPI mode

2025-02-28 Thread Lei Yang
I tested this patch with virtio-net regression tests, everything works fine. Tested-by: Lei Yang On Mon, Feb 24, 2025 at 4:20 PM wrote: > > Hello: > > This patch was applied to netdev/net-next.git (main) > by David S. Miller : > > On Tue, 18 Feb 2025 10:39:08 +0800 you wrote: > > There are seve

Re: [PATCH net-next v5 3/4] virtio-net: Map NAPIs to queues

2025-02-28 Thread Jason Wang
On Fri, Feb 28, 2025 at 2:50 AM Joe Damato wrote: > > Use netif_queue_set_napi to map NAPIs to queue IDs so that the mapping > can be accessed by user apps. Note that the netif_queue_set_napi > currently requires RTNL, so care must be taken to ensure RTNL is held on > paths where this API might be

Re: [PATCH net-next v20 00/25] Introducing OpenVPN Data Channel Offload

2025-02-27 Thread patchwork-bot+netdevbpf
Hello: This series was applied to netdev/net.git (main) by Jakub Kicinski : On Thu, 27 Feb 2025 02:21:25 +0100 you wrote: > After some time of struggle trying to fix all hidden bugs that Sabrina > has found...here is v20! > > Notable changes since v19: > * copyright years updated to 2025 > * rtn

Re: [PATCH net-next v20 00/25] Introducing OpenVPN Data Channel Offload

2025-02-27 Thread Jakub Kicinski
On Thu, 27 Feb 2025 02:21:25 +0100 Antonio Quartulli wrote: > After some time of struggle trying to fix all hidden bugs that Sabrina > has found...here is v20! > Please note that some patches were already reviewed/tested by a few > people. These patches have retained the tags as they have hardly b

[PATCH net-next v5 4/4] virtio_net: Use persistent NAPI config

2025-02-27 Thread Joe Damato
Use persistent NAPI config so that NAPI IDs are not renumbered as queue counts change. $ sudo ethtool -l ens4 | tail -5 | egrep -i '(current|combined)' Current hardware settings: Combined: 4 $ ./tools/net/ynl/pyynl/cli.py \ --spec Documentation/netlink/specs/netdev.yaml \ --dump qu

[PATCH net-next v5 3/4] virtio-net: Map NAPIs to queues

2025-02-27 Thread Joe Damato
Use netif_queue_set_napi to map NAPIs to queue IDs so that the mapping can be accessed by user apps. Note that the netif_queue_set_napi currently requires RTNL, so care must be taken to ensure RTNL is held on paths where this API might be reached. The paths in the driver where this API can be reac

[PATCH net-next v5 2/4] virtio-net: Refactor napi_disable paths

2025-02-27 Thread Joe Damato
Create virtnet_napi_disable helper and refactor virtnet_napi_tx_disable to take a struct send_queue. Signed-off-by: Joe Damato Acked-by: Michael S. Tsirkin Acked-by: Jason Wang Tested-by: Lei Yang --- drivers/net/virtio_net.c | 25 + 1 file changed, 17 insertions(+), 8

[PATCH net-next v5 1/4] virtio-net: Refactor napi_enable paths

2025-02-27 Thread Joe Damato
Refactor virtnet_napi_enable and virtnet_napi_tx_enable to take a struct receive_queue. Create a helper, virtnet_napi_do_enable, which contains the logic to enable a NAPI. Signed-off-by: Joe Damato Acked-by: Michael S. Tsirkin Acked-by: Jason Wang Tested-by: Lei Yang --- drivers/net/virtio_ne

[PATCH net-next v5 0/4] virtio-net: Link queues to NAPIs

2025-02-27 Thread Joe Damato
Greetings: Welcome to v5. Patches 1, 2, and 4 have no functional changes only updated tags. Patch 3 was refactored as requested by Jason. See the changelog below and the commit message for details. Jakub recently commented [1] that I should not hold this series on virtio-net linking queues to NAP

Re: [PATCH net v2] selftests: drv-net: Check if combined-count exists

2025-02-27 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net.git (main) by Jakub Kicinski : On Wed, 26 Feb 2025 18:19:57 + you wrote: > Some drivers, like tg3, do not set combined-count: > > $ ethtool -l enp4s0f1 > Channel parameters for enp4s0f1: > Pre-set maximums: > RX: 4 > TX: 4 > Oth

[PATCH net-next v8 4/8] net: pktgen: fix mpls maximum labels list parsing

2025-02-27 Thread Peter Seiderer
o Abeni) Changes v6 -> v7 - rebased on actual net-next/main - no changes Changes v5 -> v6 - adjust to dropped patch 'net: pktgen: use defines for the various dec/hex number parsing digits lengths' - add rev-by Simon Horman Changes v4 -> v5 - split up patchset into par

[PATCH net-next v8 3/8] net: pktgen: remove some superfluous variable initializing

2025-02-27 Thread Peter Seiderer
t/main - no changes Changes v5 -> v6 - adjust to dropped patch 'net: pktgen: use defines for the various dec/hex number parsing digits lengths' Changes v4 -> v5 - split up patchset into part i/ii (suggested by Simon Horman) - add rev-by Simon Horman Changes v3 -> v4

[PATCH net-next v8 1/8] net: pktgen: fix mix of int/long

2025-02-27 Thread Peter Seiderer
-> v8 - rebased on actual net-next/main - add rev-by Simon Horman (this time for real) Changes v6 -> v7 - rebased on actual net-next/main - no changes Changes v5 -> v6 - adjust to dropped patch 'net: pktgen: use defines for the various dec/hex number parsing digits le

[PATCH net-next v8 6/8] net: pktgen: fix mpls reset parsing

2025-02-27 Thread Peter Seiderer
pls= Signed-off-by: Peter Seiderer Reviewed-by: Simon Horman --- Changes v7 -> v8 - rebased on actual net-next/main - fix c99 comment (suggested by Paolo Abeni) Changes v6 -> v7 - rebased on actual net-next/main - no changes Changes v5 -> v6 - no changes Changes v4 -> v5

[PATCH net-next v8 8/8] selftest: net: add proc_net_pktgen

2025-02-27 Thread Peter Seiderer
- add rev-by Simon Horman (given to v6 version) Changes v6 -> v7 - rebased on actual net-next/main - fixed conflict in tools/testing/selftests/net/config Changes v5 -> v6 - no changes Changes v4 -> v5 - split up patchset into part i/ii (suggested by Simon Horman) - addapt

[PATCH net-next v8 0/8] Some pktgen fixes/improvments (part II)

2025-02-27 Thread Peter Seiderer
While taking a look at '[PATCH net] pktgen: Avoid out-of-range in get_imix_entries' ([1]) and '[PATCH net v2] pktgen: Avoid out-of-bounds access in get_imix_entries' ([2], [3]) and doing some tests and code review I detected that the /proc/net/pktgen/... parsing logic does

[PATCH net-next v8 2/8] net: pktgen: remove extra tmp variable (re-use len instead)

2025-02-27 Thread Peter Seiderer
v6 - no changes Changes v4 -> v5 - split up patchset into part i/ii (suggested by Simon Horman) - add rev-by Simon Horman Changes v3 -> v4 - new patch (factored out of patch 'net: pktgen: fix access outside of user given buffer in pktgen_if_write()') --- net/core/pktge

[PATCH net-next v8 7/8] net: pktgen: remove all superfluous index assignements

2025-02-27 Thread Peter Seiderer
Remove all superfluous index ('i += len') assignements (value not used afterwards). Signed-off-by: Peter Seiderer Reviewed-by: Simon Horman --- Changes v7 -> v8 - rebased on actual net-next/main - no changes Changes v6 -> v7 - rebased on actual net-next/main - no changes Changes v5 ->

[PATCH net-next v8 5/8] net: pktgen: fix access outside of user given buffer in pktgen_if_write()

2025-02-27 Thread Peter Seiderer
net-next/main - no changes Changes v6 -> v7 - rebased on actual net-next/main - no changes Changes v5 -> v6 - adjust to dropped patch 'net: pktgen: use defines for the various dec/hex number parsing digits lengths' Changes v4 -> v5 - split up patchset into part i/

Re: [PATCH net-next v7 4/8] net: pktgen: fix mpls maximum labels list parsing

2025-02-27 Thread Peter Seiderer
Hello Paolo, On Thu, 27 Feb 2025 11:24:48 +0100, Paolo Abeni wrote: > On 2/24/25 10:22 AM, Peter Seiderer wrote: > > Fix mpls maximum labels list parsing up to MAX_MPLS_LABELS/16 entries > > (instead of up to MAX_MPLS_LABELS - 1). > > Very minor nit... > > The above comments sounds misleading to

Re: [PATCH net-next v7 6/8] net: pktgen: fix mpls reset parsing

2025-02-27 Thread Peter Seiderer
On Thu, 27 Feb 2025 11:19:33 +0100, Paolo Abeni wrote: > On 2/24/25 10:22 AM, Peter Seiderer wrote: > > diff --git a/net/core/pktgen.c b/net/core/pktgen.c > > index ae5e81e62733..bb13a4591709 100644 > > --- a/net/core/pktgen.c > > +++ b/net/core/pktgen.c > > @@ -915,8 +915,13 @@ static ssize_t ge

Re: [PATCH net-next v7 4/8] net: pktgen: fix mpls maximum labels list parsing

2025-02-27 Thread Paolo Abeni
On 2/24/25 10:22 AM, Peter Seiderer wrote: > Fix mpls maximum labels list parsing up to MAX_MPLS_LABELS/16 entries > (instead of up to MAX_MPLS_LABELS - 1). Very minor nit... The above comments sounds misleading to me. I read it as the new limit is MAX_MPLS_LABELS divided by 16, that is 1. Thank

Re: [PATCH net-next v7 8/8] selftest: net: add proc_net_pktgen

2025-02-27 Thread Paolo Abeni
On 2/24/25 10:22 AM, Peter Seiderer wrote: > +TEST_F(proc_net_pktgen, dev_cmd_min_pkt_size) { > + ssize_t len; > + > + // with trailing '\0' ... same here. Much more occurrences below. /P

Re: [PATCH net-next v7 1/8] net: pktgen: fix mix of int/long

2025-02-27 Thread Simon Horman
On Mon, Feb 24, 2025 at 10:38:56AM +0100, Peter Seiderer wrote: > Hello *, > > On Mon, 24 Feb 2025 10:22:35 +0100, Peter Seiderer wrote: > > > Fix mix of int/long (and multiple conversion from/to) by using consequently > > size_t for i and max and ssize_t for len and adjust function signatures >

  1   2   3   4   5   6   7   8   9   10   >