get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 45307,
    "url": "https://patches.dpdk.org/api/patches/45307/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1537869163-3650-1-git-send-email-vivek.sharma@caviumnetworks.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": "<1537869163-3650-1-git-send-email-vivek.sharma@caviumnetworks.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1537869163-3650-1-git-send-email-vivek.sharma@caviumnetworks.com",
    "date": "2018-09-25T09:53:06",
    "name": "[v2] eal: use correct data type for bitmap slab operations",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "40b1e08d7ea553dce1d0790a64039346581b81e4",
    "submitter": {
        "id": 1134,
        "url": "https://patches.dpdk.org/api/people/1134/?format=api",
        "name": "Vivek Sharma",
        "email": "vivek.sharma@caviumnetworks.com"
    },
    "delegate": {
        "id": 10018,
        "url": "https://patches.dpdk.org/api/users/10018/?format=api",
        "username": "cristian_dumitrescu",
        "first_name": "Cristian",
        "last_name": "Dumitrescu",
        "email": "cristian.dumitrescu@intel.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1537869163-3650-1-git-send-email-vivek.sharma@caviumnetworks.com/mbox/",
    "series": [
        {
            "id": 1487,
            "url": "https://patches.dpdk.org/api/series/1487/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=1487",
            "date": "2018-09-25T09:53:06",
            "name": "[v2] eal: use correct data type for bitmap slab operations",
            "version": 2,
            "mbox": "https://patches.dpdk.org/series/1487/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/45307/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/45307/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 EA1B55F19;\n\tTue, 25 Sep 2018 11:53:08 +0200 (CEST)",
            "from NAM03-DM3-obe.outbound.protection.outlook.com\n\t(mail-dm3nam03on0051.outbound.protection.outlook.com [104.47.41.51])\n\tby dpdk.org (Postfix) with ESMTP id 13A9F5F0D;\n\tTue, 25 Sep 2018 11:53:08 +0200 (CEST)",
            "from DM6PR07MB5386.namprd07.prod.outlook.com (20.176.117.147) by\n\tDM6PR07MB4635.namprd07.prod.outlook.com (20.176.80.16) with Microsoft\n\tSMTP Server (version=TLS1_2,\n\tcipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id\n\t15.20.1143.19; Tue, 25 Sep 2018 09:53:06 +0000",
            "from DM6PR07MB5386.namprd07.prod.outlook.com\n\t([fe80::71e1:a96e:c3dc:91d3]) by\n\tDM6PR07MB5386.namprd07.prod.outlook.com\n\t([fe80::71e1:a96e:c3dc:91d3%2]) with mapi id 15.20.1164.024;\n\tTue, 25 Sep 2018 09:53:06 +0000"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com;\n\th=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n\tbh=GTgPKwN0s2knMFFNUYiba2kVTRIWDoXmQnrFTvVPmc0=;\n\tb=oTrjOXOYpqFjww5OnN7YvLkTcYnal7tt+EeCb8FhB1yQg55RcBk87eto70VLxJGRk6eT1vRfb4H8va3l2iG+l8nCRgNoML9nnmXOvvo1Gpwm4wawdAdccRJ4drxe44bMhQsbxQRhZ3nAfxU487E7OICLS21cPDRhKPnjHbtxxDE=",
        "From": "Vivek Sharma <vivek.sharma@caviumnetworks.com>",
        "To": "\"dev@dpdk.org\" <dev@dpdk.org>",
        "CC": "\"stable@dpdk.org\" <stable@dpdk.org>, \"cristian.dumitrescu@intel.com\"\n\t<cristian.dumitrescu@intel.com>, \"Sharma,\n\tVivek\" <Vivek.Sharma@cavium.com>",
        "Thread-Topic": "[PATCH v2] eal: use correct data type for bitmap slab\n\toperations",
        "Thread-Index": "AQHUVLWOMz4sNgLk6kigWS5SPwXoKw==",
        "Date": "Tue, 25 Sep 2018 09:53:06 +0000",
        "Message-ID": "<1537869163-3650-1-git-send-email-vivek.sharma@caviumnetworks.com>",
        "References": "<1537803523-23347-1-git-send-email-vivek.sharma@caviumnetworks.com>",
        "In-Reply-To": "<1537803523-23347-1-git-send-email-vivek.sharma@caviumnetworks.com>",
        "Accept-Language": "en-US",
        "Content-Language": "en-US",
        "X-MS-Has-Attach": "",
        "X-MS-TNEF-Correlator": "",
        "x-clientproxiedby": "BN3PR03CA0077.namprd03.prod.outlook.com\n\t(2a01:111:e400:7a4d::37) To DM6PR07MB5386.namprd07.prod.outlook.com\n\t(2603:10b6:5:44::19)",
        "authentication-results": "spf=none (sender IP is )\n\tsmtp.mailfrom=Vivek.Sharma@cavium.com; ",
        "x-ms-exchange-messagesentrepresentingtype": "1",
        "x-originating-ip": "[111.93.218.67]",
        "x-ms-publictraffictype": "Email",
        "x-microsoft-exchange-diagnostics": "1; DM6PR07MB4635;\n\t6:jCRe1Zlo8zJuFIKwIru2tiXzqgn1UkmUAWoARVrB4hsRXLD06LodtgGyQhl8YTkQP8zaTvOLHra+bb+qA/e15D/W7tBv0oYl1PS+v0j7gLX8jjy+/Ld0wGyUPuDcUylem4jFkSxw0MMtBBGHUjwCjWcPNT5T3w+rltsvWubq3djWa0qr/w94/wKnTKJNB06m9Y+Prue2LXko87T2bfc18xZcE2oobywFGBN5YzfST2vp+6Mk65V/mtcSei9wD6Pq4kzsP6uugP8xBBy8Y2HAmUdUkTuemRHTaCMItHjVmjxD7e5CZXjmxDEP0HT2lsVk4bMV/+q8sVw6CfZRZksSo338z+acmWzpEjlRMJ1RvbildT62GbbcSEo+U65UR7bPnwnwcwd3tJIx2FhVuKu9J6Hw5kzIT+nkwsibr0kaPaiwWc/OYtKoWpCseCVUQwbO4Ldnb0WIq5RhBxNBSXkAkQ==;\n\t5:YyKwhm23sUpqR6Nw4Bh+mMAqwYxgZxNZZdLayjHugsIRB1XACFQW65Frh+pyiyKtVYawmo+hAA8uTPp+77RUvmWw8v2H5xcyaECUL0RnV61THpMngLJHZ+t97HMsOOjcVWw93d8L5I3wNjN+++0ELCOTTStuQV8HA3oWtRlH1xE=;\n\t7:xLZT5E3M2jxCOY0EG9/9cbtF1X3LoCb5nteQo65ZhECcsVR5Q/I6wEAZ5wCO3RKlPwjhcSdv+jm2tTnKk0fYc7nHgksMuPzW3Jw0G4Yl4PtrMn2VGodYmFPbjO0U3is6Y/c6i8OocbTM6Z84TKAqyyublRmONG8S5O+B33Zy+bihadQAjfmLcySZzR5hGTbjvmNP0Ys1YXuGPbuP3khGUeLCMousKM8t74LVqrdfSoUBPisutViGCQl04UnRXdim",
        "x-ms-office365-filtering-correlation-id": "788be58e-871f-4e9a-451d-08d622ccb0ce",
        "x-microsoft-antispam": "BCL:0; PCL:0;\n\tRULEID:(7020095)(4652040)(8989299)(4534165)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(2017052603328)(7153060)(7193020);\n\tSRVR:DM6PR07MB4635; ",
        "x-ms-traffictypediagnostic": "DM6PR07MB4635:",
        "x-microsoft-antispam-prvs": "<DM6PR07MB46355FD14F2DE7B34A0B2C77FD160@DM6PR07MB4635.namprd07.prod.outlook.com>",
        "x-exchange-antispam-report-test": "UriScan:(228905959029699);",
        "x-ms-exchange-senderadcheck": "1",
        "x-exchange-antispam-report-cfa-test": "BCL:0; PCL:0;\n\tRULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(10201501046)(3231355)(944501410)(52105095)(3002001)(93006095)(149066)(150027)(6041310)(20161123560045)(20161123562045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(201708071742011)(7699051);\n\tSRVR:DM6PR07MB4635; BCL:0; PCL:0; RULEID:; SRVR:DM6PR07MB4635; ",
        "x-forefront-prvs": "08062C429B",
        "x-forefront-antispam-report": "SFV:NSPM;\n\tSFS:(10009020)(376002)(396003)(39850400004)(346002)(136003)(366004)(199004)(189003)(14454004)(2501003)(52116002)(2906002)(2616005)(486006)(66066001)(71200400001)(71190400001)(6916009)(476003)(5640700003)(6486002)(5660300001)(53936002)(316002)(2900100001)(6512007)(11346002)(25786009)(6116002)(107886003)(3846002)(97736004)(4326008)(256004)(446003)(54906003)(26005)(81156014)(72206003)(105586002)(305945005)(386003)(6506007)(2351001)(7736002)(8936002)(106356001)(1730700003)(81166006)(42882007)(36756003)(102836004)(6436002)(68736007)(5250100002)(478600001)(76176011)(99286004)(8676002)(186003);\n\tDIR:OUT; SFP:1101; SCL:1; SRVR:DM6PR07MB4635;\n\tH:DM6PR07MB5386.namprd07.prod.outlook.com; FPR:; SPF:None; LANG:en;\n\tPTR:InfoNoRecords; A:1; MX:1; ",
        "received-spf": "None (protection.outlook.com: cavium.com does not designate\n\tpermitted sender hosts)",
        "x-microsoft-antispam-message-info": "Zjzga6Gz+Bsqis6jBchUx1kXBRUqpfYABeNDIAsz0yl8qRYro1CxCpAz65dxq5bTCDfjSqJ72uadHFvu4b0qIq9kuXBUTZWhV9pg5oZHj9GCrASJlMIclr+aTndw52xOZnY0MzzJEGrkNldV6EgjkR9F0/Kz6OUp6kTY3EnIFpyfBh+kHa0wXzXaPuy3LhEcy+RvicwIE+juMVUY1yExcsRtesnbYqTiuw6bl0c41ohmuuu45Q4TjGtL8P43y1Ll9MJ/kxvK3korQQbHEapIbQOIA39LrNCjzVsCHJkHldHAZ9R5mRlqzrxLi3Lym7TjusC8GWHa/YYBbViaRzdspI69pXQT+3GPSTGDSaDIjwE=",
        "spamdiagnosticoutput": "1:99",
        "spamdiagnosticmetadata": "NSPM",
        "Content-Type": "text/plain; charset=\"iso-8859-1\"",
        "Content-Transfer-Encoding": "quoted-printable",
        "MIME-Version": "1.0",
        "X-OriginatorOrg": "caviumnetworks.com",
        "X-MS-Exchange-CrossTenant-Network-Message-Id": "788be58e-871f-4e9a-451d-08d622ccb0ce",
        "X-MS-Exchange-CrossTenant-originalarrivaltime": "25 Sep 2018 09:53:06.5266\n\t(UTC)",
        "X-MS-Exchange-CrossTenant-fromentityheader": "Hosted",
        "X-MS-Exchange-CrossTenant-id": "711e4ccf-2e9b-4bcf-a551-4094005b6194",
        "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "DM6PR07MB4635",
        "Subject": "[dpdk-dev] [PATCH v2] eal: use correct data type for bitmap slab\n\toperations",
        "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": "Currently, slab operations use unsigned long data type for 64-bit slab\nrelated operations. On target 'i686-native-linuxapp-gcc', unsigned long\nis 32-bit and thus, slab operations breaks on this target. Changing slab\noperations to use unsigned long long for correct functioning on\nall targets.\n\nFixes: de3cfa2c9823 (\"sched: initial import\")\nFixes: 693f715da45c (\"remove extra parentheses in return statement\")\nCC: stable@dpdk.org\n\nSigned-off-by: Vivek Sharma <vivek.sharma@caviumnetworks.com>\nAcked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>\n---\nv1-->v2:\n* Added Acked-by:\n* check-git-log.sh fixes.\n\n lib/librte_eal/common/include/rte_bitmap.h | 14 +++++++-------\n test/test/test_bitmap.c                    | 18 ++++++++++++++++++\n 2 files changed, 25 insertions(+), 7 deletions(-)",
    "diff": "diff --git a/lib/librte_eal/common/include/rte_bitmap.h b/lib/librte_eal/common/include/rte_bitmap.h\nindex d9facc6..7a36ce7 100644\n--- a/lib/librte_eal/common/include/rte_bitmap.h\n+++ b/lib/librte_eal/common/include/rte_bitmap.h\n@@ -88,7 +88,7 @@ __rte_bitmap_index1_inc(struct rte_bitmap *bmp)\n static inline uint64_t\n __rte_bitmap_mask1_get(struct rte_bitmap *bmp)\n {\n-\treturn (~1lu) << bmp->offset1;\n+\treturn (~1llu) << bmp->offset1;\n }\n \n static inline void\n@@ -317,7 +317,7 @@ rte_bitmap_get(struct rte_bitmap *bmp, uint32_t pos)\n \tindex2 = pos >> RTE_BITMAP_SLAB_BIT_SIZE_LOG2;\n \toffset2 = pos & RTE_BITMAP_SLAB_BIT_MASK;\n \tslab2 = bmp->array2 + index2;\n-\treturn (*slab2) & (1lu << offset2);\n+\treturn (*slab2) & (1llu << offset2);\n }\n \n /**\n@@ -342,8 +342,8 @@ rte_bitmap_set(struct rte_bitmap *bmp, uint32_t pos)\n \tslab2 = bmp->array2 + index2;\n \tslab1 = bmp->array1 + index1;\n \n-\t*slab2 |= 1lu << offset2;\n-\t*slab1 |= 1lu << offset1;\n+\t*slab2 |= 1llu << offset2;\n+\t*slab1 |= 1llu << offset1;\n }\n \n /**\n@@ -370,7 +370,7 @@ rte_bitmap_set_slab(struct rte_bitmap *bmp, uint32_t pos, uint64_t slab)\n \tslab1 = bmp->array1 + index1;\n \n \t*slab2 |= slab;\n-\t*slab1 |= 1lu << offset1;\n+\t*slab1 |= 1llu << offset1;\n }\n \n static inline uint64_t\n@@ -408,7 +408,7 @@ rte_bitmap_clear(struct rte_bitmap *bmp, uint32_t pos)\n \tslab2 = bmp->array2 + index2;\n \n \t/* Return if array2 slab is not all-zeros */\n-\t*slab2 &= ~(1lu << offset2);\n+\t*slab2 &= ~(1llu << offset2);\n \tif (*slab2){\n \t\treturn;\n \t}\n@@ -424,7 +424,7 @@ rte_bitmap_clear(struct rte_bitmap *bmp, uint32_t pos)\n \tindex1 = pos >> (RTE_BITMAP_SLAB_BIT_SIZE_LOG2 + RTE_BITMAP_CL_BIT_SIZE_LOG2);\n \toffset1 = (pos >> RTE_BITMAP_CL_BIT_SIZE_LOG2) & RTE_BITMAP_SLAB_BIT_MASK;\n \tslab1 = bmp->array1 + index1;\n-\t*slab1 &= ~(1lu << offset1);\n+\t*slab1 &= ~(1llu << offset1);\n \n \treturn;\n }\ndiff --git a/test/test/test_bitmap.c b/test/test/test_bitmap.c\nindex c3169e9..95c5184 100644\n--- a/test/test/test_bitmap.c\n+++ b/test/test/test_bitmap.c\n@@ -101,6 +101,7 @@ test_bitmap_slab_set_get(struct rte_bitmap *bmp)\n static int\n test_bitmap_set_get_clear(struct rte_bitmap *bmp)\n {\n+\tuint64_t val;\n \tint i;\n \n \trte_bitmap_reset(bmp);\n@@ -124,6 +125,23 @@ test_bitmap_set_get_clear(struct rte_bitmap *bmp)\n \t\t}\n \t}\n \n+\trte_bitmap_reset(bmp);\n+\n+\t/* Alternate slab set test */\n+\tfor (i = 0; i < MAX_BITS; i++) {\n+\t\tif (i % RTE_BITMAP_SLAB_BIT_SIZE)\n+\t\t\trte_bitmap_set(bmp, i);\n+\t}\n+\n+\tfor (i = 0; i < MAX_BITS; i++) {\n+\t\tval = rte_bitmap_get(bmp, i);\n+\t\tif (((i % RTE_BITMAP_SLAB_BIT_SIZE) && !val) ||\n+\t\t    (!(i % RTE_BITMAP_SLAB_BIT_SIZE) && val)) {\n+\t\t\tprintf(\"Failed to get set bit.\\n\");\n+\t\t\treturn TEST_FAILED;\n+\t\t}\n+\t}\n+\n \treturn TEST_SUCCESS;\n }\n \n",
    "prefixes": [
        "v2"
    ]
}