[PATCH RFC 0/4] Export netdev capabilities and information

huangy81@chinatelecom.cn posted 4 patches 1 year, 6 months ago
Failed in applying to current master (apply log)
hmp-commands-info.hx          | 14 +++++++
include/monitor/hmp.h         |  1 +
net/net.c                     | 90 +++++++++++++++++++++++++++++++++++++++++++
qapi/net.json                 | 66 +++++++++++++++++++++++++++++++
tests/qtest/vhost-user-test.c | 67 ++++++++++++++++++++++++++++++++
5 files changed, 238 insertions(+)
[PATCH RFC 0/4] Export netdev capabilities and information
Posted by huangy81@chinatelecom.cn 1 year, 6 months ago
From: Hyman Huang(黄勇) <huangy81@chinatelecom.cn>

This series is enlightened by Michael when we fixed a virtio features
negotiation flaw, see the details here:
https://lore.kernel.org/qemu-devel/cover.1667136717.git.huangy81@chinatelecom.cn/

And a test is suggested to be added to test behavior of virtio-net features
negotiation(if i understand correctly), see the details here:
https://lore.kernel.org/qemu-devel/20221026105516-mutt-send-email-mst@kernel.org/

Indeed, Qemu does not export interface capabilities such as ufo, vnet-hdr or
negotiated features to developers. OVS-DPDK will show the interface status such
as features, mode, ring_size and so on if we execute "ovs-vsctl list interface"
by comparison. It could be more friendly if we export above capabilities and
information for developers, especially for those who devote to offload virtio-net
dataplane to DPU and make efforts to migrate vm lively from software-based source
to DPU-offload destination smoothly, virtio-net feature compatibility is an
serious issue, exporting the key capability and acked_features of netdev could
help to debug greatly.

This series export out the key capabilities of netdev, which may affect the final
negotiated virtio-net features, meanwhile, backed-up acked_features also exported,
which is used to initialize or restore features negotiated between qemu and vhost
slave when starting vhost_dev device.

Another thing the patchset did is adding a virtio-net features check test, which
use the fresh new qmp interface "query-netdev" to check if features are
negotiated correctly via vhost user protocol.

This patchset depends on the previous patchset which is in the process of code
reviewing. So this post aims to request for comments as the subject say, any
suggestions and comments are welcome and i would appreciate a lot.

Please review, thanks,

Hyman Huang (4):
  net: Introduce qmp cmd "query-netdev"
  hmp: Add "info netdev" cmd
  hmp: Add netdev information into output of hmp cmd "info network"
  vhost-user-test: Add negotiated features check

 hmp-commands-info.hx          | 14 +++++++
 include/monitor/hmp.h         |  1 +
 net/net.c                     | 90 +++++++++++++++++++++++++++++++++++++++++++
 qapi/net.json                 | 66 +++++++++++++++++++++++++++++++
 tests/qtest/vhost-user-test.c | 67 ++++++++++++++++++++++++++++++++
 5 files changed, 238 insertions(+)

-- 
1.8.3.1