[PATCH] doc: remove the public interfaces from bus/vmbus

2025-06-02 Thread longli
From: Long Li The deprecation notice has been sent in 7642e3b0e0 ("doc: announce vmbus API deprecation") Remove those interfaces in this release. Signed-off-by: Long Li --- doc/guides/rel_notes/release_25_07.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/guides/

[PATCH] net/mana: check for vendor_part_id when probing RDMA device

2025-05-20 Thread longli
From: Long Li The RDMA kernel driver may expose two MANA RDMA devices, for RC and RAW QP types. The purpose is to support fast service mode at SOC. Depending on kernel version, the probe may fail if DPDK picks up the wrong device. Add check for vendor_part_id and RAW QP capability when probing t

[PATCH] net/mana: check for vendor_part_id when probing RDMA device

2025-05-12 Thread longli
From: Long Li The RDMA kernel driver may expose two MANA RDMA devices, for RC and RAW QP types. The purpose is to support fast service mode at SOC. Depending on kernel version, the probe may fail if DPDK picks up the wrong device. Add check for vendor_part_id and RAW QP capability when probing t

[PATCH v2] net/netvsc: add stats counters from VF

2025-04-23 Thread longli
From: Long Li The netvsc driver should add per-queue and rx_nombuf counters from VF. Fixes: 4e9c73e96e83 ("net/netvsc: add Hyper-V network device") Cc: sta...@dpdk.org Signed-off-by: Long Li --- Change log: v2 is a resend, there is no change to v1 drivers/net/netvsc/hn_ethdev.c | 10 +

[PATCH 2/4] bus/vmbus: Define Hyper-V page size

2025-04-18 Thread longli
From: Long Li Hyper-V uses 4k page size, regardless of the system page size used. Define Hyper-V page size for use in drivers. Fixes: 831dba47bd ("bus/vmbus: add Hyper-V virtual bus support") Cc: sta...@dpdk.org Signed-off-by: Long Li --- drivers/bus/vmbus/bus_vmbus_driver.h | 4 1 file c

[PATCH 4/4] net/netvsc: Use Hyper-V page size for the driver

2025-04-18 Thread longli
From: Long Li The driver should always use Hyper-V page size for implementing RNDIS and calculating PFN (Page Frame Number) for communicating with Hyper-V VSP. It should not use system page size as it may be different to the Hyper-V page size. Fixes: 4e9c73e96e ("net/netvsc: add Hyper-V network

[PATCH 3/4] bus/vmbus: Use Hyper-V page size for mapping to UIO pages

2025-04-18 Thread longli
From: Long Li The interrupt and monitor pages mapped from Hyper-V via kernel are always 4k in sizes. Use Hyper-V page size to map them. Fixes: 831dba47bd ("bus/vmbus: add Hyper-V virtual bus support") Cc: sta...@dpdk.org Signed-off-by: Long Li --- drivers/bus/vmbus/linux/vmbus_uio.c | 2 +- d

[PATCH 1/4] bus/vmbus: Align ring buffer data region to system page boundary

2025-04-18 Thread longli
From: Long Li The ring buffer data region always starts at the system page boundary after ring buffer head. The current code assumes the system page size is 4k. This is not always correct. Fix this by using system page size for addressing ring buffer data. Fixes: 831dba47bd ("bus/vmbus: add Hyp

[PATCH 0/4] Fix incorrect page size and address caclulations on systems with 64k (or other) page sizes

2025-04-18 Thread longli
From: Long Li The Hyper-V uses 4k page size regardless of system page size. This patchset fixes issues while running on systems with page sizes other than 4k. Long Li (4): bus/vmbus: Align ring buffer data region to system page boundary bus/vmbus: Define Hyper-V page size bus/vmbus: Use

[patch v6 2/6] net/netvsc: introduce get_vmbus_device to get the vmbus device

2025-04-18 Thread longli
From: Long Li Introduce a function get the vmbus device from hn_data. For secondary process, the vmbus device is in eth_dev's private region. Signed-off-by: Long Li --- drivers/net/netvsc/hn_nvs.c | 15 +++ drivers/net/netvsc/hn_nvs.h | 2 ++ 2 files changed, 17 insertions(+) dif

[patch v6 4/6] bus/vmbus: support channels without monitoring enabled

2025-04-18 Thread longli
From: Long Li Hyperv host may offer channels without monitor enabled. The max monitor ID it supports is 128. Over those channels without monitor enabled, Hyperv does not send or receive large amount of data traffic and almost all the data traffic is going over the VF. Change the code to not fail

[patch v6 5/6] bus/vmbus: add rte_vmbus_device to all functions accessing vmbus

2025-04-16 Thread longli
From: Long Li The secondary process can access its vmbus device through device private region. Add and pass it on all call chains leading to vmbus code. Signed-off-by: Long Li --- Change log. v5: rebased to the latest net-next drivers/bus/vmbus/linux/vmbus_uio.c | 2 +- drivers/bus/vmbus/priv

[patch v6 0/6] Support VMBUS channels without monitoring enabled

2025-04-16 Thread longli
From: Long Li Hyperv may expose VMBUS channels without monitoring enabled. In this case, it programs almost all the data traffic to VF. This patchset enabled vmbus/netvsc to use channels without monitoring enabled. This needs to change the APIs exposed by drivers/bus/vmbus. Because those APIs a

[patch v6 1/6] net/netvsc: introduce private data for storing vmbus device for secondary process

2025-04-16 Thread longli
From: Long Li To prepare for supporting to set hyperv event from secondary process when the channel has monitoring disable, introduce a private data region for storing the vmbus device. The secondary process will get access to its vmbus device in case it needs to signal the host. Signed-off-by:

[patch v6 6/6] bus/vmbus: set event for channel without monitoring support

2025-04-16 Thread longli
From: Long Li For vmbus channels without monitoring support, use kernel UIO interface to indicate packet through interrupt page and UIO file handle. Signed-off-by: Long Li --- Changes: v4: replace RTE_ATOMIC(uint32_t) * with RTE_ATOMIC(uint32_t *) for declaring variable v6: revert the v4 versi

[patch v6 3/6] bus/vmbus: store UIO fd for secondary process

2025-04-16 Thread longli
From: Long Li Secondary process will get access to vmbus device and this UIO fd for signaling hyperv host on channels without monitoring support. Signed-off-by: Long Li --- drivers/bus/vmbus/vmbus_common_uio.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers

[patch v4 3/6] bus/vmbus: store UIO fd for secondary process

2025-04-09 Thread longli
From: Long Li Secondary process will get access to vmbus device and this UIO fd for signaling hyperv host on channels without monitoring support. Signed-off-by: Long Li --- drivers/bus/vmbus/vmbus_common_uio.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers

[patch v5 1/6] net/netvsc: introduce private data for storing vmbus device for secondary process

2025-04-08 Thread longli
From: Long Li To prepare for supporting to set hyperv event from secondary process when the channel has monitoring disable, introduce a private data region for storing the vmbus device. The secondary process will get access to its vmbus device in case it needs to signal the host. Signed-off-by:

[patch v5 6/6] bus/vmbus: set event for channel without monitoring support

2025-04-08 Thread longli
From: Long Li For vmbus channels without monitoring support, use kernel UIO interface to indicate packet through interrupt page and UIO file handle. Signed-off-by: Long Li --- Changes: v4: replace RTE_ATOMIC(uint32_t) * with RTE_ATOMIC(uint32_t *) for declaring variable drivers/bus/vmbus/vmb

[patch v5 4/6] bus/vmbus: support channels without monitoring enabled

2025-04-08 Thread longli
From: Long Li Hyperv host may offer channels without monitor enabled. The max monitor ID it supports is 128. Over those channels without monitor enabled, Hyperv does not send or receive large amount of data traffic and almost all the data traffic is going over the VF. Change the code to not fail

[patch v5 2/6] net/netvsc: introduce get_vmbus_device to get the vmbus device

2025-04-08 Thread longli
From: Long Li Introduce a function get the vmbus device from hn_data. For secondary process, the vmbus device is in eth_dev's private region. Signed-off-by: Long Li --- drivers/net/netvsc/hn_nvs.c | 15 +++ drivers/net/netvsc/hn_nvs.h | 2 ++ 2 files changed, 17 insertions(+) dif

[patch v5 5/6] bus/vmbus: add rte_vmbus_device to all functions accessing vmbus

2025-04-08 Thread longli
From: Long Li The secondary process can access its vmbus device through device private region. Add and pass it on all call chains leading to vmbus code. Signed-off-by: Long Li --- Change log. v5: rebased to the latest net-next drivers/bus/vmbus/linux/vmbus_uio.c | 2 +- drivers/bus/vmbus/pri

[patch v5 3/6] bus/vmbus: store UIO fd for secondary process

2025-04-08 Thread longli
From: Long Li Secondary process will get access to vmbus device and this UIO fd for signaling hyperv host on channels without monitoring support. Signed-off-by: Long Li --- drivers/bus/vmbus/vmbus_common_uio.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers

[patch v5 0/6] Support VMBUS channels without monitoring enabled

2025-04-08 Thread longli
From: Long Li Hyperv may expose VMBUS channels without monitoring enabled. In this case, it programs almost all the data traffic to VF. This patchset enabled vmbus/netvsc to use channels without monitoring enabled. This needs to change the APIs exposed by drivers/bus/vmbus. Because those APIs a

[patch v4 6/6] bus/vmbus: set event for channel without monitoring support

2025-04-07 Thread longli
From: Long Li For vmbus channels without monitoring support, use kernel UIO interface to indicate packet through interrupt page and UIO file handle. Signed-off-by: Long Li --- Changes: v4: replace RTE_ATOMIC(uint32_t) * with RTE_ATOMIC(uint32_t *) for declaring variable drivers/bus/vmbus/vmb

[patch v4 5/6] bus/vmbus: add rte_vmbus_device to all functions accessing vmbus

2025-04-07 Thread longli
From: Long Li The secondary process can access its vmbus device through device private region. Add and pass it on all call chains leading to vmbus code. Signed-off-by: Long Li --- drivers/bus/vmbus/linux/vmbus_uio.c | 2 +- drivers/bus/vmbus/private.h | 2 +- drivers/bus/vmbus/rte_bu

[patch v4 4/6] bus/vmbus: support channels without monitoring enabled

2025-04-07 Thread longli
From: Long Li Hyperv host may offer channels without monitor enabled. The max monitor ID it supports is 128. Over those channels without monitor enabled, Hyperv does not send or receive large amount of data traffic and almost all the data traffic is going over the VF. Change the code to not fail

[patch v4 2/6] net/netvsc: introduce get_vmbus_device to get the vmbus device

2025-04-07 Thread longli
From: Long Li Introduce a function get the vmbus device from hn_data. For secondary process, the vmbus device is in eth_dev's private region. Signed-off-by: Long Li --- drivers/net/netvsc/hn_nvs.c | 15 +++ drivers/net/netvsc/hn_nvs.h | 2 ++ 2 files changed, 17 insertions(+) dif

[patch v4 1/6] net/netvsc: introduce private data for storing vmbus device for secondary process

2025-04-07 Thread longli
From: Long Li To prepare for supporting to set hyperv event from secondary process when the channel has monitoring disable, introduce a private data region for storing the vmbus device. The secondary process will get access to its vmbus device in case it needs to signal the host. Signed-off-by:

[patch v4 0/6] Support VMBUS channels without monitoring enabled

2025-04-07 Thread longli
From: Long Li Hyperv may expose VMBUS channels without monitoring enabled. In this case, it programs almost all the data traffic to VF. This patchset enabled vmbus/netvsc to use channels without monitoring enabled. This needs to change the APIs exposed by drivers/bus/vmbus. Because those APIs a

[Patch v3 2/6] net/netvsc: introduce get_vmbus_device to get the vmbus device

2025-04-04 Thread longli
From: Long Li Introduce a function get the vmbus device from hn_data. For secondary process, the vmbus device is in eth_dev's private region. Signed-off-by: Long Li --- drivers/net/netvsc/hn_nvs.c | 15 +++ drivers/net/netvsc/hn_nvs.h | 2 ++ 2 files changed, 17 insertions(+) dif

[Patch v3 5/6] bus/vmbus: add rte_vmbus_device to all functions accessing vmbus

2025-04-04 Thread longli
From: Long Li The secondary process can access its vmbus device through device private region. Add and pass it on all call chains leading to vmbus code. Signed-off-by: Long Li --- drivers/bus/vmbus/linux/vmbus_uio.c | 2 +- drivers/bus/vmbus/private.h | 2 +- drivers/bus/vmbus/rte_bu

[Patch v3 3/6] bus/vmbus: store UIO fd for secondary process

2025-04-04 Thread longli
From: Long Li Secondary process will get access to vmbus device and this UIO fd for signaling hyperv host on channels without monitoring support. Signed-off-by: Long Li --- drivers/bus/vmbus/vmbus_common_uio.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers

[Patch v3 4/6] bus/vmbus: support channels without monitoring enabled

2025-04-04 Thread longli
From: Long Li Hyperv host may offer channels without monitor enabled. The max monitor ID it supports is 128. Over those channels without monitor enabled, Hyperv does not send or receive large amount of data traffic and almost all the data traffic is going over the VF. Change the code to not fail

[Patch v3 6/6] bus/vmbus: set event for channel without monitoring support

2025-04-04 Thread longli
From: Long Li For vmbus channels without monitoring support, use kernel UIO interface to indicate packet through interrupt page and UIO file handle. Signed-off-by: Long Li --- Change log: v2: fixed compilation warnings drivers/bus/vmbus/vmbus_channel.c | 21 ++--- 1 file chang

[Patch v3 1/6] net/netvsc: introduce private data for storing vmbus device for secondary process

2025-04-04 Thread longli
From: Long Li To prepare for supporting to set hyperv event from secondary process when the channel has monitoring disable, introduce a private data region for storing the vmbus device. The secondary process will get access to its vmbus device in case it needs to signal the host. Signed-off-by:

[Patch v3 0/6] Support VMBUS channels without monitoring enabled

2025-04-04 Thread longli
From: root Hyperv may expose VMBUS channels without monitoring enabled. In this case, it programs almost all the data traffic to VF. This patchset enabled vmbus/netvsc to use channels without monitoring enabled. This needs to change the APIs exposed by drivers/bus/vmbus. Becuase those APIs are

[Patch v3] doc: announce bus/vmbus API changes

2025-03-17 Thread longli
From: Long Li All vmbus APIs are used internally by DPDK core and net/netvsc PMD. It's not feasible or practical to use those APIs by the application. Those APIs will become internal in DPDK 25.11. Signed-off-by: Long Li --- Change in v2: add details on what APIs will be changed v3: remove the

[Patch v2] doc: announce bus/vmbus API changes

2025-03-14 Thread longli
From: Long Li All vmbus APIs are used internally by DPDK core and net/netvsc PMD. It's not feasible or practical to use those APIs by the application. Those APIs will be moved from "DPDK" to "Internal" in DPDK 25.11. Signed-off-by: Long Li --- Change in v2: add details on what APIs will be chan

[PATCH] doc: announce bus/vmbus API changes

2025-03-12 Thread longli
From: Long Li All vmbus APIs are used internally by DPDK core and net/netvsc PMD. It's not feasible or practical to use those APIs by the application. Those APIs will be moved from "DPDK" to "Internal" in DPDK 25.11. Signed-off-by: Long Li --- doc/guides/rel_notes/deprecation.rst | 4 1 f

[patch v2 6/6] bus/vmbus: set event for channel without monitoring support

2025-03-11 Thread longli
From: Long Li For vmbus channels without monitoring support, use kernel UIO interface to indicate packet through interrupt page and UIO file handle. Signed-off-by: Long Li --- Change log: v2: fixed compilation warnings drivers/bus/vmbus/vmbus_channel.c | 21 ++--- 1 file chang

[patch v2 0/6] Support VMBUS channels without monitoring enabled

2025-03-11 Thread longli
From: Long Li Hyperv may expose VMBUS channels without monitoring enabled. In this case, it programs almost all the data traffic to VF. This patchset enabled vmbus/netvsc to use channels without monitoring enabled. Long Li (6): net/netvsc: introduce private data for storing vmbus device for

[patch v2 4/6] bus/vmbus: support channels without monitoring enabled

2025-03-11 Thread longli
From: Long Li Hyperv host may offer channels without monitor enabled. The max monitor ID it supports is 128. Over those channels without monitor enabled, Hyperv does not send or receive large amount of data traffic and almost all the data traffic is going over the VF. Change the code to not fail

[patch v2 5/6] bus/vmbus: add rte_vmbus_device to all functions accessing vmbus

2025-03-10 Thread longli
From: Long Li The secondary process can access its vmbus device through device private region. Add and pass it on all call chains leading to vmbus code. Signed-off-by: Long Li --- drivers/bus/vmbus/linux/vmbus_uio.c | 2 +- drivers/bus/vmbus/private.h | 2 +- drivers/bus/vmbus/rte_bu

[patch v2 2/6] net/netvsc: introduce get_vmbus_device to get the vmbus device

2025-03-10 Thread longli
From: Long Li Introduce a function get the vmbus device from hn_data. For secondary process, the vmbus device is in eth_dev's private region. Signed-off-by: Long Li --- drivers/net/netvsc/hn_nvs.c | 15 +++ drivers/net/netvsc/hn_nvs.h | 2 ++ 2 files changed, 17 insertions(+) dif

[patch v2 3/6] bus/vmbus: store UIO fd for secondary process

2025-03-10 Thread longli
From: Long Li Secondary process will get access to vmbus device and this UIO fd for signaling hyperv host on channels without monitoring support. Signed-off-by: Long Li --- drivers/bus/vmbus/vmbus_common_uio.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers

[patch v2 1/6] net/netvsc: introduce private data for storing vmbus device for secondary process

2025-03-10 Thread longli
From: Long Li To prepare for supporting to set hyperv event from secondary process when the channel has monitoring disable, introduce a private data region for storing the vmbus device. The secondary process will get access to its vmbus device in case it needs to signal the host. Signed-off-by:

[PATCH] net/mana: avoid the use of variable length array

2025-03-04 Thread longli
From: Long Li The pathname can be defined as name[MAX_PATH]. This makes the driver compilable using MSVC. Signed-off-by: Long Li --- drivers/net/mana/mana.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/net/mana/mana.c b/drivers/net/mana/mana.c index c37c4e

[PATCH 2/6] net/netvsc: introduce get_vmbus_device to get the vmbus device

2025-02-27 Thread longli
From: Long Li Introduce a function get the vmbus device from hn_data. For secondary process, the vmbus device is in eth_dev's private region. Signed-off-by: Long Li --- drivers/net/netvsc/hn_nvs.c | 15 +++ drivers/net/netvsc/hn_nvs.h | 2 ++ 2 files changed, 17 insertions(+) dif

[PATCH 0/6] Support VMBUS channels without monitoring enabled

2025-02-27 Thread longli
From: Long Li Hyperv may expose VMBUS channels without monitoring enabled. In this case, it programs almost all the data traffic to VF. This patchset enabled vmbus/netvsc to use channels without monitoring enabled. Long Li (6): net/netvsc: introduce private data for storing vmbus device for

[PATCH 4/6] bus/vmbus: support channels without monitoring enabled

2025-02-27 Thread longli
From: Long Li Hyperv host may offer channels without monitor enabled. The max monitor ID it supports is 128. Over those channels without monitor enabled, Hyperv does not send or receive large amount of data traffic and almost all the data traffic is going over the VF. Change the code to not fail

[PATCH 5/6] bus/vmbus: add rte_vmbus_device to all functions accessing vmbus

2025-02-27 Thread longli
From: Long Li The secondary process can access its vmbus device through device private region. Add and pass it on all call chains leading to vmbus code. Signed-off-by: Long Li --- drivers/bus/vmbus/linux/vmbus_uio.c | 2 +- drivers/bus/vmbus/private.h | 2 +- drivers/bus/vmbus/rte_bu

[PATCH 6/6] bus/vmbus: set event for channel without monitoring support

2025-02-27 Thread longli
From: Long Li For vmbus channels without monitoring support, use kernel UIO interface to indicate packet through interrupt page and UIO file handle. Signed-off-by: Long Li --- drivers/bus/vmbus/vmbus_channel.c | 21 ++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff -

[PATCH 1/6] net/netvsc: introduce private data for storing vmbus device for secondary process

2025-02-27 Thread longli
From: Long Li To prepare for supporting to set hyperv event from secondary process when the channel has monitoring disable, introduce a private data region for storing the vmbus device. The secondary process will get access to its vmbus device in case it needs to signal the host. Signed-off-by:

[PATCH 3/6] bus/vmbus: store UIO fd for secondary process

2025-02-27 Thread longli
From: Long Li Secondary process will get access to vmbus device and this UIO fd for signaling hyperv host on channels without monitoring support. Signed-off-by: Long Li --- drivers/bus/vmbus/vmbus_common_uio.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers

[Patch v3] net/mana: use mana_local_data for tracking usage data for primary process

2025-02-20 Thread longli
From: Long Li The driver uses mana_shared_data for tracking usage count for primary process. This is not correct as the mana_shared_data is allocated by the primary and is meant to track usage of secondary process by the primary process. And it creates a race condition when the device is removed

[PATCH] net/netvsc: add stats counters from VF

2025-02-18 Thread longli
From: Long Li The netvsc driver should add per-queue and rx_nombuf counters from VF. Fixes: 4e9c73e96e83 ("net/netvsc: add Hyper-V network device") Cc: sta...@dpdk.org Signed-off-by: Long Li --- drivers/net/netvsc/hn_ethdev.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) di

[Patch v2] net/mana: use mana_local_data for tracking usage data for primary process

2025-02-18 Thread longli
From: Long Li The driver uses mana_shared_data for tracking usage count for primary process. This is not correct as the mana_shared_data is allocated by the primary and is meant to track usage of secondary process by the primary process. And it creates a race condition when the device is removed

[Patch v2 1/3] net/netvsc: scan all net devices under the PCI device

2025-02-13 Thread longli
From: Long Li The current code has the wrong assumption that a PCI device can have only one Ethernet device. This is not correct as a PCI device can be multi functional and have multiple Ethernet devices. Fix this by scanning all the devices under a PCI device. Fixes: a2a23a794b3a ("net/netvsc:

[Patch v2 3/3] net/netvsc: log error on failure to switch data path

2025-02-13 Thread longli
From: Long Li There is no recovery code path if netvsc failed to switch data path. Log an error in this case for troubleshooting. Signed-off-by: Long Li --- drivers/net/netvsc/hn_vf.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/netvsc/hn_vf.c b/drivers

[Patch v2 2/3] net/netvsc: remove RTE device if all its net devices are removed

2025-02-13 Thread longli
From: Long Li An RTE device can have multiple Ethernet devices. On hot plug events, it can't be removed until all its Ethernet devices have been removed. Fixes: a2a23a794b3a ("net/netvsc: support VF device hot add/remove") Cc: sta...@dpdk.org Signed-off-by: Long Li --- drivers/net/netvsc/hn_vf

[Patch v2 0/3] net/netvsc fixes for handling PCI hotplug with multiple devices

2025-02-13 Thread longli
From: Long Li On some systems, one PCI device may have muiltple NET devices. This patchset fixes issues on those systems when such PCI device is doing hot add/remove. Change in v2: added cover letter, drop the 4th patch that will be implemented in EAL instead for device args caching Long Li (

[PATCH] net/mana: use mana_local_data for tracking usage data for primary process

2025-02-07 Thread longli
From: Long Li The driver uses mana_shared_data for tracking usage count for primary process. This is not correct as the mana_shared_data is allocated by the primary and is meant to track usage of secondary process by the primary process. And it creates a race condition when the device is removed

[PATCH 1/4] net/netvsc: scan all net devices under the PCI device

2025-01-27 Thread longli
From: Long Li The current code has the wrong assumption that a PCI device can have only one Ethernet device. This is not correct as a PCI device can be multi functional and have multiple Ethernet devices. Fix this by scanning all the devices under a PCI device. Fixes: a2a23a794b3a ("net/netvsc:

[PATCH 3/4] net/netvsc: log error on failure to switch data path

2025-01-27 Thread longli
From: Long Li There is no recovery code path if netvsc failed to switch data path. Log an error in this case for troubleshooting. Signed-off-by: Long Li --- drivers/net/netvsc/hn_vf.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/netvsc/hn_vf.c b/drivers

[PATCH 4/4] net/netvsc: cache device parameters for hot plug events

2025-01-27 Thread longli
From: Long Li If a device is hot removed and hot plugged, it needs the same driver parameters that are passed to EAL. However, during device removal, all EAL driver parameters are freed as part of the cleanup. Cache those driver parameters for future hot plug events. Because we don't know which

[PATCH 2/4] net/netvsc: remove RTE device if all its net devices are removed

2025-01-27 Thread longli
From: Long Li An RTE device can have multiple Ethernet devices. On hot plug events, it can't be removed until all its Ethernet devices have been removed. Fixes: a2a23a794b3a ("net/netvsc: support VF device hot add/remove") Cc: sta...@dpdk.org Signed-off-by: Long Li --- drivers/net/netvsc/hn_vf

[PATCH] net/netvsc: force TX VLAN offload on 801.2Q packet

2024-10-18 Thread longli
From: Long Li The VSP assumes the packet doesn't have VLAN tags. When VLAN tag is present in a TX packet, always strip it and use PPI to send VLAN info through VSP packet. Fixes: 4e9c73e96e83 ("net/netvsc: add Hyper-V network device") Cc: Hui (Hui) Ling Cc: Stephen Hemminger Cc: Wei Hu Cc: st

[Patch v5] net/netvsc: fix number Tx queues > Rx queues

2024-10-17 Thread longli
From: Alan Elder The previous code allowed the number of Tx queues to be set higher than the number of Rx queues. If a packet was sent on a Tx queue with index >= number Rx queues there was a segfault due to accessing beyond the end of the dev->data->rx_queues[] array. This commit fixes the iss

[PATCH] net/mana: support building the driver on arm64

2024-08-27 Thread longli
From: Long Li The driver has been verified on Linux arm64. Enable this build option and add a missing header file for arm64. Signed-off-by: Long Li --- drivers/net/mana/meson.build | 4 ++-- drivers/net/mana/mp.c| 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/driv

[PATCH] eal: fix device unregister for event registered with device_name NULL

2024-07-18 Thread longli
From: Malcolm Bumgardner In the device event unregister code, it unconditionally remove all callbacks which are registered with device_name set to NULL. This results in many callbacks uncorrectly removed. Fix this by only removing callbacks with matching cb_fn and cb_arg. Signed-off-by: Malcolm

[PATCH] net/netvsc: use rte_eth_dev_set_mtu to set VF MTU

2024-07-18 Thread longli
From: Stephen Hemminger The current code uses unnecessary locking to set VF MTU, resulting in deadlock on hot add/remove path. Fix this by using rte_eth_dev_set_mtu() to set VF MTU. Signed-off-by: Stephen Hemminger Fixes: 45c83603087e ("net/netvsc: support MTU set") Cc: sta...@dpdk.org Signed-

[Patch v2 2/2] net/mana: properly deal with MR cache expansion failure

2024-02-08 Thread longli
From: Long Li On MR cache expension failure, the request should fail as there is no path to get a new MR into the tree. Attempting to insert a new MR to the cache tree will result in memory violation. Fixes: 0f5db3c68ba7 ("net/mana: implement memory registration") Cc: sta...@dpdk.org Signed-off-

[Patch v2 1/2] net/mana: fix memory leak on MR variable allocation

2024-02-08 Thread longli
From: Long Li Use a MR on the stack instead of allocating it. This fixes the memory leak in the code where a MR is allocated but never freed. Fixes: 0f5db3c68ba7 ("net/mana: implement memory registration") Cc: sta...@dpdk.org Signed-off-by: Long Li --- Change in v2: change commit message to in

[Patch v5] net/mana: use rte_pktmbuf_alloc_bulk for allocating RX WQEs

2024-02-08 Thread longli
From: Long Li Instead of allocating mbufs one by one during RX, use rte_pktmbuf_alloc_bulk() to allocate them in a batch. With this patch, there are no measurable performance improvements in benchmarks. However, this patch should improve CPU cycles and reduce potential locking conflicts in real-

[Patch v4] net/mana: use rte_pktmbuf_alloc_bulk for allocating RX mbufs

2024-02-01 Thread longli
From: Long Li Instead of allocating mbufs one by one during RX, use rte_pktmbuf_alloc_bulk() to allocate them in a batch. With this patch, there are no measurable performance improvements in benchmarks. However, this patch should improve CPU cycles and reduce potential locking conflicts in real-

[Patch v3] net/mana: use rte_pktmbuf_alloc_bulk for allocating RX WQEs

2024-01-31 Thread longli
From: Long Li Instead of allocating mbufs one by one during RX, use rte_pktmbuf_alloc_bulk() to allocate them in a batch. There are no measurable performance improvements in benchmarks. However, this patch should improve CPU cycles and reduce potential locking conflicts in real-world application

[PATCH] net/mana: start secondary process queues by default

2024-01-30 Thread longli
From: Long Li Secondary processes are started after primary, and in most cases with the device already started. Make them being able to process packets as soon as they start. This also works with the case where the primary process decides to start the device at a later time after secondary proce

[PATCH 2/2] net/mana: properly deal with MR cache expansion failure

2024-01-29 Thread longli
From: Long Li On MR cache expension failure, the request should fail as there is no path to get a new MR into the tree. Attempting to insert a new MR to the cache tree will result in memory violation. Signed-off-by: Long Li --- drivers/net/mana/mana.h | 6 +++--- drivers/net/mana/mr.c | 45

[PATCH 1/2] net/mana: use a MR variable on the stack instead of allocating it

2024-01-29 Thread longli
From: Long Li The content of the MR is copied to the cache trees, it's not necessary to allocate a MR to do this. Use a variable on the stack instead. This also fixes the memory leak in the code where a MR is allocated but never freed. Signed-off-by: Long Li --- drivers/net/mana/mr.c | 15 +++

[Patch v2] net/mana: use rte_pktmbuf_alloc_bulk for allocating RX WQEs

2024-01-29 Thread longli
From: Long Li Instead of allocating mbufs one by one during RX, use rte_pktmbuf_alloc_bulk() to allocate them in a batch. Signed-off-by: Long Li --- Change in v2: use rte_calloc_socket() in place of rte_calloc() drivers/net/mana/rx.c | 68 --- 1 file ch

[PATCH] net/mana: use rte_pktmbuf_alloc_bulk for allocating RX WQEs

2024-01-24 Thread longli
From: Long Li Instead of allocating mbufs one by one during RX, use rte_pktmbuf_alloc_bulk() to allocate them in a batch. Signed-off-by: Long Li --- drivers/net/mana/rx.c | 67 +++ 1 file changed, 43 insertions(+), 24 deletions(-) diff --git a/drivers/n

[PATCH] net/mana: rename mana_find_pmd_mr() to mana_alloc_pmd_mr()

2024-01-19 Thread longli
From: Long Li The function name mana_find_pmd_mr() is misleading as there might be allocations to get a MR. Change function name to mana_alloc_pmd_mr(). Signed-off-by: Long Li --- drivers/net/mana/mana.h | 6 +++--- drivers/net/mana/mr.c | 7 --- drivers/net/mana/rx.c | 2 +- drivers/n

[PATCH] net/mana: prevent values overflow returned from RDMA layer

2024-01-18 Thread longli
From: Long Li The device capabilities reported from RDMA layer are in int. Those values can overflow with the data types defined in dev_info_get(). Fix this by doing a upper bound before returning those values. Fixes: 517ed6e2d590 ("net/mana: add basic driver with build environment") Cc: sta...

[PATCH] net/mana: add missing \n to DP logs

2023-10-13 Thread longli
From: Long Li Add a missing "\n" to DP logs. This makes the logs correctly formatted. Signed-off-by: Long Li --- drivers/net/mana/mana.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/mana/mana.h b/drivers/net/mana/mana.h index 9bff90ab77..6836872dc2 100644 ---

[Patch v2] net/netvsc: set the correct queue state

2023-08-29 Thread longli
From: Long Li Set the queue state when queue is started/stopped. Signed-off-by: Long Li Acked-by: Stephen Hemminger --- Change since v1: Fixed the following building error error: 'for' loop initial declarations are only allowed in C99 mode drivers/net/netvsc/hn_ethdev.c | 17 +++-

[PATCH] net/netvsc: increase VSP response timeout to 60 seconds

2023-07-26 Thread longli
From: Long Li The current timeout is set to 5 seconds. In Azure, tests show that it may take up to 15 seconds for VSP to respond on busy nodes. The VSP schedules unbounded work to process VSC resquest, there is no upper limit on how long it takes to send response back to VSC. In the NETVSC kerne

[PATCH] net/mana: use %m for fscanf to read mac address

2023-07-25 Thread longli
From: Long Li Use %m through fscanf to allocate mac dynamically is safer than using mac[20], this guarantees there is no overflow on mac[]. Signed-off-by: Long Li --- drivers/net/mana/mana.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/mana/mana.c b/dri

[PATCH] net/mana: add support to update MTU

2023-07-25 Thread longli
From: Long Li Add support for updating MTU for MANA. MTU is updated in kernel through socket interface. Signed-off-by: Long Li --- doc/guides/nics/features/mana.ini | 1 + drivers/net/mana/mana.c | 96 ++- drivers/net/mana/mana.h | 2 +- 3 file

[PATCH] net/mana: fix stats for txq bytes sent

2023-07-20 Thread longli
From: Long Li Bytes should be calculated using the packet length, not the mbuf segment data length. Fixes: 517ed6e2d590 ("net/mana: add basic driver with build environment") Cc: sta...@dpdk.org Signed-off-by: Long Li --- drivers/net/mana/tx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(

[PATCH] net/netvsc: remove unused function hn_vf_reset()

2023-07-11 Thread longli
From: Long Li hn_vf_reset() is defined but not used. Remove it. Signed-off-by: Long Li --- drivers/net/netvsc/hn_var.h | 1 - drivers/net/netvsc/hn_vf.c | 5 - 2 files changed, 6 deletions(-) diff --git a/drivers/net/netvsc/hn_var.h b/drivers/net/netvsc/hn_var.h index 98a3b83033..e1f8e69

[Patch v2] net/mana: use the correct WQE count for ringing RQ doorbell

2023-07-10 Thread longli
From: Long Li The hardware specification specifies that WQE_COUNT should set to 0 for the Receive Queue. Although currently the hardware doesn't enforce the check, in the future releases it may check on this value. Signed-off-by: Long Li --- Change log: v2: added "Signed-off-by" drivers/net/m

[Patch v2] net/mana: fix counter overflow for posted WQE

2023-07-10 Thread longli
From: Long Li This counter should set to uint16_t, the same type as pkt_received. Otherwise, it may overflow when pkt_received goes over 256. Thanks Xinhao Kong for debugging this. Fixes: 517ed6e2d590 ("net/mana: add basic driver with build environment") Cc: sta...@dpdk.org Signed-off-by: Long

[PATCH] net/mana: use the correct WQE count for ringing RQ doorbell

2023-07-10 Thread longli
From: Long Li The hardware specification specifies that WQE_COUNT should set to 0 for the Receive Queue. Although currently the hardware doesn't enforce the check, in the future releases it may check on this value. --- drivers/net/mana/mana.h | 2 +- drivers/net/mana/rx.c | 11 +++ 2

[PATCH] net/mana: fix counter overflow for posted WQE

2023-07-10 Thread longli
From: Long Li This counter should set to uint16_t, the same type as pkt_received. Otherwise, it may overflow when pkt_received goes over 256. Thanks Xinhao Kong for debugging. Fixes: 517ed6e2d590 ("net/mana: add basic driver with build environment") Cc: sta...@dpdk.org --- drivers/net/mana/rx

[PATCH] net/netvsc: set the correct queue state

2023-07-07 Thread longli
From: Long Li Set the queue state when queue is started/stopped. Signed-off-by: Long Li --- drivers/net/netvsc/hn_ethdev.c | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/drivers/net/netvsc/hn_ethdev.c b/drivers/net/netvsc/hn_ethdev.c index d0bbc0a4c0..0c15f

[PATCH] net/mana: set the correct queue state

2023-07-07 Thread longli
From: Long Li Set the queue state when queue is started/stopped Signed-off-by: Long Li --- drivers/net/mana/rx.c | 15 +++ drivers/net/mana/tx.c | 13 + 2 files changed, 28 insertions(+) diff --git a/drivers/net/mana/rx.c b/drivers/net/mana/rx.c index 220b372b15..1047a

[PATCH] net/mana: fix wrong indexing on CQE error when coalescing is used

2023-07-06 Thread longli
From: Long Li On a fatal CQE error when coalescing is used, update the correct index and allow proceeding to the next CQE. Fixes: 3409e0f172f6 ("net/mana: implement Rx CQE coalescing") Signed-off-by: Long Li --- drivers/net/mana/rx.c | 18 -- 1 file changed, 8 insertions(+), 10

[PATCH] net/netvsc: fix bogus sizeof calculation

2023-06-28 Thread longli
From: Stephen Hemminger Found by cppcheck. drivers/net/netvsc/hn_rndis.c:332:21: warning: Found calculation inside sizeof(). [sizeofCalculation] if (len < sizeof(3 * sizeof(uint32_t))) { Fixes: 4e9c73e96e83 ("net/netvsc: add Hyper-V network device") Signed-off-by: Stephen Hemminger Signed-of

[PATCH] net/mana: implement RX CQE coalescing

2023-05-05 Thread longli
From: Long Li With RX coalescing, one CQE entry can be used to indicate up to 4 packets on the receive queue. This saves processing time and PCI bandwidth over the CQ. Cc: sta...@dpdk.org Signed-off-by: Long Li --- drivers/net/mana/mana.h | 4 +++ drivers/net/mana/rx.c | 71

  1   2   3   4   >