patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Kevin Traynor <ktraynor@redhat.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: dpdk stable <stable@dpdk.org>
Subject: patch 'net/qede: fix build with GCC 12' has been queued to stable release 21.11.2
Date: Fri, 24 Jun 2022 17:10:10 +0100	[thread overview]
Message-ID: <20220624161016.1881349-8-ktraynor@redhat.com> (raw)
In-Reply-To: <20220624161016.1881349-1-ktraynor@redhat.com>

Hi,

FYI, your patch has been queued to stable release 21.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 06/27/22. 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/e4939398dfe939e8f1c91c04734ea83f335a8d37

Thanks.

Kevin

---
From e4939398dfe939e8f1c91c04734ea83f335a8d37 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Tue, 7 Jun 2022 10:17:40 -0700
Subject: [PATCH] net/qede: fix build with GCC 12

[ upstream commit 4200c4d62586985d70ad69ed7bee526a282b8777 ]

The x86 version of rte_memcpy can cause warnings. The driver does
not need to use rte_memcpy for everything. Standard memcpy is
just as fast and safer; the compiler and static analysis tools
treat memcpy specially.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/qede/base/bcm_osal.h |  3 +--
 drivers/net/qede/qede_ethdev.c   |  2 +-
 drivers/net/qede/qede_filter.c   | 16 ++++++----------
 drivers/net/qede/qede_main.c     | 13 ++++++-------
 drivers/net/qede/qede_sriov.c    |  6 +++---
 5 files changed, 17 insertions(+), 23 deletions(-)

diff --git a/drivers/net/qede/base/bcm_osal.h b/drivers/net/qede/base/bcm_osal.h
index c5b5399282..9ea579bfc8 100644
--- a/drivers/net/qede/base/bcm_osal.h
+++ b/drivers/net/qede/base/bcm_osal.h
@@ -15,5 +15,4 @@
 #include <rte_malloc.h>
 #include <rte_atomic.h>
-#include <rte_memcpy.h>
 #include <rte_log.h>
 #include <rte_cycles.h>
@@ -100,5 +99,5 @@ typedef intptr_t osal_int_ptr_t;
 #define OSAL_VFREE(dev, memory) OSAL_FREE(dev, memory)
 #define OSAL_MEM_ZERO(mem, size) bzero(mem, size)
-#define OSAL_MEMCPY(dst, src, size) rte_memcpy(dst, src, size)
+#define OSAL_MEMCPY(dst, src, size) memcpy(dst, src, size)
 #define OSAL_MEMCMP(s1, s2, size) memcmp(s1, s2, size)
 #define OSAL_MEMSET(dst, val, length) \
diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index a1122a297e..2a3123f0c8 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -359,5 +359,5 @@ static void
 qede_alloc_etherdev(struct qede_dev *qdev, struct qed_dev_eth_info *info)
 {
-	rte_memcpy(&qdev->dev_info, info, sizeof(*info));
+	qdev->dev_info = *info;
 	qdev->ops = qed_ops;
 }
diff --git a/drivers/net/qede/qede_filter.c b/drivers/net/qede/qede_filter.c
index 440440423a..ca3165d972 100644
--- a/drivers/net/qede/qede_filter.c
+++ b/drivers/net/qede/qede_filter.c
@@ -389,8 +389,6 @@ qede_arfs_construct_pkt(struct rte_eth_dev *eth_dev,
 			rte_cpu_to_be_32(QEDE_FDIR_IPV6_DEFAULT_VTC_FLOW);
 
-		rte_memcpy(&ip6->src_addr, arfs->tuple.src_ipv6,
-			   IPV6_ADDR_LEN);
-		rte_memcpy(&ip6->dst_addr, arfs->tuple.dst_ipv6,
-			   IPV6_ADDR_LEN);
+		memcpy(&ip6->src_addr, arfs->tuple.src_ipv6, IPV6_ADDR_LEN);
+		memcpy(&ip6->dst_addr, arfs->tuple.dst_ipv6, IPV6_ADDR_LEN);
 		len += sizeof(struct rte_ipv6_hdr);
 		params->ipv6 = true;
@@ -822,10 +820,8 @@ qede_flow_parse_pattern(__rte_unused struct rte_eth_dev *dev,
 
 				spec = pattern->spec;
-				rte_memcpy(flow->entry.tuple.src_ipv6,
-					   spec->hdr.src_addr,
-					   IPV6_ADDR_LEN);
-				rte_memcpy(flow->entry.tuple.dst_ipv6,
-					   spec->hdr.dst_addr,
-					   IPV6_ADDR_LEN);
+				memcpy(flow->entry.tuple.src_ipv6,
+				       spec->hdr.src_addr, IPV6_ADDR_LEN);
+				memcpy(flow->entry.tuple.dst_ipv6,
+				       spec->hdr.dst_addr, IPV6_ADDR_LEN);
 				flow->entry.tuple.eth_proto =
 					RTE_ETHER_TYPE_IPV6;
diff --git a/drivers/net/qede/qede_main.c b/drivers/net/qede/qede_main.c
index 2d1f70693a..c5afdb00d5 100644
--- a/drivers/net/qede/qede_main.c
+++ b/drivers/net/qede/qede_main.c
@@ -374,5 +374,5 @@ qed_fill_dev_info(struct ecore_dev *edev, struct qed_dev_info *dev_info)
 	dev_info->dev_type = edev->type;
 
-	rte_memcpy(&dev_info->hw_mac, &edev->hwfns[0].hw_info.hw_mac_addr,
+	memcpy(&dev_info->hw_mac, &edev->hwfns[0].hw_info.hw_mac_addr,
 	       RTE_ETHER_ADDR_LEN);
 
@@ -442,5 +442,5 @@ qed_fill_eth_dev_info(struct ecore_dev *edev, struct qed_dev_eth_info *info)
 					 max_vf_vlan_filters;
 
-		rte_memcpy(&info->port_mac, &edev->hwfns[0].hw_info.hw_mac_addr,
+		memcpy(&info->port_mac, &edev->hwfns[0].hw_info.hw_mac_addr,
 			   RTE_ETHER_ADDR_LEN);
 	} else {
@@ -473,5 +473,5 @@ static void qed_set_name(struct ecore_dev *edev, char name[NAME_SIZE])
 	int i;
 
-	rte_memcpy(edev->name, name, NAME_SIZE);
+	memcpy(edev->name, name, NAME_SIZE);
 	for_each_hwfn(edev, i) {
 		snprintf(edev->hwfns[i].name, NAME_SIZE, "%s-%d", name, i);
@@ -515,8 +515,7 @@ static void qed_fill_link(struct ecore_hwfn *hwfn,
 	/* Prepare source inputs */
 	if (IS_PF(hwfn->p_dev)) {
-		rte_memcpy(&params, ecore_mcp_get_link_params(hwfn),
-		       sizeof(params));
-		rte_memcpy(&link, ecore_mcp_get_link_state(hwfn), sizeof(link));
-		rte_memcpy(&link_caps, ecore_mcp_get_link_capabilities(hwfn),
+		memcpy(&params, ecore_mcp_get_link_params(hwfn), sizeof(params));
+		memcpy(&link, ecore_mcp_get_link_state(hwfn), sizeof(link));
+		memcpy(&link_caps, ecore_mcp_get_link_capabilities(hwfn),
 		       sizeof(link_caps));
 	} else {
diff --git a/drivers/net/qede/qede_sriov.c b/drivers/net/qede/qede_sriov.c
index 0b99a8d6fe..937d339fb8 100644
--- a/drivers/net/qede/qede_sriov.c
+++ b/drivers/net/qede/qede_sriov.c
@@ -204,8 +204,8 @@ void qed_inform_vf_link_state(struct ecore_hwfn *hwfn)
 		return;
 
-	rte_memcpy(&params, ecore_mcp_get_link_params(lead_hwfn),
+	memcpy(&params, ecore_mcp_get_link_params(lead_hwfn),
 		   sizeof(params));
-	rte_memcpy(&link, ecore_mcp_get_link_state(lead_hwfn), sizeof(link));
-	rte_memcpy(&caps, ecore_mcp_get_link_capabilities(lead_hwfn),
+	memcpy(&link, ecore_mcp_get_link_state(lead_hwfn), sizeof(link));
+	memcpy(&caps, ecore_mcp_get_link_capabilities(lead_hwfn),
 		   sizeof(caps));
 
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-24 16:54:05.792742098 +0100
+++ 0008-net-qede-fix-build-with-GCC-12.patch	2022-06-24 16:54:05.545165060 +0100
@@ -1 +1 @@
-From 4200c4d62586985d70ad69ed7bee526a282b8777 Mon Sep 17 00:00:00 2001
+From e4939398dfe939e8f1c91c04734ea83f335a8d37 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4200c4d62586985d70ad69ed7bee526a282b8777 ]
+
@@ -11,2 +12,0 @@
-Cc: stable@dpdk.org
-
@@ -40 +40 @@
-index ea6b71f093..a4923670d6 100644
+index a1122a297e..2a3123f0c8 100644
@@ -81 +81 @@
-index ad101194d6..03039038ad 100644
+index 2d1f70693a..c5afdb00d5 100644
@@ -84 +84 @@
-@@ -373,5 +373,5 @@ qed_fill_dev_info(struct ecore_dev *edev, struct qed_dev_info *dev_info)
+@@ -374,5 +374,5 @@ qed_fill_dev_info(struct ecore_dev *edev, struct qed_dev_info *dev_info)
@@ -91 +91 @@
-@@ -441,5 +441,5 @@ qed_fill_eth_dev_info(struct ecore_dev *edev, struct qed_dev_eth_info *info)
+@@ -442,5 +442,5 @@ qed_fill_eth_dev_info(struct ecore_dev *edev, struct qed_dev_eth_info *info)
@@ -98 +98 @@
-@@ -472,5 +472,5 @@ static void qed_set_name(struct ecore_dev *edev, char name[NAME_SIZE])
+@@ -473,5 +473,5 @@ static void qed_set_name(struct ecore_dev *edev, char name[NAME_SIZE])
@@ -105 +105 @@
-@@ -514,8 +514,7 @@ static void qed_fill_link(struct ecore_hwfn *hwfn,
+@@ -515,8 +515,7 @@ static void qed_fill_link(struct ecore_hwfn *hwfn,


  parent reply	other threads:[~2022-06-24 16:10 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-24 16:10 patch 'malloc: fix allocation of almost hugepage size' " Kevin Traynor
2022-06-24 16:10 ` patch 'net/octeontx: fix port close' " Kevin Traynor
2022-06-24 16:10 ` patch 'common/cnxk: fix decrypt packet count register update' " Kevin Traynor
2022-06-24 16:10 ` patch 'common/cnxk: handle ROC model init failure' " Kevin Traynor
2022-06-24 16:10 ` patch 'net/qede: fix build with GCC 13' " Kevin Traynor
2022-06-24 16:10 ` patch 'net/ice: fix race condition in Rx timestamp' " Kevin Traynor
2022-06-24 16:10 ` patch 'net/ice/base: fix build with GCC 12' " Kevin Traynor
2022-06-24 16:10 ` Kevin Traynor [this message]
2022-06-24 16:10 ` patch 'net/mlx5: fix build with clang 14' " Kevin Traynor
2022-06-24 16:10 ` patch 'net/mlx5: fix RSS expansion for patterns with ICMP item' " Kevin Traynor
2022-06-24 16:10 ` patch 'net/mlx5: add limitation for E-Switch Manager match' " Kevin Traynor
2022-06-24 16:10 ` patch 'net/mlx5: fix metering on E-Switch Manager' " Kevin Traynor
2022-06-24 16:10 ` patch 'net/mlx5: fix stack buffer overflow in drop action' " Kevin Traynor
2022-06-24 16:10 ` patch 'doc: fix flow integrity hardware support in mlx5 guide' " 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=20220624161016.1881349-8-ktraynor@redhat.com \
    --to=ktraynor@redhat.com \
    --cc=stable@dpdk.org \
    --cc=stephen@networkplumber.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).