From: Paolo Abeni <pabeni@redhat.com>
To: Gur Stavi <gur.stavi@huawei.com>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Simon Horman <horms@kernel.org>,
Fan Gong <gongfan1@huawei.com>
Subject: Re: [PATCH net-next v2 1/3] queue_api: add subqueue variant netif_subqueue_sent
Date: Tue, 27 May 2025 12:06:40 +0200 [thread overview]
Message-ID: <dbcb476d-9bfd-42bd-bef8-8085baa05063@redhat.com> (raw)
In-Reply-To: <19057ca470251f5c48d90f379edafdb639278339.1747896423.git.gur.stavi@huawei.com>
On 5/22/25 8:54 AM, Gur Stavi wrote:
> diff --git a/include/net/netdev_queues.h b/include/net/netdev_queues.h
> index ba2eaf39089b..7b6656ee549f 100644
> --- a/include/net/netdev_queues.h
> +++ b/include/net/netdev_queues.h
> @@ -294,6 +294,14 @@ netdev_txq_completed_mb(struct netdev_queue *dev_queue,
> netif_txq_try_stop(_txq, get_desc, start_thrs); \
> })
>
> +#define netif_subqueue_sent(dev, idx, bytes) \
> + ({ \
> + struct netdev_queue *_txq; \
> + \
> + _txq = netdev_get_tx_queue(dev, idx); \
> + netdev_tx_sent_queue(_txq, bytes); \
> + })
The above could be (and should be) a static inline function. Note that
(most of) the existing queue API helper are macros to allow quering the
tx ring without using indirect calls/function pointers.
Thanks,
Paolo
next prev parent reply other threads:[~2025-05-27 10:07 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-22 6:54 [PATCH net-next v2 0/3] hinic3: queue_api related fixes Gur Stavi
2025-05-22 6:54 ` [PATCH net-next v2 1/3] queue_api: add subqueue variant netif_subqueue_sent Gur Stavi
2025-05-27 10:06 ` Paolo Abeni [this message]
2025-05-22 6:54 ` [PATCH net-next v2 2/3] hinic3: use netif_subqueue_sent api Gur Stavi
2025-05-22 6:54 ` [PATCH net-next v2 3/3] hinic3: remove tx_q name collision hack Gur Stavi
2025-05-22 16:58 ` [PATCH net-next v2 0/3] hinic3: queue_api related fixes Jakub Kicinski
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=dbcb476d-9bfd-42bd-bef8-8085baa05063@redhat.com \
--to=pabeni@redhat.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gongfan1@huawei.com \
--cc=gur.stavi@huawei.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).