[Bpf] [PATCH] update the consistency issue in documentation
"Aoyang Fang (SSE, 222010547)" <aoyangfang@link.cuhk.edu.cn> Thu, 04 January 2024 03:12 UTC
Return-Path: <aoyangfang@link.cuhk.edu.cn>
X-Original-To: bpf@ietfa.amsl.com
Delivered-To: bpf@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id DDC1FC14F6AA for <bpf@ietfa.amsl.com>; Wed, 3 Jan 2024 19:12:45 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.911
X-Spam-Level:
X-Spam-Status: No, score=-1.911 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=cuhko365.onmicrosoft.com
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6aJOvEIdpZnK for <bpf@ietfa.amsl.com>; Wed, 3 Jan 2024 19:12:43 -0800 (PST)
Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on2081.outbound.protection.outlook.com [40.107.113.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 9B8E7C1654E9 for <bpf@ietf.org>; Wed, 3 Jan 2024 19:12:42 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cnBdDBYy8a7DtV/WdQJWqjR2+BW9AR7m+rXOvJ1HiwjAc+enLciAXT2GlnesHh3Lj2qQjNisjjXEhFW0RJbAtLHDfmQRGo5EiTuBiEjrrykuKlxGG+p0Xp6XfhApPc0v63SYtCq1OuexWKlTWp5cWOZPwXjZhQqzFXQY+6Py9Pt5WHvm7DMgWJjVMwpYLY4atEa7UlfV4M18ZuivVh4OCSiDZonJ4R971+kPn9IMscNMI99B0VIr4bHmB7n1eWxf4r69hUKs8XIjSorw5aCY54SSQ2/HcWpu3dXsLteztqB4VO0McXSTp7Jljyp3+vrrQzMV8s/QLPC12mWcsDLSfg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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; bh=9jIWgysWGTweyjwCg095ynhHbkS2XmiZeTcX8lM5KCI=; b=PKDWE3z/6wdYNY1zKD3AvSqRvXSrH4t1D7Wh06iJZ71YMsKvaObRyj4aDZ6mG6UALgPFnNKE3lLYbWkZwMu1QTekfwtfhq0uy7LVuBAQomb9tVJ/cS/byaj8tcv1Mo8CLQJfN9nJ8R04UUg63mdq0H96KHNn08X33EZymfX8DOnA086nIv4o8Zf3Bbe3hl0AIYQf28AyUcNucjLGXcv+2NzD3rDsz8KgmKlzQ4wSKYi8fTHQKhaqgzl+Q6ckNyMJWP0VcBt5XkmuYd+CLki3Z9uQfUk+2yA7ehYGO8QycD5z80yyTrXJ+BgTFDTaWBpvBLF0YZEL+T9Xm01jCSCn7A==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=link.cuhk.edu.cn; dmarc=pass action=none header.from=link.cuhk.edu.cn; dkim=pass header.d=link.cuhk.edu.cn; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cuhko365.onmicrosoft.com; s=selector2-cuhko365-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9jIWgysWGTweyjwCg095ynhHbkS2XmiZeTcX8lM5KCI=; b=JtoYeXTD+DzR8cY8Cy01ti3AvCrtDTPnS4U67NssGqGtBtaUfwH4Hyz2xtWkDQnq1NFBd2v+y+XvrFraYaRCHxi28yPTDljCdXCIdoCCqrV544y8ggimg/hCjGyNGAN0dyS26tKsN5zIawVDoqCtEqCnL0/7s8b6InPTwmAgeQs=
Received: from TYWP286MB3822.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:447::6) by TY3P286MB3732.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:3d2::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7159.14; Thu, 4 Jan 2024 03:12:41 +0000
Received: from TYWP286MB3822.JPNP286.PROD.OUTLOOK.COM ([fe80::6fa9:a85c:1adc:827b]) by TYWP286MB3822.JPNP286.PROD.OUTLOOK.COM ([fe80::6fa9:a85c:1adc:827b%4]) with mapi id 15.20.7159.013; Thu, 4 Jan 2024 03:12:40 +0000
From: "Aoyang Fang (SSE, 222010547)" <aoyangfang@link.cuhk.edu.cn>
To: "bpf@vger.kernel.org" <bpf@vger.kernel.org>, "bpf@ietf.org" <bpf@ietf.org>
CC: "void@manifault.com" <void@manifault.com>
Thread-Topic: [PATCH] update the consistency issue in documentation
Thread-Index: AQHaPrvgz1htAWG5g0GpJpM0pJumoQ==
Date: Thu, 04 Jan 2024 03:12:40 +0000
Message-ID: <3A7D0A57-02EF-4ACB-A599-1029CFCA7E74@link.cuhk.edu.cn>
Accept-Language: zh-CN, en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=link.cuhk.edu.cn;
x-ms-publictraffictype: Email
x-ms-traffictypediagnostic: TYWP286MB3822:EE_|TY3P286MB3732:EE_
x-ms-office365-filtering-correlation-id: 6b400a82-a466-442a-3aab-08dc0cd302ec
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: F0/ERUlKP99wPR2PbYlw0RS3aNIZB3AHbJVOFx7uDcLY1I4fBn2bRafOArL409nBjWaQQwUMPNAHSTdsgqw107zCeKY2Vt9p8iQoRttBJnhEPvdl1ResjiUrRBcZmKoQV0jnVRj6436LqCtbc/3KKuzjkyy1Sqel52vN3b7DZdd8ScxQMU+sov8uUqLkq+PN6MMQBweFtUe/McXBobo/FgzSQcIb70xEiucSi4l1yIPIMDt4+9rIBTZqXXhMzGoM4wY03IcyjFaNQ7IdUnFxSKnLFzjmhhUJ4iW20IMzgFYRsoNOCJaCVUATs4wLZiV+9SxSXCdfmOPvPyMVqMYZDDJF9SoYo14sFU4NsY0ycNb7yFJyTCKPYJ1uHjcAMmTsSFcaL+l/gk7zVAkecyXgnrjBOg4P9HMdyoVKozHaRqO0Lzd3DMQ8VIKKwgvTUQ1xcL8GLaJPulwAE39Rph42EraTajOn7nfEQUS9dWXJ9PW6jX88fCJyXXKPR1PVJj0PS5sFLNDum2EJcFcXUII+e1EgbsNTmxqWBAs8ywIIPn+b3Z8ILROnY55l0TrssXVP77R5Z56SYftjJY/9w+HfAPZgM8Mim9w7U1mm1bmBFJI2VbE6oIXZnpySYAW6kQxAYxRWkWUT906JNbK01Mnbhg==
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:TYWP286MB3822.JPNP286.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(13230031)(376002)(136003)(366004)(396003)(346002)(39850400004)(230922051799003)(1800799012)(64100799003)(451199024)(186009)(8676002)(4326008)(41320700001)(2906002)(5660300002)(478600001)(71200400001)(6506007)(6512007)(53546011)(64756008)(66446008)(66556008)(76116006)(66946007)(316002)(66476007)(786003)(110136005)(8936002)(6486002)(41300700001)(38070700009)(83380400001)(122000001)(2616005)(86362001)(38100700002)(26005)(33656002)(45980500001); DIR:OUT; SFP:1101;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0: I1Rm8UpCrykiPL1phWhcEHv+IHHCH2Dhb+sXNGO+cSrPSD/E3KXXm4dmdScn1CZVd5DMMQ0vhlaquq1Cyi7i4/drmfoVoWUPtW+rCJETx5+npOBU+ym+CzqJswL1p2ViRqk2iR19WH9xBvRiozD82HNt8pTpPsHIYTVBbFMRYu65GinOEty8RQQdH4605jLRdN6AjC+zWc96Q5yo1aJTYbHK7QZDZf/LOnpcy5TnzdxjXsiQLVD0aQDEGUSpfVLzJqcTe67O+C6LzumvOS/Tz98J5iXGmUyQKas/+L60OLPUnBPn5dm1aXxxpVXRNDgHmr2+ahc6xuU9BzsE8m6CL0gwZkPFVu0zTpYMUVcmsmb6xWE3y9X6SrRnKagseep7eVcCywzNi9dMRQX9sK+fpkzmxLDlR5B4nFE8LXJB+6lVMIkmAZAYqcCmZOCycJ6P2q42BL18encM1idKQL2ITNcMn4C1inmk5xr6+1OlYYpskgclr4O3kc5f+BHVDT2NBqMK68k/n42gwYS9sYKTZyGUsQeRQLFbI0f9kNY2glmPFksf5Qz8Xv6E6+MyMxpKlXz2qO+X0cA+HaOHQ1G4igh4cDACjsWJ1abk91aWucg+rELM7k9AocR79GQFGh6ghP1AcOfRJ2I8SKNzIGRYDnYmezU+WM5c++HtN2oOVBu/v50aN/21Qth/o8dt667ybe0KOfr4rVnguW6nUex0npreGwDAjuwmSs1zyShkkFQcV1xPvD6zAU+sUcvxSZ3QJEz7gP41lEDSTa1Zud+85UCP/oqAWWVOPPy+WEmHNVs0CtA64Up8JcVLV8+6BwF/ej6jfZMtBjlmgnoRPAdbKHgpEqWCUa+K2mwKHG6T64G6ZDOO48128Ew/7DAIIn32BLsWqNUNOZueZjfr4CzFMhsoS5udcYWWDfDoYIyi99CD/dew+pNp1nc8MeKIhnvLActor+w84ZvBSoSgoNhyK3L3Ur1fKEG1A5MVgoOQUruEBSizt7musg/Jvhip4vonFZ+H4pEHCXCy3dCqQrerAKeK7CfAOS5VX8V3DBvdLAbYn4uCGGgHERvkAWXiSu7W2INIf8dPXS6UCZ2eYbi/uH+FlQwFzEPYsbE1k/Dhq8P5ExBxoDpIcNuqqngaH/hkEUSdsHSdI87kHDZthi9Vab/G4dvuMUgR439QeURczVy5OrUbo/FniWSNjLLRkrR7Xm07aSFjvvpwqDeMK6vJqQ7oGF8oLgAOQSxwUSB/Z6COCPi/N9HDfC+pH0kQ6Ipm2wwsoTYR11mI7HqQBRjyyNNo8lBdcNGdQyU6qDJJpB52HDLWOBxAsryj+vj6aWDSdsZOsaqXQJ+zAqpg2vOS3aspvE26jV5hpAAwiz4HUKZcxMQdmDw7f5WjmOG+ui9gT4KBlI2RQWu9HPcyh6CYaPJvDMpitsVFOVuiHydcmiV4FbadjYj0uwTosdKhs/QrjOGM+92LvR/Xr2KBvTJcN056Eu0uvCu6OGusRhVfu8gOBF9YF+MZ5r8L35DGZC9BZiOwg6+dEljIwJCa+LWwz1T5rZGif8W6+EUhzOgLHhU4JhxdI+kM6rh7BZTmerHJ6oh7t7YNBcvnOwvq6kLDIw==
Content-Type: text/plain; charset="us-ascii"
Content-ID: <DD654C668D7F8F42A34CD27A924BF85C@JPNP286.PROD.OUTLOOK.COM>
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: link.cuhk.edu.cn
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: TYWP286MB3822.JPNP286.PROD.OUTLOOK.COM
X-MS-Exchange-CrossTenant-Network-Message-Id: 6b400a82-a466-442a-3aab-08dc0cd302ec
X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Jan 2024 03:12:40.5998 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: e5898b7a-9c87-4a4b-b22a-2df3f355e01e
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: sGcZRQr+aKrj+2wGhm8aJbxJGaRUA8qAgYXlZiG4hauVTxo/oW7WQASQ/jGozgq3FyqX3OoyhvfsL0e+tuNz1KfhoSMiPJRMS0kmL/4buio=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY3P286MB3732
Archived-At: <https://mailarchive.ietf.org/arch/msg/bpf/xBh7k_g_tlVyn7ycwyln2lTPGgA>
Subject: [Bpf] [PATCH] update the consistency issue in documentation
X-BeenThere: bpf@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: Discussion of BPF/eBPF standardization efforts within the IETF <bpf.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/bpf>, <mailto:bpf-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/bpf/>
List-Post: <mailto:bpf@ietf.org>
List-Help: <mailto:bpf-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/bpf>, <mailto:bpf-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 04 Jan 2024 03:15:22 -0000
>From fa9f3f47ddeb3e9a615c17aea57d2ecd53a7d201 Mon Sep 17 00:00:00 2001 From: lincyawer <53161583+Lincyaw@users.noreply.github.com> Date: Thu, 4 Jan 2024 10:51:36 +0800 Subject: [PATCH] The original documentation of BPF_JMP instructions is somehow misleading. The code part of instruction, e.g., BPF_JEQ's value is noted as 0x1, however, in `include/uapi/linux/bpf.h`, the value of BPF_JEQ is 0x10. At the same time, the description convention is inconsistent with the BPF_ALU, whose code are also 4bit, but the value of BPF_ADD is 0x00 Signed-off-by: lincyawer <53161583+Lincyaw@users.noreply.github.com> --- .../bpf/standardization/instruction-set.rst | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/Documentation/bpf/standardization/instruction-set.rst b/Documentation/bpf/standardization/instruction-set.rst index 245b6defc..dee3b1fa8 100644 --- a/Documentation/bpf/standardization/instruction-set.rst +++ b/Documentation/bpf/standardization/instruction-set.rst @@ -355,23 +355,23 @@ The 'code' field encodes the operation as below: ======== ===== === =========================================== ========================================= code value src description notes ======== ===== === =========================================== ========================================= -BPF_JA 0x0 0x0 PC += offset BPF_JMP class -BPF_JA 0x0 0x0 PC += imm BPF_JMP32 class -BPF_JEQ 0x1 any PC += offset if dst == src -BPF_JGT 0x2 any PC += offset if dst > src unsigned -BPF_JGE 0x3 any PC += offset if dst >= src unsigned -BPF_JSET 0x4 any PC += offset if dst & src -BPF_JNE 0x5 any PC += offset if dst != src -BPF_JSGT 0x6 any PC += offset if dst > src signed -BPF_JSGE 0x7 any PC += offset if dst >= src signed -BPF_CALL 0x8 0x0 call helper function by address see `Helper functions`_ -BPF_CALL 0x8 0x1 call PC += imm see `Program-local functions`_ -BPF_CALL 0x8 0x2 call helper function by BTF ID see `Helper functions`_ -BPF_EXIT 0x9 0x0 return BPF_JMP only -BPF_JLT 0xa any PC += offset if dst < src unsigned -BPF_JLE 0xb any PC += offset if dst <= src unsigned -BPF_JSLT 0xc any PC += offset if dst < src signed -BPF_JSLE 0xd any PC += offset if dst <= src signed +BPF_JA 0x00 0x0 PC += offset BPF_JMP class +BPF_JA 0x00 0x0 PC += imm BPF_JMP32 class +BPF_JEQ 0x10 any PC += offset if dst == src +BPF_JGT 0x20 any PC += offset if dst > src unsigned +BPF_JGE 0x30 any PC += offset if dst >= src unsigned +BPF_JSET 0x40 any PC += offset if dst & src +BPF_JNE 0x50 any PC += offset if dst != src +BPF_JSGT 0x60 any PC += offset if dst > src signed +BPF_JSGE 0x70 any PC += offset if dst >= src signed +BPF_CALL 0x80 0x0 call helper function by address see `Helper functions`_ +BPF_CALL 0x80 0x1 call PC += imm see `Program-local functions`_ +BPF_CALL 0x80 0x2 call helper function by BTF ID see `Helper functions`_ +BPF_EXIT 0x90 0x0 return BPF_JMP only +BPF_JLT 0xa0 any PC += offset if dst < src unsigned +BPF_JLE 0xb0 any PC += offset if dst <= src unsigned +BPF_JSLT 0xc0 any PC += offset if dst < src signed +BPF_JSLE 0xd0 any PC += offset if dst <= src signed ======== ===== === =========================================== ========================================= The BPF program needs to store the return value into register R0 before doing a -- 2.42.0
- [Bpf] [PATCH] update the consistency issue in doc… Aoyang Fang (SSE, 222010547)
- Re: [Bpf] [PATCH] update the consistency issue in… David Vernet
- Re: [Bpf] [PATCH] update the consistency issue in… dthaler1968
- Re: [Bpf] [PATCH] update the consistency issue in… dthaler1968