patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Kevin Traynor <ktraynor@redhat.com>
To: Satha Rao <skoteshwar@marvell.com>
Cc: dpdk stable <stable@dpdk.org>
Subject: patch 'net/cnxk: flush SQ before configuring MTU' has been queued to stable release 21.11.5
Date: Thu, 20 Jul 2023 16:18:59 +0100	[thread overview]
Message-ID: <20230720151942.262154-108-ktraynor@redhat.com> (raw)
In-Reply-To: <20230720151942.262154-1-ktraynor@redhat.com>

Hi,

FYI, your patch has been queued to stable release 21.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/25/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/dd0782d8b25ab3e90c4dc5946e60fc01a2dca04a

Thanks.

Kevin

---
From dd0782d8b25ab3e90c4dc5946e60fc01a2dca04a Mon Sep 17 00:00:00 2001
From: Satha Rao <skoteshwar@marvell.com>
Date: Thu, 15 Jun 2023 01:04:23 -0400
Subject: [PATCH] net/cnxk: flush SQ before configuring MTU

[ upstream commit b33bef500a50b750577e3028e7ae8aff08bf3ae9 ]

When try to configure MTU for lower value causes run time failure
due to old bigger packets enqueued. To avoid error interrupts better
to flush the all SQs of this port before configuring new MTU.

Fixes: 8589ec212e80 ("net/cnxk: support MTU set")

Signed-off-by: Satha Rao <skoteshwar@marvell.com>
---
 drivers/net/cnxk/cnxk_ethdev.h     |  1 +
 drivers/net/cnxk/cnxk_ethdev_ops.c | 47 ++++++++++++++++++++++++++++++
 2 files changed, 48 insertions(+)

diff --git a/drivers/net/cnxk/cnxk_ethdev.h b/drivers/net/cnxk/cnxk_ethdev.h
index 480cc6dfa4..ccdc5f04ee 100644
--- a/drivers/net/cnxk/cnxk_ethdev.h
+++ b/drivers/net/cnxk/cnxk_ethdev.h
@@ -445,4 +445,5 @@ int cnxk_nix_probe(struct rte_pci_driver *pci_drv,
 int cnxk_nix_remove(struct rte_pci_device *pci_dev);
 int cnxk_nix_mtu_set(struct rte_eth_dev *eth_dev, uint16_t mtu);
+int cnxk_nix_sq_flush(struct rte_eth_dev *eth_dev);
 int cnxk_nix_mc_addr_list_configure(struct rte_eth_dev *eth_dev,
 				    struct rte_ether_addr *mc_addr_set,
diff --git a/drivers/net/cnxk/cnxk_ethdev_ops.c b/drivers/net/cnxk/cnxk_ethdev_ops.c
index f1d13c5004..9662bb0a2c 100644
--- a/drivers/net/cnxk/cnxk_ethdev_ops.c
+++ b/drivers/net/cnxk/cnxk_ethdev_ops.c
@@ -391,4 +391,42 @@ cnxk_nix_mac_addr_del(struct rte_eth_dev *eth_dev, uint32_t index)
 }
 
+int
+cnxk_nix_sq_flush(struct rte_eth_dev *eth_dev)
+{
+	struct cnxk_eth_dev *dev = cnxk_eth_pmd_priv(eth_dev);
+	struct rte_eth_dev_data *data = eth_dev->data;
+	int i, rc = 0;
+
+	/* Flush all tx queues */
+	for (i = 0; i < eth_dev->data->nb_tx_queues; i++) {
+		struct roc_nix_sq *sq = &dev->sqs[i];
+
+		if (eth_dev->data->tx_queues[i] == NULL)
+			continue;
+
+		rc = roc_nix_tm_sq_aura_fc(sq, false);
+		if (rc) {
+			plt_err("Failed to disable sqb aura fc, rc=%d", rc);
+			goto exit;
+		}
+
+		/* Wait for sq entries to be flushed */
+		rc = roc_nix_tm_sq_flush_spin(sq);
+		if (rc) {
+			plt_err("Failed to drain sq, rc=%d\n", rc);
+			goto exit;
+		}
+		if (data->tx_queue_state[i] == RTE_ETH_QUEUE_STATE_STARTED) {
+			rc = roc_nix_tm_sq_aura_fc(sq, true);
+			if (rc) {
+				plt_err("Failed to enable sq aura fc, txq=%u, rc=%d", i, rc);
+				goto exit;
+			}
+		}
+	}
+exit:
+	return rc;
+}
+
 int
 cnxk_nix_mtu_set(struct rte_eth_dev *eth_dev, uint16_t mtu)
@@ -434,4 +472,13 @@ cnxk_nix_mtu_set(struct rte_eth_dev *eth_dev, uint16_t mtu)
 	}
 
+	/* if new MTU was smaller than old one, then flush all SQs before MTU change */
+	if (old_frame_size > frame_size) {
+		if (data->dev_started) {
+			plt_err("Reducing MTU is not supported when device started");
+			goto exit;
+		}
+		cnxk_nix_sq_flush(eth_dev);
+	}
+
 	frame_size -= RTE_ETHER_CRC_LEN;
 
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:18:08.228273487 +0100
+++ 0108-net-cnxk-flush-SQ-before-configuring-MTU.patch	2023-07-20 16:17:55.086752244 +0100
@@ -1 +1 @@
-From b33bef500a50b750577e3028e7ae8aff08bf3ae9 Mon Sep 17 00:00:00 2001
+From dd0782d8b25ab3e90c4dc5946e60fc01a2dca04a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b33bef500a50b750577e3028e7ae8aff08bf3ae9 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 45dc72b609..ed531fb277 100644
+index 480cc6dfa4..ccdc5f04ee 100644
@@ -23 +24 @@
-@@ -466,4 +466,5 @@ int cnxk_nix_probe(struct rte_pci_driver *pci_drv,
+@@ -445,4 +445,5 @@ int cnxk_nix_probe(struct rte_pci_driver *pci_drv,
@@ -30 +31 @@
-index bce6d59bbc..da5ee19c85 100644
+index f1d13c5004..9662bb0a2c 100644
@@ -33 +34 @@
-@@ -496,4 +496,42 @@ cnxk_nix_mac_addr_del(struct rte_eth_dev *eth_dev, uint32_t index)
+@@ -391,4 +391,42 @@ cnxk_nix_mac_addr_del(struct rte_eth_dev *eth_dev, uint32_t index)
@@ -76 +77 @@
-@@ -539,4 +577,13 @@ cnxk_nix_mtu_set(struct rte_eth_dev *eth_dev, uint16_t mtu)
+@@ -434,4 +472,13 @@ cnxk_nix_mtu_set(struct rte_eth_dev *eth_dev, uint16_t mtu)


  parent reply	other threads:[~2023-07-20 15:25 UTC|newest]

Thread overview: 144+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-20 15:17 patch 'kni: fix build with Linux 6.3' " Kevin Traynor
2023-07-20 15:17 ` patch 'examples/ip_pipeline: fix build with GCC 13' " Kevin Traynor
2023-07-20 15:17 ` patch 'examples/ntb: " Kevin Traynor
2023-07-20 15:17 ` patch 'ring: fix use after free' " Kevin Traynor
2023-07-20 15:17 ` patch 'vfio: fix include with musl runtime' " Kevin Traynor
2023-07-20 15:17 ` patch 'kernel/freebsd: fix function parameter list' " Kevin Traynor
2023-07-20 15:17 ` patch 'build: fix case of project language name' " Kevin Traynor
2023-07-20 15:17 ` patch 'telemetry: fix autotest on Alpine' " Kevin Traynor
2023-07-20 15:17 ` patch 'ring: fix dequeue parameter name' " Kevin Traynor
2023-07-20 15:17 ` patch 'pipeline: fix double free for table stats' " Kevin Traynor
2023-07-20 15:17 ` patch 'test/malloc: fix missing free' " Kevin Traynor
2023-07-20 15:17 ` patch 'test/malloc: fix statistics checks' " Kevin Traynor
2023-07-20 15:17 ` patch 'eal: avoid calling cleanup twice' " Kevin Traynor
2023-07-20 15:17 ` patch 'pci: fix comment referencing renamed function' " Kevin Traynor
2023-07-20 15:17 ` patch 'eventdev/timer: fix timeout event wait behavior' " Kevin Traynor
2023-07-20 15:17 ` patch 'doc: fix event timer adapter guide' " Kevin Traynor
2023-07-20 15:17 ` patch 'event/dsw: free rings on close' " Kevin Traynor
2023-07-20 15:17 ` patch 'eventdev/timer: fix buffer flush' " Kevin Traynor
2023-07-20 15:17 ` patch 'event/cnxk: fix nanoseconds to ticks conversion' " Kevin Traynor
2023-07-20 15:17 ` patch 'eal/linux: fix secondary process crash for mp hotplug' " Kevin Traynor
2023-07-20 15:17 ` patch 'eal/linux: fix legacy mem init with many segments' " Kevin Traynor
2023-07-20 15:17 ` patch 'net/hns3: fix build warning' " Kevin Traynor
2023-07-20 15:17 ` patch 'net/sfc: stop misuse of Rx ingress m-port metadata on EF100' " Kevin Traynor
2023-07-20 15:17 ` patch 'net/tap: set locally administered bit for fixed MAC address' " Kevin Traynor
2023-07-20 15:17 ` patch 'net/dpaa2: fix checksum good flags' " Kevin Traynor
2023-07-20 15:17 ` patch 'app/testpmd: fix GTP L2 length in checksum engine' " Kevin Traynor
2023-07-20 15:17 ` patch 'net/vmxnet3: fix drop of empty segments in Tx' " Kevin Traynor
2023-07-20 15:17 ` patch 'net/txgbe: fix use-after-free on remove' " Kevin Traynor
2023-07-20 15:17 ` patch 'ethdev: fix MAC address occupies two entries' " Kevin Traynor
2023-07-20 15:17 ` patch 'net/sfc: invalidate dangling MAE flow action FW resource IDs' " Kevin Traynor
2023-07-20 15:17 ` patch 'net/hns3: fix never set MAC flow control' " Kevin Traynor
2023-07-20 15:17 ` patch 'net/hns3: fix variable type mismatch' " Kevin Traynor
2023-07-20 15:17 ` patch 'net/hns3: fix Rx multiple firmware reset interrupts' " Kevin Traynor
2023-07-20 15:17 ` patch 'ethdev: fix indirect action conversion' " Kevin Traynor
2023-07-20 15:17 ` patch 'net/hns3: fix FEC mode for 200G ports' " Kevin Traynor
2023-07-20 15:17 ` patch 'net/hns3: fix FEC mode check' " Kevin Traynor
2023-07-20 15:17 ` patch 'doc: fix format in flow API guide' " Kevin Traynor
2023-07-20 15:17 ` patch 'net/hns3: fix RTC time on initialization' " Kevin Traynor
2023-07-20 15:17 ` patch 'net/hns3: fix RTC time after reset' " Kevin Traynor
2023-07-20 15:17 ` patch 'net/hns3: uninitialize PTP' " Kevin Traynor
2023-07-20 15:17 ` patch 'net/hns3: extract PTP to its own header file' " Kevin Traynor
2023-07-20 15:17 ` patch 'net/hns3: fix mbuf leakage when RxQ started during reset' " Kevin Traynor
2023-07-20 15:17 ` patch 'net/hns3: fix mbuf leakage when RxQ started after " Kevin Traynor
2023-07-20 15:17 ` patch 'net/hns3: fix device start return value' " Kevin Traynor
2023-07-20 15:17 ` patch 'net/hns3: fix uninitialized variable' " Kevin Traynor
2023-07-20 15:17 ` patch 'net/hns3: fix inaccurate log' " Kevin Traynor
2023-07-20 15:17 ` patch 'net/hns3: fix redundant line break in " Kevin Traynor
2023-07-20 15:17 ` patch 'net/hns3: fix IMP reset trigger' " Kevin Traynor
2023-07-20 15:18 ` patch 'net/vmxnet3: fix return code in initializing' " Kevin Traynor
2023-07-20 15:18 ` patch 'doc: fix auth algos in cryptoperf app' " Kevin Traynor
2023-07-20 15:18 ` patch 'crypto/scheduler: fix last element for valid args' " Kevin Traynor
2023-07-20 15:18 ` patch 'test/crypto: fix return value for SNOW3G' " Kevin Traynor
2023-07-20 15:18 ` patch 'test/crypto: fix session creation check' " Kevin Traynor
2023-07-20 15:18 ` patch 'crypto/ipsec_mb: fix enqueue counter for SNOW3G' " Kevin Traynor
2023-07-20 15:18 ` patch 'crypto/ipsec_mb: optimize allocation in session' " Kevin Traynor
2023-07-20 15:18 ` patch 'vhost: fix invalid call FD handling' " Kevin Traynor
2023-07-20 15:18 ` patch 'net/virtio: propagate interrupt configuration error values' " Kevin Traynor
2023-07-20 15:18 ` patch 'net/virtio: fix initialization to return negative errno' " Kevin Traynor
2023-07-20 15:18 ` patch 'net/mlx5: enhance error log for tunnel offloading' " Kevin Traynor
2023-07-20 15:18 ` patch 'net/mlx5: fix duplicated tag index matching in SWS' " Kevin Traynor
2023-07-20 15:18 ` patch 'common/cnxk: fix IPsec IPv6 tunnel address byte swap' " Kevin Traynor
2023-07-20 15:18 ` patch 'common/cnxk: fix inline device VF identification' " Kevin Traynor
2023-07-20 15:18 ` patch 'net/qede: fix RSS indirection table initialization' " Kevin Traynor
2023-07-20 15:18 ` patch 'doc: fix typo in cnxk platform guide' " Kevin Traynor
2023-07-20 15:18 ` patch 'net/i40e: fix Rx data buffer size' " Kevin Traynor
2023-07-20 15:18 ` patch 'net/ice: " Kevin Traynor
2023-07-20 15:18 ` patch 'net/iavf: " Kevin Traynor
2023-07-20 15:18 ` patch 'net/ice: fix statistics' " Kevin Traynor
2023-07-20 15:18 ` patch 'net/ice: fix DCF RSS initialization' " Kevin Traynor
2023-07-20 15:18 ` patch 'net/iavf: release large VF when closing device' " Kevin Traynor
2023-07-20 15:18 ` patch 'net/ice: fix DCF control thread crash' " Kevin Traynor
2023-07-20 15:18 ` patch 'net/ice/base: remove unreachable code' " Kevin Traynor
2023-07-20 15:18 ` patch 'net/ice: adjust timestamp mbuf register' " Kevin Traynor
2023-07-20 15:18 ` patch 'net/ice: fix timestamp enabling' " Kevin Traynor
2023-07-20 15:18 ` patch 'net/ice: initialize parser for double VLAN' " Kevin Traynor
2023-07-20 15:18 ` patch 'net/ice: fix outer UDP checksum offload' " Kevin Traynor
2023-07-20 15:18 ` patch 'net/virtio-user: fix leak when initialisation fails' " Kevin Traynor
2023-07-20 15:18 ` patch 'doc: fix typo in graph guide' " Kevin Traynor
2023-07-20 15:18 ` patch 'doc: remove warning with Doxygen 1.9.7' " Kevin Traynor
2023-07-20 15:18 ` patch 'examples/l2fwd-cat: fix external build' " Kevin Traynor
2023-07-20 15:18 ` patch 'test: add graph tests' " Kevin Traynor
2023-07-20 15:18 ` patch 'mbuf: fix Doxygen comment of distributor metadata' " Kevin Traynor
2023-07-20 15:18 ` patch 'ci: fix libabigail cache in GHA' " Kevin Traynor
2023-07-20 15:18 ` patch 'crypto/openssl: skip workaround at compilation time' " Kevin Traynor
2023-07-20 15:18 ` patch 'ethdev: update documentation for API to set FEC' " Kevin Traynor
2023-07-20 15:18 ` patch 'ethdev: check that at least one FEC mode is specified' " Kevin Traynor
2023-07-20 15:18 ` patch 'ethdev: update documentation for API to get FEC' " Kevin Traynor
2023-07-20 15:18 ` patch 'net/bonding: fix startup when NUMA is not supported' " Kevin Traynor
2023-07-20 15:18 ` patch 'net/bonding: fix destroy dedicated queues flow' " Kevin Traynor
2023-07-20 15:18 ` patch 'net/txgbe/base: fix Tx with fiber hotplug' " Kevin Traynor
2023-07-20 15:18 ` patch 'net/txgbe: fix interrupt enable mask' " Kevin Traynor
2023-07-20 15:18 ` patch 'net/txgbe: fix to set autoneg for 1G speed' " Kevin Traynor
2023-07-20 15:18 ` patch 'net/txgbe: fix extended statistics' " Kevin Traynor
2023-07-20 15:18 ` patch 'net/ngbe: " Kevin Traynor
2023-07-20 15:18 ` patch 'app/testpmd: fix primary process not polling all queues' " Kevin Traynor
2023-07-24  1:58   ` haijie
2023-07-24 13:22     ` Kevin Traynor
2023-07-20 15:18 ` patch 'net/nfp: fix address always related with PF ID 0' " Kevin Traynor
2023-07-20 15:18 ` patch 'common/sfc_efx/base: fix Rx queue without RSS hash prefix' " Kevin Traynor
2023-07-20 15:18 ` patch 'net/iavf: fix VLAN offload with AVX512' " Kevin Traynor
2023-07-20 15:18 ` patch 'net/ice: fix tunnel packet Tx descriptor' " Kevin Traynor
2023-07-20 15:18 ` patch 'net/ixgbe: add proper memory barriers in Rx' " Kevin Traynor
2023-07-20 15:18 ` patch 'net/iavf: fix abnormal disable HW interrupt' " Kevin Traynor
2023-07-20 15:18 ` patch 'net/i40e: fix tunnel packet Tx descriptor' " Kevin Traynor
2023-07-20 15:18 ` patch 'net/e1000: fix queue number initialization' " Kevin Traynor
2023-07-20 15:18 ` patch 'net/ice: fix protocol agnostic offloading with big packets' " Kevin Traynor
2023-07-20 15:18 ` patch 'net/mlx5: fix risk in NEON Rx descriptor read' " Kevin Traynor
2023-07-20 15:18 ` patch 'net/mlx5: fix device removal event handling' " Kevin Traynor
2023-07-20 15:18 ` patch 'common/mlx5: adjust fork call with new kernel API' " Kevin Traynor
2023-07-20 15:18 ` Kevin Traynor [this message]
2023-07-20 15:19 ` patch 'net/cnxk: fix cookies check with security offload' " Kevin Traynor
2023-07-20 15:19 ` patch 'net/cnxk: fix flow queue index validation' " Kevin Traynor
2023-07-20 15:19 ` patch 'ipc: fix file descriptor leakage with unhandled messages' " Kevin Traynor
2023-07-20 15:19 ` patch 'fib: fix adding default route' " Kevin Traynor
2023-07-20 15:19 ` patch 'mem: fix memsegs exhausted message' " Kevin Traynor
2023-07-20 15:19 ` patch 'hash: fix reading unaligned bits in Toeplitz hash' " Kevin Traynor
2023-07-20 15:19 ` patch 'net/netvsc: fix sizeof calculation' " Kevin Traynor
2023-07-20 15:19 ` patch 'app/testpmd: fix checksum engine with GTP on 32-bit' " Kevin Traynor
2023-07-20 15:19 ` patch 'net/hns3: delete duplicate macro definition' " Kevin Traynor
2023-07-20 15:19 ` patch 'doc: fix kernel patch link in hns3 guide' " Kevin Traynor
2023-07-20 15:19 ` patch 'doc: fix syntax " Kevin Traynor
2023-07-20 15:19 ` patch 'doc: fix number of leading spaces " Kevin Traynor
2023-07-20 15:19 ` patch 'app/testpmd: revert primary process polling all queues fix' " Kevin Traynor
2023-07-25  8:53   ` Kevin Traynor
2023-07-20 15:19 ` patch 'net/hns3: fix non-zero weight for disabled TC' " Kevin Traynor
2023-07-20 15:19 ` patch 'net/hns3: fix index to look up table in NEON Rx' " Kevin Traynor
2023-07-20 15:19 ` patch 'ethdev: fix potential leak in PCI probing helper' " Kevin Traynor
2023-07-20 15:19 ` patch 'net/mlx5: fix flow dump for modify field' " Kevin Traynor
2023-07-20 15:19 ` patch 'net/mlx5: fix flow workspace destruction' " Kevin Traynor
2023-07-20 15:19 ` patch 'net/mlx5: forbid MPRQ restart' " Kevin Traynor
2023-07-20 15:19 ` patch 'net/ice: fix VLAN mode parser' " Kevin Traynor
2023-07-20 15:19 ` patch 'net/iavf: fix VLAN insertion in vector path' " Kevin Traynor
2023-07-20 15:19 ` patch 'net/ice: fix 32-bit build' " Kevin Traynor
2023-07-20 15:19 ` patch 'net/iavf: fix tunnel TSO path selection' " Kevin Traynor
2023-07-20 15:19 ` patch 'net/ice: fix RSS hash key generation' " Kevin Traynor
2023-07-20 15:19 ` patch 'baseband/fpga_5gnr_fec: fix possible division by zero' " Kevin Traynor
2023-07-20 15:19 ` patch 'baseband/fpga_5gnr_fec: fix starting unconfigured queue' " Kevin Traynor
2023-07-20 15:19 ` patch 'common/qat: detach crypto from compress build' " Kevin Traynor
2023-07-20 15:19 ` patch 'test/crypto: fix PDCP-SDAP test vectors' " Kevin Traynor
2023-07-20 15:19 ` patch 'examples/fips_validation: fix digest length in AES-GCM' " Kevin Traynor
2023-07-20 15:19 ` patch 'app/crypto-perf: fix socket ID default value' " Kevin Traynor
2023-07-20 15:19 ` patch 'examples/ipsec-secgw: fix TAP default MAC address' " Kevin Traynor
2023-07-20 15:19 ` patch 'ipsec: fix NAT-T header length' " Kevin Traynor
2023-07-20 15:19 ` patch 'kni: fix build with Linux 6.5' " 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=20230720151942.262154-108-ktraynor@redhat.com \
    --to=ktraynor@redhat.com \
    --cc=skoteshwar@marvell.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).