From ec253493263070da3e753c74c366f42659661768 Mon Sep 17 00:00:00 2001 From: Yogesh Tyagi Date: Mon, 5 Sep 2022 21:57:30 +0800 Subject: dpdk/21.11 : update version to 21.11.2 Drops upstreamed patch: * 0002-dma-idxd-fix-AVX2-in-non-datapath-functions.patch Signed-off-by: Yogesh Tyagi Signed-off-by: Anuj Mittal --- ...a-idxd-fix-AVX2-in-non-datapath-functions.patch | 171 --------------------- recipes-extended/dpdk/dpdk_21.11.1.bb | 75 --------- recipes-extended/dpdk/dpdk_21.11.2.bb | 74 +++++++++ 3 files changed, 74 insertions(+), 246 deletions(-) delete mode 100644 recipes-extended/dpdk/dpdk/0002-dma-idxd-fix-AVX2-in-non-datapath-functions.patch delete mode 100644 recipes-extended/dpdk/dpdk_21.11.1.bb create mode 100644 recipes-extended/dpdk/dpdk_21.11.2.bb diff --git a/recipes-extended/dpdk/dpdk/0002-dma-idxd-fix-AVX2-in-non-datapath-functions.patch b/recipes-extended/dpdk/dpdk/0002-dma-idxd-fix-AVX2-in-non-datapath-functions.patch deleted file mode 100644 index 4cd5164..0000000 --- a/recipes-extended/dpdk/dpdk/0002-dma-idxd-fix-AVX2-in-non-datapath-functions.patch +++ /dev/null @@ -1,171 +0,0 @@ -From aa802b10237c2f7d3b0d0498de9b2fb438f9b9a2 Mon Sep 17 00:00:00 2001 -From: Bruce Richardson -Date: Fri, 17 Jun 2022 11:59:20 +0100 -Subject: [PATCH] dma/idxd: fix AVX2 in non-datapath functions - -While all systems which will use the idxd driver for hardware will -support AVX2, if the driver is present the initialization functions e.g. -to register logs, will be called on all systems - irrespective of HW -support. This can cause issues if the system running DPDK does not have -AVX2, and the compiler has included AVX instructions in the -initialization code. - -To fix this, remove AVX2 instruction set from the whole build of the -driver. Instead, we add "target(avx2)" attribute to all datapath -functions, so those - and only those functions - will having AVX2 -instructions in them. - -Bugzilla ID: 1038 -Fixes: 3d36a0a1c7de ("dma/idxd: add data path job submission") -Cc: stable@dpdk.org - -Signed-off-by: Bruce Richardson -Acked-by: Conor Walsh - -Upstream-Status: Backport [http://git.dpdk.org/dpdk/commit/?id=aa802b10237c2f7d3b0d0498de9b2fb438f9b9a2] - -Signed-off-by: Yongxin Liu ---- - drivers/dma/idxd/idxd_common.c | 23 +++++++++++++++++++++++ - drivers/dma/idxd/meson.build | 1 - - 2 files changed, 23 insertions(+), 1 deletion(-) - -diff --git a/drivers/dma/idxd/idxd_common.c b/drivers/dma/idxd/idxd_common.c -index ea6413cc7a..c77200a457 100644 ---- a/drivers/dma/idxd/idxd_common.c -+++ b/drivers/dma/idxd/idxd_common.c -@@ -13,12 +13,23 @@ - - #define IDXD_PMD_NAME_STR "dmadev_idxd" - -+/* systems with DSA all support AVX2 so allow our data-path functions to -+ * always use at least that instruction set -+ */ -+#ifndef __AVX2__ -+#define __use_avx2 __attribute__((target("avx2"))) -+#else -+#define __use_avx2 -+#endif -+ -+__use_avx2 - static __rte_always_inline rte_iova_t - __desc_idx_to_iova(struct idxd_dmadev *idxd, uint16_t n) - { - return idxd->desc_iova + (n * sizeof(struct idxd_hw_desc)); - } - -+__use_avx2 - static __rte_always_inline void - __idxd_movdir64b(volatile void *dst, const struct idxd_hw_desc *src) - { -@@ -28,6 +39,7 @@ __idxd_movdir64b(volatile void *dst, const struct idxd_hw_desc *src) - : "memory"); - } - -+__use_avx2 - static __rte_always_inline void - __submit(struct idxd_dmadev *idxd) - { -@@ -74,6 +86,7 @@ __submit(struct idxd_dmadev *idxd) - _mm256_setzero_si256()); - } - -+__use_avx2 - static __rte_always_inline int - __idxd_write_desc(struct idxd_dmadev *idxd, - const uint32_t op_flags, -@@ -112,6 +125,7 @@ __idxd_write_desc(struct idxd_dmadev *idxd, - return job_id; - } - -+__use_avx2 - int - idxd_enqueue_copy(void *dev_private, uint16_t qid __rte_unused, rte_iova_t src, - rte_iova_t dst, unsigned int length, uint64_t flags) -@@ -126,6 +140,7 @@ idxd_enqueue_copy(void *dev_private, uint16_t qid __rte_unused, rte_iova_t src, - flags); - } - -+__use_avx2 - int - idxd_enqueue_fill(void *dev_private, uint16_t qid __rte_unused, uint64_t pattern, - rte_iova_t dst, unsigned int length, uint64_t flags) -@@ -136,6 +151,7 @@ idxd_enqueue_fill(void *dev_private, uint16_t qid __rte_unused, uint64_t pattern - flags); - } - -+__use_avx2 - int - idxd_submit(void *dev_private, uint16_t qid __rte_unused) - { -@@ -143,6 +159,7 @@ idxd_submit(void *dev_private, uint16_t qid __rte_unused) - return 0; - } - -+__use_avx2 - static enum rte_dma_status_code - get_comp_status(struct idxd_completion *c) - { -@@ -163,6 +180,7 @@ get_comp_status(struct idxd_completion *c) - } - } - -+__use_avx2 - int - idxd_vchan_status(const struct rte_dma_dev *dev, uint16_t vchan __rte_unused, - enum rte_dma_vchan_status *status) -@@ -180,6 +198,7 @@ idxd_vchan_status(const struct rte_dma_dev *dev, uint16_t vchan __rte_unused, - return 0; - } - -+__use_avx2 - static __rte_always_inline int - batch_ok(struct idxd_dmadev *idxd, uint16_t max_ops, enum rte_dma_status_code *status) - { -@@ -224,6 +243,7 @@ batch_ok(struct idxd_dmadev *idxd, uint16_t max_ops, enum rte_dma_status_code *s - return -1; /* error case */ - } - -+__use_avx2 - static inline uint16_t - batch_completed(struct idxd_dmadev *idxd, uint16_t max_ops, bool *has_error) - { -@@ -275,6 +295,7 @@ batch_completed(struct idxd_dmadev *idxd, uint16_t max_ops, bool *has_error) - return ret; - } - -+__use_avx2 - static uint16_t - batch_completed_status(struct idxd_dmadev *idxd, uint16_t max_ops, enum rte_dma_status_code *status) - { -@@ -366,6 +387,7 @@ batch_completed_status(struct idxd_dmadev *idxd, uint16_t max_ops, enum rte_dma_ - return ret; - } - -+__use_avx2 - uint16_t - idxd_completed(void *dev_private, uint16_t qid __rte_unused, uint16_t max_ops, - uint16_t *last_idx, bool *has_error) -@@ -383,6 +405,7 @@ idxd_completed(void *dev_private, uint16_t qid __rte_unused, uint16_t max_ops, - return ret; - } - -+__use_avx2 - uint16_t - idxd_completed_status(void *dev_private, uint16_t qid __rte_unused, uint16_t max_ops, - uint16_t *last_idx, enum rte_dma_status_code *status) -diff --git a/drivers/dma/idxd/meson.build b/drivers/dma/idxd/meson.build -index f1396be945..dcc0a297d7 100644 ---- a/drivers/dma/idxd/meson.build -+++ b/drivers/dma/idxd/meson.build -@@ -5,7 +5,6 @@ build = dpdk_conf.has('RTE_ARCH_X86') - reason = 'only supported on x86' - - deps += ['bus_pci'] --cflags += '-mavx2' # all platforms with idxd HW support AVX - sources = files( - 'idxd_common.c', - 'idxd_pci.c', --- -2.32.0 - diff --git a/recipes-extended/dpdk/dpdk_21.11.1.bb b/recipes-extended/dpdk/dpdk_21.11.1.bb deleted file mode 100644 index 0b7dd75..0000000 --- a/recipes-extended/dpdk/dpdk_21.11.1.bb +++ /dev/null @@ -1,75 +0,0 @@ -include dpdk.inc - -SRC_URI += " \ - file://0001-meson.build-march-and-mcpu-already-passed-by-Yocto-21.11.patch \ - file://0002-dma-idxd-fix-AVX2-in-non-datapath-functions.patch \ -" - -STABLE = "-stable" -BRANCH = "21.11" -SRCREV = "fcd039e4663bf2b595d7af3a8175a3e0bc09b367" -S = "${WORKDIR}/git" - -# CVE-2021-3839 has been fixed by commit 4c40d30d2b in 21.11.1 -# NVD database is incomplete -CVE_CHECK_IGNORE += "\ - CVE-2021-3839 \ -" - -# kernel module is provide by dpdk-module recipe, so disable here -EXTRA_OEMESON = " -Denable_kmods=false \ - -Dexamples=all \ -" - -COMPATIBLE_MACHINE = "null" -COMPATIBLE_HOST:libc-musl:class-target = "null" -COMPATIBLE_HOST:linux-gnux32 = "null" - -PACKAGECONFIG ??= " " -PACKAGECONFIG[afxdp] = ",,libbpf" -PACKAGECONFIG[libvirt] = ",,libvirt" - -RDEPENDS:${PN} += "pciutils python3-core" -RDEPENDS:${PN}-examples += "bash" -DEPENDS = "numactl python3-pyelftools-native" - -inherit meson - -INSTALL_PATH = "${prefix}/share/dpdk" - -do_install:append(){ - # remove source files - rm -rf ${D}/${INSTALL_PATH}/examples/* - - # Install examples - install -m 0755 -d ${D}/${INSTALL_PATH}/examples/ - for dirname in ${B}/examples/dpdk-* - do - if [ ! -d ${dirname} ] && [ -x ${dirname} ]; then - install -m 0755 ${dirname} ${D}/${INSTALL_PATH}/examples/ - fi - done - -} - -PACKAGES =+ "${PN}-examples ${PN}-tools" - -FILES:${PN} += " ${bindir}/dpdk-testpmd \ - ${bindir}/dpdk-proc-info \ - ${libdir}/*.so* \ - ${libdir}/dpdk/pmds-22.0/*.so* \ - " -FILES:${PN}-examples = " \ - ${prefix}/share/dpdk/examples/* \ - " - -FILES:${PN}-tools = " \ - ${bindir}/dpdk-pdump \ - ${bindir}/dpdk-test \ - ${bindir}/dpdk-test-* \ - ${bindir}/dpdk-*.py \ - " - -CVE_PRODUCT = "data_plane_development_kit" - -INSANE_SKIP:${PN} = "dev-so" diff --git a/recipes-extended/dpdk/dpdk_21.11.2.bb b/recipes-extended/dpdk/dpdk_21.11.2.bb new file mode 100644 index 0000000..570648a --- /dev/null +++ b/recipes-extended/dpdk/dpdk_21.11.2.bb @@ -0,0 +1,74 @@ +include dpdk.inc + +SRC_URI += " \ + file://0001-meson.build-march-and-mcpu-already-passed-by-Yocto-21.11.patch \ +" + +STABLE = "-stable" +BRANCH = "21.11" +SRCREV = "7bcd45ce824d0ea2a9f30d16855613a93521851b" +S = "${WORKDIR}/git" + +# CVE-2021-3839 has been fixed by commit 4c40d30d2b in 21.11.1 +# NVD database is incomplete +CVE_CHECK_IGNORE += "\ + CVE-2021-3839 \ +" + +# kernel module is provide by dpdk-module recipe, so disable here +EXTRA_OEMESON = " -Denable_kmods=false \ + -Dexamples=all \ +" + +COMPATIBLE_MACHINE = "null" +COMPATIBLE_HOST:libc-musl:class-target = "null" +COMPATIBLE_HOST:linux-gnux32 = "null" + +PACKAGECONFIG ??= " " +PACKAGECONFIG[afxdp] = ",,libbpf" +PACKAGECONFIG[libvirt] = ",,libvirt" + +RDEPENDS:${PN} += "pciutils python3-core" +RDEPENDS:${PN}-examples += "bash" +DEPENDS = "numactl python3-pyelftools-native" + +inherit meson + +INSTALL_PATH = "${prefix}/share/dpdk" + +do_install:append(){ + # remove source files + rm -rf ${D}/${INSTALL_PATH}/examples/* + + # Install examples + install -m 0755 -d ${D}/${INSTALL_PATH}/examples/ + for dirname in ${B}/examples/dpdk-* + do + if [ ! -d ${dirname} ] && [ -x ${dirname} ]; then + install -m 0755 ${dirname} ${D}/${INSTALL_PATH}/examples/ + fi + done + +} + +PACKAGES =+ "${PN}-examples ${PN}-tools" + +FILES:${PN} += " ${bindir}/dpdk-testpmd \ + ${bindir}/dpdk-proc-info \ + ${libdir}/*.so* \ + ${libdir}/dpdk/pmds-22.0/*.so* \ + " +FILES:${PN}-examples = " \ + ${prefix}/share/dpdk/examples/* \ + " + +FILES:${PN}-tools = " \ + ${bindir}/dpdk-pdump \ + ${bindir}/dpdk-test \ + ${bindir}/dpdk-test-* \ + ${bindir}/dpdk-*.py \ + " + +CVE_PRODUCT = "data_plane_development_kit" + +INSANE_SKIP:${PN} = "dev-so" -- cgit v1.2.3-54-g00ecf