get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 54252,
    "url": "http://patches.dpdk.org/api/patches/54252/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1559583160-13944-29-git-send-email-anoobj@marvell.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": "<1559583160-13944-29-git-send-email-anoobj@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1559583160-13944-29-git-send-email-anoobj@marvell.com",
    "date": "2019-06-03T17:32:28",
    "name": "[28/39] eventdev: add default conf for event port-lcore link",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "c4fccffac9dcd5f529fc05a0c1161a40fd3b9636",
    "submitter": {
        "id": 1205,
        "url": "http://patches.dpdk.org/api/people/1205/?format=api",
        "name": "Anoob Joseph",
        "email": "anoobj@marvell.com"
    },
    "delegate": {
        "id": 310,
        "url": "http://patches.dpdk.org/api/users/310/?format=api",
        "username": "jerin",
        "first_name": "Jerin",
        "last_name": "Jacob",
        "email": "jerinj@marvell.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1559583160-13944-29-git-send-email-anoobj@marvell.com/mbox/",
    "series": [
        {
            "id": 4868,
            "url": "http://patches.dpdk.org/api/series/4868/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=4868",
            "date": "2019-06-03T17:32:00",
            "name": "adding eventmode helper library",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/4868/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/54252/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/54252/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 409F01BBD7;\n\tMon,  3 Jun 2019 19:36:20 +0200 (CEST)",
            "from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com\n\t[67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 434841BB3D\n\tfor <dev@dpdk.org>; Mon,  3 Jun 2019 19:36:10 +0200 (CEST)",
            "from pps.filterd (m0045849.ppops.net [127.0.0.1])\n\tby mx0a-0016f401.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id\n\tx53HKsuS000981; Mon, 3 Jun 2019 10:36:09 -0700",
            "from sc-exch04.marvell.com ([199.233.58.184])\n\tby mx0a-0016f401.pphosted.com with ESMTP id 2sw2wmhdpd-1\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); \n\tMon, 03 Jun 2019 10:36:09 -0700",
            "from SC-EXCH03.marvell.com (10.93.176.83) by SC-EXCH04.marvell.com\n\t(10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1367.3;\n\tMon, 3 Jun 2019 10:36:08 -0700",
            "from maili.marvell.com (10.93.176.43) by SC-EXCH03.marvell.com\n\t(10.93.176.83) with Microsoft SMTP Server id 15.0.1367.3 via Frontend\n\tTransport; Mon, 3 Jun 2019 10:36:08 -0700",
            "from ajoseph83.caveonetworks.com.com (unknown [10.29.45.56])\n\tby maili.marvell.com (Postfix) with ESMTP id E4F483F7041;\n\tMon,  3 Jun 2019 10:36:03 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com;\n\th=from : to : cc :\n\tsubject : date : message-id : in-reply-to : references : mime-version\n\t: content-transfer-encoding : content-type; s=pfpt0818;\n\tbh=qOmuy5F05mMO5t+x4yP2K2NCT5WjJy1A/47KvaYZsRU=;\n\tb=RsItaj/y3d9GrXE396mSasi+LU4334RTQ+TbLXblNrFhELYsR77IG/C4gpS7yYjNt7Dr\n\tfd5Ppusa+L1CA8PDCoqdqjtQrne0Ggh5foZc4lgBLPXHzQCKrQqRDLarQ/WaD+053k/d\n\tR/w+vgHT0VF1Xa4Vdo6cDFeAFaEA7bePGGpwYou4wERaBjONnIV/Eq+abyx5pyXj9V16\n\tYc4ZNgfQXWRo1UZhXSggt0BuvXJq5z4P2GOZL3K4iVw546xpnzfM/vPc4q7oMgCbsEYt\n\tiF8F2CAVtCyD8AjDREx4uE6dT1CKbQ24HEQKzGJtpB6+g+/h8T76vt85TGl1r0FNH4G/\n\tGQ== ",
        "From": "Anoob Joseph <anoobj@marvell.com>",
        "To": "Jerin Jacob <jerinj@marvell.com>, Nikhil Rao <nikhil.rao@intel.com>,\n\t\"Erik Gabriel Carrillo\" <erik.g.carrillo@intel.com>, Abhinandan Gujjar\n\t<abhinandan.gujjar@intel.com>,\n\tBruce Richardson <bruce.richardson@intel.com>,\n\tPablo de Lara <pablo.de.lara.guarch@intel.com>",
        "CC": "Anoob Joseph <anoobj@marvell.com>, Narayana Prasad <pathreya@marvell.com>,\n\t<dev@dpdk.org>, Lukasz Bartosik <lbartosik@marvell.com>, Pavan Nikhilesh\n\t<pbhagavatula@marvell.com>, Hemant Agrawal <hemant.agrawal@nxp.com>,\n\t\"Nipun  Gupta\" <nipun.gupta@nxp.com>, Harry van Haaren\n\t<harry.van.haaren@intel.com>, =?utf-8?q?Mattias_R=C3=B6nnblom?=\n\t<mattias.ronnblom@ericsson.com>,  Liang Ma <liang.j.ma@intel.com>",
        "Date": "Mon, 3 Jun 2019 23:02:28 +0530",
        "Message-ID": "<1559583160-13944-29-git-send-email-anoobj@marvell.com>",
        "X-Mailer": "git-send-email 2.7.4",
        "In-Reply-To": "<1559583160-13944-1-git-send-email-anoobj@marvell.com>",
        "References": "<1559583160-13944-1-git-send-email-anoobj@marvell.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Proofpoint-Virus-Version": "vendor=fsecure engine=2.50.10434:, ,\n\tdefinitions=2019-06-03_13:, , signatures=0",
        "Subject": "[dpdk-dev] [PATCH 28/39] eventdev: add default conf for event\n\tport-lcore link",
        "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": "Generate a default conf for event port-lcore link, if not specified in\nthe conf. This routine will check the number of available ports and then\ncreate links according to the number of cores available.\n\nThis patch also adds a new entry in the eventmode conf to denote that\nall queues is to be linked with every port. This enables one core to\nreceive packets from every port.\n\nSigned-off-by: Anoob Joseph <anoobj@marvell.com>\nSigned-off-by: Lukasz Bartosik <lbartosik@marvell.com>\n---\n lib/librte_eventdev/rte_eventmode_helper.c         | 109 ++++++++++++++++++++-\n .../rte_eventmode_helper_internal.h                |   5 +\n 2 files changed, 113 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/lib/librte_eventdev/rte_eventmode_helper.c b/lib/librte_eventdev/rte_eventmode_helper.c\nindex a24d654..191eb77 100644\n--- a/lib/librte_eventdev/rte_eventmode_helper.c\n+++ b/lib/librte_eventdev/rte_eventmode_helper.c\n@@ -70,6 +70,28 @@ internal_get_next_rx_core(struct eventmode_conf *em_conf,\n \treturn next_core;\n }\n \n+static inline unsigned int\n+internal_get_next_active_core(struct eventmode_conf *em_conf,\n+\t\tunsigned int prev_core)\n+{\n+\tunsigned int next_core;\n+\n+get_next_core:\n+\t/* Get the next core */\n+\tnext_core = rte_get_next_lcore(prev_core, 0, 0);\n+\n+\t/* Check if we have reached max lcores */\n+\tif (next_core == RTE_MAX_LCORE)\n+\t\treturn next_core;\n+\n+\t/* Some cores would be reserved as rx cores. Skip them */\n+\tif (em_conf->eth_core_mask & (1 << next_core)) {\n+\t\tprev_core = next_core;\n+\t\tgoto get_next_core;\n+\t}\n+\n+\treturn next_core;\n+}\n \n /* Global functions */\n \n@@ -350,6 +372,74 @@ rte_eventmode_helper_set_default_conf_rx_adapter(struct eventmode_conf *em_conf)\n }\n \n static int\n+rte_eventmode_helper_set_default_conf_link(struct eventmode_conf *em_conf)\n+{\n+\tint i, j;\n+\tstruct eventdev_params *eventdev_config;\n+\tunsigned int lcore_id = -1;\n+\tint link_index;\n+\tstruct rte_eventmode_helper_event_link_info *link;\n+\n+\t/*\n+\t * Create a 1:1 mapping from event ports to cores. If the number\n+\t * of event ports is lesser than the cores, some cores won't\n+\t * execute worker. If event ports are more, then some ports won't\n+\t * be used.\n+\t *\n+\t */\n+\n+\t/*\n+\t * The event queue-port mapping is done according to the link. Since\n+\t * we are falling back to the default link conf, enabling\n+\t * \"all_ev_queue_to_ev_port\" mode flag. This will map all queues to the\n+\t * port.\n+\t */\n+\tem_conf->ext_params.all_ev_queue_to_ev_port = 1;\n+\n+\tfor (i = 0; i < em_conf->nb_eventdev; i++) {\n+\n+\t\t/* Get event dev conf */\n+\t\teventdev_config = &(em_conf->eventdev_config[i]);\n+\n+\t\t/* Loop through the ports */\n+\t\tfor (j = 0; j < eventdev_config->nb_eventport; j++) {\n+\n+\t\t\t/* Get next active core id */\n+\t\t\tlcore_id = internal_get_next_active_core(em_conf,\n+\t\t\t\t\tlcore_id);\n+\n+\t\t\tif (lcore_id == RTE_MAX_LCORE) {\n+\t\t\t\t/* Reached max cores */\n+\t\t\t\treturn 0;\n+\t\t\t}\n+\n+\t\t\t/* Save the current combination as one link */\n+\n+\t\t\t/* Get the index */\n+\t\t\tlink_index = em_conf->nb_link;\n+\n+\t\t\t/* Get the corresponding link */\n+\t\t\tlink = &(em_conf->link[link_index]);\n+\n+\t\t\t/* Save link */\n+\t\t\tlink->eventdev_id = eventdev_config->eventdev_id;\n+\t\t\tlink->event_portid = j;\n+\t\t\tlink->lcore_id = lcore_id;\n+\n+\t\t\t/*\n+\t\t\t * Not setting eventq_id as by default all queues\n+\t\t\t * need to be mapped to the port, and is controlled\n+\t\t\t * by the operating mode.\n+\t\t\t */\n+\n+\t\t\t/* Update number of links */\n+\t\t\tem_conf->nb_link++;\n+\t\t}\n+\t}\n+\treturn 0;\n+}\n+\n+static int\n rte_eventmode_helper_validate_conf(struct eventmode_conf *em_conf)\n {\n \tint ret;\n@@ -379,6 +469,16 @@ rte_eventmode_helper_validate_conf(struct eventmode_conf *em_conf)\n \t\t\treturn ret;\n \t}\n \n+\t/*\n+\t * See if links are specified. Else generate a default conf for\n+\t * the event ports used.\n+\t */\n+\tif (em_conf->nb_link == 0) {\n+\t\tret = rte_eventmode_helper_set_default_conf_link(em_conf);\n+\t\tif (ret != 0)\n+\t\t\treturn ret;\n+\t}\n+\n \treturn 0;\n }\n \n@@ -508,7 +608,14 @@ rte_eventmode_helper_initialize_eventdev(struct eventmode_conf *em_conf)\n \t\t/* Get event dev ID */\n \t\teventdev_id = link->eventdev_id;\n \n-\t\tqueue = &(link->eventq_id);\n+\t\t/*\n+\t\t * If \"all_ev_queue_to_ev_port\" params flag is selected, all\n+\t\t * queues need to be mapped to the port.\n+\t\t */\n+\t\tif (em_conf->ext_params.all_ev_queue_to_ev_port)\n+\t\t\tqueue = NULL;\n+\t\telse\n+\t\t\tqueue = &(link->eventq_id);\n \n \t\t/* Link queue to port */\n \t\tret = rte_event_port_link(eventdev_id, link->event_portid,\ndiff --git a/lib/librte_eventdev/rte_eventmode_helper_internal.h b/lib/librte_eventdev/rte_eventmode_helper_internal.h\nindex 7cc5776..499cf5d 100644\n--- a/lib/librte_eventdev/rte_eventmode_helper_internal.h\n+++ b/lib/librte_eventdev/rte_eventmode_helper_internal.h\n@@ -96,6 +96,11 @@ struct eventmode_conf {\n \t\tstruct {\n \t\t\tuint64_t sched_type\t\t\t: 2;\n \t\t/**< Schedule type */\n+\t\t\tuint64_t all_ev_queue_to_ev_port\t: 1;\n+\t\t/**<\n+\t\t * When enabled, all event queues need to be mapped to\n+\t\t * each event port\n+\t\t */\n \t\t};\n \t\tuint64_t u64;\n \t} ext_params;\n",
    "prefixes": [
        "28/39"
    ]
}