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 4/4] net/gve: add minor fixes to flow rule code
Date: Fri, 27 Mar 2026 00:18:27 +0000	[thread overview]
Message-ID: <20260327001827.3385001-5-jtranoleary@google.com> (raw)
In-Reply-To: <20260327001827.3385001-1-jtranoleary@google.com>

Replace an unneeded goto statement with an early return. Add a comment
about the lifetime of the flow rule lock.

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

diff --git a/drivers/net/gve/gve_ethdev.c b/drivers/net/gve/gve_ethdev.c
index 6ce3ef3..fce90ad 100644
--- a/drivers/net/gve/gve_ethdev.c
+++ b/drivers/net/gve/gve_ethdev.c
@@ -521,8 +521,7 @@ gve_setup_flow_subsystem(struct gve_priv *priv)
 			priv->flow_rule_bmp_size, 0);
 	if (!priv->avail_flow_rule_bmp_mem) {
 		PMD_DRV_LOG(ERR, "Failed to alloc bitmap for flow rules.");
-		err = -ENOMEM;
-		goto free_flow_rule_bmp;
+		return -ENOMEM;
 	}
 
 	err = gve_flow_init_bmp(priv);
@@ -619,6 +618,11 @@ gve_dev_reset(struct rte_eth_dev *dev)
 	if (gve_get_flow_subsystem_ok(priv))
 		gve_teardown_flow_subsystem(priv);
 
+	/*
+	 * Note that gve_teardown_flow_subsystem does not destroy the
+	 * flow_rule_lock. The lock is preserved across device resets and only
+	 * destroyed on dev_close.
+	 */
 	gve_free_queues(dev);
 	gve_teardown_device_resources(priv);
 	gve_adminq_free(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 ` [PATCH 3/4] net/gve: add checks for flow rule struct padding Jasper Tran O'Leary
2026-03-27  0:18 ` Jasper Tran O'Leary [this message]
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-5-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