Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/11403/?format=api
https://patches.dpdk.org/api/patches/11403/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/596c08913453daea0e9c98f25befba923a961216.1457617795.git.pmatilai@redhat.com/", "project": { "id": 1, "url": "https://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": "<596c08913453daea0e9c98f25befba923a961216.1457617795.git.pmatilai@redhat.com>", "list_archive_url": "https://inbox.dpdk.org/dev/596c08913453daea0e9c98f25befba923a961216.1457617795.git.pmatilai@redhat.com", "date": "2016-03-10T13:49:55", "name": "[dpdk-dev] pipeline: use unsigned constants for left shift operations", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "5f9669ce433af6bfbad8a10c217be9db409a322b", "submitter": { "id": 169, "url": "https://patches.dpdk.org/api/people/169/?format=api", "name": "Panu Matilainen", "email": "pmatilai@redhat.com" }, "delegate": { "id": 1, "url": "https://patches.dpdk.org/api/users/1/?format=api", "username": "tmonjalo", "first_name": "Thomas", "last_name": "Monjalon", "email": "thomas@monjalon.net" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/596c08913453daea0e9c98f25befba923a961216.1457617795.git.pmatilai@redhat.com/mbox/", "series": [], "comments": "https://patches.dpdk.org/api/patches/11403/comments/", "check": "pending", "checks": "https://patches.dpdk.org/api/patches/11403/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 [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id C23842BEA;\n\tThu, 10 Mar 2016 14:50:05 +0100 (CET)", "from mx1.redhat.com (mx1.redhat.com [209.132.183.28])\n\tby dpdk.org (Postfix) with ESMTP id A8F422BDB\n\tfor <dev@dpdk.org>; Thu, 10 Mar 2016 14:50:03 +0100 (CET)", "from int-mx09.intmail.prod.int.phx2.redhat.com\n\t(int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22])\n\tby mx1.redhat.com (Postfix) with ESMTPS id 31928720A0;\n\tThu, 10 Mar 2016 13:50:03 +0000 (UTC)", "from sopuli.koti.laiskiainen.org.com (vpn1-4-209.ams2.redhat.com\n\t[10.36.4.209])\n\tby int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with\n\tESMTP id u2ADo1pJ019242; Thu, 10 Mar 2016 08:50:02 -0500" ], "From": "Panu Matilainen <pmatilai@redhat.com>", "To": "dev@dpdk.org", "Date": "Thu, 10 Mar 2016 15:49:55 +0200", "Message-Id": "<596c08913453daea0e9c98f25befba923a961216.1457617795.git.pmatilai@redhat.com>", "X-Scanned-By": "MIMEDefang 2.68 on 10.5.11.22", "X-Greylist": "Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.38]); Thu, 10 Mar 2016 13:50:03 +0000 (UTC)", "Subject": "[dpdk-dev] [PATCH] pipeline: use unsigned constants for left shift\n\toperations", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "patches and discussions about DPDK <dev.dpdk.org>", "List-Unsubscribe": "<http://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": "<http://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": "Tell the compiler to use unsigned constants for left shift ops,\notherwise building with gcc >= 6.0 fails due to multiple warnings like:\nwarning: left shift of negative value [-Wshift-negative-value]\n\nSigned-off-by: Panu Matilainen <pmatilai@redhat.com>\n---\n examples/ip_pipeline/pipeline/pipeline_common_fe.c | 4 ++--\n examples/ip_pipeline/pipeline/pipeline_firewall.c | 4 ++--\n examples/ip_pipeline/pipeline/pipeline_routing.c | 4 ++--\n 3 files changed, 6 insertions(+), 6 deletions(-)", "diff": "diff --git a/examples/ip_pipeline/pipeline/pipeline_common_fe.c b/examples/ip_pipeline/pipeline/pipeline_common_fe.c\nindex bffc9a4..a691d42 100644\n--- a/examples/ip_pipeline/pipeline/pipeline_common_fe.c\n+++ b/examples/ip_pipeline/pipeline/pipeline_common_fe.c\n@@ -337,7 +337,7 @@ app_link_config(struct app_params *app,\n \t\treturn -1;\n \t}\n \n-\tnetmask = (~0) << (32 - depth);\n+\tnetmask = (~0U) << (32 - depth);\n \thost = ip & netmask;\n \tbcast = host | (~netmask);\n \n@@ -889,7 +889,7 @@ print_link_info(struct app_link_params *p)\n {\n \tstruct rte_eth_stats stats;\n \tstruct ether_addr *mac_addr;\n-\tuint32_t netmask = (~0) << (32 - p->depth);\n+\tuint32_t netmask = (~0U) << (32 - p->depth);\n \tuint32_t host = p->ip & netmask;\n \tuint32_t bcast = host | (~netmask);\n \ndiff --git a/examples/ip_pipeline/pipeline/pipeline_firewall.c b/examples/ip_pipeline/pipeline/pipeline_firewall.c\nindex 3d7ea7a..320b25d 100644\n--- a/examples/ip_pipeline/pipeline/pipeline_firewall.c\n+++ b/examples/ip_pipeline/pipeline/pipeline_firewall.c\n@@ -256,10 +256,10 @@ app_pipeline_firewall_key_check_and_normalize(struct pipeline_firewall_key *key)\n \t\t\treturn -1;\n \n \t\tif (src_ip_depth)\n-\t\t\tsrc_ip_netmask = (~0) << (32 - src_ip_depth);\n+\t\t\tsrc_ip_netmask = (~0U) << (32 - src_ip_depth);\n \n \t\tif (dst_ip_depth)\n-\t\t\tdst_ip_netmask = ((~0) << (32 - dst_ip_depth));\n+\t\t\tdst_ip_netmask = ((~0U) << (32 - dst_ip_depth));\n \n \t\tkey->key.ipv4_5tuple.src_ip &= src_ip_netmask;\n \t\tkey->key.ipv4_5tuple.dst_ip &= dst_ip_netmask;\ndiff --git a/examples/ip_pipeline/pipeline/pipeline_routing.c b/examples/ip_pipeline/pipeline/pipeline_routing.c\nindex 6354730..62a5eec 100644\n--- a/examples/ip_pipeline/pipeline/pipeline_routing.c\n+++ b/examples/ip_pipeline/pipeline/pipeline_routing.c\n@@ -319,7 +319,7 @@ app_pipeline_routing_add_route(struct app_params *app,\n \t\tif ((depth == 0) || (depth > 32))\n \t\t\treturn -1;\n \n-\t\tnetmask = (~0) << (32 - depth);\n+\t\tnetmask = (~U0) << (32 - depth);\n \t\tkey->key.ipv4.ip &= netmask;\n \n \t\t/* data */\n@@ -421,7 +421,7 @@ app_pipeline_routing_delete_route(struct app_params *app,\n \t\tif ((depth == 0) || (depth > 32))\n \t\t\treturn -1;\n \n-\t\tnetmask = (~0) << (32 - depth);\n+\t\tnetmask = (~0U) << (32 - depth);\n \t\tkey->key.ipv4.ip &= netmask;\n \t}\n \tbreak;\n", "prefixes": [ "dpdk-dev" ] }{ "id": 11403, "url": "