get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 34219,
    "url": "http://patches.dpdk.org/api/patches/34219/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1516615450-57525-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": "<1516615450-57525-1-git-send-email-harry.van.haaren@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1516615450-57525-1-git-send-email-harry.van.haaren@intel.com",
    "date": "2018-01-22T10:04:10",
    "name": "[dpdk-dev] event/opdl: rework loops to comply with dpdk style",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "b13b32161aa32d8ea8c2b152a2c875024ea30ca7",
    "submitter": {
        "id": 317,
        "url": "http://patches.dpdk.org/api/people/317/?format=api",
        "name": "Van Haaren, Harry",
        "email": "harry.van.haaren@intel.com"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1516615450-57525-1-git-send-email-harry.van.haaren@intel.com/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/34219/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/34219/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 5B22AA499;\n\tMon, 22 Jan 2018 11:04:23 +0100 (CET)",
            "from mga14.intel.com (mga14.intel.com [192.55.52.115])\n\tby dpdk.org (Postfix) with ESMTP id 6AC00A493\n\tfor <dev@dpdk.org>; Mon, 22 Jan 2018 11:04:21 +0100 (CET)",
            "from orsmga005.jf.intel.com ([10.7.209.41])\n\tby fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t22 Jan 2018 02:04:20 -0800",
            "from silpixa00398672.ir.intel.com ([10.237.223.111])\n\tby orsmga005.jf.intel.com with ESMTP; 22 Jan 2018 02:04:18 -0800"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.46,396,1511856000\"; d=\"scan'208\";a=\"195241998\"",
        "From": "Harry van Haaren <harry.van.haaren@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "Harry van Haaren <harry.van.haaren@intel.com>, liang.j.ma@intel.com,\n\tpeter.mccarthy@intel.com",
        "Date": "Mon, 22 Jan 2018 10:04:10 +0000",
        "Message-Id": "<1516615450-57525-1-git-send-email-harry.van.haaren@intel.com>",
        "X-Mailer": "git-send-email 2.7.4",
        "Subject": "[dpdk-dev] [PATCH] event/opdl: rework loops to comply with dpdk\n\tstyle",
        "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://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://dpdk.org/ml/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 reworks the loop counter variable declarations\nto be in line with the DPDK source code.\n\nFixes: 3c7f3dcfb099 (\"event/opdl: add PMD main body and helper function\")\nFixes: 8ca8e3b48eff (\"event/opdl: add event queue config get/set\")\nFixes: d548ef513cd7 (\"event/opdl: add unit tests\")\n\nCc: liang.j.ma@intel.com\nCc: peter.mccarthy@intel.com\n\nSigned-off-by: Harry van Haaren <harry.van.haaren@intel.com>\n\n---\n\nCompile tested for loop declarations by adding \"-std=gnu90\" to the\nOPDL Makefile CFLAGS variable, which now passes here. Note that DPDK\nas a whole does not compile with gnu90, so don't pass it as EXTRA_CFLAGS\n---\n drivers/event/opdl/Makefile            |  2 --\n drivers/event/opdl/opdl_evdev.c        |  9 +++++----\n drivers/event/opdl/opdl_evdev_init.c   | 23 ++++++++++++++---------\n drivers/event/opdl/opdl_evdev_xstats.c |  9 ++++++---\n drivers/event/opdl/opdl_test.c         |  6 ++++--\n 5 files changed, 29 insertions(+), 20 deletions(-)",
    "diff": "diff --git a/drivers/event/opdl/Makefile b/drivers/event/opdl/Makefile\nindex a8aff2c..747ae5b 100644\n--- a/drivers/event/opdl/Makefile\n+++ b/drivers/event/opdl/Makefile\n@@ -7,8 +7,6 @@ include $(RTE_SDK)/mk/rte.vars.mk\n LIB = librte_pmd_opdl_event.a\n \n # build flags\n-CFLAGS += -std=c99\n-CFLAGS += -D_XOPEN_SOURCE=600\n CFLAGS += -O3\n CFLAGS += $(WERROR_FLAGS)\n # for older GCC versions, allow us to initialize an event using\ndiff --git a/drivers/event/opdl/opdl_evdev.c b/drivers/event/opdl/opdl_evdev.c\nindex dcbf404..d5e2b60 100644\n--- a/drivers/event/opdl/opdl_evdev.c\n+++ b/drivers/event/opdl/opdl_evdev.c\n@@ -288,7 +288,8 @@ opdl_queue_setup(struct rte_eventdev *dev,\n \t\t}\n \t}\n \t/* Check if queue id has been setup already */\n-\tfor (uint32_t i = 0; i < device->nb_q_md; i++) {\n+\tuint32_t i;\n+\tfor (i = 0; i < device->nb_q_md; i++) {\n \t\tif (device->q_md[i].ext_id == queue_id) {\n \t\t\tPMD_DRV_LOG(ERR, \"DEV_ID:[%02d] : \"\n \t\t\t\t     \"queue id %u already setup\\n\",\n@@ -390,8 +391,8 @@ opdl_dump(struct rte_eventdev *dev, FILE *f)\n \n \tfprintf(f,\n \t\t\"\\n\\n -- RING STATISTICS --\\n\");\n-\n-\tfor (uint32_t i = 0; i < device->nb_opdls; i++)\n+\tuint32_t i;\n+\tfor (i = 0; i < device->nb_opdls; i++)\n \t\topdl_ring_dump(device->opdl[i], f);\n \n \tfprintf(f,\n@@ -400,7 +401,7 @@ opdl_dump(struct rte_eventdev *dev, FILE *f)\n \t\t\"Av. Grant Size     Av. Cycles PP\"\n \t\t\"      Empty DEQs   Non Empty DEQs   Pkts Processed\\n\");\n \n-\tfor (uint32_t i = 0; i < device->max_port_nb; i++) {\n+\tfor (i = 0; i < device->max_port_nb; i++) {\n \t\tchar queue_id[64];\n \t\tchar total_cyc[64];\n \t\tconst char *p_type;\ndiff --git a/drivers/event/opdl/opdl_evdev_init.c b/drivers/event/opdl/opdl_evdev_init.c\nindex c37d8bc..84ab258 100644\n--- a/drivers/event/opdl/opdl_evdev_init.c\n+++ b/drivers/event/opdl/opdl_evdev_init.c\n@@ -314,8 +314,8 @@ static int opdl_add_deps(struct opdl_evdev *device,\n \t\t\t\t\t     \"Stages and dependents\"\n \t\t\t\t\t     \" are not for same opdl ring\",\n \t\t\t\t\t     opdl_pmd_dev_id(device));\n-\t\t\t\tfor (uint32_t k = 0;\n-\t\t\t\t\t\tk < device->nb_opdls; k++) {\n+\t\t\t\tuint32_t k;\n+\t\t\t\tfor (k = 0; k < device->nb_opdls; k++) {\n \t\t\t\t\topdl_ring_dump(device->opdl[k],\n \t\t\t\t\t\t\tstdout);\n \t\t\t\t}\n@@ -505,8 +505,9 @@ void\n destroy_queues_and_rings(struct rte_eventdev *dev)\n {\n \tstruct opdl_evdev *device = opdl_pmd_priv(dev);\n+\tuint32_t i;\n \n-\tfor (uint32_t i = 0; i < device->nb_opdls; i++) {\n+\tfor (i = 0; i < device->nb_opdls; i++) {\n \t\tif (device->opdl[i])\n \t\t\topdl_ring_free(device->opdl[i]);\n \t}\n@@ -639,7 +640,8 @@ create_queues_and_rings(struct rte_eventdev *dev)\n \t\t\t\t OPDL_Q_POS_START,\n \t\t\t\t -1);\n \n-\t\tfor (uint32_t i = 0; i < device->nb_q_md; i++) {\n+\t\tuint32_t i;\n+\t\tfor (i = 0; i < device->nb_q_md; i++) {\n \n \t\t\t/* Check */\n \t\t\tif (!device->q_md[i].setup) {\n@@ -702,7 +704,8 @@ initialise_all_other_ports(struct rte_eventdev *dev)\n \n \tstruct opdl_evdev *device = opdl_pmd_priv(dev);\n \n-\tfor (uint32_t i = 0; i < device->nb_ports; i++) {\n+\tuint32_t i;\n+\tfor (i = 0; i < device->nb_ports; i++) {\n \t\tstruct opdl_port *port = &device->ports[i];\n \t\tstruct opdl_queue *queue = &device->queue[port->queue_id];\n \n@@ -827,7 +830,7 @@ initialise_all_other_ports(struct rte_eventdev *dev)\n \t * setup the last bit of stage md\n \t */\n \tif (!err) {\n-\t\tfor (uint32_t i = 0; i < device->nb_ports; i++) {\n+\t\tfor (i = 0; i < device->nb_ports; i++) {\n \t\t\tstruct opdl_port *port = &device->ports[i];\n \t\t\tstruct opdl_queue *queue =\n \t\t\t\t&device->queue[port->queue_id];\n@@ -872,7 +875,8 @@ initialise_queue_zero_ports(struct rte_eventdev *dev)\n \tstruct opdl_evdev *device = opdl_pmd_priv(dev);\n \n \t/* Assign queue zero and figure out how many Q0 ports we have */\n-\tfor (uint32_t i = 0; i < device->nb_ports; i++) {\n+\tuint32_t i;\n+\tfor (i = 0; i < device->nb_ports; i++) {\n \t\tstruct opdl_port *port = &device->ports[i];\n \t\tif (port->queue_id == OPDL_INVALID_QID) {\n \t\t\tport->queue_id = 0;\n@@ -889,7 +893,7 @@ initialise_queue_zero_ports(struct rte_eventdev *dev)\n \tif (stage_inst) {\n \n \t\t/* Assign the new created input stage to all relevant ports */\n-\t\tfor (uint32_t i = 0; i < device->nb_ports; i++) {\n+\t\tfor (i = 0; i < device->nb_ports; i++) {\n \t\t\tstruct opdl_port *port = &device->ports[i];\n \t\t\tif (port->queue_id == 0) {\n \t\t\t\tqueue = &device->queue[port->queue_id];\n@@ -914,8 +918,9 @@ assign_internal_queue_ids(struct rte_eventdev *dev)\n {\n \tint err = 0;\n \tstruct opdl_evdev *device = opdl_pmd_priv(dev);\n+\tuint32_t i;\n \n-\tfor (uint32_t i = 0; i < device->nb_ports; i++) {\n+\tfor (i = 0; i < device->nb_ports; i++) {\n \t\tstruct opdl_port *port = &device->ports[i];\n \t\tif (port->external_qid != OPDL_INVALID_QID) {\n \t\t\tport->queue_id =\ndiff --git a/drivers/event/opdl/opdl_evdev_xstats.c b/drivers/event/opdl/opdl_evdev_xstats.c\nindex 94dfeee..70b84d9 100644\n--- a/drivers/event/opdl/opdl_evdev_xstats.c\n+++ b/drivers/event/opdl/opdl_evdev_xstats.c\n@@ -86,7 +86,8 @@ opdl_xstats_get_names(const struct rte_eventdev *dev,\n \n \tuint32_t port_idx = queue_port_id * max_num_port_xstat;\n \n-\tfor (uint32_t j = 0; j < max_num_port_xstat; j++) {\n+\tuint32_t j;\n+\tfor (j = 0; j < max_num_port_xstat; j++) {\n \n \t\tstrcpy(xstats_names[j].name,\n \t\t\t\tdevice->port_xstat[j + port_idx].stat.name);\n@@ -121,7 +122,8 @@ opdl_xstats_get(const struct rte_eventdev *dev,\n \tuint32_t p_start = queue_port_id * max_num_port_xstat;\n \tuint32_t p_finish = p_start + max_num_port_xstat;\n \n-\tfor (uint32_t i = 0; i < n; i++) {\n+\tuint32_t i;\n+\tfor (i = 0; i < n; i++) {\n \t\tif (ids[i] < p_start || ids[i] >= p_finish)\n \t\t\treturn -EINVAL;\n \n@@ -142,7 +144,8 @@ opdl_xstats_get_by_name(const struct rte_eventdev *dev,\n \n \tuint32_t max_index = device->max_port_nb * max_num_port_xstat;\n \n-\tfor (uint32_t i = 0; i < max_index; i++) {\n+\tuint32_t i;\n+\tfor (i = 0; i < max_index; i++) {\n \n \t\tif (strncmp(name,\n \t\t\t   device->port_xstat[i].stat.name,\ndiff --git a/drivers/event/opdl/opdl_test.c b/drivers/event/opdl/opdl_test.c\nindex 44a5cc5..13d4f6b 100644\n--- a/drivers/event/opdl/opdl_test.c\n+++ b/drivers/event/opdl/opdl_test.c\n@@ -433,7 +433,8 @@ atomic_basic(struct test *t)\n \t\t\t\treturn -1;\n \t\t\t}\n \n-\t\t\tfor (int j = 0; j < 3; j++) {\n+\t\t\tint j;\n+\t\t\tfor (j = 0; j < 3; j++) {\n \t\t\t\tdeq_ev[j].op = RTE_EVENT_OP_FORWARD;\n \t\t\t\tdeq_ev[j].queue_id = t->qid[1];\n \t\t\t}\n@@ -495,8 +496,9 @@ static int\n check_statistics(void)\n {\n \tint num_ports = 3; /* Hard-coded for this app */\n+\tint i;\n \n-\tfor (int i = 0; i < num_ports; i++) {\n+\tfor (i = 0; i < num_ports; i++) {\n \t\tint num_stats, num_stats_returned;\n \n \t\tnum_stats = rte_event_dev_xstats_names_get(0,\n",
    "prefixes": [
        "dpdk-dev"
    ]
}