From 0939aead24d5c27d748650e5ee020ab57fc7aeae Mon Sep 17 00:00:00 2001 From: Chunrong Guo Date: Fri, 28 Jul 2017 15:44:18 +0800 Subject: [PATCH] dpdk: update to 98f548c36 *include the following changes 98f548c - dpaa2: fix incorrect copyright string 7962baa - examples/ipsec-secgw: modify port numbers in config files 3217401 - dpdk-extras: updating submodule commit e011184 - dpdk-extras: update commit of submodule 4bea5be - dpaa2: fix incorrect copyright string 09e88a4 - dpdk-extra: update submodule commit 7fc9dad - IPSEC:Enabling dequeue of all pending packets before retransmitting eaf69d3 - Merge pull request #377 in GITAM/dpdk from ~B10814/dpdk:16.07-qoriq to 16.07-qoriq 6a5d817 - dpaa: naming alignment with 17.05 code b802c02 - mempool: fix search of maximum contiguous pages b889f0b - net/dpaa2: tx cgr setting to frame based e3b9a92 - net/dpaa2: change rx and tx queue numbers from MC attributes 5aba5d9 - vfio: fix memseg error message ec49f70 - Merge pull request #376 in GITAM/dpdk from ~B27504/dpdk:16.07-qoriq to 16.07-qoriq c024799 - Merge pull request #373 in GITAM/dpdk from ~B10814/dpdk:16.07-qoriq to 16.07-qoriq d3b2ef0 - dpaa1: have separate device id's for eth and sec 874df10 - dpaa: update the parsing mask 0eff523 - bus/fslmc: panic on failure to get DPIO fbd65d1 - dpaa2: obtain kernel version and toggle MSI setup 2143d38 - dpaa: modify compatible string due to kernel update from 4.1 to 4.4 d17c69d - dpdk-extras: commit-id updated 43f4f81 - Merge pull request #369 in GITAM/dpdk from ~B10814/dpdk:16.07-qoriq to 16.07-qoriq 431ff86 - net/dpaa: expose env variable to disable taildrop 8e451ee - Merge pull request #366 in GITAM/dpdk from ~B49015/dpdk:16.07-qoriq_fix to 16.07-qoriq 3876243 - DPAA2: coverity issues fixes Signed-off-by: Chunrong Guo Signed-off-by: Otavio Salvador --- .../dpdk/0001-fix-build-with-gcc-7.1.patch | 119 ++++++++++++++++++ recipes-extended/dpdk/dpdk_16.07.bb | 8 +- 2 files changed, 123 insertions(+), 4 deletions(-) create mode 100644 recipes-extended/dpdk/dpdk/0001-fix-build-with-gcc-7.1.patch diff --git a/recipes-extended/dpdk/dpdk/0001-fix-build-with-gcc-7.1.patch b/recipes-extended/dpdk/dpdk/0001-fix-build-with-gcc-7.1.patch new file mode 100644 index 00000000..399510aa --- /dev/null +++ b/recipes-extended/dpdk/dpdk/0001-fix-build-with-gcc-7.1.patch @@ -0,0 +1,119 @@ +From 03ee26cd708971a51f056e3f53482367aa38fcb1 Mon Sep 17 00:00:00 2001 +From: Chunrong Guo +Date: Wed, 12 Jul 2017 12:03:38 +0800 +Subject: [PATCH] fix build with gcc 7.1 + +Signed-off-by: Chunrong Guo +--- + lib/librte_cmdline/cmdline_parse_num.c | 4 ++-- + lib/librte_eal/linuxapp/kni/ethtool/igb/igb.h | 2 +- + lib/librte_hash/rte_crc_arm64.h | 2 ++ + lib/librte_ring/rte_ring.h | 18 ++++++++++++------ + mk/toolchain/gcc/rte.vars.mk | 6 ++++++ + 5 files changed, 23 insertions(+), 9 deletions(-) + +diff --git a/lib/librte_cmdline/cmdline_parse_num.c b/lib/librte_cmdline/cmdline_parse_num.c +index b0f9a35..e507ec4 100644 +--- a/lib/librte_cmdline/cmdline_parse_num.c ++++ b/lib/librte_cmdline/cmdline_parse_num.c +@@ -250,7 +250,7 @@ cmdline_parse_num(cmdline_parse_token_hdr_t *tk, const char *srcbuf, void *res, + + case HEX: + st = HEX_OK; +- /* no break */ ++ /* fall-through no break */ + case HEX_OK: + if (c >= '0' && c <= '9') { + if (add_to_res(c - '0', &res1, 16) < 0) +@@ -282,7 +282,7 @@ cmdline_parse_num(cmdline_parse_token_hdr_t *tk, const char *srcbuf, void *res, + + case BIN: + st = BIN_OK; +- /* no break */ ++ /* fall-through */ + case BIN_OK: + if (c >= '0' && c <= '1') { + if (add_to_res(c - '0', &res1, 2) < 0) +diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/igb.h b/lib/librte_eal/linuxapp/kni/ethtool/igb/igb.h +index e5554ca..8d76f32 100644 +--- a/lib/librte_eal/linuxapp/kni/ethtool/igb/igb.h ++++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/igb.h +@@ -607,7 +607,7 @@ struct igb_adapter { + int int_mode; + u32 rss_queues; + u32 vmdq_pools; +- char fw_version[32]; ++ char fw_version[43]; + u32 wvbr; + struct igb_mac_addr *mac_table; + #ifdef CONFIG_IGB_VMDQ_NETDEV +diff --git a/lib/librte_hash/rte_crc_arm64.h b/lib/librte_hash/rte_crc_arm64.h +index 7dd6334..a17c0e4 100644 +--- a/lib/librte_hash/rte_crc_arm64.h ++++ b/lib/librte_hash/rte_crc_arm64.h +@@ -110,8 +110,10 @@ rte_hash_crc_set_alg(uint8_t alg) + case CRC32_ARM64: + if (!rte_cpu_get_flag_enabled(RTE_CPUFLAG_CRC32)) + alg = CRC32_SW; ++ /* fall-through */ + case CRC32_SW: + crc32_alg = alg; ++ /* fall-through */ + default: + break; + } +diff --git a/lib/librte_ring/rte_ring.h b/lib/librte_ring/rte_ring.h +index 0e22e69..085f3fe 100644 +--- a/lib/librte_ring/rte_ring.h ++++ b/lib/librte_ring/rte_ring.h +@@ -364,9 +364,12 @@ void rte_ring_dump(FILE *f, const struct rte_ring *r); + r->ring[idx+3] = obj_table[i+3]; \ + } \ + switch (n & 0x3) { \ +- case 3: r->ring[idx++] = obj_table[i++]; \ +- case 2: r->ring[idx++] = obj_table[i++]; \ +- case 1: r->ring[idx++] = obj_table[i++]; \ ++ case 3: \ ++ r->ring[idx++] = obj_table[i++]; /* fallthrough */ \ ++ case 2: \ ++ r->ring[idx++] = obj_table[i++]; /* fallthrough */ \ ++ case 1: \ ++ r->ring[idx++] = obj_table[i++]; /* fallthrough */ \ + } \ + } else { \ + for (i = 0; idx < size; i++, idx++)\ +@@ -390,9 +393,12 @@ void rte_ring_dump(FILE *f, const struct rte_ring *r); + obj_table[i+3] = r->ring[idx+3]; \ + } \ + switch (n & 0x3) { \ +- case 3: obj_table[i++] = r->ring[idx++]; \ +- case 2: obj_table[i++] = r->ring[idx++]; \ +- case 1: obj_table[i++] = r->ring[idx++]; \ ++ case 3: \ ++ obj_table[i++] = r->ring[idx++]; /* fallthrough */ \ ++ case 2: \ ++ obj_table[i++] = r->ring[idx++]; /* fallthrough */ \ ++ case 1: \ ++ obj_table[i++] = r->ring[idx++]; /* fallthrough */ \ + } \ + } else { \ + for (i = 0; idx < size; i++, idx++) \ +diff --git a/mk/toolchain/gcc/rte.vars.mk b/mk/toolchain/gcc/rte.vars.mk +index 94f6412..350c8bc 100644 +--- a/mk/toolchain/gcc/rte.vars.mk ++++ b/mk/toolchain/gcc/rte.vars.mk +@@ -101,5 +101,11 @@ ifeq ($(shell test $(GCC_VERSION) -lt 47 && echo 1), 1) + WERROR_FLAGS += -Wno-uninitialized + endif + ++ifeq ($(shell test $(GCC_VERSION) -gt 70 && echo 1), 1) ++# Tell GCC only to error for switch fallthroughs without a suitable comment ++# Ignore errors for snprintf truncation ++WERROR_FLAGS += -Wno-format-truncation ++endif ++ + export CC AS AR LD OBJCOPY OBJDUMP STRIP READELF + export TOOLCHAIN_CFLAGS TOOLCHAIN_LDFLAGS TOOLCHAIN_ASFLAGS +-- +2.7.4 + diff --git a/recipes-extended/dpdk/dpdk_16.07.bb b/recipes-extended/dpdk/dpdk_16.07.bb index ebc08809..b47d041f 100644 --- a/recipes-extended/dpdk/dpdk_16.07.bb +++ b/recipes-extended/dpdk/dpdk_16.07.bb @@ -9,12 +9,12 @@ RDEPENDS_${PN}-examples = "bash python-core" inherit module -SRC_URI = "git://git.freescale.com/ppc/sdk/dpdk.git;nobranch=1 \ +SRC_URI = "git://github.com/qoriq-open-source/dpdk.git;nobranch=1 \ file://add-RTE_KERNELDIR_OUT-to-split-kernel-bu.patch \ file://0001-include-sys-sysmacros.h-for-major-minor-defintions.patch \ file://0001-fix-build-with-gcc-7.1.patch \ " -SRCREV = "a3395d24774a8a7a2ce0d56a92a8ad2895b2ae8c" +SRCREV = "98f548c36b3c805a04d9963b8eb02e09340aa089" S = "${WORKDIR}/git" @@ -40,7 +40,7 @@ do_compile() { do_install() { unset LDFLAGS TARGET_LDFLAGS BUILD_LDFLAGS - oe_runmake EXTRA_LDFLAGS="-L${STAGING_LIBDIR} --hash-style=gnu" WERROR_FLAGS="-w" V=1 T="${RTE_TARGET}" DESTDIR="${D}" install + oe_runmake EXTRA_LDFLAGS="-L${STAGING_LIBDIR} --hash-style=gnu" WERROR_FLAGS="-w" V=1 T="${RTE_TARGET}" DESTDIR="${D}" install # Build and install the DPDK examples for APP in examples/l2fwd examples/l3fwd examples/l2fwd-crypto examples/ipsec-secgw examples/kni examples/ip_fragmentation examples/ip_reassembly; do @@ -89,4 +89,4 @@ FILES_${PN}-dev += "${datadir}/mk ${datadir}/scripts \ " FILES_${PN}-examples += "${datadir}/examples" -COMPATIBLE_MACHINE = "(ls2080ardb|ls2084ardb|ls2088a|ls1043a|ls1046a)" +COMPATIBLE_MACHINE = "(ls2080ardb|ls2084ardb|ls2088a|ls1043a|ls1046a|ls1088a)" -- 2.40.1