Skip to content

Commit 976c269

Browse files
akihikodakikuba-moo
authored andcommitted
virtio_net: Split struct virtio_net_rss_config
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 <[email protected]> Signed-off-by: Akihiko Odaki <[email protected]> Acked-by: Jason Wang <[email protected]> Reviewed-by: Xuan Zhuo <[email protected]> Acked-by: Michael S. Tsirkin <[email protected]> Tested-by: Lei Yang <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent b2d1e4c commit 976c269

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

include/uapi/linux/virtio_net.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,19 @@ struct virtio_net_rss_config {
327327
__u8 hash_key_data[/* hash_key_length */];
328328
};
329329

330+
struct virtio_net_rss_config_hdr {
331+
__le32 hash_types;
332+
__le16 indirection_table_mask;
333+
__le16 unclassified_queue;
334+
__le16 indirection_table[/* 1 + indirection_table_mask */];
335+
};
336+
337+
struct virtio_net_rss_config_trailer {
338+
__le16 max_tx_vq;
339+
__u8 hash_key_length;
340+
__u8 hash_key_data[/* hash_key_length */];
341+
};
342+
330343
#define VIRTIO_NET_CTRL_MQ_RSS_CONFIG 1
331344

332345
/*

0 commit comments

Comments
 (0)