Show a cover letter.

GET /api/covers/738/?format=api
HTTP 200 OK
Allow: GET, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 738,
    "url": "http://patches.dpdk.org/api/covers/738/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/cover/20240302135328.531940-1-mattias.ronnblom@ericsson.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": "<20240302135328.531940-1-mattias.ronnblom@ericsson.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20240302135328.531940-1-mattias.ronnblom@ericsson.com",
    "date": "2024-03-02T13:53:21",
    "name": "[RFC,0/7] Improve EAL bit operations API",
    "submitter": {
        "id": 1077,
        "url": "http://patches.dpdk.org/api/people/1077/?format=api",
        "name": "Mattias Rönnblom",
        "email": "mattias.ronnblom@ericsson.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/cover/20240302135328.531940-1-mattias.ronnblom@ericsson.com/mbox/",
    "series": [
        {
            "id": 31345,
            "url": "http://patches.dpdk.org/api/series/31345/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=31345",
            "date": "2024-03-02T13:53:21",
            "name": "Improve EAL bit operations API",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/31345/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/covers/738/comments/",
    "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 B03B843C3A;\n\tSat,  2 Mar 2024 15:02:17 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 3E8CF4025C;\n\tSat,  2 Mar 2024 15:02:17 +0100 (CET)",
            "from EUR03-AM7-obe.outbound.protection.outlook.com\n (mail-am7eur03on2078.outbound.protection.outlook.com [40.107.105.78])\n by mails.dpdk.org (Postfix) with ESMTP id 91724400D5\n for <dev@dpdk.org>; Sat,  2 Mar 2024 15:02:15 +0100 (CET)",
            "from AS9PR06CA0196.eurprd06.prod.outlook.com (2603:10a6:20b:45d::22)\n by PAWPR07MB9663.eurprd07.prod.outlook.com (2603:10a6:102:383::8)\n with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.32; Sat, 2 Mar\n 2024 14:02:14 +0000",
            "from AM4PEPF00027A5E.eurprd04.prod.outlook.com\n (2603:10a6:20b:45d:cafe::1f) by AS9PR06CA0196.outlook.office365.com\n (2603:10a6:20b:45d::22) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.35 via Frontend\n Transport; Sat, 2 Mar 2024 14:02:13 +0000",
            "from oa.msg.ericsson.com (192.176.1.74) by\n AM4PEPF00027A5E.mail.protection.outlook.com (10.167.16.72) with Microsoft\n SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id\n 15.20.7362.11 via Frontend Transport; Sat, 2 Mar 2024 14:02:13 +0000",
            "from seliicinfr00050.seli.gic.ericsson.se (153.88.142.248) by\n smtp-central.internal.ericsson.com (100.87.178.69) with Microsoft SMTP Server\n id 15.2.1258.12; Sat, 2 Mar 2024 15:02:12 +0100",
            "from breslau.. (seliicwb00002.seli.gic.ericsson.se [10.156.25.100])\n by seliicinfr00050.seli.gic.ericsson.se (Postfix) with ESMTP id\n CFE471C006A; Sat,  2 Mar 2024 15:02:12 +0100 (CET)"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;\n b=VDZjPQujd+Yr9i4/Wkueg0kxnynP4Cmw2aBTipgiod9YBD7/NjqEKy1BeHKsBXDdd1NBOGw8lwkTKS3VMKUUT2ZsNPCI0NqjRpI88L7TPSny8zyQlrlGRKAKcqn9De4K5at4D5hSYtqIWpBvKogrm5An7QAXxMaPe8zo8m9YlN18g/DdbR6TbZAU16J/VR0GMjQFVA3bXmJzt1efx247FXGDGJGIvRiE5m7Ve5tjNmw93ev36v48rKJFUs2kTY7eRgBuXv1fvSP+P5JJLKGl5ff1skvPItFONtSdexjnTRS3vn2BbiN8oVLOccht7S3Bz7AjM761e08046yXNGf2wg==",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;\n s=arcselector9901;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;\n bh=cqEwbYUyjia318T0xzGuco5bB5t77dw1uC1VDzcd+RE=;\n b=HBwijEROBDF1QuZwTrBciDQawuFpD5CpxNDq8un3Eiv0rCYWs/q8dTvG6YurLOdBKQGbX18q9nQ3Vozzm9kdRyqOQsONjicSaM36JOrcjXKLNnIa3HL88VacSZUFDUWjTiSXvJkQrvDzR/wrsJVB+XGoRvPkbhHCzdlAJ13RG+GV4KOZtI+pbb3u2+jx6E21fgDy+FXv+ncVkNEtqSm7el8WKNw6V7ns7EPNMLeFuFA+zLbBe6pGa2pady0taq72n0dSdoCHU6ctuta1a/JLA0Zb0Rl9u8L9IFlrmODvzvANRGm0K0fratVlhfr5zj2H0aj9vVDMqwDxSd9OD1d/dg==",
        "ARC-Authentication-Results": "i=1; mx.microsoft.com 1; spf=pass (sender ip is\n 192.176.1.74) smtp.rcpttodomain=dpdk.org smtp.mailfrom=ericsson.com;\n dmarc=pass (p=reject sp=reject pct=100) action=none header.from=ericsson.com;\n dkim=none (message not signed); arc=none (0)",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericsson.com;\n s=selector1;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=cqEwbYUyjia318T0xzGuco5bB5t77dw1uC1VDzcd+RE=;\n b=lJONbcPCZ7mwldR/owVnvrAzj4Y6UJHid+h4YDfXtFCnKMyPTDnIl/IZd5HmMyQ+b2ycV0WtZuxRBzPCe6dNjT3Ul52vkCHLFd+M253TxGOyVd+HmMbgowC3yLiTwdVHVo/GuVTfx3DSDFAJ6cpkY+w9sN1v0aalOwclxo6UnG0LVqlvc9siOCeZ5VFNz9Sz7cRU8V71uDDrc3jsDBokeiA+JKNTsCfN9qIxY7BkoaXs+86EBCkpW43ligTaxy64+2YXpYb0fIMgYLA5IYzSp0hLr7iU+2k9lritvkDpZw4qyydl7nt9SI/uSg4QIOsbHYOjis3tm7rhf5swbzdLzQ==",
        "X-MS-Exchange-Authentication-Results": "spf=pass (sender IP is 192.176.1.74)\n smtp.mailfrom=ericsson.com; dkim=none (message not signed)\n header.d=none;dmarc=pass action=none header.from=ericsson.com;",
        "Received-SPF": "Pass (protection.outlook.com: domain of ericsson.com designates\n 192.176.1.74 as permitted sender)\n receiver=protection.outlook.com;\n client-ip=192.176.1.74; helo=oa.msg.ericsson.com; pr=C",
        "From": "=?utf-8?q?Mattias_R=C3=B6nnblom?= <mattias.ronnblom@ericsson.com>",
        "To": "<dev@dpdk.org>",
        "CC": "<hofors@lysator.liu.se>, Heng Wang <heng.wang@ericsson.com>, =?utf-8?q?M?=\n\t=?utf-8?q?attias_R=C3=B6nnblom?= <mattias.ronnblom@ericsson.com>",
        "Subject": "[RFC 0/7] Improve EAL bit operations API",
        "Date": "Sat, 2 Mar 2024 14:53:21 +0100",
        "Message-ID": "<20240302135328.531940-1-mattias.ronnblom@ericsson.com>",
        "X-Mailer": "git-send-email 2.34.1",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"UTF-8\"",
        "Content-Transfer-Encoding": "8bit",
        "X-EOPAttributedMessage": "0",
        "X-MS-PublicTrafficType": "Email",
        "X-MS-TrafficTypeDiagnostic": "AM4PEPF00027A5E:EE_|PAWPR07MB9663:EE_",
        "X-MS-Office365-Filtering-Correlation-Id": "664b9f25-b449-4118-8476-08dc3ac15c83",
        "X-MS-Exchange-SenderADCheck": "1",
        "X-MS-Exchange-AntiSpam-Relay": "0",
        "X-Microsoft-Antispam": "BCL:0;",
        "X-Microsoft-Antispam-Message-Info": "\n uKUxUBM5uoT9EY6HWN46pM7Q/+9c+k9BHaIlxOA0MmknGprdLQX1U5wtsVE5/qdoKJUga+s+d3zt8pAwoc8Gcyf5EvMqd1ajjucz+vvUFPbwhhygzwBrGjCkZ2pbDEOLkIv1v7f4ZFLpqvbd0iHgo61V6QQ+v35Jm6HA2DR8IIVBhPzmwX02JaP3pTmM82/axRs0in/a1oXkny0Ft1eqHSzP4XDCGn9v2FplWY/lE99bRcMQucDrWnKdG7TfTaWkhNCAiqf5j8Bqrc3b0UdzZPUBJYqWe1jrENAw2jxGRCxsRHhNogiVgbJu++Kphq5GDOTY18LJj6AXK5chjGat7bwwD4suwOOmTD+I6/JtpQn/NNOu55Ap3/UsGpu82Ty/AJUq6Pv64qamq3lGiPR6y2ou2WEyF7xFfHLWJHalNtMgOib25aLEwhvK7AvO1WkxgZEcylRHoKRR4+m+o9xkfYJCh0BQdewAelTqfVEImSe/Nfab5AT5hF8VoDy9PE1FRAfb0hPuZdQrydo9PZCxzu3CX8lyasSeFBr7eHRIbPVzWkKRNAZ2XAFZOvXmHfB01JFG9KCcv2N3IGXHZ0NH2M1F5v/TXcYNKLWQuMcZ287uAZ5KwYA/xUYcyRzbGLtCDpQzQIjIHJgS32VZKaC+Tdcwl4ijV1TE0jidz485vG8qkjdKefn1OX0lcyo8Q85hX+LCVXVRzei5ine5CuKjPJ7OVrU7jXyjblIZgFgU0URCFGSBZAQ5LgDpXVeVImWY",
        "X-Forefront-Antispam-Report": "CIP:192.176.1.74; CTRY:SE; LANG:en; SCL:1; SRV:;\n IPV:NLI; SFV:NSPM; H:oa.msg.ericsson.com; PTR:office365.se.ericsson.net;\n CAT:NONE; SFS:(13230031)(376005)(36860700004)(82310400014); DIR:OUT;\n SFP:1101;",
        "X-OriginatorOrg": "ericsson.com",
        "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "02 Mar 2024 14:02:13.4364 (UTC)",
        "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n 664b9f25-b449-4118-8476-08dc3ac15c83",
        "X-MS-Exchange-CrossTenant-Id": "92e84ceb-fbfd-47ab-be52-080c6b87953f",
        "X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp": "\n TenantId=92e84ceb-fbfd-47ab-be52-080c6b87953f; Ip=[192.176.1.74];\n Helo=[oa.msg.ericsson.com]",
        "X-MS-Exchange-CrossTenant-AuthSource": "\n AM4PEPF00027A5E.eurprd04.prod.outlook.com",
        "X-MS-Exchange-CrossTenant-AuthAs": "Anonymous",
        "X-MS-Exchange-CrossTenant-FromEntityHeader": "HybridOnPrem",
        "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "PAWPR07MB9663",
        "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"
    },
    "content": "This patch set represent an attempt to improve and extend the RTE\nbitops API, in particular for functions that operate on individual\nbits.\n\nRFCv1 is submitted primarily to 1) receive general feedback on if\nimprovements in this area is worth working on, and 2) receive feedback\non the API.\n\nNo test cases are included in v1 and the various functions may well\nnot do what they are intended to.\n\nThe legacy <rte_bitops.h> rte_bit_relaxed_*() family of functions is\nreplaced with three families:\n\nrte_bit_[test|set|clear|assign][32|64]() which provides no memory\nordering or atomicity guarantees and no read-once or write-once\nsemantics (e.g., no use of volatile), but does provide the best\nperformance. The performance degradation resulting from the use of\nvolatile (e.g., forcing loads and stores to actually occur and in the\nnumber specified) and atomic (e.g., LOCK instructions on x86) may be a\nsignificant.\n\nrte_bit_once_*() which guarantees program-level load and stores\nactually occurring (i.e., prevents certain optimizations). The primary\nuse of these functions are in the context of memory mapped\nI/O. Feedback on the details (semantics, naming) here would be greatly\nappreciated, since the author is not much of a driver developer.\n\nrte_bit_atomic_*() which provides atomic bit-level operations,\nincluding the possibility to specifying memory ordering constraints\n(or the lack thereof).\n\nThe atomic functions take non-_Atomic pointers, to be flexible, just\nlike the GCC builtins and default <rte_stdatomic.h>. The issue with\n_Atomic APIs is that it may well be the case that the user wants to\nperform both non-atomic and atomic operations on the same word.\n\nHaving _Atomic-marked addresses would complicate supporting atomic\nbit-level operations in the proposed bitset API (and potentially other\nAPIs depending on RTE bitops for atomic bit-level ops). Either one\nneeds two bitset variants, one _Atomic bitset and one non-atomic one,\nor the bitset code needs to cast the non-_Atomic pointer to an _Atomic\none. Having a separate _Atomic bitset would be bloat and also prevent\nthe user from both, in some situations, doing atomic operations\nagainst a bit set, while in other situations (e.g., at times when MT\nsafety is not a concern) operating on the same words in a non-atomic\nmanner. That said, all this is still unclear to the author and much\ndepending on the future path of DPDK atomics.\n\nUnlike rte_bit_relaxed_*(), individual bits are represented by bool,\nnot uint32_t or uint64_t. The author found the use of such large types\nconfusing, and also failed to see any performance benefits.\n\nA set of functions rte_bit_*_assign*() are added, to assign a\nparticular boolean value to a particular bit.\n\nAll functions have properly documented semantics.\n\nAll functions are available in uint32_t and uint64_t variants.\n\nIn addition, for every function there is a generic selection variant\nwhich operates on both 32-bit and 64-bit words (depending on the\npointer type). The use of C11 generic selection is the first in the\nDPDK code base.\n\n_Generic allow the user code to be a little more impact. Have a\ngeneric atomic test/set/clear/assign bit API also seems consistent\nwith the \"core\" (word-size) atomics API, which is generic (both GCC\nbuiltins and <rte_stdatomic.h> are).\n\nThe _Generic versions also may avoid having explicit unsigned long\nversions of all functions. If you have an unsigned long, it's safe to\nuse the generic version (e.g., rte_set_bit()) and _Generic will pick\nthe right function, provided long is either 32 or 64 bit on your\nplatform (which it is on all DPDK-supported ABIs).\n\nThe generic rte_bit_set() is a macro, and not a function, but\nnevertheless has been given a lower-case name. That's how C11 does it\n(for atomics, and other _Generic), and <rte_stdatomic.h>. Its address\ncan't be taken, but it does not evaluate its parameters more than\nonce.\n\nThings that are left out of this patch set, that may be included\nin future versions:\n\n * Have all functions returning a bit number have the same return type\n   (i.e., unsigned int).\n * Harmonize naming of some GCC builtin wrappers (i.e., rte_fls_u32()).\n * Add __builtin_ffsll()/ffs() wrapper and potentially other wrappers\n   for useful/used bit-level GCC builtins.\n * Eliminate the MSVC #ifdef-induced documentation duplication.\n * _Generic versions of things like rte_popcount32(). (?)\n\nABI-breaking patches should probably go into a separate patch set (?).\n\nMattias Rönnblom (7):\n  eal: extend bit manipulation functions\n  eal: add generic bit manipulation macros\n  eal: add bit manipulation functions which read or write once\n  eal: add generic once-type bit operations macros\n  eal: add atomic bit operations\n  eal: add generic atomic bit operations\n  eal: deprecate relaxed family of bit operations\n\n lib/eal/include/rte_bitops.h | 1115 +++++++++++++++++++++++++++++++++-\n 1 file changed, 1113 insertions(+), 2 deletions(-)"
}