public inbox for dev@dpdk.org
 help / color / mirror / Atom feed
From: "Jasper Tran O'Leary" <jtranoleary@google.com>
To: stephen@networkplumber.org
Cc: dev@dpdk.org, "Jasper Tran O'Leary" <jtranoleary@google.com>,
	 Joshua Washington <joshwash@google.com>
Subject: [PATCH 3/4] net/gve: add checks for flow rule struct padding
Date: Fri, 27 Mar 2026 00:18:26 +0000	[thread overview]
Message-ID: <20260327001827.3385001-4-jtranoleary@google.com> (raw)
In-Reply-To: <20260327001827.3385001-1-jtranoleary@google.com>

Enforce struct size matches at compile time to ensure we do not have
unexpected padding added. Other admin queue structs already have this
check, so add it to flow rule structs as well.

Signed-off-by: Jasper Tran O'Leary <jtranoleary@google.com>
Reviewed-by: Joshua Washington <joshwash@google.com>
---
 drivers/net/gve/gve_flow_rule.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/gve/gve_flow_rule.h b/drivers/net/gve/gve_flow_rule.h
index d597a6c..bdf2955 100644
--- a/drivers/net/gve/gve_flow_rule.h
+++ b/drivers/net/gve/gve_flow_rule.h
@@ -41,6 +41,7 @@ struct gve_flow_spec {
 		u8 tclass;
 	};
 };
+GVE_CHECK_STRUCT_LEN(40, gve_flow_spec);
 
 /* Flow rule parameters using mixed endianness.
  * - flow_type and action are guest endian.
@@ -55,6 +56,7 @@ struct gve_flow_rule_params {
 	struct gve_flow_spec key;
 	struct gve_flow_spec mask;
 };
+GVE_CHECK_STRUCT_LEN(84, gve_flow_rule_params);
 
 struct gve_priv;
 
-- 
2.53.0.1118.gaef5881109-goog


  parent reply	other threads:[~2026-03-27  0:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-27  0:18 [PATCH 0/4] net/gve: clean up minor issues Jasper Tran O'Leary
2026-03-27  0:18 ` [PATCH 1/4] net/gve: fix comma operator compiler warning Jasper Tran O'Leary
2026-03-27  0:18 ` [PATCH 2/4] net/gve: remove variable length array in rx refill Jasper Tran O'Leary
2026-03-27  0:18 ` Jasper Tran O'Leary [this message]
2026-03-27  0:18 ` [PATCH 4/4] net/gve: add minor fixes to flow rule code Jasper Tran O'Leary
2026-04-05 16:19 ` [PATCH 0/4] net/gve: clean up minor issues Stephen Hemminger

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=20260327001827.3385001-4-jtranoleary@google.com \
    --to=jtranoleary@google.com \
    --cc=dev@dpdk.org \
    --cc=joshwash@google.com \
    --cc=stephen@networkplumber.org \
    /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