* [PATCH net-next v2] sfc: siena: eliminate xdp_rxq_info_valid using XDP base API
@ 2025-06-28 5:10 Fushuai Wang
2025-07-01 12:23 ` Edward Cree
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Fushuai Wang @ 2025-06-28 5:10 UTC (permalink / raw)
To: ecree.xilinx, andrew+netdev, davem, edumazet, kuba, pabeni
Cc: netdev, linux-net-drivers, linux-kernel, Fushuai Wang
Commit d48523cb88e0 ("sfc: Copy shared files needed for Siena (part 2)")
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>
---
drivers/net/ethernet/sfc/siena/net_driver.h | 2 --
drivers/net/ethernet/sfc/siena/rx_common.c | 6 +-----
2 files changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/net/ethernet/sfc/siena/net_driver.h b/drivers/net/ethernet/sfc/siena/net_driver.h
index 2be3bad3c993..4cf556782133 100644
--- a/drivers/net/ethernet/sfc/siena/net_driver.h
+++ b/drivers/net/ethernet/sfc/siena/net_driver.h
@@ -384,7 +384,6 @@ struct efx_rx_page_state {
* @recycle_count: RX buffer recycle counter.
* @slow_fill: Timer used to defer efx_nic_generate_fill_event().
* @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;
@@ -417,7 +416,6 @@ struct efx_rx_queue {
/* Statistics to supplement MAC stats */
unsigned long rx_packets;
struct xdp_rxq_info xdp_rxq_info;
- bool xdp_rxq_info_valid;
};
enum efx_sync_events_state {
diff --git a/drivers/net/ethernet/sfc/siena/rx_common.c b/drivers/net/ethernet/sfc/siena/rx_common.c
index 98d27174015d..4ae09505e417 100644
--- a/drivers/net/ethernet/sfc/siena/rx_common.c
+++ b/drivers/net/ethernet/sfc/siena/rx_common.c
@@ -268,8 +268,6 @@ void efx_siena_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 */
@@ -299,10 +297,8 @@ void efx_siena_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_siena_remove_rx_queue(struct efx_rx_queue *rx_queue)
--
2.36.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH net-next v2] sfc: siena: eliminate xdp_rxq_info_valid using XDP base API
2025-06-28 5:10 [PATCH net-next v2] sfc: siena: eliminate xdp_rxq_info_valid using XDP base API Fushuai Wang
@ 2025-07-01 12:23 ` Edward Cree
2025-07-01 13:29 ` Larysa Zaremba
2025-07-02 0:20 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 5+ messages in thread
From: Edward Cree @ 2025-07-01 12:23 UTC (permalink / raw)
To: Fushuai Wang, andrew+netdev, davem, edumazet, kuba, pabeni
Cc: netdev, linux-net-drivers, linux-kernel
On 28/06/2025 06:10, Fushuai Wang wrote:
> Commit d48523cb88e0 ("sfc: Copy shared files needed for Siena (part 2)")
> 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/siena/net_driver.h | 2 --
> drivers/net/ethernet/sfc/siena/rx_common.c | 6 +-----
> 2 files changed, 1 insertion(+), 7 deletions(-)
>
> diff --git a/drivers/net/ethernet/sfc/siena/net_driver.h b/drivers/net/ethernet/sfc/siena/net_driver.h
> index 2be3bad3c993..4cf556782133 100644
> --- a/drivers/net/ethernet/sfc/siena/net_driver.h
> +++ b/drivers/net/ethernet/sfc/siena/net_driver.h
> @@ -384,7 +384,6 @@ struct efx_rx_page_state {
> * @recycle_count: RX buffer recycle counter.
> * @slow_fill: Timer used to defer efx_nic_generate_fill_event().
> * @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;
> @@ -417,7 +416,6 @@ struct efx_rx_queue {
> /* Statistics to supplement MAC stats */
> unsigned long rx_packets;
> struct xdp_rxq_info xdp_rxq_info;
> - bool xdp_rxq_info_valid;
> };
>
> enum efx_sync_events_state {
> diff --git a/drivers/net/ethernet/sfc/siena/rx_common.c b/drivers/net/ethernet/sfc/siena/rx_common.c
> index 98d27174015d..4ae09505e417 100644
> --- a/drivers/net/ethernet/sfc/siena/rx_common.c
> +++ b/drivers/net/ethernet/sfc/siena/rx_common.c
> @@ -268,8 +268,6 @@ void efx_siena_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 */
> @@ -299,10 +297,8 @@ void efx_siena_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_siena_remove_rx_queue(struct efx_rx_queue *rx_queue)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net-next v2] sfc: siena: eliminate xdp_rxq_info_valid using XDP base API
2025-06-28 5:10 [PATCH net-next v2] sfc: siena: eliminate xdp_rxq_info_valid using XDP base API Fushuai Wang
2025-07-01 12:23 ` Edward Cree
@ 2025-07-01 13:29 ` Larysa Zaremba
2025-07-01 13:38 ` Edward Cree
2025-07-02 0:20 ` patchwork-bot+netdevbpf
2 siblings, 1 reply; 5+ messages in thread
From: Larysa Zaremba @ 2025-07-01 13:29 UTC (permalink / raw)
To: Fushuai Wang
Cc: ecree.xilinx, andrew+netdev, davem, edumazet, kuba, pabeni,
netdev, linux-net-drivers, linux-kernel
On Sat, Jun 28, 2025 at 01:10:33PM +0800, Fushuai Wang wrote:
> Commit d48523cb88e0 ("sfc: Copy shared files needed for Siena (part 2)")
> 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>
You could have sent those patches in a single patchset, but the patches
themselves are fine.
Reviewed-by: Larysa Zaremba <larysa.zaremba@intel.com>
> ---
> drivers/net/ethernet/sfc/siena/net_driver.h | 2 --
> drivers/net/ethernet/sfc/siena/rx_common.c | 6 +-----
> 2 files changed, 1 insertion(+), 7 deletions(-)
>
> diff --git a/drivers/net/ethernet/sfc/siena/net_driver.h b/drivers/net/ethernet/sfc/siena/net_driver.h
> index 2be3bad3c993..4cf556782133 100644
> --- a/drivers/net/ethernet/sfc/siena/net_driver.h
> +++ b/drivers/net/ethernet/sfc/siena/net_driver.h
> @@ -384,7 +384,6 @@ struct efx_rx_page_state {
> * @recycle_count: RX buffer recycle counter.
> * @slow_fill: Timer used to defer efx_nic_generate_fill_event().
> * @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;
> @@ -417,7 +416,6 @@ struct efx_rx_queue {
> /* Statistics to supplement MAC stats */
> unsigned long rx_packets;
> struct xdp_rxq_info xdp_rxq_info;
> - bool xdp_rxq_info_valid;
> };
>
> enum efx_sync_events_state {
> diff --git a/drivers/net/ethernet/sfc/siena/rx_common.c b/drivers/net/ethernet/sfc/siena/rx_common.c
> index 98d27174015d..4ae09505e417 100644
> --- a/drivers/net/ethernet/sfc/siena/rx_common.c
> +++ b/drivers/net/ethernet/sfc/siena/rx_common.c
> @@ -268,8 +268,6 @@ void efx_siena_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 */
> @@ -299,10 +297,8 @@ void efx_siena_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_siena_remove_rx_queue(struct efx_rx_queue *rx_queue)
> --
> 2.36.1
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net-next v2] sfc: siena: eliminate xdp_rxq_info_valid using XDP base API
2025-07-01 13:29 ` Larysa Zaremba
@ 2025-07-01 13:38 ` Edward Cree
0 siblings, 0 replies; 5+ messages in thread
From: Edward Cree @ 2025-07-01 13:38 UTC (permalink / raw)
To: Larysa Zaremba, Fushuai Wang
Cc: andrew+netdev, davem, edumazet, kuba, pabeni, netdev,
linux-net-drivers, linux-kernel
On 01/07/2025 14:29, Larysa Zaremba wrote:
> On Sat, Jun 28, 2025 at 01:10:33PM +0800, Fushuai Wang wrote:
>> Commit d48523cb88e0 ("sfc: Copy shared files needed for Siena (part 2)")
>> 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>
>
> You could have sent those patches in a single patchset, but the patches
> themselves are fine.
I asked him to split it, for a few reasons (different blamed commits,
clearer Subject: lines, Siena is EOL).
So if you don't like it, blame me ;-)
> Reviewed-by: Larysa Zaremba <larysa.zaremba@intel.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net-next v2] sfc: siena: eliminate xdp_rxq_info_valid using XDP base API
2025-06-28 5:10 [PATCH net-next v2] sfc: siena: eliminate xdp_rxq_info_valid using XDP base API Fushuai Wang
2025-07-01 12:23 ` Edward Cree
2025-07-01 13:29 ` Larysa Zaremba
@ 2025-07-02 0:20 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 5+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-07-02 0:20 UTC (permalink / raw)
To: Fushuai Wang
Cc: ecree.xilinx, andrew+netdev, davem, edumazet, kuba, pabeni,
netdev, linux-net-drivers, linux-kernel
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Sat, 28 Jun 2025 13:10:33 +0800 you wrote:
> Commit d48523cb88e0 ("sfc: Copy shared files needed for Siena (part 2)")
> 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>
>
> [...]
Here is the summary with links:
- [net-next,v2] sfc: siena: eliminate xdp_rxq_info_valid using XDP base API
https://git.kernel.org/netdev/net-next/c/ca899622c528
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-07-02 0:19 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-28 5:10 [PATCH net-next v2] sfc: siena: eliminate xdp_rxq_info_valid using XDP base API Fushuai Wang
2025-07-01 12:23 ` Edward Cree
2025-07-01 13:29 ` Larysa Zaremba
2025-07-01 13:38 ` Edward Cree
2025-07-02 0:20 ` patchwork-bot+netdevbpf
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).