aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorHawkins Jiawei <yin31149@gmail.com>2023-06-30 21:21:48 +0800
committerMichael Tokarev <mjt@tls.msk.ru>2023-07-08 07:24:38 +0300
commit2875a0ca021817b7006e6b9215ce31daa33c06f7 (patch)
tree163a93148fde89611116a6c7523bc9d9719db36b /net
parentaee9701729db62c01aa5927c1b690e9bc2b84460 (diff)
vdpa: Sort vdpa_feature_bits array alphabetically
This patch sorts the vdpa_feature_bits array alphabetically in ascending order to avoid future duplicates. Signed-off-by: Hawkins Jiawei <yin31149@gmail.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'net')
-rw-r--r--net/vhost-vdpa.c39
1 files changed, 23 insertions, 16 deletions
diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c
index 0479988a79..c0e93ce568 100644
--- a/net/vhost-vdpa.c
+++ b/net/vhost-vdpa.c
@@ -50,38 +50,45 @@ typedef struct VhostVDPAState {
bool started;
} VhostVDPAState;
+/*
+ * The array is sorted alphabetically in ascending order,
+ * with the exception of VHOST_INVALID_FEATURE_BIT,
+ * which should always be the last entry.
+ */
const int vdpa_feature_bits[] = {
- VIRTIO_F_NOTIFY_ON_EMPTY,
- VIRTIO_RING_F_INDIRECT_DESC,
- VIRTIO_RING_F_EVENT_IDX,
VIRTIO_F_ANY_LAYOUT,
+ VIRTIO_F_IOMMU_PLATFORM,
+ VIRTIO_F_NOTIFY_ON_EMPTY,
+ VIRTIO_F_RING_PACKED,
+ VIRTIO_F_RING_RESET,
VIRTIO_F_VERSION_1,
VIRTIO_NET_F_CSUM,
- VIRTIO_NET_F_GUEST_CSUM,
VIRTIO_NET_F_CTRL_GUEST_OFFLOADS,
+ VIRTIO_NET_F_CTRL_MAC_ADDR,
+ VIRTIO_NET_F_CTRL_RX,
+ VIRTIO_NET_F_CTRL_RX_EXTRA,
+ VIRTIO_NET_F_CTRL_VLAN,
+ VIRTIO_NET_F_CTRL_VQ,
VIRTIO_NET_F_GSO,
+ VIRTIO_NET_F_GUEST_CSUM,
+ VIRTIO_NET_F_GUEST_ECN,
VIRTIO_NET_F_GUEST_TSO4,
VIRTIO_NET_F_GUEST_TSO6,
- VIRTIO_NET_F_GUEST_ECN,
VIRTIO_NET_F_GUEST_UFO,
+ VIRTIO_NET_F_HASH_REPORT,
+ VIRTIO_NET_F_HOST_ECN,
VIRTIO_NET_F_HOST_TSO4,
VIRTIO_NET_F_HOST_TSO6,
- VIRTIO_NET_F_HOST_ECN,
VIRTIO_NET_F_HOST_UFO,
+ VIRTIO_NET_F_MQ,
VIRTIO_NET_F_MRG_RXBUF,
VIRTIO_NET_F_MTU,
- VIRTIO_NET_F_CTRL_RX,
- VIRTIO_NET_F_CTRL_RX_EXTRA,
- VIRTIO_NET_F_CTRL_VLAN,
- VIRTIO_NET_F_CTRL_MAC_ADDR,
- VIRTIO_NET_F_MQ,
- VIRTIO_NET_F_CTRL_VQ,
- VIRTIO_F_IOMMU_PLATFORM,
- VIRTIO_F_RING_PACKED,
- VIRTIO_F_RING_RESET,
VIRTIO_NET_F_RSS,
- VIRTIO_NET_F_HASH_REPORT,
VIRTIO_NET_F_STATUS,
+ VIRTIO_RING_F_EVENT_IDX,
+ VIRTIO_RING_F_INDIRECT_DESC,
+
+ /* VHOST_INVALID_FEATURE_BIT should always be the last entry */
VHOST_INVALID_FEATURE_BIT
};