[Bpf] [PATCH bpf-next] Fix definition of BPF_NEG operation
Dave Thaler <dthaler1968@googlemail.com> Tue, 27 June 2023 21:39 UTC
Return-Path: <dthaler1968@googlemail.com>
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 24F28C137393 for <bpf@ietfa.amsl.com>; Tue, 27 Jun 2023 14:39:21 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.845
X-Spam-Level:
X-Spam-Status: No, score=-1.845 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=googlemail.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 6ABQx9mIfFFr for <bpf@ietfa.amsl.com>; Tue, 27 Jun 2023 14:39:17 -0700 (PDT)
Received: from mail-pg1-x52c.google.com (mail-pg1-x52c.google.com [IPv6:2607:f8b0:4864:20::52c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 4B900C13AE52 for <bpf@ietf.org>; Tue, 27 Jun 2023 14:39:17 -0700 (PDT)
Received: by mail-pg1-x52c.google.com with SMTP id 41be03b00d2f7-55b0e7efb1cso651036a12.1 for <bpf@ietf.org>; Tue, 27 Jun 2023 14:39:17 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20221208; t=1687901956; x=1690493956; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=zZ9y6QRdu6OKqSRcId44hSNEZdSQokxImaizAMqnnzI=; b=ciUhEUEh/fgucB23VxRKLV1NC22GCX6+ff4NC2K1rkG9+pevOiXlEnSmnchNBAJNNM YNgttOuAMH8povK7lkCpU8Wr0+YqBui4rnkAvaEtwJb5AmbQUG7Kb+iX/KMg4RH1o7zs lD6M1IpvHfLTcbDPSXSKt5X8suHpljLzPOB0mtSiD1OzVBl5tmXQFkKXYtWx1ypiLDQj PIXYRwKJxesV1CgpEUKBpSSQGSbt5mb+zKIO1VUl0C2ARH+M/0pYvyyQi0SeKWZgjDZE wBHa2nYh114uI7gvhpLeH/3zI9o3TEJ3u30qbVJ+p/A71a3ZpF9ZvtKROjIK3xeLBNMB CK7Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687901956; x=1690493956; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=zZ9y6QRdu6OKqSRcId44hSNEZdSQokxImaizAMqnnzI=; b=Rhs8zR9o7S+ACw9YoUglmqMAWr64Qrwplxf7AC6mNC+65e5VqowQpVDmvDwvTcoVb9 ARCZxDI3awCKcP2SFUcEQzMHhi21dLyAAwufUdh6NtR+3+1OMMfW6Bq/69iuMq2BnFZB ol1COWVRWO21NnIOW2O2rjohJ9bAD7KVAqIIho/VpfTIQRJqfwA7MIymSbGxLaGNQrWY hHRcD6tsk/3MVQf9nUTjh1okuVpwZJBGgxMX3BNgodEY+CzcarJ8i15DqOfUXzY0a23p MLE6mFumTDZ1CGeGacWo2kZyBBjehzCak4cqeL//XuOLaJAQYUuwagrj+vANsPlt2qR2 zwBw==
X-Gm-Message-State: AC+VfDzGLpWeqMZtOUwY3Q/HMQO5JhK6dhIiWocvebsFRGfhgjzf0p4x fURuFucIB0Q057oCLtLJqwVc1d6RAuQ=
X-Google-Smtp-Source: ACHHUZ7PHwh1JD5aoBDpi0RLH0WnbNgHMPjyzfz+jYm5rMBJ+5rYpskko1BcZmOiT4jhlGt9JRHHEg==
X-Received: by 2002:a17:90a:a789:b0:263:b62:4472 with SMTP id f9-20020a17090aa78900b002630b624472mr3253770pjq.48.1687901956607; Tue, 27 Jun 2023 14:39:16 -0700 (PDT)
Received: from mariner-vm.. (c-71-197-160-159.hsd1.wa.comcast.net. [71.197.160.159]) by smtp.gmail.com with ESMTPSA id sj18-20020a17090b2d9200b00262ec29ef90sm4631122pjb.21.2023.06.27.14.39.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Jun 2023 14:39:16 -0700 (PDT)
From: Dave Thaler <dthaler1968@googlemail.com>
To: bpf@vger.kernel.org
Cc: bpf@ietf.org, Dave Thaler <dthaler@microsoft.com>
Date: Tue, 27 Jun 2023 21:39:12 +0000
Message-Id: <20230627213912.951-1-dthaler1968@googlemail.com>
X-Mailer: git-send-email 2.33.4
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/bpf/hWe0ixMYzYio43X_0_Ld2Kihv_k>
Subject: [Bpf] [PATCH bpf-next] Fix definition of BPF_NEG operation
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: Tue, 27 Jun 2023 21:39:21 -0000
From: Dave Thaler <dthaler@microsoft.com> Instruction is an arithmetic negative, not a bitwise inverse. Signed-off-by: Dave Thaler <dthaler@microsoft.com> --- Documentation/bpf/instruction-set.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/bpf/instruction-set.rst b/Documentation/bpf/instruction-set.rst index 6644842cd3e..751e657973f 100644 --- a/Documentation/bpf/instruction-set.rst +++ b/Documentation/bpf/instruction-set.rst @@ -165,7 +165,7 @@ BPF_OR 0x40 dst \|= src BPF_AND 0x50 dst &= src BPF_LSH 0x60 dst <<= (src & mask) BPF_RSH 0x70 dst >>= (src & mask) -BPF_NEG 0x80 dst = ~src +BPF_NEG 0x80 dst = -src BPF_MOD 0x90 dst = (src != 0) ? (dst % src) : dst BPF_XOR 0xa0 dst ^= src BPF_MOV 0xb0 dst = src -- 2.33.4
- [Bpf] [PATCH bpf-next] Fix definition of BPF_NEG … Dave Thaler
- Re: [Bpf] [PATCH bpf-next] Fix definition of BPF_… David Vernet