[patch v5 0/6] Support VMBUS channels without monitoring enabled
Stephen Hemminger
stephen at networkplumber.org
Thu Apr 10 17:39:40 CEST 2025
On Tue, 8 Apr 2025 14:53:50 -0700
longli at linuxonhyperv.com wrote:
> From: Long Li <longli at microsoft.com>
>
> 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 are used only by NetVSC PMD and not feasible for use by a DPDK
> application, all VMBUS APIs are set to deprecate in upcoming 25.11 release.
>
> The notice for deprecation is accepted in the following patch:
> https://patchwork.dpdk.org/project/dpdk/patch/1742242184-19600-1-git-send-email-longli@linuxonhyperv.com/
>
> Change log:
> v3: Add in the comment on the VMBUS API deprecation notice
>
> Long Li (6):
> net/netvsc: introduce private data for storing vmbus device for
> secondary process
> net/netvsc: introduce get_vmbus_device to get the vmbus device
> bus/vmbus: store UIO fd for secondary process
> bus/vmbus: support channels without monitoring enabled
> bus/vmbus: add rte_vmbus_device to all functions accessing vmbus
> bus/vmbus: set event for channel without monitoring support
>
> drivers/bus/vmbus/linux/vmbus_bus.c | 9 +++--
> drivers/bus/vmbus/linux/vmbus_uio.c | 6 +--
> drivers/bus/vmbus/private.h | 2 +-
> drivers/bus/vmbus/rte_bus_vmbus.h | 16 +++++---
> drivers/bus/vmbus/vmbus_channel.c | 57 ++++++++++++++++++++--------
> drivers/bus/vmbus/vmbus_common_uio.c | 9 +++--
> drivers/net/netvsc/hn_ethdev.c | 44 ++++++++++++++++-----
> drivers/net/netvsc/hn_nvs.c | 33 +++++++++++-----
> drivers/net/netvsc/hn_nvs.h | 21 ++++++----
> drivers/net/netvsc/hn_rndis.c | 11 +++---
> drivers/net/netvsc/hn_rxtx.c | 16 ++++----
> 11 files changed, 155 insertions(+), 69 deletions(-)
>
Still see issues in clang build.
This happens because clang treats _Atomic() as a different type:
####################################################################################
#### [Begin job log] "ubuntu-22.04-gcc-stdatomic" at step Build and test
####################################################################################
[449/3553] Compiling C object lib/librte_port.a.p/port_rte_swx_port_ring.c.o
[450/3553] Generating rte_bus_ifpga.pmd.c with a custom command
[451/3553] Generating rte_bus_vdev.pmd.c with a custom command
[452/3553] Compiling C object drivers/libtmp_rte_common_ionic.a.p/common_ionic_ionic_common_uio.c.o
[453/3553] Compiling C object lib/librte_port.a.p/port_rte_swx_port_source_sink.c.o
[454/3553] Linking static target lib/librte_port.a
[455/3553] Compiling C object drivers/libtmp_rte_bus_vmbus.a.p/bus_vmbus_vmbus_bufring.c.o
[456/3553] Linking static target drivers/librte_common_cnxk.a
[457/3553] Compiling C object drivers/libtmp_rte_bus_vmbus.a.p/bus_vmbus_linux_vmbus_bus.c.o
[458/3553] Compiling C object drivers/libtmp_rte_bus_vmbus.a.p/bus_vmbus_vmbus_common.c.o
[459/3553] Compiling C object drivers/libtmp_rte_bus_vmbus.a.p/bus_vmbus
ccache gcc -Idrivers/libtmp_rte_bus_vmbus.a.p -Idrivers -I../drivers -Idrivers/bus/vmbus -I../drivers/bus/vmbus -I../drivers/bus/vmbus/linux -Ilib/eal/common -I../lib/eal/common -I. -I.. -Iconfig -I../config -Ilib/eal/include -I../lib/eal/include -Ilib/eal/linux/include -I../lib/eal/linux/include -Ilib/eal/x86/include -I../lib/eal/x86/include -I../kernel/linux -Ilib/eal -I../lib/eal -Ilib/kvargs -I../lib/kvargs -Ilib/log -I../lib/log -Ilib/metrics -I../lib/metrics -Ilib/telemetry -I../lib/telemetry -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Werror -std=c11 -O2 -g -include rte_config.h -Wvla -Wcast-qual -Wdeprecated -Wformat -Wformat-nonliteral -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wpointer-arith -Wsign-compare -Wstrict-prototypes -Wundef -Wwrite-strings -Wno-packed-not-aligned -Wno-missing-field-initializers -D_GNU_SOURCE -fPIC -march=corei7 -mrtm -DALLOW_EXPERIMENTAL_API -DALLOW_INTERNAL_API -Wno-format-truncation -Wno-address-of-packed-member -DRTE_LOG_DEFAULT_LOGTYPE=bus.vmbus -MD -MQ drivers/libtmp_rte_bus_vmbus.a.p/bus_vmbus_vmbus_channel.c.o -MF drivers/libtmp_rte_bus_vmbus.a.p/bus_vmbus_vmbus_channel.c.o.d -o drivers/libtmp_rte_bus_vmbus.a.p/bus_vmbus_vmbus_channel.c.o -c ../drivers/bus/vmbus/vmbus_channel.c
../drivers/bus/vmbus/vmbus_channel.c: In function ‘vmbus_set_monitor’:
../drivers/bus/vmbus/vmbus_channel.c:51:22: error: assignment to ‘uint32_t *’ {aka ‘unsigned int *’} from incompatible pointer type ‘_Atomic uint32_t *’ {aka ‘_Atomic unsigned int *’} [-Werror=incompatible-pointer-types]
51 | monitor_addr = &channel->monitor_page->trigs[trigger_index].pending;
| ^
cc1: all warnings being treated as errors
More information about the dev
mailing list