diff mbox series

[v2,2/3] sfc: revert "adjust efx->xdp_tx_queue_count with the real number of initialized queues"

Message ID 20210709125520.39001-3-ihuguet@redhat.com (mailing list archive)
State Superseded
Delegated to: Netdev Maintainers
Headers show
Series Fix lack of XDP TX queues | expand

Checks

Context Check Description
netdev/cover_letter success Link
netdev/fixes_present success Link
netdev/patch_count success Link
netdev/tree_selection success Guessed tree name to be net-next
netdev/subject_prefix warning Target tree name not specified in the subject
netdev/cc_maintainers warning 1 maintainers not CCed: bpf@vger.kernel.org
netdev/source_inline success Was 0 now: 0
netdev/verify_signedoff success Link
netdev/module_param success Was 0 now: 0
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/verify_fixes success Link
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/header_inline success Link

Commit Message

Íñigo Huguet July 9, 2021, 12:55 p.m. UTC
This reverts commit 99ba0ea616aa ("sfc: adjust efx->xdp_tx_queue_count
with the real number of initialized queues"). It intended to fix a
problem caused by a round up when calculating the number of XDP channels
and queues.

However, that was not the real problem. The real problem was that the
number of XDP TX queues created had been reduced to half in
commit e26ca4b53582 ("sfc: reduce the number of requested xdp ev queues"),
but the variable xdp_tx_queue_count had remained the same.

After reverting that commit in the previous patch of this series, this
also can be reverted since the error doesn't actually exist.

Signed-off-by: Íñigo Huguet <ihuguet@redhat.com>
---
 drivers/net/ethernet/sfc/efx_channels.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Edward Cree July 9, 2021, 1:53 p.m. UTC | #1
On 09/07/2021 13:55, Íñigo Huguet wrote:
> This reverts commit 99ba0ea616aa ("sfc: adjust efx->xdp_tx_queue_count
> with the real number of initialized queues"). It intended to fix a
> problem caused by a round up when calculating the number of XDP channels
> and queues.
> 
> However, that was not the real problem. The real problem was that the
> number of XDP TX queues created had been reduced to half in
> commit e26ca4b53582 ("sfc: reduce the number of requested xdp ev queues"),
> but the variable xdp_tx_queue_count had remained the same.
> 
> After reverting that commit in the previous patch of this series, this
> also can be reverted since the error doesn't actually exist.
> 
> Signed-off-by: Íñigo Huguet <ihuguet@redhat.com>
> ---
>  drivers/net/ethernet/sfc/efx_channels.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/sfc/efx_channels.c b/drivers/net/ethernet/sfc/efx_channels.c
> index 5b71f8a03a6d..e25c8f9d9ff4 100644
> --- a/drivers/net/ethernet/sfc/efx_channels.c
> +++ b/drivers/net/ethernet/sfc/efx_channels.c
> @@ -915,8 +915,6 @@ int efx_set_channels(struct efx_nic *efx)
>  			}
>  		}
>  	}
> -	if (xdp_queue_number)
> -		efx->xdp_tx_queue_count = xdp_queue_number;
>  

Probably best to add in a WARN_ON[_ONCE] here to catch if these ever
 aren't already equal.  Or at least a netif_warn().

-ed
diff mbox series

Patch

diff --git a/drivers/net/ethernet/sfc/efx_channels.c b/drivers/net/ethernet/sfc/efx_channels.c
index 5b71f8a03a6d..e25c8f9d9ff4 100644
--- a/drivers/net/ethernet/sfc/efx_channels.c
+++ b/drivers/net/ethernet/sfc/efx_channels.c
@@ -915,8 +915,6 @@  int efx_set_channels(struct efx_nic *efx)
 			}
 		}
 	}
-	if (xdp_queue_number)
-		efx->xdp_tx_queue_count = xdp_queue_number;
 
 	rc = netif_set_real_num_tx_queues(efx->net_dev, efx->n_tx_channels);
 	if (rc)