Skip to content

Commit

Permalink
virtio_net: Split struct virtio_net_rss_config
Browse files Browse the repository at this point in the history
struct virtio_net_rss_config was less useful in actual code because of a
flexible array placed in the middle. Add new structures that split it
into two to avoid having a flexible array in the middle.

Suggested-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Reviewed-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Tested-by: Lei Yang <leiyang@redhat.com>
Link: https://patch.msgid.link/20250321-virtio-v2-1-33afb8f4640b@daynix.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Akihiko Odaki authored and Jakub Kicinski committed Mar 25, 2025
1 parent b2d1e4c commit 976c269
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions include/uapi/linux/virtio_net.h
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,19 @@ struct virtio_net_rss_config {
__u8 hash_key_data[/* hash_key_length */];
};

struct virtio_net_rss_config_hdr {
__le32 hash_types;
__le16 indirection_table_mask;
__le16 unclassified_queue;
__le16 indirection_table[/* 1 + indirection_table_mask */];
};

struct virtio_net_rss_config_trailer {
__le16 max_tx_vq;
__u8 hash_key_length;
__u8 hash_key_data[/* hash_key_length */];
};

#define VIRTIO_NET_CTRL_MQ_RSS_CONFIG 1

/*
Expand Down

0 comments on commit 976c269

Please sign in to comment.