[dpdk-stable] patch 'net/virtio: fix Tx cleanup functions to have same signature' has been queued to stable release 20.11.4

Xueming Li xuemingl at nvidia.com
Wed Nov 10 07:29:33 CET 2021


Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/0da178c94e72f8a8a9e5673e3d66929b68d398cf

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 0da178c94e72f8a8a9e5673e3d66929b68d398cf Mon Sep 17 00:00:00 2001
From: Ivan Ilchenko <ivan.ilchenko at oktetlabs.ru>
Date: Wed, 15 Sep 2021 12:19:41 +0300
Subject: [PATCH] net/virtio: fix Tx cleanup functions to have same signature
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit e2ca43a35ea60e6194a72d37c964d52827fcff71 ]

There is a family of cleanup from completed transmits functions.
Fix packed virtqueues cleanup functions to have the same signature
as split virtqueues have. This lets all functions of the family to
match the same callback prototype.

Fixes: 892dc798fa9c ("net/virtio: implement Tx path for packed queues")

Signed-off-by: Ivan Ilchenko <ivan.ilchenko at oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <andrew.rybchenko at oktetlabs.ru>
Reviewed-by: Maxime Coquelin <maxime.coquelin at redhat.com>
---
 drivers/net/virtio/virtqueue.h | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/net/virtio/virtqueue.h b/drivers/net/virtio/virtqueue.h
index 42c4c9882f..c169518ec8 100644
--- a/drivers/net/virtio/virtqueue.h
+++ b/drivers/net/virtio/virtqueue.h
@@ -828,25 +828,26 @@ vq_ring_free_id_packed(struct virtqueue *vq, uint16_t id)
 }
 
 static void
-virtio_xmit_cleanup_inorder_packed(struct virtqueue *vq, int num)
+virtio_xmit_cleanup_inorder_packed(struct virtqueue *vq, uint16_t num)
 {
 	uint16_t used_idx, id, curr_id, free_cnt = 0;
 	uint16_t size = vq->vq_nentries;
 	struct vring_packed_desc *desc = vq->vq_packed.ring.desc;
 	struct vq_desc_extra *dxp;
+	int nb = num;
 
 	used_idx = vq->vq_used_cons_idx;
 	/* desc_is_used has a load-acquire or rte_io_rmb inside
 	 * and wait for used desc in virtqueue.
 	 */
-	while (num > 0 && desc_is_used(&desc[used_idx], vq)) {
+	while (nb > 0 && desc_is_used(&desc[used_idx], vq)) {
 		id = desc[used_idx].id;
 		do {
 			curr_id = used_idx;
 			dxp = &vq->vq_descx[used_idx];
 			used_idx += dxp->ndescs;
 			free_cnt += dxp->ndescs;
-			num -= dxp->ndescs;
+			nb -= dxp->ndescs;
 			if (used_idx >= size) {
 				used_idx -= size;
 				vq->vq_packed.used_wrap_counter ^= 1;
@@ -862,7 +863,7 @@ virtio_xmit_cleanup_inorder_packed(struct virtqueue *vq, int num)
 }
 
 static void
-virtio_xmit_cleanup_normal_packed(struct virtqueue *vq, int num)
+virtio_xmit_cleanup_normal_packed(struct virtqueue *vq, uint16_t num)
 {
 	uint16_t used_idx, id;
 	uint16_t size = vq->vq_nentries;
@@ -892,7 +893,7 @@ virtio_xmit_cleanup_normal_packed(struct virtqueue *vq, int num)
 
 /* Cleanup from completed transmits. */
 static inline void
-virtio_xmit_cleanup_packed(struct virtqueue *vq, int num, int in_order)
+virtio_xmit_cleanup_packed(struct virtqueue *vq, uint16_t num, int in_order)
 {
 	if (in_order)
 		virtio_xmit_cleanup_inorder_packed(vq, num);
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:05.991845129 +0800
+++ 0089-net-virtio-fix-Tx-cleanup-functions-to-have-same-sig.patch	2021-11-10 14:17:01.847412948 +0800
@@ -1 +1 @@
-From e2ca43a35ea60e6194a72d37c964d52827fcff71 Mon Sep 17 00:00:00 2001
+From 0da178c94e72f8a8a9e5673e3d66929b68d398cf Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit e2ca43a35ea60e6194a72d37c964d52827fcff71 ]
@@ -12 +14,0 @@
-Cc: stable at dpdk.org
@@ -22 +24 @@
-index 03957b2bd0..d0c48ca415 100644
+index 42c4c9882f..c169518ec8 100644
@@ -25 +27 @@
-@@ -803,25 +803,26 @@ vq_ring_free_id_packed(struct virtqueue *vq, uint16_t id)
+@@ -828,25 +828,26 @@ vq_ring_free_id_packed(struct virtqueue *vq, uint16_t id)
@@ -55 +57 @@
-@@ -837,7 +838,7 @@ virtio_xmit_cleanup_inorder_packed(struct virtqueue *vq, int num)
+@@ -862,7 +863,7 @@ virtio_xmit_cleanup_inorder_packed(struct virtqueue *vq, int num)
@@ -64 +66 @@
-@@ -867,7 +868,7 @@ virtio_xmit_cleanup_normal_packed(struct virtqueue *vq, int num)
+@@ -892,7 +893,7 @@ virtio_xmit_cleanup_normal_packed(struct virtqueue *vq, int num)


More information about the stable mailing list