From: Juergen Gross <jgross@suse.com>
To: linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Cc: Juergen Gross <jgross@suse.com>, Wei Liu <wei.liu@kernel.org>,
Paul Durrant <paul@xen.org>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
xen-devel@lists.xenproject.org, Jan Beulich <jbeulich@suse.com>
Subject: [PATCH 2/2] xen/netback: remove not needed test in xenvif_tx_build_gops()
Date: Mon, 27 Mar 2023 10:36:46 +0200 [thread overview]
Message-ID: <20230327083646.18690-3-jgross@suse.com> (raw)
In-Reply-To: <20230327083646.18690-1-jgross@suse.com>
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(-)
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;
--
2.35.3
next prev parent reply other threads:[~2023-03-27 8:41 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-27 8:36 [PATCH 0/2] xen/netback: fix issue introduced recently Juergen Gross
2023-03-27 8:36 ` [PATCH 1/2] xen/netback: don't do grant copy across page boundary Juergen Gross
2023-03-27 9:04 ` Paul Durrant
2023-03-27 9:49 ` Jan Beulich
2023-03-27 10:07 ` Juergen Gross
2023-03-27 15:38 ` Jan Beulich
2023-03-27 16:22 ` Juergen Gross
2023-03-28 7:50 ` Jan Beulich
2023-03-27 8:36 ` Juergen Gross [this message]
2023-03-27 9:04 ` [PATCH 2/2] xen/netback: remove not needed test in xenvif_tx_build_gops() Paul Durrant
2023-03-28 13:30 ` [PATCH 0/2] xen/netback: fix issue introduced recently 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=20230327083646.18690-3-jgross@suse.com \
--to=jgross@suse.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jbeulich@suse.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=paul@xen.org \
--cc=wei.liu@kernel.org \
--cc=xen-devel@lists.xenproject.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