From: Ahmad Gani <reyuki@gnuweeb.org>
To: Ammar Faizi <ammarfaizi2@gnuweeb.org>
Cc: Ahmad Gani <reyuki@gnuweeb.org>,
GNU/Weeb Mailing List <gwml@vger.gnuweeb.org>
Subject: [PATCH gwproxy v1 3/3] io_uring: Rename GWP_CONN_FLAG_IS_SHUTDOWN to GWP_CONN_FLAG_IS_CANCEL
Date: Tue, 29 Jul 2025 09:48:28 +0700 [thread overview]
Message-ID: <20250729024913.154302-4-reyuki@gnuweeb.org> (raw)
In-Reply-To: <20250729024913.154302-1-reyuki@gnuweeb.org>
A previous commit forgot to replace GWP_CONN_FLAG_IS_SHUTDOWN and leading to
build error on debug mode, it wasn't detected on release mode.
Fixes: 06fa2ea2ba4a ("io_uring: Replace prep_shutdown() with prep_cancel()")
Signed-off-by: Ahmad Gani <reyuki@gnuweeb.org>
---
src/gwproxy/ev/io_uring.c | 8 ++++----
src/gwproxy/gwproxy.h | 2 +-
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/gwproxy/ev/io_uring.c b/src/gwproxy/ev/io_uring.c
index e7696efbf4aa..ca7178476f9f 100644
--- a/src/gwproxy/ev/io_uring.c
+++ b/src/gwproxy/ev/io_uring.c
@@ -318,7 +318,7 @@ static void shutdown_gcp(struct gwp_wrk *w, struct gwp_conn_pair *gcp)
struct gwp_ctx *ctx = w->ctx;
struct io_uring_sqe *s;
- if (gcp->flags & GWP_CONN_FLAG_IS_SHUTDOWN)
+ if (gcp->flags & GWP_CONN_FLAG_IS_CANCEL)
return;
if (gcp->target.fd >= 0) {
@@ -339,7 +339,7 @@ static void shutdown_gcp(struct gwp_wrk *w, struct gwp_conn_pair *gcp)
get_gcp(gcp);
}
- gcp->flags |= GWP_CONN_FLAG_IS_SHUTDOWN;
+ gcp->flags |= GWP_CONN_FLAG_IS_CANCEL;
}
static int arm_gcp(struct gwp_wrk *w, struct gwp_conn_pair *gcp)
@@ -640,7 +640,7 @@ static int handle_event(struct gwp_wrk *w, struct io_uring_cqe *cqe)
break;
case EV_BIT_TARGET_CANCEL:
pr_dbg(&ctx->lh, "Handling target cancel event: %d", cqe->res);
- assert(gcp->flags & GWP_CONN_FLAG_IS_SHUTDOWN);
+ assert(gcp->flags & GWP_CONN_FLAG_IS_CANCEL);
r = 0;
break;
case EV_BIT_CLIENT_CANCEL:
@@ -661,7 +661,7 @@ static int handle_event(struct gwp_wrk *w, struct io_uring_cqe *cqe)
gcp = udata;
if ((gcp->flags & GWP_CONN_FLAG_IS_DYING) &&
- !(gcp->flags & GWP_CONN_FLAG_IS_SHUTDOWN))
+ !(gcp->flags & GWP_CONN_FLAG_IS_CANCEL))
shutdown_gcp(w, gcp);
put_gcp(w, gcp);
diff --git a/src/gwproxy/gwproxy.h b/src/gwproxy/gwproxy.h
index 86c1a05458ad..4b0fdfb37f73 100644
--- a/src/gwproxy/gwproxy.h
+++ b/src/gwproxy/gwproxy.h
@@ -99,7 +99,7 @@ enum {
*/
GWP_CONN_FLAG_NO_CLOSE_FD = (1ull << 0ull),
GWP_CONN_FLAG_IS_DYING = (1ull << 1ull),
- GWP_CONN_FLAG_IS_SHUTDOWN = (1ull << 2ull),
+ GWP_CONN_FLAG_IS_CANCEL = (1ull << 2ull),
};
struct gwp_conn_pair {
--
Ahmad Gani
next prev parent reply other threads:[~2025-07-29 2:50 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-29 2:48 [PATCH gwproxy v1 0/3] Minor changes and fixes Ahmad Gani
2025-07-29 2:48 ` [PATCH gwproxy v1 2/3] io_uring: Add macro guard Ahmad Gani
2025-07-29 2:48 ` Ahmad Gani [this message]
2025-07-29 2:53 ` [PATCH gwproxy v1 0/3] Minor changes and fixes Ammar Faizi
2025-07-29 3:08 ` [PATCH gwproxy v2] io_uring: Reduce liburing code base Ahmad Gani
2025-07-29 3:47 ` [PATCH gwproxy v2 0/3] Minor changes and fixes Ahmad Gani
2025-07-29 3:47 ` [PATCH gwproxy v2 1/3] io_uring: Add liburing to the code base Ahmad Gani
2025-07-29 15:06 ` Ammar Faizi
2025-07-29 3:47 ` [PATCH gwproxy v2 2/3] io_uring: Add macro guard Ahmad Gani
2025-07-29 3:47 ` [PATCH gwproxy v2 3/3] io_uring: Rename GWP_CONN_FLAG_IS_SHUTDOWN to GWP_CONN_FLAG_IS_CANCEL Ahmad Gani
2025-07-29 3:50 ` [PATCH gwproxy v2 0/3] Minor changes and fixes Ammar Faizi
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=20250729024913.154302-4-reyuki@gnuweeb.org \
--to=reyuki@gnuweeb.org \
--cc=ammarfaizi2@gnuweeb.org \
--cc=gwml@vger.gnuweeb.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