Show a patch.

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

{
    "id": 45105,
    "url": "http://patches.dpdk.org/api/patches/45105/",
    "web_url": "http://patches.dpdk.org/patch/45105/",
    "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": "<1537536294-16703-3-git-send-email-amo@semihalf.com>",
    "date": "2018-09-21T13:24:53",
    "name": "[v2,2/3] crypto/mvsam: use common initialization",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "b0501a10280a843bdf6c14b618890b6c005c5976",
    "submitter": {
        "id": 1112,
        "url": "http://patches.dpdk.org/api/people/1112/",
        "name": "Andrzej Ostruszka",
        "email": "amo@semihalf.com"
    },
    "delegate": {
        "id": 6690,
        "url": "http://patches.dpdk.org/api/users/6690/",
        "username": "akhil",
        "first_name": "akhil",
        "last_name": "goyal",
        "email": "akhil.goyal@nxp.com"
    },
    "mbox": "http://patches.dpdk.org/patch/45105/mbox/",
    "series": [
        {
            "id": 1440,
            "url": "http://patches.dpdk.org/api/series/1440/",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=1440",
            "date": "2018-09-21T13:24:51",
            "name": "crypto/mvsam: yet another round of features",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/1440/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/45105/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/45105/checks/",
    "tags": {},
    "headers": {
        "X-Mailer": "git-send-email 2.7.4",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "From": "Andrzej Ostruszka <amo@semihalf.com>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "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=iHNzJsEN1DmesPWsBU2inuRAfsBFcC3KdKHwdA/01Fw=;\n\tb=nzVFblrP4WlTF5O9OIxl3cc7Y1y+rR0KgQ0hRZ35XVisQx/1a5YR2FlqNT8CdHlECp\n\tu+x+/yd0AENlRsF0D6qgMNl/qUivEQNFH9WeMflCx1w4xZZYCuHlQSZvrbIU6B7ooOp0\n\tPWICkyeQeQ5HpcROqb4SDQa51penxzeG9d79dOO05Ip3rxPcA3s1S9Db0d2lMDcZlMr2\n\t1X4Breh3TTsKQEx4f0nI0pntrd7BOOP94Ow0azMvNEHEYW1wJLDwLtcAkml8wYm+PUZ1\n\tuxKEElUU9LJWIH/5G7gqc5ll8WLNgLvvYgT7WoFqHWKRU/JMxuTramhNj13bykpiFvmq\n\tUp8Q==",
        "X-Mailman-Version": "2.1.15",
        "Delivered-To": "patchwork@dpdk.org",
        "X-Gm-Message-State": "APzg51ArWMUTDvmDM1tnS0jcZjFOVGnT6P8l1oj5Xv0XFUfbmeg1Kuky\n\tlC+GRzZSvrGX5GHXJzfOTQmU8GKwbiw=",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Cc": "mw@semihalf.com, nadavh@marvell.com, Dmitri Epshtein <dima@marvell.com>, \n\tTomasz Duszynski <tdu@semihalf.com>",
        "To": "dev@dpdk.org",
        "Errors-To": "dev-bounces@dpdk.org",
        "References": "<1535372574-18950-1-git-send-email-tdu@semihalf.com>\n\t<1537536294-16703-1-git-send-email-amo@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=iHNzJsEN1DmesPWsBU2inuRAfsBFcC3KdKHwdA/01Fw=;\n\tb=JicOf/NJpfUfLMz6RXmF1KR49wU1ziymqRncbl4QQbTuckywrQ1VM0LBX9HOC0bLRX\n\tCLHKKBBUraqkyQK9BTn2SS15/reJ5L7SMKIl8YukHFnd4OhEsQIe2j6wGKd2ugbrIysh\n\tQaDrpiNfB3yEEPpOjul6FsLNS0imN6o+Sn9mkXvF0HQEkTpOG0pEaP33l+qgUBZ/96Gq\n\tD/Es2zXPS+BpK3lpPoU0cnytE/wLrc+oyAkGeHlsawX9Cv3Osa98AwApszRYO20PxIPR\n\tk6ruAm0wTqARgeraCMlWx2NnXud6hQANLZUPhKg5vOAVhbm3xbXo+/eW0TFEPbB6fXUi\n\tXyLA==",
        "Return-Path": "<dev-bounces@dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id E55284F98;\n\tFri, 21 Sep 2018 15:25:02 +0200 (CEST)",
            "from mail-lf1-f65.google.com (mail-lf1-f65.google.com\n\t[209.85.167.65]) by dpdk.org (Postfix) with ESMTP id 7ED434CA1\n\tfor <dev@dpdk.org>; Fri, 21 Sep 2018 15:24:59 +0200 (CEST)",
            "by mail-lf1-f65.google.com with SMTP id b12-v6so4124350lfa.4\n\tfor <dev@dpdk.org>; Fri, 21 Sep 2018 06:24:59 -0700 (PDT)",
            "from amok.semihalf.local (31-172-191-173.noc.fibertech.net.pl.\n\t[31.172.191.173]) by smtp.googlemail.com with ESMTPSA id\n\tv14-v6sm4868767lji.80.2018.09.21.06.24.57\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tFri, 21 Sep 2018 06:24:57 -0700 (PDT)"
        ],
        "Date": "Fri, 21 Sep 2018 15:24:53 +0200",
        "X-Received": "by 2002:a19:4c41:: with SMTP id\n\tz62-v6mr3732289lfa.127.1537536298809; \n\tFri, 21 Sep 2018 06:24:58 -0700 (PDT)",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>",
        "Subject": "[dpdk-dev] [PATCH v2 2/3] crypto/mvsam: use common initialization",
        "In-Reply-To": "<1537536294-16703-1-git-send-email-amo@semihalf.com>",
        "Message-Id": "<1537536294-16703-3-git-send-email-amo@semihalf.com>",
        "Precedence": "list",
        "X-BeenThere": "dev@dpdk.org",
        "X-Original-To": "patchwork@dpdk.org",
        "X-Google-Smtp-Source": "ANB0VdZTrPUvxI4OaXjCuFW3Uvbgm10i3IMi4HwvbfAw1oRMXDvtFWCoSj6OoQvN3NzEnk6MeCiPww=="
    },
    "content": "From: Dmitri Epshtein <dima@marvell.com>\n\nUse common initialization to reduce boilerplate code.\n\nSigned-off-by: Dmitri Epshtein <dima@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/crypto/mvsam/Makefile       |  3 ++-\n drivers/crypto/mvsam/meson.build    |  2 +-\n drivers/crypto/mvsam/rte_mrvl_pmd.c | 31 ++++++++++++++-----------------\n mk/rte.app.mk                       |  4 +++-\n 5 files changed, 23 insertions(+), 21 deletions(-)",
    "diff": "diff --git a/drivers/common/Makefile b/drivers/common/Makefile\nindex 5f72da0..0859601 100644\n--- a/drivers/common/Makefile\n+++ b/drivers/common/Makefile\n@@ -8,7 +8,9 @@ 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+MVEP-y += $(CONFIG_RTE_LIBRTE_MVPP2_PMD)\n+MVEP-y += $(CONFIG_RTE_LIBRTE_PMD_MVSAM_CRYPTO)\n+ifneq (,$(findstring y,$(MVEP-y)))\n DIRS-y += mvep\n endif\n \ndiff --git a/drivers/crypto/mvsam/Makefile b/drivers/crypto/mvsam/Makefile\nindex c3dc72c..9850fda 100644\n--- a/drivers/crypto/mvsam/Makefile\n+++ b/drivers/crypto/mvsam/Makefile\n@@ -19,6 +19,7 @@ LIB = librte_pmd_mvsam_crypto.a\n # build flags\n CFLAGS += -O3\n CFLAGS += $(WERROR_FLAGS)\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@@ -33,7 +34,7 @@ EXPORT_MAP := rte_pmd_mvsam_version.map\n LDLIBS += -L$(LIBMUSDK_PATH)/lib -lmusdk\n LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool\n LDLIBS += -lrte_cryptodev\n-LDLIBS += -lrte_bus_vdev\n+LDLIBS += -lrte_bus_vdev -lrte_common_mvep\n \n # library source files\n SRCS-$(CONFIG_RTE_LIBRTE_PMD_MVSAM_CRYPTO) += rte_mrvl_pmd.c\ndiff --git a/drivers/crypto/mvsam/meson.build b/drivers/crypto/mvsam/meson.build\nindex 3c8ea3c..f1c8796 100644\n--- a/drivers/crypto/mvsam/meson.build\n+++ b/drivers/crypto/mvsam/meson.build\n@@ -18,4 +18,4 @@ endif\n \n sources = files('rte_mrvl_pmd.c', 'rte_mrvl_pmd_ops.c')\n \n-deps += ['bus_vdev']\n+deps += ['bus_vdev', 'common_mvep']\ndiff --git a/drivers/crypto/mvsam/rte_mrvl_pmd.c b/drivers/crypto/mvsam/rte_mrvl_pmd.c\nindex 977e478..35dd659 100644\n--- a/drivers/crypto/mvsam/rte_mrvl_pmd.c\n+++ b/drivers/crypto/mvsam/rte_mrvl_pmd.c\n@@ -11,11 +11,11 @@\n #include <rte_bus_vdev.h>\n #include <rte_malloc.h>\n #include <rte_cpuflags.h>\n+#include <rte_kvargs.h>\n+#include <rte_mvep_common.h>\n \n #include \"rte_mrvl_pmd_private.h\"\n \n-#define MRVL_MUSDK_DMA_MEMSIZE 41943040\n-\n #define MRVL_PMD_MAX_NB_SESS_ARG\t\t(\"max_nb_sessions\")\n #define MRVL_PMD_DEFAULT_MAX_NB_SESSIONS\t2048\n \n@@ -752,7 +752,7 @@ cryptodev_mrvl_crypto_create(const char *name,\n \tstruct rte_cryptodev *dev;\n \tstruct mrvl_crypto_private *internals;\n \tstruct sam_init_params\tsam_params;\n-\tint ret;\n+\tint ret = -EINVAL;\n \n \tdev = rte_cryptodev_pmd_create(name, &vdev->device,\n \t\t\t&init_params->common);\n@@ -778,30 +778,26 @@ cryptodev_mrvl_crypto_create(const char *name,\n \tinternals->max_nb_qpairs = init_params->common.max_nb_queue_pairs;\n \tinternals->max_nb_sessions = init_params->max_nb_sessions;\n \n-\t/*\n-\t * ret == -EEXIST is correct, it means DMA\n-\t * has been already initialized.\n-\t */\n-\tret = mv_sys_dma_mem_init(MRVL_MUSDK_DMA_MEMSIZE);\n-\tif (ret < 0) {\n-\t\tif (ret != -EEXIST)\n-\t\t\treturn ret;\n-\n-\t\tMRVL_CRYPTO_LOG_INFO(\n-\t\t\t\"DMA memory has been already initialized by a different driver.\");\n-\t}\n+\tret = rte_mvep_init(MVEP_MOD_T_SAM, NULL);\n+\tif (ret)\n+\t\tgoto init_error;\n \n \tsam_params.max_num_sessions = internals->max_nb_sessions;\n \n \t/* sam_set_debug_flags(3); */\n-\treturn sam_init(&sam_params);\n+\n+\tret = sam_init(&sam_params);\n+\tif (ret)\n+\t\tgoto init_error;\n+\n+\treturn 0;\n \n init_error:\n \tMRVL_CRYPTO_LOG_ERR(\n \t\t\"driver %s: %s failed\", init_params->common.name, __func__);\n \n \tcryptodev_mrvl_crypto_uninit(vdev);\n-\treturn -EFAULT;\n+\treturn ret;\n }\n \n /** Parse integer from integer argument */\n@@ -951,6 +947,7 @@ cryptodev_mrvl_crypto_uninit(struct rte_vdev_device *vdev)\n \t\tname, rte_socket_id());\n \n \tsam_deinit();\n+\trte_mvep_deinit(MVEP_MOD_T_SAM);\n \n \tcryptodev = rte_cryptodev_pmd_get_named_dev(name);\n \tif (cryptodev == NULL)\ndiff --git a/mk/rte.app.mk b/mk/rte.app.mk\nindex 899d51a..4278ebb 100644\n--- a/mk/rte.app.mk\n+++ b/mk/rte.app.mk\n@@ -98,7 +98,9 @@ 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+MVEP-y += $(CONFIG_RTE_LIBRTE_MVPP2_PMD)\n+MVEP-y += $(CONFIG_RTE_LIBRTE_PMD_MVSAM_CRYPTO)\n+ifneq (,$(findstring y,$(MVEP-y)))\n _LDLIBS-y += -lrte_common_mvep -L$(LIBMUSDK_PATH)/lib -lmusdk\n endif\n \n",
    "prefixes": [
        "v2",
        "2/3"
    ]
}