patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Kevin Traynor <ktraynor@redhat.com>
To: David Marchand <david.marchand@redhat.com>
Cc: Maxime Coquelin <maxime.coquelin@redhat.com>,
	Andy Pei <andy.pei@intel.com>, Chenbo Xia <chenbo.xia@intel.com>,
	dpdk stable <stable@dpdk.org>
Subject: patch 'net/virtio: remove address width limit for modern devices' has been queued to stable release 21.11.4
Date: Wed, 22 Mar 2023 10:31:59 +0000	[thread overview]
Message-ID: <20230322103209.456098-12-ktraynor@redhat.com> (raw)
In-Reply-To: <20230322103209.456098-1-ktraynor@redhat.com>

Hi,

FYI, your patch has been queued to stable release 21.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 03/24/23. 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/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/f5922d3d3da7cb495de9092fdb3ea59ff5e30524

Thanks.

Kevin

---
From f5922d3d3da7cb495de9092fdb3ea59ff5e30524 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Tue, 14 Mar 2023 09:53:34 +0100
Subject: [PATCH] net/virtio: remove address width limit for modern devices

[ upstream commit 8b76b3a0d327f6bedc1343149e03619337ab0408 ]

Modern devices don't have the same limitation as legacy devices, because
vring addresses are not configured using a 32-bit register.

Fixes: 6ba1f63b5ab0 ("virtio: support specification 1.0")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Andy Pei <andy.pei@intel.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
---
 drivers/net/virtio/virtio_pci.c | 28 ++++++++--------------------
 1 file changed, 8 insertions(+), 20 deletions(-)

diff --git a/drivers/net/virtio/virtio_pci.c b/drivers/net/virtio/virtio_pci.c
index 632451dcbe..46b9ba6682 100644
--- a/drivers/net/virtio/virtio_pci.c
+++ b/drivers/net/virtio/virtio_pci.c
@@ -34,20 +34,4 @@
 struct virtio_pci_internal virtio_pci_internal[RTE_MAX_ETHPORTS];
 
-static inline int
-check_vq_phys_addr_ok(struct virtqueue *vq)
-{
-	/* Virtio PCI device VIRTIO_PCI_QUEUE_PF register is 32bit,
-	 * and only accepts 32 bit page frame number.
-	 * Check if the allocated physical memory exceeds 16TB.
-	 */
-	if ((vq->vq_ring_mem + vq->vq_ring_size - 1) >>
-			(VIRTIO_PCI_QUEUE_ADDR_SHIFT + 32)) {
-		PMD_INIT_LOG(ERR, "vring address shouldn't be above 16TB!");
-		return 0;
-	}
-
-	return 1;
-}
-
 #define PCI_MSIX_ENABLE 0x8000
 
@@ -274,6 +258,13 @@ legacy_setup_queue(struct virtio_hw *hw, struct virtqueue *vq)
 	uint32_t src;
 
-	if (!check_vq_phys_addr_ok(vq))
+	/* Virtio PCI device VIRTIO_PCI_QUEUE_PFN register is 32bit,
+	 * and only accepts 32 bit page frame number.
+	 * Check if the allocated physical memory exceeds 16TB.
+	 */
+	if ((vq->vq_ring_mem + vq->vq_ring_size - 1) >>
+			(VIRTIO_PCI_QUEUE_ADDR_SHIFT + 32)) {
+		PMD_INIT_LOG(ERR, "vring address shouldn't be above 16TB!");
 		return -1;
+	}
 
 	rte_pci_ioport_write(VTPCI_IO(hw), &vq->vq_queue_index, 2,
@@ -477,7 +468,4 @@ modern_setup_queue(struct virtio_hw *hw, struct virtqueue *vq)
 	uint16_t notify_off;
 
-	if (!check_vq_phys_addr_ok(vq))
-		return -1;
-
 	desc_addr = vq->vq_ring_mem;
 	avail_addr = desc_addr + vq->vq_nentries * sizeof(struct vring_desc);
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-03-22 10:30:08.226570524 +0000
+++ 0012-net-virtio-remove-address-width-limit-for-modern-dev.patch	2023-03-22 10:30:07.913866562 +0000
@@ -1 +1 @@
-From 8b76b3a0d327f6bedc1343149e03619337ab0408 Mon Sep 17 00:00:00 2001
+From f5922d3d3da7cb495de9092fdb3ea59ff5e30524 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8b76b3a0d327f6bedc1343149e03619337ab0408 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 9cf4d760b4..29eb739b04 100644
+index 632451dcbe..46b9ba6682 100644


  parent reply	other threads:[~2023-03-22 10:32 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-22 10:31 patch 'raw/skeleton: fix selftest' " Kevin Traynor
2023-03-22 10:31 ` patch 'reorder: fix sequence number mbuf field register' " Kevin Traynor
2023-03-22 10:31 ` patch 'test: fix segment length in packet generator' " Kevin Traynor
2023-03-22 10:31 ` patch 'test/mbuf: fix test with mbuf debug enabled' " Kevin Traynor
2023-03-22 10:31 ` patch 'test/crypto: fix ZUC digest length in comparison' " Kevin Traynor
2023-03-22 10:31 ` patch 'test/crypto: fix capability check for ZUC cipher-auth' " Kevin Traynor
2023-03-22 10:31 ` patch 'app/compress-perf: fix remaining data for ops' " Kevin Traynor
2023-03-22 10:31 ` patch 'app/bbdev: check statistics failure' " Kevin Traynor
2023-03-22 10:31 ` patch 'net/vhost: add missing newline in logs' " Kevin Traynor
2023-03-22 10:31 ` patch 'net/vhost: fix leak in interrupt handle setup' " Kevin Traynor
2023-03-22 10:31 ` patch 'net/vhost: fix Rx interrupt' " Kevin Traynor
2023-03-22 10:31 ` Kevin Traynor [this message]
2023-03-22 10:32 ` patch 'net/sfc: invalidate switch port entry on representor unplug' " Kevin Traynor
2023-03-22 10:32 ` patch 'net/i40e: fix AVX512 fast-free path' " Kevin Traynor
2023-03-22 10:32 ` patch 'net/e1000: fix saving of stripped VLAN TCI' " Kevin Traynor
2023-03-22 10:32 ` patch 'net/i40e: fix MAC loopback on X722' " Kevin Traynor
2023-03-22 10:32 ` patch 'net/iavf: fix device stop during reset' " Kevin Traynor
2023-03-22 10:32 ` patch 'net/mlx5: fix hairpin Tx queue reference count' " Kevin Traynor
2023-03-22 10:32 ` patch 'doc: fix LPM support in l3forward guide' " Kevin Traynor
2023-03-22 10:32 ` patch 'bus/ifpga: fix devargs handling' " Kevin Traynor
2023-03-22 10:32 ` patch 'net/ipn3ke: fix thread exit' " Kevin Traynor
2023-03-22 10:32 ` patch 'net/ipn3ke: fix representor name' " Kevin Traynor

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=20230322103209.456098-12-ktraynor@redhat.com \
    --to=ktraynor@redhat.com \
    --cc=andy.pei@intel.com \
    --cc=chenbo.xia@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=maxime.coquelin@redhat.com \
    --cc=stable@dpdk.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;
as well as URLs for NNTP newsgroup(s).