The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Akihiko Odaki <akihiko.odaki@daynix.com>
To: "Michael S. Tsirkin" <mst@redhat.com>,
	"Jason Wang" <jasowang@redhat.com>,
	"Xuan Zhuo" <xuanzhuo@linux.alibaba.com>,
	"Eugenio Pérez" <eperezma@redhat.com>,
	"Andrew Lunn" <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	"Eric Dumazet" <edumazet@google.com>,
	"Jakub Kicinski" <kuba@kernel.org>,
	"Paolo Abeni" <pabeni@redhat.com>,
	"Andrew Melnychenko" <andrew@daynix.com>,
	"Joe Damato" <jdamato@fastly.com>,
	"Philo Lu" <lulie@linux.alibaba.com>
Cc: virtualization@lists.linux.dev, linux-kernel@vger.kernel.org,
	 netdev@vger.kernel.org, devel@daynix.com,
	 Akihiko Odaki <akihiko.odaki@daynix.com>,
	Lei Yang <leiyang@redhat.com>
Subject: [PATCH net-next v2 1/4] virtio_net: Split struct virtio_net_rss_config
Date: Fri, 21 Mar 2025 15:48:32 +0900	[thread overview]
Message-ID: <20250321-virtio-v2-1-33afb8f4640b@daynix.com> (raw)
In-Reply-To: <20250321-virtio-v2-0-33afb8f4640b@daynix.com>

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>
Tested-by: Lei Yang <leiyang@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
---
 include/uapi/linux/virtio_net.h | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/include/uapi/linux/virtio_net.h b/include/uapi/linux/virtio_net.h
index ac9174717ef1..963540deae66 100644
--- a/include/uapi/linux/virtio_net.h
+++ b/include/uapi/linux/virtio_net.h
@@ -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
 
 /*

-- 
2.48.1


  reply	other threads:[~2025-03-21  6:49 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-21  6:48 [PATCH net-next v2 0/4] virtio_net: Fixes and improvements Akihiko Odaki
2025-03-21  6:48 ` Akihiko Odaki [this message]
2025-03-21  6:48 ` [PATCH net-next v2 2/4] virtio_net: Fix endian with virtio_net_ctrl_rss Akihiko Odaki
2025-03-21  6:48 ` [PATCH net-next v2 3/4] virtio_net: Use new RSS config structs Akihiko Odaki
2025-03-24  4:01   ` Jason Wang
2025-03-21  6:48 ` [PATCH net-next v2 4/4] virtio_net: Allocate rss_hdr with devres Akihiko Odaki
2025-03-21  7:17 ` [PATCH net-next v2 0/4] virtio_net: Fixes and improvements Xuan Zhuo
2025-03-21 18:26 ` Michael S. Tsirkin
2025-03-24 14:38   ` Lei Yang
2025-03-25 16:40 ` patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250321-virtio-v2-1-33afb8f4640b@daynix.com \
    --to=akihiko.odaki@daynix.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=andrew@daynix.com \
    --cc=davem@davemloft.net \
    --cc=devel@daynix.com \
    --cc=edumazet@google.com \
    --cc=eperezma@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=jdamato@fastly.com \
    --cc=kuba@kernel.org \
    --cc=leiyang@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lulie@linux.alibaba.com \
    --cc=mst@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=virtualization@lists.linux.dev \
    --cc=xuanzhuo@linux.alibaba.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox