diff mbox series

[2/2] xen/netback: remove not needed test in xenvif_tx_build_gops()

Message ID 20230327083646.18690-3-jgross@suse.com (mailing list archive)
State Superseded
Headers show
Series xen/netback: fix issue introduced recently | expand

Commit Message

Jürgen Groß March 27, 2023, 8:36 a.m. UTC
The tests for the number of grant mapping or copy operations reaching
the array size of the operations buffer at the end of the main loop in
xenvif_tx_build_gops() isn't needed.

The loop can handle at maximum MAX_PENDING_REQS transfer requests, as
XEN_RING_NR_UNCONSUMED_REQUESTS() is taking unsent responses into
consideration, too.

Remove the tests.

Suggested-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
---
 drivers/net/xen-netback/netback.c | 4 ----
 1 file changed, 4 deletions(-)

Comments

Paul Durrant March 27, 2023, 9:04 a.m. UTC | #1
On 27/03/2023 09:36, Juergen Gross wrote:
> The tests for the number of grant mapping or copy operations reaching
> the array size of the operations buffer at the end of the main loop in
> xenvif_tx_build_gops() isn't needed.
> 
> The loop can handle at maximum MAX_PENDING_REQS transfer requests, as
> XEN_RING_NR_UNCONSUMED_REQUESTS() is taking unsent responses into
> consideration, too.
> 
> Remove the tests.
> 
> Suggested-by: Jan Beulich <jbeulich@suse.com>
> Signed-off-by: Juergen Gross <jgross@suse.com>
> ---
>   drivers/net/xen-netback/netback.c | 4 ----
>   1 file changed, 4 deletions(-)
> 

Reviewed-by: Paul Durrant <paul@xen.org>
diff mbox series

Patch

diff --git a/drivers/net/xen-netback/netback.c b/drivers/net/xen-netback/netback.c
index 111c179f161b..4943be4fd99d 100644
--- a/drivers/net/xen-netback/netback.c
+++ b/drivers/net/xen-netback/netback.c
@@ -1082,10 +1082,6 @@  static void xenvif_tx_build_gops(struct xenvif_queue *queue,
 		__skb_queue_tail(&queue->tx_queue, skb);
 
 		queue->tx.req_cons = idx;
-
-		if ((*map_ops >= ARRAY_SIZE(queue->tx_map_ops)) ||
-		    (*copy_ops >= ARRAY_SIZE(queue->tx_copy_ops)))
-			break;
 	}
 
 	return;