mirror of
https://github.com/qemu/qemu.git
synced 2025-08-16 14:54:29 +00:00

Previously, the vhost_net_get_feature_bits() function in hw/net/vhost_net.c used a large switch statement to determine the appropriate feature bits based on the NetClientDriver type. This created unnecessary coupling between the generic vhost layer and specific network backends (like TAP, vhost-user, and vhost-vdpa). This patch moves the definition of vhost feature bits directly into the vhost_net structure for each relevant network client. Signed-off-by: Laurent Vivier <lvivier@redhat.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
18 lines
349 B
C
18 lines
349 B
C
/*
|
|
* vhost-vdpa.h
|
|
*
|
|
* Copyright(c) 2017-2018 Intel Corporation.
|
|
* Copyright(c) 2020 Red Hat, Inc.
|
|
*
|
|
* This work is licensed under the terms of the GNU GPL, version 2 or later.
|
|
* See the COPYING file in the top-level directory.
|
|
*
|
|
*/
|
|
|
|
#ifndef VHOST_VDPA_H
|
|
#define VHOST_VDPA_H
|
|
|
|
#define TYPE_VHOST_VDPA "vhost-vdpa"
|
|
|
|
#endif /* VHOST_VDPA_H */
|