From: Edward Cree <ecree.xilinx@gmail.com>
To: Fushuai Wang <wangfushuai@baidu.com>,
andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com
Cc: netdev@vger.kernel.org, linux-net-drivers@amd.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next] sfc: eliminate xdp_rxq_info_valid using XDP base API
Date: Tue, 1 Jul 2025 13:24:13 +0100 [thread overview]
Message-ID: <d152a6ae-4303-4889-b68b-25e29ea8eddb@gmail.com> (raw)
In-Reply-To: <20250628051016.51022-1-wangfushuai@baidu.com>
On 28/06/2025 06:10, Fushuai Wang wrote:
> Commit eb9a36be7f3e ("sfc: perform XDP processing on received packets")
> use xdp_rxq_info_valid to track failures of xdp_rxq_info_reg().
> However, this driver-maintained state becomes redundant since the XDP
> framework already provides xdp_rxq_info_is_reg() for checking registration
> status.
>
> Signed-off-by: Fushuai Wang <wangfushuai@baidu.com>
Acked-by: Edward Cree <ecree.xilinx@gmail.com>
> ---
> drivers/net/ethernet/sfc/net_driver.h | 2 --
> drivers/net/ethernet/sfc/rx_common.c | 6 +-----
> 2 files changed, 1 insertion(+), 7 deletions(-)
>
> diff --git a/drivers/net/ethernet/sfc/net_driver.h b/drivers/net/ethernet/sfc/net_driver.h
> index 5c0f306fb019..b98c259f672d 100644
> --- a/drivers/net/ethernet/sfc/net_driver.h
> +++ b/drivers/net/ethernet/sfc/net_driver.h
> @@ -404,7 +404,6 @@ struct efx_rx_page_state {
> * @old_rx_packets: Value of @rx_packets as of last efx_init_rx_queue()
> * @old_rx_bytes: Value of @rx_bytes as of last efx_init_rx_queue()
> * @xdp_rxq_info: XDP specific RX queue information.
> - * @xdp_rxq_info_valid: Is xdp_rxq_info valid data?.
> */
> struct efx_rx_queue {
> struct efx_nic *efx;
> @@ -443,7 +442,6 @@ struct efx_rx_queue {
> unsigned long old_rx_packets;
> unsigned long old_rx_bytes;
> struct xdp_rxq_info xdp_rxq_info;
> - bool xdp_rxq_info_valid;
> };
>
> enum efx_sync_events_state {
> diff --git a/drivers/net/ethernet/sfc/rx_common.c b/drivers/net/ethernet/sfc/rx_common.c
> index f4f75299dfa9..5306f4c44be4 100644
> --- a/drivers/net/ethernet/sfc/rx_common.c
> +++ b/drivers/net/ethernet/sfc/rx_common.c
> @@ -269,8 +269,6 @@ void efx_init_rx_queue(struct efx_rx_queue *rx_queue)
> "Failure to initialise XDP queue information rc=%d\n",
> rc);
> efx->xdp_rxq_info_failed = true;
> - } else {
> - rx_queue->xdp_rxq_info_valid = true;
> }
>
> /* Set up RX descriptor ring */
> @@ -302,10 +300,8 @@ void efx_fini_rx_queue(struct efx_rx_queue *rx_queue)
>
> efx_fini_rx_recycle_ring(rx_queue);
>
> - if (rx_queue->xdp_rxq_info_valid)
> + if (xdp_rxq_info_is_reg(&rx_queue->xdp_rxq_info))
> xdp_rxq_info_unreg(&rx_queue->xdp_rxq_info);
> -
> - rx_queue->xdp_rxq_info_valid = false;
> }
>
> void efx_remove_rx_queue(struct efx_rx_queue *rx_queue)
next prev parent reply other threads:[~2025-07-01 12:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-28 5:10 [PATCH net-next] sfc: eliminate xdp_rxq_info_valid using XDP base API Fushuai Wang
2025-07-01 12:24 ` Edward Cree [this message]
2025-07-01 13:26 ` Larysa Zaremba
2025-07-02 0:20 ` patchwork-bot+netdevbpf
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=d152a6ae-4303-4889-b68b-25e29ea8eddb@gmail.com \
--to=ecree.xilinx@gmail.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-net-drivers@amd.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=wangfushuai@baidu.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