Show a patch.

GET /api/patches/43872/
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 43872,
    "url": "http://patches.dpdk.org/api/patches/43872/",
    "web_url": "http://patches.dpdk.org/patch/43872/",
    "project": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/projects/1/",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk"
    },
    "msgid": "<1535122494-30249-2-git-send-email-tdu@semihalf.com>",
    "date": "2018-08-24T14:54:49",
    "name": "[v2,1/6] drivers/common: add mvep common code for MRVL PMDs",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "ba1540b1efbeaa915a9e2172add49efe24c5d064",
    "submitter": {
        "id": 846,
        "url": "http://patches.dpdk.org/api/people/846/",
        "name": "Tomasz Duszynski",
        "email": "tdu@semihalf.com"
    },
    "delegate": {
        "id": 319,
        "url": "http://patches.dpdk.org/api/users/319/",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@intel.com"
    },
    "mbox": "http://patches.dpdk.org/patch/43872/mbox/",
    "series": [
        {
            "id": 1050,
            "url": "http://patches.dpdk.org/api/series/1050/",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=1050",
            "date": "2018-08-24T14:54:48",
            "name": "net/mvpp2 changes and features",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/1050/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/43872/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/43872/checks/",
    "tags": {},
    "headers": {
        "X-Mailman-Version": "2.1.15",
        "In-Reply-To": "<1535122494-30249-1-git-send-email-tdu@semihalf.com>",
        "Errors-To": "dev-bounces@dpdk.org",
        "X-Mailer": "git-send-email 2.7.4",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id F30535F2D;\n\tFri, 24 Aug 2018 16:55:05 +0200 (CEST)",
            "from mail-lj1-f193.google.com (mail-lj1-f193.google.com\n\t[209.85.208.193]) by dpdk.org (Postfix) with ESMTP id 51E115F28\n\tfor <dev@dpdk.org>; Fri, 24 Aug 2018 16:55:04 +0200 (CEST)",
            "by mail-lj1-f193.google.com with SMTP id f8-v6so7131045ljk.1\n\tfor <dev@dpdk.org>; Fri, 24 Aug 2018 07:55:04 -0700 (PDT)",
            "from sh.semihalf.local (31-172-191-173.noc.fibertech.net.pl.\n\t[31.172.191.173]) by smtp.gmail.com with ESMTPSA id\n\tj140-v6sm1373659lfg.16.2018.08.24.07.55.02\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tFri, 24 Aug 2018 07:55:02 -0700 (PDT)"
        ],
        "References": "<1535113006-9393-1-git-send-email-tdu@semihalf.com>\n\t<1535122494-30249-1-git-send-email-tdu@semihalf.com>",
        "X-Google-Smtp-Source": "ANB0VdadvYduLgqtyhsYn7FjmOKWvL8ILwQ7hZ5JiDM2GUpkr9/detX/pHgKBb8i4jfQSyIhH1HBKA==",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=semihalf-com.20150623.gappssmtp.com; s=20150623;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=s8z5Hk93eG+7g+UHFj1EQT46F4z3gY52q2lbFSaBU8U=;\n\tb=ATyk+LofP2OPICM28t4JAeGZTzrJvsAnSMsV530fIYO3J3B/cx+7eU3hDf3bE87yb4\n\t8t9IiWpNKNdsGOuN59dqhpJmf4j6QoEOWL/OemqmIYcNn9styQyjfM5gMgumjU2/XoeO\n\tS/Q7YDV2XJ0aRDjRrl5qoavXKTfcKXC0aR5UA0d5Cgft2iXothCj87EroTG1GLNp+hrO\n\tcqf3ipazKhwZiHEKHEqf7rYIUAMk6ucvZDbJaleQaafKWYRyDzHAGOJxXTvG8Yf5jjGw\n\tObrulV5PQxgvaCa3JtxUz9w/UwkaPTLEfOEHAferG7qh/ZHlILv+KohEM6Oz1s9/RM7B\n\tScrA==",
        "X-BeenThere": "dev@dpdk.org",
        "X-Received": "by 2002:a2e:2ac3:: with SMTP id\n\tq186-v6mr1554172ljq.123.1535122503588; \n\tFri, 24 Aug 2018 07:55:03 -0700 (PDT)",
        "Message-Id": "<1535122494-30249-2-git-send-email-tdu@semihalf.com>",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=s8z5Hk93eG+7g+UHFj1EQT46F4z3gY52q2lbFSaBU8U=;\n\tb=E6ZzdEM3c63ftrhfhQnqEREcJWfZBiDw1bFK/nMdidd/tVSaSkFIik4zS5UaMVpwGr\n\tSTqDN5qq6SFOtggLHj+8Du2K9wfYYSXs3z4oT/oADbEaUSar+b218TXLYKe+V58icTAn\n\tVPgzKHz7Anow33R/vAXpKUNZ9ZBmx3OUND6IdFZJkxQ1H3Jif1IIo07qPL6X1UcQRDsj\n\tiBqct7NzlRWjk/Sjrzrb2C2i5NtS5EyM5gdb/pnZf/TBo5sFFkAdX7HNfYZtM37qcOpu\n\to4RVWNg8I5OhHLnfG9oG2oPy0VSZvowtIDHxC+vNt/wvcNgu4dYR3lDP3o/qzGgnxFCo\n\t26aQ==",
        "Delivered-To": "patchwork@dpdk.org",
        "Precedence": "list",
        "From": "Tomasz Duszynski <tdu@semihalf.com>",
        "X-Original-To": "patchwork@dpdk.org",
        "List-Post": "<mailto:dev@dpdk.org>",
        "Return-Path": "<dev-bounces@dpdk.org>",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "To": "dev@dpdk.org",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "Date": "Fri, 24 Aug 2018 16:54:49 +0200",
        "X-Gm-Message-State": "APzg51CE/wJ8tXXrH4MEC3go7dCX3MxjGlv2mFl6IUfrBkEBBEJLtQEq\n\tvhN23L86rO4+WHEqnky9NovHx+tElIE=",
        "Cc": "nsamsono@marvell.com, mw@semihalf.com, Liron Himi <lironh@marvell.com>, \n\tTomasz Duszynski <tdu@semihalf.com>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "Subject": "[dpdk-dev] [PATCH v2 1/6] drivers/common: add mvep common code for\n\tMRVL PMDs"
    },
    "content": "From: Liron Himi <lironh@marvell.com>\n\nAdd MVEP (Marvell Embedded Processors) to drivers/common which\nwill keep code reused by current and future MRVL PMDs.\nRight now we have only common DMA memory initialization routines there.\n\nSigned-off-by: Liron Himi <lironh@marvell.com>\nSigned-off-by: Tomasz Duszynski <tdu@semihalf.com>\nReviewed-by: Natalie Samsonov <nsamsono@marvell.com>\n---\n drivers/common/Makefile                         |  4 +++\n drivers/common/meson.build                      |  2 +-\n drivers/common/mvep/Makefile                    | 38 +++++++++++++++++++++\n drivers/common/mvep/meson.build                 | 19 +++++++++++\n drivers/common/mvep/mvep_common.c               | 45 +++++++++++++++++++++++++\n drivers/common/mvep/rte_common_mvep_version.map |  6 ++++\n drivers/common/mvep/rte_mvep_common.h           | 20 +++++++++++\n mk/rte.app.mk                                   |  4 +++\n 8 files changed, 137 insertions(+), 1 deletion(-)\n create mode 100644 drivers/common/mvep/Makefile\n create mode 100644 drivers/common/mvep/meson.build\n create mode 100644 drivers/common/mvep/mvep_common.c\n create mode 100644 drivers/common/mvep/rte_common_mvep_version.map\n create mode 100644 drivers/common/mvep/rte_mvep_common.h",
    "diff": "diff --git a/drivers/common/Makefile b/drivers/common/Makefile\nindex 0fd2237..5f72da0 100644\n--- a/drivers/common/Makefile\n+++ b/drivers/common/Makefile\n@@ -8,4 +8,8 @@ ifeq ($(CONFIG_RTE_LIBRTE_PMD_OCTEONTX_SSOVF)$(CONFIG_RTE_LIBRTE_OCTEONTX_MEMPOO\n DIRS-y += octeontx\n endif\n \n+ifeq ($(CONFIG_RTE_LIBRTE_MVPP2_PMD),y)\n+DIRS-y += mvep\n+endif\n+\n include $(RTE_SDK)/mk/rte.subdir.mk\ndiff --git a/drivers/common/meson.build b/drivers/common/meson.build\nindex d7b7d8c..f828ce7 100644\n--- a/drivers/common/meson.build\n+++ b/drivers/common/meson.build\n@@ -2,6 +2,6 @@\n # Copyright(c) 2018 Cavium, Inc\n \n std_deps = ['eal']\n-drivers = ['octeontx', 'qat']\n+drivers = ['mvep', 'octeontx', 'qat']\n config_flag_fmt = 'RTE_LIBRTE_@0@_COMMON'\n driver_name_fmt = 'rte_common_@0@'\ndiff --git a/drivers/common/mvep/Makefile b/drivers/common/mvep/Makefile\nnew file mode 100644\nindex 0000000..1f5f005\n--- /dev/null\n+++ b/drivers/common/mvep/Makefile\n@@ -0,0 +1,38 @@\n+# SPDX-License-Identifier: BSD-3-Clause\n+# Copyright(c) 2018 Marvell International Ltd.\n+#\n+\n+include $(RTE_SDK)/mk/rte.vars.mk\n+\n+ifneq ($(MAKECMDGOALS),clean)\n+ifneq ($(MAKECMDGOALS),config)\n+ifeq ($(LIBMUSDK_PATH),)\n+$(error \"Please define LIBMUSDK_PATH environment variable\")\n+endif\n+endif\n+endif\n+\n+# library name\n+LIB = librte_common_mvep.a\n+\n+# library version\n+LIBABIVER := 1\n+\n+# versioning export map\n+EXPORT_MAP := rte_common_mvep_version.map\n+\n+# external library dependencies\n+CFLAGS += -I$($RTE_SDK)/drivers/common/mvep\n+CFLAGS += -I$(LIBMUSDK_PATH)/include\n+CFLAGS += -DMVCONF_TYPES_PUBLIC\n+CFLAGS += -DMVCONF_DMA_PHYS_ADDR_T_PUBLIC\n+CFLAGS += $(WERROR_FLAGS)\n+CFLAGS += -O3\n+LDLIBS += -L$(LIBMUSDK_PATH)/lib\n+LDLIBS += -lmusdk\n+LDLIBS += -lrte_eal -lrte_kvargs\n+\n+# library source files\n+SRCS-y += mvep_common.c\n+\n+include $(RTE_SDK)/mk/rte.lib.mk\ndiff --git a/drivers/common/mvep/meson.build b/drivers/common/mvep/meson.build\nnew file mode 100644\nindex 0000000..8ccfacb\n--- /dev/null\n+++ b/drivers/common/mvep/meson.build\n@@ -0,0 +1,19 @@\n+# SPDX-License-Identifier: BSD-3-Clause\n+# Copyright(c) 2018 Marvell International Ltd.\n+# Copyright(c) 2018 Semihalf.\n+# All rights reserved.\n+#\n+path = get_option('lib_musdk_dir')\n+lib_dir = path + '/lib'\n+inc_dir = path + '/include'\n+\n+lib = cc.find_library('libmusdk', dirs: [lib_dir], required: false)\n+if not lib.found()\n+\tbuild = false\n+else\n+\text_deps += lib\n+\tincludes += include_directories(inc_dir)\n+\tcflags += ['-DMVCONF_TYPES_PUBLIC', '-DMVCONF_DMA_PHYS_ADDR_T_PUBLIC']\n+endif\n+\n+sources = files('mvep_common.c')\ndiff --git a/drivers/common/mvep/mvep_common.c b/drivers/common/mvep/mvep_common.c\nnew file mode 100644\nindex 0000000..67fa65b\n--- /dev/null\n+++ b/drivers/common/mvep/mvep_common.c\n@@ -0,0 +1,45 @@\n+/*  SPDX-License-Identifier: BSD-3-Clause\n+ *  Copyright(c) 2018 Marvell International Ltd.\n+ */\n+\n+#include <rte_common.h>\n+\n+#include <env/mv_autogen_comp_flags.h>\n+#include <env/mv_sys_dma.h>\n+\n+#include \"rte_mvep_common.h\"\n+\n+/* Memory size (in bytes) for MUSDK dma buffers */\n+#define MRVL_MUSDK_DMA_MEMSIZE (40 * 1024 * 1024)\n+\n+struct mvep {\n+\tuint32_t ref_count;\n+};\n+\n+static struct mvep mvep;\n+\n+int rte_mvep_init(enum mvep_module_type module __rte_unused,\n+\t\t  struct rte_kvargs *kvlist __rte_unused)\n+{\n+\tint ret;\n+\n+\tif (!mvep.ref_count) {\n+\t\tret = mv_sys_dma_mem_init(MRVL_MUSDK_DMA_MEMSIZE);\n+\t\tif (ret)\n+\t\t\treturn ret;\n+\t}\n+\n+\tmvep.ref_count++;\n+\n+\treturn 0;\n+}\n+\n+int rte_mvep_deinit(enum mvep_module_type module __rte_unused)\n+{\n+\tmvep.ref_count--;\n+\n+\tif (!mvep.ref_count)\n+\t\tmv_sys_dma_mem_destroy();\n+\n+\treturn 0;\n+}\ndiff --git a/drivers/common/mvep/rte_common_mvep_version.map b/drivers/common/mvep/rte_common_mvep_version.map\nnew file mode 100644\nindex 0000000..fa1a1b8\n--- /dev/null\n+++ b/drivers/common/mvep/rte_common_mvep_version.map\n@@ -0,0 +1,6 @@\n+DPDK_18.08 {\n+\tglobal:\n+\n+\trte_mvep_init;\n+\trte_mvep_deinit;\n+};\ndiff --git a/drivers/common/mvep/rte_mvep_common.h b/drivers/common/mvep/rte_mvep_common.h\nnew file mode 100644\nindex 0000000..ba47e16\n--- /dev/null\n+++ b/drivers/common/mvep/rte_mvep_common.h\n@@ -0,0 +1,20 @@\n+/*  SPDX-License-Identifier: BSD-3-Clause\n+ *  Copyright(c) 2018 Marvell International Ltd.\n+ */\n+\n+#ifndef __RTE_MVEP_COMMON_H__\n+#define __RTE_MVEP_COMMON_H__\n+\n+#include <rte_kvargs.h>\n+\n+enum mvep_module_type {\n+\tMVEP_MOD_T_NONE = 0,\n+\tMVEP_MOD_T_PP2,\n+\tMVEP_MOD_T_SAM,\n+\tMVEP_MOD_T_LAST\n+};\n+\n+int rte_mvep_init(enum mvep_module_type module, struct rte_kvargs *kvlist);\n+int rte_mvep_deinit(enum mvep_module_type module);\n+\n+#endif /* __RTE_MVEP_COMMON_H__ */\ndiff --git a/mk/rte.app.mk b/mk/rte.app.mk\nindex de33883..899d51a 100644\n--- a/mk/rte.app.mk\n+++ b/mk/rte.app.mk\n@@ -98,6 +98,10 @@ ifeq ($(CONFIG_RTE_LIBRTE_PMD_OCTEONTX_SSOVF)$(CONFIG_RTE_LIBRTE_OCTEONTX_MEMPOO\n _LDLIBS-y += -lrte_common_octeontx\n endif\n \n+ifeq ($(CONFIG_RTE_LIBRTE_MVPP2_PMD),y)\n+_LDLIBS-y += -lrte_common_mvep -L$(LIBMUSDK_PATH)/lib -lmusdk\n+endif\n+\n _LDLIBS-$(CONFIG_RTE_LIBRTE_PCI_BUS)        += -lrte_bus_pci\n _LDLIBS-$(CONFIG_RTE_LIBRTE_VDEV_BUS)       += -lrte_bus_vdev\n _LDLIBS-$(CONFIG_RTE_LIBRTE_DPAA_BUS)       += -lrte_bus_dpaa\n",
    "prefixes": [
        "v2",
        "1/6"
    ]
}