summaryrefslogtreecommitdiffstats
path: root/bsp/meta-freescale/recipes-extended/dpdk/dpdk
diff options
context:
space:
mode:
authortakeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp>2020-11-02 11:07:33 +0900
committertakeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp>2020-11-02 11:07:33 +0900
commit1c7d6584a7811b7785ae5c1e378f14b5ba0971cf (patch)
treecd70a267a5ef105ba32f200aa088e281fbd85747 /bsp/meta-freescale/recipes-extended/dpdk/dpdk
parent4204309872da5cb401cbb2729d9e2d4869a87f42 (diff)
recipes
Diffstat (limited to 'bsp/meta-freescale/recipes-extended/dpdk/dpdk')
-rw-r--r--bsp/meta-freescale/recipes-extended/dpdk/dpdk/0001-Add-RTE_KERNELDIR_OUT.patch26
-rw-r--r--bsp/meta-freescale/recipes-extended/dpdk/dpdk/0001-add-Wno-cast-function-type.patch26
-rw-r--r--bsp/meta-freescale/recipes-extended/dpdk/dpdk/0001-examples-ipsec-gw-fix-gcc-10-maybe-uninitialized-war.patch53
-rw-r--r--bsp/meta-freescale/recipes-extended/dpdk/dpdk/0001-fix-gcc-8-build-error.patch51
-rw-r--r--bsp/meta-freescale/recipes-extended/dpdk/dpdk/0004-update-WERROR_FLAGS.patch39
5 files changed, 144 insertions, 51 deletions
diff --git a/bsp/meta-freescale/recipes-extended/dpdk/dpdk/0001-Add-RTE_KERNELDIR_OUT.patch b/bsp/meta-freescale/recipes-extended/dpdk/dpdk/0001-Add-RTE_KERNELDIR_OUT.patch
new file mode 100644
index 00000000..5ee48a59
--- /dev/null
+++ b/bsp/meta-freescale/recipes-extended/dpdk/dpdk/0001-Add-RTE_KERNELDIR_OUT.patch
@@ -0,0 +1,26 @@
+From 9c2b840a1c8ac0fbb638b5cd481909a3f832eed4 Mon Sep 17 00:00:00 2001
+From: Chunrong Guo <chunrong.guo@nxp.com>
+Date: Wed, 3 Jul 2019 08:50:45 +0200
+Subject: [PATCH] Add RTE_KERNELDIR_OUT
+
+Signed-off-by: C.r. Guo <nxa13725@lsv07004.swis.us-cdc01.nxp.com>
+---
+ kernel/linux/kni/Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/kernel/linux/kni/Makefile b/kernel/linux/kni/Makefile
+index 595bac261..28a31f36a 100644
+--- a/kernel/linux/kni/Makefile
++++ b/kernel/linux/kni/Makefile
+@@ -20,7 +20,7 @@ MODULE_CFLAGS += -Wall -Werror
+
+ ifeq ($(DISTRIB_ID),Ubuntu)
+ MODULE_CFLAGS += -DUBUNTU_RELEASE_CODE=$(subst .,,$(DISTRIB_RELEASE))
+-UBUNTU_KERNEL_CODE := $(shell echo `grep UTS_RELEASE $(RTE_KERNELDIR)/include/generated/utsrelease.h \
++UBUNTU_KERNEL_CODE := $(shell echo `grep UTS_RELEASE $(RTE_KERNELDIR_OUT)/include/generated/utsrelease.h \
+ | cut -d '"' -f2 | cut -d- -f1,2 | tr .- ,`,1)
+ MODULE_CFLAGS += -D"UBUNTU_KERNEL_CODE=UBUNTU_KERNEL_VERSION($(UBUNTU_KERNEL_CODE))"
+ endif
+--
+2.17.1
+
diff --git a/bsp/meta-freescale/recipes-extended/dpdk/dpdk/0001-add-Wno-cast-function-type.patch b/bsp/meta-freescale/recipes-extended/dpdk/dpdk/0001-add-Wno-cast-function-type.patch
new file mode 100644
index 00000000..fa0eda87
--- /dev/null
+++ b/bsp/meta-freescale/recipes-extended/dpdk/dpdk/0001-add-Wno-cast-function-type.patch
@@ -0,0 +1,26 @@
+From 354c2d1570ddf83a99c4ac711c884644c6dd1cef Mon Sep 17 00:00:00 2001
+From: "C.r. Guo" <nxa13725@lsv07005.swis.us-cdc01.nxp.com>
+Date: Wed, 27 Mar 2019 09:35:43 +0100
+Subject: [PATCH] add -Wno-cast-function-type
+
+Upstream-Status: Inappropriate [configuration]
+---
+ examples/cmdif/lib/Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/examples/cmdif/lib/Makefile b/examples/cmdif/lib/Makefile
+index 235c3adbf..230f17b0a 100644
+--- a/examples/cmdif/lib/Makefile
++++ b/examples/cmdif/lib/Makefile
+@@ -28,7 +28,7 @@ SRCS-y += server/cmdif_srv_gpp.c
+ SRCS-y += shbp/shbp.c
+
+ CFLAGS += -O3
+-CFLAGS += $(WERROR_FLAGS)
++CFLAGS += $(WERROR_FLAGS) -Wno-cast-function-type -Wno-missing-attributes
+ CFLAGS += -I$(RTE_SDK)/examples/cmdif/lib
+ CFLAGS += -I$(RTE_SDK)/examples/cmdif/lib/client
+ CFLAGS += -I$(RTE_SDK)/examples/cmdif/lib/server
+--
+2.17.1
+
diff --git a/bsp/meta-freescale/recipes-extended/dpdk/dpdk/0001-examples-ipsec-gw-fix-gcc-10-maybe-uninitialized-war.patch b/bsp/meta-freescale/recipes-extended/dpdk/dpdk/0001-examples-ipsec-gw-fix-gcc-10-maybe-uninitialized-war.patch
new file mode 100644
index 00000000..3b5a2b3a
--- /dev/null
+++ b/bsp/meta-freescale/recipes-extended/dpdk/dpdk/0001-examples-ipsec-gw-fix-gcc-10-maybe-uninitialized-war.patch
@@ -0,0 +1,53 @@
+From 6fe3e96ab6e92f8faca9784a46bc33d92790c2b8 Mon Sep 17 00:00:00 2001
+From: Kevin Traynor <ktraynor@redhat.com>
+Date: Wed, 11 Mar 2020 11:33:00 +0000
+Subject: [PATCH] examples/ipsec-gw: fix gcc 10 maybe-uninitialized warning
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+gcc 10.0.1 reports:
+
+../examples/ipsec-secgw/ipsec_process.c: In function ‘ipsec_process’:
+../examples/ipsec-secgw/ipsec_process.c:132:34:
+error: ‘grp.m’ may be used uninitialized in this function
+ [-Werror=maybe-uninitialized]
+ 132 | grp[n].cnt = pkts + i - grp[n].m;
+ | ~~~~~~^~
+
+This is a correct warning for the initial execution of the statement.
+However, it is the design of the loop that grp[0].cnt will later be
+written with the correct value using an initialized grp[0].m before it
+is used.
+
+In order to remove the warning, initialize grp[0].m for the initial and
+unused calculation of grp[0].cnt.
+
+Fixes: 3e5f4625dc17 ("examples/ipsec-secgw: make data-path to use IPsec library")
+Cc: stable@dpdk.org
+
+Upstream-Status: Backport
+
+Suggested-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
+Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
+Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
+Signed-off-by: Jens Rehsack <jens.rehsack.ext@safrangroup.com>
+---
+ examples/ipsec-secgw/ipsec_process.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/examples/ipsec-secgw/ipsec_process.c b/examples/ipsec-secgw/ipsec_process.c
+index 2eb5c8b34..37f406d46 100644
+--- a/examples/ipsec-secgw/ipsec_process.c
++++ b/examples/ipsec-secgw/ipsec_process.c
+@@ -125,6 +125,7 @@ sa_group(void *sa_ptr[], struct rte_mbuf *pkts[],
+ void * const nosa = &spi;
+
+ sa = nosa;
++ grp[0].m = pkts;
+ for (i = 0, n = 0; i != num; i++) {
+
+ if (sa != sa_ptr[i]) {
+--
+2.17.1
+
diff --git a/bsp/meta-freescale/recipes-extended/dpdk/dpdk/0001-fix-gcc-8-build-error.patch b/bsp/meta-freescale/recipes-extended/dpdk/dpdk/0001-fix-gcc-8-build-error.patch
deleted file mode 100644
index 51987b53..00000000
--- a/bsp/meta-freescale/recipes-extended/dpdk/dpdk/0001-fix-gcc-8-build-error.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From 7409d0b89f80a72d91e02dc9ec688a01723c3c66 Mon Sep 17 00:00:00 2001
-From: Chunrong Guo <chunrong.guo@nxp.com>
-Date: Wed, 4 Jul 2018 17:12:39 +0800
-Subject: [PATCH] fix gcc-8 build error
-
-Signed-off-by: Chunrong Guo <chunrong.guo@nxp.com>
----
- examples/ipsec-secgw/parser.c | 6 ++----
- mk/toolchain/gcc/rte.vars.mk | 2 +-
- 2 files changed, 3 insertions(+), 5 deletions(-)
-
-diff --git a/examples/ipsec-secgw/parser.c b/examples/ipsec-secgw/parser.c
-index 9d0ea46..b2b30e4 100644
---- a/examples/ipsec-secgw/parser.c
-+++ b/examples/ipsec-secgw/parser.c
-@@ -544,8 +544,7 @@ parse_cfg_file(const char *cfg_filename)
- goto error_exit;
- }
-
-- strncpy(str + strlen(str), oneline,
-- strlen(oneline));
-+ strcpy(str + strlen(str), oneline);
-
- continue;
- }
-@@ -557,8 +556,7 @@ parse_cfg_file(const char *cfg_filename)
- cfg_filename, line_num);
- goto error_exit;
- }
-- strncpy(str + strlen(str), oneline,
-- strlen(oneline));
-+ strcpy(str + strlen(str), oneline);
-
- str[strlen(str)] = '\n';
- if (cmdline_parse(cl, str) < 0) {
-diff --git a/mk/toolchain/gcc/rte.vars.mk b/mk/toolchain/gcc/rte.vars.mk
-index 3b907e2..cc63da8 100644
---- a/mk/toolchain/gcc/rte.vars.mk
-+++ b/mk/toolchain/gcc/rte.vars.mk
-@@ -75,7 +75,7 @@ WERROR_FLAGS := -W -Wall -Wstrict-prototypes -Wmissing-prototypes
- WERROR_FLAGS += -Wmissing-declarations -Wold-style-definition -Wpointer-arith
- WERROR_FLAGS += -Wcast-align -Wnested-externs -Wcast-qual
- WERROR_FLAGS += -Wformat-nonliteral -Wformat-security
--WERROR_FLAGS += -Wundef -Wwrite-strings
-+WERROR_FLAGS += -Wundef -Wwrite-strings -Wno-cast-function-type
-
- ifeq ($(RTE_DEVEL_BUILD),y)
- WERROR_FLAGS += -Werror
---
-2.7.4
-
diff --git a/bsp/meta-freescale/recipes-extended/dpdk/dpdk/0004-update-WERROR_FLAGS.patch b/bsp/meta-freescale/recipes-extended/dpdk/dpdk/0004-update-WERROR_FLAGS.patch
new file mode 100644
index 00000000..61467377
--- /dev/null
+++ b/bsp/meta-freescale/recipes-extended/dpdk/dpdk/0004-update-WERROR_FLAGS.patch
@@ -0,0 +1,39 @@
+From aa97b9162b68780ca912a226b5045a3ddab41d3c Mon Sep 17 00:00:00 2001
+From: Chunrong Guo <chunrong.guo@nxp.com>
+Date: Thu, 4 Jul 2019 08:03:56 +0200
+Subject: [PATCH] update WERROR_FLAGS
+
+Signed-off-by: C.r. Guo <nxa13725@lsv07004.swis.us-cdc01.nxp.com>
+---
+ kernel/linux/kni/Makefile | 2 +-
+ mk/toolchain/gcc/rte.vars.mk | 1 +
+ 2 files changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/kernel/linux/kni/Makefile b/kernel/linux/kni/Makefile
+index 595bac261..a17939996 100644
+--- a/kernel/linux/kni/Makefile
++++ b/kernel/linux/kni/Makefile
+@@ -14,7 +14,7 @@ MODULE = rte_kni
+ MODULE_CFLAGS += -I$(SRCDIR) --param max-inline-insns-single=50
+ MODULE_CFLAGS += -I$(RTE_OUTPUT)/include
+ MODULE_CFLAGS += -include $(RTE_OUTPUT)/include/rte_config.h
+-MODULE_CFLAGS += -Wall -Werror
++MODULE_CFLAGS += -Wall -Werror -Wno-missing-attributes
+
+ -include /etc/lsb-release
+
+diff --git a/mk/toolchain/gcc/rte.vars.mk b/mk/toolchain/gcc/rte.vars.mk
+index de5e0d24d..ca2cb5fcd 100644
+--- a/mk/toolchain/gcc/rte.vars.mk
++++ b/mk/toolchain/gcc/rte.vars.mk
+@@ -49,6 +49,7 @@ WERROR_FLAGS += -Wcast-align -Wnested-externs -Wcast-qual
+ WERROR_FLAGS += -Wformat-nonliteral -Wformat-security
+ WERROR_FLAGS += -Wundef -Wwrite-strings -Wdeprecated
+ WERROR_FLAGS += -Wno-error=pedantic
++WERROR_FLAGS += -Wno-address-of-packed-member
+
+ ifeq ($(RTE_DEVEL_BUILD),y)
+ WERROR_FLAGS += -Werror
+--
+2.17.1
+