get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 43080,
    "url": "http://patches.dpdk.org/api/patches/43080/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1531502739-121073-1-git-send-email-harry.van.haaren@intel.com/",
    "project": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/projects/1/?format=api",
        "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",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<1531502739-121073-1-git-send-email-harry.van.haaren@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1531502739-121073-1-git-send-email-harry.van.haaren@intel.com",
    "date": "2018-07-13T17:25:39",
    "name": "[v3] eal/service: improve error checking of coremasks",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "427e81ac3e4356c0c2cad28903674f83516c05cd",
    "submitter": {
        "id": 317,
        "url": "http://patches.dpdk.org/api/people/317/?format=api",
        "name": "Van Haaren, Harry",
        "email": "harry.van.haaren@intel.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1531502739-121073-1-git-send-email-harry.van.haaren@intel.com/mbox/",
    "series": [
        {
            "id": 578,
            "url": "http://patches.dpdk.org/api/series/578/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=578",
            "date": "2018-07-13T17:25:39",
            "name": "[v3] eal/service: improve error checking of coremasks",
            "version": 3,
            "mbox": "http://patches.dpdk.org/series/578/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/43080/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/43080/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 038B210B7;\n\tFri, 13 Jul 2018 19:25:49 +0200 (CEST)",
            "from mga14.intel.com (mga14.intel.com [192.55.52.115])\n\tby dpdk.org (Postfix) with ESMTP id 14E7E374\n\tfor <dev@dpdk.org>; Fri, 13 Jul 2018 19:25:46 +0200 (CEST)",
            "from orsmga007.jf.intel.com ([10.7.209.58])\n\tby fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t13 Jul 2018 10:25:46 -0700",
            "from silpixa00399779.ir.intel.com ([10.237.223.187])\n\tby orsmga007.jf.intel.com with ESMTP; 13 Jul 2018 10:25:44 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.51,348,1526367600\"; d=\"scan'208\";a=\"56320222\"",
        "From": "Harry van Haaren <harry.van.haaren@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "Harry van Haaren <harry.van.haaren@intel.com>, thomas@monjalon.net,\n\tvipin.varghese@intel.com",
        "Date": "Fri, 13 Jul 2018 18:25:39 +0100",
        "Message-Id": "<1531502739-121073-1-git-send-email-harry.van.haaren@intel.com>",
        "X-Mailer": "git-send-email 2.7.4",
        "In-Reply-To": "<1526399782-156061-1-git-send-email-harry.van.haaren@intel.com>",
        "References": "<1526399782-156061-1-git-send-email-harry.van.haaren@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v3] eal/service: improve error checking of\n\tcoremasks",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "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>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@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>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "This commit improves the error checking performed on the\ncore masks (or lists) of the service cores, in particular\nwith respect to the data-plane (RTE) cores of DPDK.\n\nWith this commit, invalid configurations are detected at\nruntime, and warning messages are printed to inform the user.\n\nFor example specifying the coremask as 0xf, and the service\ncoremask as 0xff00 is invalid as not all service-cores are\ncontained within the coremask. A warning is now printed to\ninform the user.\n\nReported-by: Vipin Varghese <vipin.varghese@intel.com>\nSigned-off-by: Harry van Haaren <harry.van.haaren@intel.com>\n\n---\n\nv3:\n- Use WARNING instead of ERR log level (Vipin)\n- Put strings on one line for grep-ability (Harry)\n\n\nv2, thanks for review:\n- Consistency in message endings - vs . (Thomas)\n- Wrap lines as they're very long otherwise (Thomas)\n\nCc: thomas@monjalon.net\nCc: vipin.varghese@intel.com\n\n@Thomas, RC2 is also OK for this patch in my opinion\n---\n lib/librte_eal/common/eal_common_options.c | 39 ++++++++++++++++++++++++++++++\n 1 file changed, 39 insertions(+)",
    "diff": "diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c\nindex 80f11d0..bee0f2d 100644\n--- a/lib/librte_eal/common/eal_common_options.c\n+++ b/lib/librte_eal/common/eal_common_options.c\n@@ -321,6 +321,7 @@ eal_parse_service_coremask(const char *coremask)\n \tunsigned int count = 0;\n \tchar c;\n \tint val;\n+\tuint32_t taken_lcore_count = 0;\n \n \tif (coremask == NULL)\n \t\treturn -1;\n@@ -364,6 +365,10 @@ eal_parse_service_coremask(const char *coremask)\n \t\t\t\t\t\t\"lcore %u unavailable\\n\", idx);\n \t\t\t\t\treturn -1;\n \t\t\t\t}\n+\n+\t\t\t\tif (cfg->lcore_role[idx] == ROLE_RTE)\n+\t\t\t\t\ttaken_lcore_count++;\n+\n \t\t\t\tlcore_config[idx].core_role = ROLE_SERVICE;\n \t\t\t\tcount++;\n \t\t\t}\n@@ -380,11 +385,27 @@ eal_parse_service_coremask(const char *coremask)\n \tif (count == 0)\n \t\treturn -1;\n \n+\tif (core_parsed && taken_lcore_count != count) {\n+\t\tRTE_LOG(WARNING, EAL,\n+\t\t\t\"Not all service cores are in the coremask. Please ensure -c or -l includes service cores\\n\");\n+\t}\n+\n \tcfg->service_lcore_count = count;\n \treturn 0;\n }\n \n static int\n+eal_service_cores_parsed(void)\n+{\n+\tint idx;\n+\tfor (idx = 0; idx < RTE_MAX_LCORE; idx++) {\n+\t\tif (lcore_config[idx].core_role == ROLE_SERVICE)\n+\t\t\treturn 1;\n+\t}\n+\treturn 0;\n+}\n+\n+static int\n eal_parse_coremask(const char *coremask)\n {\n \tstruct rte_config *cfg = rte_eal_get_configuration();\n@@ -393,6 +414,10 @@ eal_parse_coremask(const char *coremask)\n \tchar c;\n \tint val;\n \n+\tif (eal_service_cores_parsed())\n+\t\tRTE_LOG(WARNING, EAL,\n+\t\t\t\"Service cores parsed before dataplane cores Please ensure -c is before -s or -S.\\n\");\n+\n \tif (coremask == NULL)\n \t\treturn -1;\n \t/* Remove all blank characters ahead and after .\n@@ -424,6 +449,7 @@ eal_parse_coremask(const char *coremask)\n \t\t\t\t\t        \"unavailable\\n\", idx);\n \t\t\t\t\treturn -1;\n \t\t\t\t}\n+\n \t\t\t\tcfg->lcore_role[idx] = ROLE_RTE;\n \t\t\t\tlcore_config[idx].core_index = count;\n \t\t\t\tcount++;\n@@ -455,6 +481,7 @@ eal_parse_service_corelist(const char *corelist)\n \tunsigned count = 0;\n \tchar *end = NULL;\n \tint min, max;\n+\tuint32_t taken_lcore_count = 0;\n \n \tif (corelist == NULL)\n \t\treturn -1;\n@@ -496,6 +523,9 @@ eal_parse_service_corelist(const char *corelist)\n \t\t\t\t\t\t\tidx);\n \t\t\t\t\t\treturn -1;\n \t\t\t\t\t}\n+\t\t\t\t\tif (cfg->lcore_role[idx] == ROLE_RTE)\n+\t\t\t\t\t\ttaken_lcore_count++;\n+\n \t\t\t\t\tlcore_config[idx].core_role =\n \t\t\t\t\t\t\tROLE_SERVICE;\n \t\t\t\t\tcount++;\n@@ -510,6 +540,11 @@ eal_parse_service_corelist(const char *corelist)\n \tif (count == 0)\n \t\treturn -1;\n \n+\tif (core_parsed && taken_lcore_count != count) {\n+\t\tRTE_LOG(WARNING, EAL,\n+\t\t\t\"not all service cores were in the coremask. Please ensure -c or -l includes service cores\\n\");\n+\t}\n+\n \treturn 0;\n }\n \n@@ -522,6 +557,10 @@ eal_parse_corelist(const char *corelist)\n \tchar *end = NULL;\n \tint min, max;\n \n+\tif (eal_service_cores_parsed())\n+\t\tRTE_LOG(WARNING, EAL,\n+\t\t\t\"Service cores parsed before dataplane cores. Please ensure -l is before -s or -S.\\n\");\n+\n \tif (corelist == NULL)\n \t\treturn -1;\n \n",
    "prefixes": [
        "v3"
    ]
}