From: SeungJong Ha <engineer.jjhama@gmail.com>
To: "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@kernel.org>,
Jakub Kicinski <kuba@kernel.org>,
Paolo Abeni <pabeni@redhat.com>,
Willem de Bruijn <willemb@google.com>,
Simon Horman <horms@kernel.org>,
Jamal Hadi Salim <jhs@mojatatu.com>,
Jiri Pirko <jiri@resnulli.us>,
Andrew Lunn <andrew+netdev@lunn.ch>,
Willem de Bruijn <willemdebruijn.kernel@gmail.com>,
Jason Wang <jasowangio@gmail.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
John Fastabend <john.fastabend@gmail.com>,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
SeungJong Ha <engineer.jjhama@gmail.com>
Subject: [PATCH RFC net-next 1/5] ptr_ring: drop the unused gfp argument of __ptr_ring_swap_queue()
Date: Sun, 06 Dec 2026 23:44:42 +0900 [thread overview]
Message-ID: <20261206-tc1-txqlen-commit-v1-1-ec9f34dce973@gmail.com> (raw)
In-Reply-To: <20261206-tc1-txqlen-commit-v1-0-ec9f34dce973@gmail.com>
__ptr_ring_swap_queue() does not allocate. It has not used its gfp
argument since it was split out of ptr_ring_resize() in commit
59e6ae53248a ("ptr_ring: support resizing multiple queues"). Drop it.
No functional change.
The patch was written with Claude Code (Claude Opus 5.5).
Signed-off-by: SeungJong Ha <engineer.jjhama@gmail.com>
---
include/linux/ptr_ring.h | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/include/linux/ptr_ring.h b/include/linux/ptr_ring.h
index b851a9c170bf..4e710397903b 100644
--- a/include/linux/ptr_ring.h
+++ b/include/linux/ptr_ring.h
@@ -590,8 +590,7 @@ static inline void ptr_ring_unconsume(struct ptr_ring *r, void **batch, int n,
}
static inline void **__ptr_ring_swap_queue(struct ptr_ring *r, void **queue,
- int size, gfp_t gfp,
- void (*destroy)(void *))
+ int size, void (*destroy)(void *))
{
int producer = 0;
void **old;
@@ -634,7 +633,7 @@ static inline int ptr_ring_resize_noprof(struct ptr_ring *r, int size, gfp_t gfp
spin_lock_irqsave(&(r)->consumer_lock, flags);
spin_lock(&(r)->producer_lock);
- old = __ptr_ring_swap_queue(r, queue, size, gfp, destroy);
+ old = __ptr_ring_swap_queue(r, queue, size, destroy);
spin_unlock(&(r)->producer_lock);
spin_unlock_irqrestore(&(r)->consumer_lock, flags);
@@ -673,7 +672,7 @@ static inline int ptr_ring_resize_multiple_bh_noprof(struct ptr_ring **rings,
spin_lock_bh(&(rings[i])->consumer_lock);
spin_lock(&(rings[i])->producer_lock);
queues[i] = __ptr_ring_swap_queue(rings[i], queues[i],
- size, gfp, destroy);
+ size, destroy);
spin_unlock(&(rings[i])->producer_lock);
spin_unlock_bh(&(rings[i])->consumer_lock);
}
--
2.54.0
next prev parent reply other threads:[~2026-12-06 14:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-06 14:44 [PATCH RFC net-next 0/5] net: make tx_queue_len changes all-or-nothing SeungJong Ha
2026-12-06 14:44 ` SeungJong Ha [this message]
2026-12-06 14:44 ` [PATCH RFC net-next 2/5] ptr_ring: split ptr_ring_resize_multiple_bh() into alloc and swap SeungJong Ha
2026-12-06 14:44 ` [PATCH RFC net-next 3/5] net_sched: change tx_queue_len on all tx queues or on none SeungJong Ha
2026-12-06 14:44 ` [PATCH RFC net-next 4/5] net: resize tun and tap rings from rtnl_link_ops SeungJong Ha
2026-12-06 14:44 ` [PATCH RFC net-next 5/5] net: change tx_queue_len only after all allocations succeeded SeungJong Ha
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=20261206-tc1-txqlen-commit-v1-1-ec9f34dce973@gmail.com \
--to=engineer.jjhama@gmail.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=horms@kernel.org \
--cc=jasowangio@gmail.com \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=john.fastabend@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=willemb@google.com \
--cc=willemdebruijn.kernel@gmail.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