patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Kevin Traynor <ktraynor@redhat.com>
To: Andrew Rybchenko <arybchenko@solarflare.com>
Cc: dpdk stable <stable@dpdk.org>
Subject: [dpdk-stable] patch 'net/sfc: fix logging from secondary process' has been queued to LTS release 18.11.2
Date: Wed, 10 Apr 2019 17:43:13 +0100	[thread overview]
Message-ID: <20190410164411.10546-5-ktraynor@redhat.com> (raw)
In-Reply-To: <20190410164411.10546-1-ktraynor@redhat.com>

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

Thanks.

Kevin Traynor

---
From 347e44ad60e8984bf964fd4a8c8ada961af11bff Mon Sep 17 00:00:00 2001
From: Andrew Rybchenko <arybchenko@solarflare.com>
Date: Thu, 7 Feb 2019 12:17:26 +0000
Subject: [PATCH] net/sfc: fix logging from secondary process

[ upstream commit e2c3639abf559866acc291e576e83916c2986a08 ]

Dynamic log type value may differ in different processes.

Fixes: f28ede500c2e ("net/sfc: support multi-process")

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 drivers/net/sfc/sfc.c        |  6 +++---
 drivers/net/sfc/sfc.h        |  2 +-
 drivers/net/sfc/sfc_ethdev.c | 25 ++++++++++++++++---------
 drivers/net/sfc/sfc_mcdi.c   |  3 ++-
 4 files changed, 22 insertions(+), 14 deletions(-)

diff --git a/drivers/net/sfc/sfc.c b/drivers/net/sfc/sfc.c
index 6690053f2..0d7311d68 100644
--- a/drivers/net/sfc/sfc.c
+++ b/drivers/net/sfc/sfc.c
@@ -1072,6 +1072,6 @@ sfc_unprobe(struct sfc_adapter *sa)
 
 uint32_t
-sfc_register_logtype(struct sfc_adapter *sa, const char *lt_prefix_str,
-		     uint32_t ll_default)
+sfc_register_logtype(const struct rte_pci_addr *pci_addr,
+		     const char *lt_prefix_str, uint32_t ll_default)
 {
 	size_t lt_prefix_str_size = strlen(lt_prefix_str);
@@ -1093,5 +1093,5 @@ sfc_register_logtype(struct sfc_adapter *sa, const char *lt_prefix_str,
 	strncpy(lt_str, lt_prefix_str, lt_prefix_str_size);
 	lt_str[lt_prefix_str_size - 1] = '.';
-	rte_pci_device_name(&sa->pci_addr, lt_str + lt_prefix_str_size,
+	rte_pci_device_name(pci_addr, lt_str + lt_prefix_str_size,
 			    lt_str_size_max - lt_prefix_str_size);
 	lt_str[lt_str_size_max - 1] = '\0';
diff --git a/drivers/net/sfc/sfc.h b/drivers/net/sfc/sfc.h
index a94ca8e75..f1cb83002 100644
--- a/drivers/net/sfc/sfc.h
+++ b/drivers/net/sfc/sfc.h
@@ -312,5 +312,5 @@ int sfc_dma_alloc(const struct sfc_adapter *sa, const char *name, uint16_t id,
 void sfc_dma_free(const struct sfc_adapter *sa, efsys_mem_t *esmp);
 
-uint32_t sfc_register_logtype(struct sfc_adapter *sa,
+uint32_t sfc_register_logtype(const struct rte_pci_addr *pci_addr,
 			      const char *lt_prefix_str,
 			      uint32_t ll_default);
diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c
index 67ce5a22f..10e032400 100644
--- a/drivers/net/sfc/sfc_ethdev.c
+++ b/drivers/net/sfc/sfc_ethdev.c
@@ -1876,5 +1876,5 @@ static const struct eth_dev_ops sfc_eth_dev_secondary_ops = {
 
 static int
-sfc_eth_dev_secondary_set_ops(struct rte_eth_dev *dev)
+sfc_eth_dev_secondary_set_ops(struct rte_eth_dev *dev, uint32_t logtype_main)
 {
 	/*
@@ -1890,10 +1890,12 @@ sfc_eth_dev_secondary_set_ops(struct rte_eth_dev *dev)
 	dp_rx = sfc_dp_find_rx_by_name(&sfc_dp_head, sa->dp_rx_name);
 	if (dp_rx == NULL) {
-		sfc_err(sa, "cannot find %s Rx datapath", sa->dp_rx_name);
+		SFC_LOG(sa, RTE_LOG_ERR, logtype_main,
+			"cannot find %s Rx datapath", sa->dp_rx_name);
 		rc = ENOENT;
 		goto fail_dp_rx;
 	}
 	if (~dp_rx->features & SFC_DP_RX_FEAT_MULTI_PROCESS) {
-		sfc_err(sa, "%s Rx datapath does not support multi-process",
+		SFC_LOG(sa, RTE_LOG_ERR, logtype_main,
+			"%s Rx datapath does not support multi-process",
 			sa->dp_rx_name);
 		rc = EINVAL;
@@ -1903,10 +1905,12 @@ sfc_eth_dev_secondary_set_ops(struct rte_eth_dev *dev)
 	dp_tx = sfc_dp_find_tx_by_name(&sfc_dp_head, sa->dp_tx_name);
 	if (dp_tx == NULL) {
-		sfc_err(sa, "cannot find %s Tx datapath", sa->dp_tx_name);
+		SFC_LOG(sa, RTE_LOG_ERR, logtype_main,
+			"cannot find %s Tx datapath", sa->dp_tx_name);
 		rc = ENOENT;
 		goto fail_dp_tx;
 	}
 	if (~dp_tx->features & SFC_DP_TX_FEAT_MULTI_PROCESS) {
-		sfc_err(sa, "%s Tx datapath does not support multi-process",
+		SFC_LOG(sa, RTE_LOG_ERR, logtype_main,
+			"%s Tx datapath does not support multi-process",
 			sa->dp_tx_name);
 		rc = EINVAL;
@@ -1956,4 +1960,5 @@ sfc_eth_dev_init(struct rte_eth_dev *dev)
 	struct sfc_adapter *sa = dev->data->dev_private;
 	struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(dev);
+	uint32_t logtype_main;
 	int rc;
 	const efx_nic_cfg_t *encp;
@@ -1962,10 +1967,15 @@ sfc_eth_dev_init(struct rte_eth_dev *dev)
 	sfc_register_dp();
 
+	logtype_main = sfc_register_logtype(&pci_dev->addr,
+					    SFC_LOGTYPE_MAIN_STR,
+					    RTE_LOG_NOTICE);
+
 	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
-		return -sfc_eth_dev_secondary_set_ops(dev);
+		return -sfc_eth_dev_secondary_set_ops(dev, logtype_main);
 
 	/* Required for logging */
 	sa->pci_addr = pci_dev->addr;
 	sa->port_id = dev->data->port_id;
+	sa->logtype_main = logtype_main;
 
 	sa->eth_dev = dev;
@@ -1974,7 +1984,4 @@ sfc_eth_dev_init(struct rte_eth_dev *dev)
 	rte_eth_copy_pci_info(dev, pci_dev);
 
-	sa->logtype_main = sfc_register_logtype(sa, SFC_LOGTYPE_MAIN_STR,
-						RTE_LOG_NOTICE);
-
 	rc = sfc_kvargs_parse(sa);
 	if (rc != 0)
diff --git a/drivers/net/sfc/sfc_mcdi.c b/drivers/net/sfc/sfc_mcdi.c
index 007506b4e..e485e07d6 100644
--- a/drivers/net/sfc/sfc_mcdi.c
+++ b/drivers/net/sfc/sfc_mcdi.c
@@ -257,5 +257,6 @@ sfc_mcdi_init(struct sfc_adapter *sa)
 		goto fail_dma_alloc;
 
-	mcdi->logtype = sfc_register_logtype(sa, SFC_LOGTYPE_MCDI_STR,
+	mcdi->logtype = sfc_register_logtype(&sa->pci_addr,
+					     SFC_LOGTYPE_MCDI_STR,
 					     RTE_LOG_NOTICE);
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-04-10 14:06:08.402905704 +0100
+++ 0005-net-sfc-fix-logging-from-secondary-process.patch	2019-04-10 14:06:07.761296601 +0100
@@ -1,12 +1,13 @@
-From e2c3639abf559866acc291e576e83916c2986a08 Mon Sep 17 00:00:00 2001
+From 347e44ad60e8984bf964fd4a8c8ada961af11bff Mon Sep 17 00:00:00 2001
 From: Andrew Rybchenko <arybchenko@solarflare.com>
 Date: Thu, 7 Feb 2019 12:17:26 +0000
 Subject: [PATCH] net/sfc: fix logging from secondary process
 
+[ upstream commit e2c3639abf559866acc291e576e83916c2986a08 ]
+
 Dynamic log type value may differ in different processes.
 
 Fixes: f28ede500c2e ("net/sfc: support multi-process")
-Cc: stable@dpdk.org
 
 Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
 ---

  parent reply	other threads:[~2019-04-10 16:44 UTC|newest]

Thread overview: 63+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-10 16:43 [dpdk-stable] patch 'net/pcap: fix memory leak' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'net/bonding: fix values of descriptor limits' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'net/sfc: log port ID as 16-bit unsigned integer on panic' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'net/sfc: remove control path logging from Rx queue count' " Kevin Traynor
2019-04-10 16:43 ` Kevin Traynor [this message]
2019-04-10 16:43 ` [dpdk-stable] patch 'net/virtio: set offload flag for jumbo frames' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'net/virtio: remove forward declaration' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'mbuf: fix a typo' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'net/mlx5: fix Tx metadata for multi-segment packet' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'net/bonding: fix Tx in 802.3ad mode' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'net/bnxt: support IOVA VA " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'net/avf: fix admin queue interrupt for ICE' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'net/bonding: fix slave Tx burst for mode 4' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'net/bonding: fix link status' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'doc: fix a minor typo in testpmd guide' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'ethdev: remove unused variable' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'net/qede: fix Tx packet prepare for tunnel packets' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'net/bonding: avoid warning for invalid port' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'test/pmd_perf: fix the way to drain the " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'net/virtio: fix in-order Tx path for split ring' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'vhost: fix sprintf with snprintf' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'mk: fix build of shared library with libbsd' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'devtools: add libelf dependency to build test' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'devtools: test build of zlib PMD' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'devtools: fix test of some build options' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'test/compress: fix missing header include' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'examples/ip_pipeline: disable build when no epoll' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'examples/vhost_crypto: fix dependency on vhost library' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'devtools: fix build test on FreeBSD' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'net/mlx: prefix private structure' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'net/tap: fix multi-process request' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'mempool/dpaa2: fix continuous print on empty pool' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'vhost: restore mbuf first when freeing zmbuf' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'vhost: fix potential use-after-free for zero copy mbuf' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'vhost: fix potential use-after-free for memory region' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'app/pdump: remove only created vdevs' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'crypto/virtio: use local log type' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'net/softnic: fix possible buffer overflow' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'drivers/net: fix shifting 32-bit signed variable 31 times' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'devtools: fix result of svg include check' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'doc: remove reference to rte.doc.mk in programmers guide' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'examples/ethtool: fix two typos' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'doc: fix link in Linux getting started guide' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'doc: fix PCI whitelist typo in prog " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'mk: fix AVX512 disabled warning on non x86' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'bus/vdev: fix debug message on probing' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'bus/vdev: fix hotplug twice' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'eal: fix check when retrieving current CPU affinity' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'eal: fix control threads pinnning' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'eal: restrict control threads to startup CPU affinity' " Kevin Traynor
2019-04-10 16:43 ` [dpdk-stable] patch 'eal: remove dead code in core list parsing' " Kevin Traynor
2019-04-10 16:44 ` [dpdk-stable] patch 'eal: fix core list validation with disabled cores' " Kevin Traynor
2019-04-10 16:44 ` [dpdk-stable] patch 'net/enic: fix flow director SCTP matching' " Kevin Traynor
2019-04-10 16:44 ` [dpdk-stable] patch 'net/enic: fix SCTP match for flow API' " Kevin Traynor
2019-04-10 16:44 ` [dpdk-stable] patch 'net/enic: allow flow mark ID 0' " Kevin Traynor
2019-04-10 16:44 ` [dpdk-stable] patch 'net/enic: check for unsupported flow item types' " Kevin Traynor
2019-04-10 16:44 ` [dpdk-stable] patch 'net/enic: reset VXLAN port regardless of overlay offload' " Kevin Traynor
2019-04-10 16:44 ` [dpdk-stable] patch 'net/enic: fix VXLAN match' " Kevin Traynor
2019-04-10 16:44 ` [dpdk-stable] patch 'net/enic: fix endianness in VLAN " Kevin Traynor
2019-04-10 16:44 ` [dpdk-stable] patch 'doc: fix tag for inner RSS feature' " Kevin Traynor
2019-04-10 16:44 ` [dpdk-stable] patch 'net/mlx5: fix flow priorities probing error path' " Kevin Traynor
2019-04-10 16:44 ` [dpdk-stable] patch 'net/mlx5: fix hex dump of error completion' " Kevin Traynor
2019-04-10 16:44 ` [dpdk-stable] patch 'net/mlx5: fix sync when handling Tx completions' " 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=20190410164411.10546-5-ktraynor@redhat.com \
    --to=ktraynor@redhat.com \
    --cc=arybchenko@solarflare.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).