DPDK-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Maxime Leroy <maxime@leroys.fr>
To: dev@dpdk.org
Cc: Maxime Leroy <maxime@leroys.fr>,
	Stephen Hemminger <stephen@networkplumber.org>
Subject: [PATCH v2 3/3] net/tap: use bool for boolean flags
Date: Mon, 20 Jul 2026 14:06:59 +0200	[thread overview]
Message-ID: <20260720120700.801099-4-maxime@leroys.fr> (raw)
In-Reply-To: <20260720120700.801099-1-maxime@leroys.fr>

persist, flow_init and flow_isolate only ever hold true or false but were
declared as int. Use bool, consistent with the interrupt-mode flags added
in this series and with common DPDK practice.

Signed-off-by: Maxime Leroy <maxime@leroys.fr>
---
 drivers/net/tap/rte_eth_tap.h | 6 +++---
 drivers/net/tap/tap_flow.c    | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/net/tap/rte_eth_tap.h b/drivers/net/tap/rte_eth_tap.h
index aae9eea510..80419aad8c 100644
--- a/drivers/net/tap/rte_eth_tap.h
+++ b/drivers/net/tap/rte_eth_tap.h
@@ -72,7 +72,7 @@ struct pmd_internals {
 	char remote_iface[IFNAMSIZ];	  /* Remote netdevice name */
 	char name[IFNAMSIZ];		  /* Internal Tap device name */
 	int type;                         /* Type field - TUN|TAP */
-	int persist;			  /* 1 if keep link up, else 0 */
+	bool persist;			  /* 1 if keep link up, else 0 */
 	struct rte_ether_addr eth_addr;   /* Mac address of the device port */
 	struct rte_ether_addr *mc_addrs;  /* multicast address list */
 	uint32_t nb_mc_addrs;             /* multicast address count */
@@ -82,8 +82,8 @@ struct pmd_internals {
 	int nlsk_fd;                      /* Netlink socket fd */
 
 #ifdef HAVE_TCA_FLOWER
-	int flow_init;                    /* 1 if qdiscs were created */
-	int flow_isolate;                 /* 1 if flow isolation is enabled */
+	bool flow_init;                   /* 1 if qdiscs were created */
+	bool flow_isolate;                /* 1 if flow isolation is enabled */
 
 	struct tap_rss *rss;		  /* BPF program */
 
diff --git a/drivers/net/tap/tap_flow.c b/drivers/net/tap/tap_flow.c
index a9d8e09562..a0ffb35bdd 100644
--- a/drivers/net/tap/tap_flow.c
+++ b/drivers/net/tap/tap_flow.c
@@ -1521,7 +1521,7 @@ tap_flow_isolate(struct rte_eth_dev *dev,
 	}
 	return 0;
 error:
-	pmd->flow_isolate = 0;
+	pmd->flow_isolate = false;
 	return rte_flow_error_set(
 		error, ENOTSUP, RTE_FLOW_ERROR_TYPE_UNSPECIFIED, NULL,
 		"TC rule creation failed");
@@ -1914,7 +1914,7 @@ tap_flow_init(struct pmd_internals *pmd)
 		return -1;
 	}
 
-	pmd->flow_init = 1;
+	pmd->flow_init = true;
 
 	return 0;
 }
-- 
2.43.0


      parent reply	other threads:[~2026-07-20 12:07 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-17  9:58 [PATCH 0/2] net/tap: fix Rx queue interrupt support Maxime Leroy
2026-07-17  9:58 ` [PATCH 1/2] net/tap: support Rx queue interrupt enable/disable Maxime Leroy
2026-07-17  9:58 ` [PATCH 2/2] net/tap: drain queue FD in Rx interrupt mode Maxime Leroy
2026-07-17 12:31   ` Stephen Hemminger
2026-07-20  8:33     ` Maxime Leroy
2026-07-20 11:16       ` Stephen Hemminger
2026-07-20 12:06 ` [PATCH v2 0/3] net/tap: fix Rx queue interrupt support Maxime Leroy
2026-07-20 12:06   ` [PATCH v2 1/3] net/tap: support Rx queue interrupt enable/disable Maxime Leroy
2026-07-20 12:06   ` [PATCH v2 2/3] net/tap: drain queue FD in Rx interrupt mode Maxime Leroy
2026-07-20 12:06   ` Maxime Leroy [this message]

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=20260720120700.801099-4-maxime@leroys.fr \
    --to=maxime@leroys.fr \
    --cc=dev@dpdk.org \
    --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