Show a patch.

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

{
    "id": 43873,
    "url": "http://patches.dpdk.org/api/patches/43873/",
    "web_url": "http://patches.dpdk.org/patch/43873/",
    "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-3-git-send-email-tdu@semihalf.com>",
    "date": "2018-08-24T14:54:50",
    "name": "[v2,2/6] net/mvpp2: use common code to initialize DMA",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "725cd026c8456624985e24815733db9328d1c2b5",
    "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/43873/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/43873/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/43873/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 649D45F38;\n\tFri, 24 Aug 2018 16:55:08 +0200 (CEST)",
            "from mail-lf1-f67.google.com (mail-lf1-f67.google.com\n\t[209.85.167.67]) by dpdk.org (Postfix) with ESMTP id 523CC5F2B\n\tfor <dev@dpdk.org>; Fri, 24 Aug 2018 16:55:05 +0200 (CEST)",
            "by mail-lf1-f67.google.com with SMTP id c21-v6so6907758lfh.3\n\tfor <dev@dpdk.org>; Fri, 24 Aug 2018 07:55:05 -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.03\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tFri, 24 Aug 2018 07:55:03 -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": "ANB0VdaWidmZPQ/03Bew8onYux6Ovq+IueKEfqf/D++X0UGMb9F5++iyc5EFgnE9WaTHGo93YjNRYQ==",
        "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=Rr8XQqSaj7UoEbdE2DpmaUy19I2laBmqxUZ2ot/DQ98=;\n\tb=ivREtC8tIL7VDTy/jJ+QSDntraImm6cgiFHcQk7XVgI5yY3xnJ0N62X7r1p0dYSHLP\n\tZIni+Wb8kgFmql68mPfNVrNpYQPWYfKzSi+czt3SsXmmxu4yeewfBc33vAYboJWxLBx+\n\tN1KElnEUszcztYltysv1B7Zpf08S1jtWOTa45JIRTeqkUJJXv5XChuBPSBxM+T50T/X0\n\tSPXyi/hC65zNa+GqNjAGaNeTwT1kqc/17u2YVgEsCu0tOwfgsRRpk/tTOpE1NxVj5Q+t\n\t8kCgpXkij6Caq7tA3mtxeecT6XLtLavhQb6fZKvxOSqbKP00bqy//o2cgjd/aRV5zFzZ\n\tP88Q==",
        "X-BeenThere": "dev@dpdk.org",
        "X-Received": "by 2002:a19:9710:: with SMTP id\n\tz16-v6mr1677431lfd.17.1535122504824; \n\tFri, 24 Aug 2018 07:55:04 -0700 (PDT)",
        "Message-Id": "<1535122494-30249-3-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=Rr8XQqSaj7UoEbdE2DpmaUy19I2laBmqxUZ2ot/DQ98=;\n\tb=eHUZdVuDQgB+BTQRJZMph2B/lDFVUrWj+ShcKTyFZAUWrpPcAqxJfz02vPEZBnpb4u\n\toVPTbLwxNwyqwBknsLdPxM4vj3bcixTs0sfHqZhmefQSrddBQPhRuV6iiycWRwaeZvud\n\tWvKaHEGxoptOC15ZdRK3VnL6HCmSJATSeGzZM9pDCV/kZk3K3DxXLteWDcmAKC1OFlJY\n\tp8v/8Q6I8x4LUG7XzdF8F70SOK8PeiP4JAm3F86IG/MW13iXIUBl9GwgRxs1qXsrtQON\n\tHdeoJcwiHYyFtMECxyadBrX+cIaY2DdS5hYReTRyiXaprWXdJ4crRx3dXNGNGyB8d9jQ\n\tNj5g==",
        "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:50 +0200",
        "X-Gm-Message-State": "APzg51C+56JAg498IyJWAgWCwuW60Es54wJjvKpsfqgid+Oyj+NoWNcn\n\tvzOZ/hIiP0Gcp9M1/p6kV9Cq+amiI28=",
        "Cc": "nsamsono@marvell.com, mw@semihalf.com, Liron Himi <lironh@marvell.com>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "Subject": "[dpdk-dev] [PATCH v2 2/6] net/mvpp2: use common code to initialize\n\tDMA"
    },
    "content": "From: Liron Himi <lironh@marvell.com>\n\nUse common code to initialize MUSDK DMA memory buffers.\n\nSigned-off-by: Liron Himi <lironh@marvell.com>\nReviewed-by: Natalie Samsonov <nsamsono@marvell.com>\n---\n drivers/net/mvpp2/Makefile      |  3 ++-\n drivers/net/mvpp2/meson.build   |  2 +-\n drivers/net/mvpp2/mrvl_ethdev.c | 36 +++++++++++++-----------------------\n 3 files changed, 16 insertions(+), 25 deletions(-)",
    "diff": "diff --git a/drivers/net/mvpp2/Makefile b/drivers/net/mvpp2/Makefile\nindex 492aef9..211d398 100644\n--- a/drivers/net/mvpp2/Makefile\n+++ b/drivers/net/mvpp2/Makefile\n@@ -23,6 +23,7 @@ LIBABIVER := 1\n EXPORT_MAP := rte_pmd_mvpp2_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@@ -32,7 +33,7 @@ LDLIBS += -L$(LIBMUSDK_PATH)/lib\n LDLIBS += -lmusdk\n LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring\n LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs -lrte_cfgfile\n-LDLIBS += -lrte_bus_vdev\n+LDLIBS += -lrte_bus_vdev -lrte_common_mvep\n \n # library source files\n SRCS-$(CONFIG_RTE_LIBRTE_MVPP2_PMD) += mrvl_ethdev.c\ndiff --git a/drivers/net/mvpp2/meson.build b/drivers/net/mvpp2/meson.build\nindex e139889..3620659 100644\n--- a/drivers/net/mvpp2/meson.build\n+++ b/drivers/net/mvpp2/meson.build\n@@ -22,4 +22,4 @@ sources = files(\n \t'mrvl_qos.c'\n )\n \n-deps += ['cfgfile']\n+deps += ['cfgfile', 'common_mvep']\ndiff --git a/drivers/net/mvpp2/mrvl_ethdev.c b/drivers/net/mvpp2/mrvl_ethdev.c\nindex a2d0576..7ea8946 100644\n--- a/drivers/net/mvpp2/mrvl_ethdev.c\n+++ b/drivers/net/mvpp2/mrvl_ethdev.c\n@@ -29,6 +29,7 @@\n #include <sys/stat.h>\n #include <sys/types.h>\n \n+#include <rte_mvep_common.h>\n #include \"mrvl_ethdev.h\"\n #include \"mrvl_qos.h\"\n \n@@ -63,9 +64,6 @@\n #define MRVL_COOKIE_HIGH_ADDR_SHIFT\t(sizeof(pp2_cookie_t) * 8)\n #define MRVL_COOKIE_HIGH_ADDR_MASK\t(~0ULL << MRVL_COOKIE_HIGH_ADDR_SHIFT)\n \n-/* Memory size (in bytes) for MUSDK dma buffers */\n-#define MRVL_MUSDK_DMA_MEMSIZE 41943040\n-\n /** Port Rx offload capabilities */\n #define MRVL_RX_OFFLOADS (DEV_RX_OFFLOAD_VLAN_FILTER | \\\n \t\t\t  DEV_RX_OFFLOAD_JUMBO_FRAME | \\\n@@ -2653,24 +2651,17 @@ rte_pmd_mrvl_probe(struct rte_vdev_device *vdev)\n \tif (mrvl_dev_num)\n \t\tgoto init_devices;\n \n-\tMRVL_LOG(INFO, \"Perform MUSDK initializations\");\n-\t/*\n-\t * ret == -EEXIST is correct, it means DMA\n-\t * has been already initialized (by another PMD).\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\tgoto out_free_kvlist;\n-\t\telse\n-\t\t\tMRVL_LOG(INFO,\n-\t\t\t\t\"DMA memory has been already initialized by a different driver.\");\n-\t}\n+\tMRVL_LOG(INFO, \"Perform MUSDK initializations\\n\");\n+\n+\tret = rte_mvep_init(MVEP_MOD_T_PP2, kvlist);\n+\tif (ret)\n+\t\tgoto out_free_kvlist;\n \n \tret = mrvl_init_pp2();\n \tif (ret) {\n-\t\tMRVL_LOG(ERR, \"Failed to init PP!\");\n-\t\tgoto out_deinit_dma;\n+\t\tMRVL_LOG(ERR, \"Failed to init PP!\\n\");\n+\t\trte_mvep_deinit(MVEP_MOD_T_PP2);\n+\t\tgoto out_free_kvlist;\n \t}\n \n \tmemset(mrvl_port_bpool_size, 0, sizeof(mrvl_port_bpool_size));\n@@ -2695,11 +2686,10 @@ rte_pmd_mrvl_probe(struct rte_vdev_device *vdev)\n \tfor (; i > 0; i--)\n \t\tmrvl_eth_dev_destroy(ifnames.names[i]);\n \n-\tif (mrvl_dev_num == 0)\n+\tif (mrvl_dev_num == 0) {\n \t\tmrvl_deinit_pp2();\n-out_deinit_dma:\n-\tif (mrvl_dev_num == 0)\n-\t\tmv_sys_dma_mem_destroy();\n+\t\trte_mvep_deinit(MVEP_MOD_T_PP2);\n+\t}\n out_free_kvlist:\n \trte_kvargs_free(kvlist);\n \n@@ -2739,7 +2729,7 @@ rte_pmd_mrvl_remove(struct rte_vdev_device *vdev)\n \t\tMRVL_LOG(INFO, \"Perform MUSDK deinit\");\n \t\tmrvl_deinit_hifs();\n \t\tmrvl_deinit_pp2();\n-\t\tmv_sys_dma_mem_destroy();\n+\t\trte_mvep_deinit(MVEP_MOD_T_PP2);\n \t}\n \n \treturn 0;\n",
    "prefixes": [
        "v2",
        "2/6"
    ]
}