Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/98959/?format=api
http://patchwork.dpdk.org/api/patches/98959/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20210915214052.143098-5-dmitry.kozliuk@gmail.com/", "project": { "id": 1, "url": "http://patchwork.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": "<20210915214052.143098-5-dmitry.kozliuk@gmail.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20210915214052.143098-5-dmitry.kozliuk@gmail.com", "date": "2021-09-15T21:40:51", "name": "[4/5] ring: rename local variables for Windows compatibility", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "1c8a201b5f7ec80719b2dcd503249aba16b16ef6", "submitter": { "id": 1581, "url": "http://patchwork.dpdk.org/api/people/1581/?format=api", "name": "Dmitry Kozlyuk", "email": "dmitry.kozliuk@gmail.com" }, "delegate": { "id": 1, "url": "http://patchwork.dpdk.org/api/users/1/?format=api", "username": "tmonjalo", "first_name": "Thomas", "last_name": "Monjalon", "email": "thomas@monjalon.net" }, "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20210915214052.143098-5-dmitry.kozliuk@gmail.com/mbox/", "series": [ { "id": 18953, "url": "http://patchwork.dpdk.org/api/series/18953/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=18953", "date": "2021-09-15T21:40:47", "name": "lib: Windows compatibility renaming", "version": 1, "mbox": "http://patchwork.dpdk.org/series/18953/mbox/" } ], "comments": "http://patchwork.dpdk.org/api/patches/98959/comments/", "check": "success", "checks": "http://patchwork.dpdk.org/api/patches/98959/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id D246DA0C41;\n\tWed, 15 Sep 2021 23:41:29 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id D9E9F410E7;\n\tWed, 15 Sep 2021 23:41:08 +0200 (CEST)", "from mail-lf1-f54.google.com (mail-lf1-f54.google.com\n [209.85.167.54]) by mails.dpdk.org (Postfix) with ESMTP id 13B4E41109\n for <dev@dpdk.org>; Wed, 15 Sep 2021 23:41:07 +0200 (CEST)", "by mail-lf1-f54.google.com with SMTP id y28so10088977lfb.0\n for <dev@dpdk.org>; Wed, 15 Sep 2021 14:41:07 -0700 (PDT)", "from sovereign.. (broadband-37-110-65-23.ip.moscow.rt.ru.\n [37.110.65.23])\n by smtp.gmail.com with ESMTPSA id o4sm85989lfi.16.2021.09.15.14.41.03\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Wed, 15 Sep 2021 14:41:04 -0700 (PDT)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;\n h=from:to:cc:subject:date:message-id:in-reply-to:references\n :mime-version:content-transfer-encoding;\n bh=qQ68Ik6DTrBmJa8/GbTD2ABGc9AIBAKgl+SNiDC/JDY=;\n b=SlPsz159D49XvhYU0EtJXdcdXPoJTD7TLuFtGodfmDoabwGBvtUpOjzh1BFt+Yx5wg\n AxyyAn1wRPT1RQcgth+Hf8SzUT5K5qtwNORQ3ejiKre5LsZTKuRWeN9k7Pzh6hzNRzEs\n 9BYgHVxV0ERsrdB5R36to6iNonJbflYJR7PgqL+zaLEelfjJt1ZrLyQKfuzDs9HGRukB\n eFSkFA6TAxunRDoXoBjkpf22b6ojI8kZ2Bk2/MXq8CIDUkzEG0zmHhxHLmGa2X+cjIs6\n XvtmYfRPd+mBHQTjnILAhELisrTwgqBf2aQrRGpSGtbGeYuKxKjukR8w13Rmq3e3sDXR\n 56Mw==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20210112;\n h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n :references:mime-version:content-transfer-encoding;\n bh=qQ68Ik6DTrBmJa8/GbTD2ABGc9AIBAKgl+SNiDC/JDY=;\n b=YotK5X7QBX721zI7Px9JvthbQPpMVTfUDNWN+rwdsmniCTGNSF6E31rOl95E3OPd6I\n LgsaA0RVxEV/29junh27Z7gNhNElZz/cTs5htLz6BrcWgU+5rJceh70z97t3lRoIPqoy\n +clRvJN7DHidf+PGme6EZokH3FX4h+0qxusqAlNL2wuruoes8caB5/WUUuEW5v7wk8ZV\n OJbsO0AqbO7wMTlQ5ZzyHaBRSbJ9rVlhXfGpRrfvJjUO0tYjOoBQW8BcbIZryq7Z7idR\n oA9QM3BORfcq5mG1zdzqEjy+9GkOr7M1wG6Kfxwte8rC7niiEy1LZ/afu6A/YqiT//OG\n o9fQ==", "X-Gm-Message-State": "AOAM531jea+SnIRTbAf2kb2x9Q7KPLIc30oL7ISXUfbeXhNwZeTLpKBM\n 2gV9dxwitDKJIShNa7Grvkq1bPGmyt2uQQ==", "X-Google-Smtp-Source": "\n ABdhPJxynYl7sHGHh9YQE75DikS0vlZx5QvKEsvGrrEWbG0510qUXuo1u3RlipKi7k3T4oiyT4ldIw==", "X-Received": "by 2002:a2e:b4a5:: with SMTP id q5mr1824066ljm.11.1631742066328;\n Wed, 15 Sep 2021 14:41:06 -0700 (PDT)", "From": "Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>", "To": "dev@dpdk.org", "Cc": "Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>,\n Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>,\n Konstantin Ananyev <konstantin.ananyev@intel.com>", "Date": "Thu, 16 Sep 2021 00:40:51 +0300", "Message-Id": "<20210915214052.143098-5-dmitry.kozliuk@gmail.com>", "X-Mailer": "git-send-email 2.29.3", "In-Reply-To": "<20210915214052.143098-1-dmitry.kozliuk@gmail.com>", "References": "<20210915214052.143098-1-dmitry.kozliuk@gmail.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[dpdk-dev] [PATCH 4/5] ring: rename local variables for Windows\n compatibility", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <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 <mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "Windows SDK headers define `max` macro which breaks the definitions\nof `max` variable inside inline functions. Rename the variables\nto allow inclusion of both DPDK and Windows headers in the same file.\n\nSigned-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>\n---\n lib/ring/rte_ring_c11_pvt.h | 8 ++++----\n lib/ring/rte_ring_generic_pvt.h | 8 ++++----\n lib/ring/rte_ring_rts_elem_pvt.h | 6 +++---\n 3 files changed, 11 insertions(+), 11 deletions(-)", "diff": "diff --git a/lib/ring/rte_ring_c11_pvt.h b/lib/ring/rte_ring_c11_pvt.h\nindex 37e0b2afd6..ec6be12154 100644\n--- a/lib/ring/rte_ring_c11_pvt.h\n+++ b/lib/ring/rte_ring_c11_pvt.h\n@@ -58,13 +58,13 @@ __rte_ring_move_prod_head(struct rte_ring *r, unsigned int is_sp,\n {\n \tconst uint32_t capacity = r->capacity;\n \tuint32_t cons_tail;\n-\tunsigned int max = n;\n+\tunsigned int maximum = n;\n \tint success;\n \n \t*old_head = __atomic_load_n(&r->prod.head, __ATOMIC_RELAXED);\n \tdo {\n \t\t/* Reset n to the initial burst count */\n-\t\tn = max;\n+\t\tn = maximum;\n \n \t\t/* Ensure the head is read before tail */\n \t\t__atomic_thread_fence(__ATOMIC_ACQUIRE);\n@@ -132,7 +132,7 @@ __rte_ring_move_cons_head(struct rte_ring *r, int is_sc,\n \t\tuint32_t *old_head, uint32_t *new_head,\n \t\tuint32_t *entries)\n {\n-\tunsigned int max = n;\n+\tunsigned int maximum = n;\n \tuint32_t prod_tail;\n \tint success;\n \n@@ -140,7 +140,7 @@ __rte_ring_move_cons_head(struct rte_ring *r, int is_sc,\n \t*old_head = __atomic_load_n(&r->cons.head, __ATOMIC_RELAXED);\n \tdo {\n \t\t/* Restore n as it may change every loop */\n-\t\tn = max;\n+\t\tn = maximum;\n \n \t\t/* Ensure the head is read before tail */\n \t\t__atomic_thread_fence(__ATOMIC_ACQUIRE);\ndiff --git a/lib/ring/rte_ring_generic_pvt.h b/lib/ring/rte_ring_generic_pvt.h\nindex c95ad7e12c..beb3140e78 100644\n--- a/lib/ring/rte_ring_generic_pvt.h\n+++ b/lib/ring/rte_ring_generic_pvt.h\n@@ -58,12 +58,12 @@ __rte_ring_move_prod_head(struct rte_ring *r, unsigned int is_sp,\n \t\tuint32_t *free_entries)\n {\n \tconst uint32_t capacity = r->capacity;\n-\tunsigned int max = n;\n+\tunsigned int maximum = n;\n \tint success;\n \n \tdo {\n \t\t/* Reset n to the initial burst count */\n-\t\tn = max;\n+\t\tn = maximum;\n \n \t\t*old_head = r->prod.head;\n \n@@ -127,13 +127,13 @@ __rte_ring_move_cons_head(struct rte_ring *r, unsigned int is_sc,\n \t\tuint32_t *old_head, uint32_t *new_head,\n \t\tuint32_t *entries)\n {\n-\tunsigned int max = n;\n+\tunsigned int maximum = n;\n \tint success;\n \n \t/* move cons.head atomically */\n \tdo {\n \t\t/* Restore n as it may change every loop */\n-\t\tn = max;\n+\t\tn = maximum;\n \n \t\t*old_head = r->cons.head;\n \ndiff --git a/lib/ring/rte_ring_rts_elem_pvt.h b/lib/ring/rte_ring_rts_elem_pvt.h\nindex 7164213ee0..6241f28dc0 100644\n--- a/lib/ring/rte_ring_rts_elem_pvt.h\n+++ b/lib/ring/rte_ring_rts_elem_pvt.h\n@@ -53,11 +53,11 @@ static __rte_always_inline void\n __rte_ring_rts_head_wait(const struct rte_ring_rts_headtail *ht,\n \tunion __rte_ring_rts_poscnt *h)\n {\n-\tuint32_t max;\n+\tuint32_t maximum;\n \n-\tmax = ht->htd_max;\n+\tmaximum = ht->htd_max;\n \n-\twhile (h->val.pos - ht->tail.val.pos > max) {\n+\twhile (h->val.pos - ht->tail.val.pos > maximum) {\n \t\trte_pause();\n \t\th->raw = __atomic_load_n(&ht->head.raw, __ATOMIC_ACQUIRE);\n \t}\n", "prefixes": [ "4/5" ] }{ "id": 98959, "url": "