Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp3396053pxu; Tue, 15 Dec 2020 06:12:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJy5tbQBtRn3Psv7Gk/wQ8i0ySFJZ06ruvzu/tBn92p+p95l0PeQ9lt+f0ViiI4kt++3Hib0 X-Received: by 2002:a17:906:edd1:: with SMTP id sb17mr26705617ejb.118.1608041564310; Tue, 15 Dec 2020 06:12:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608041564; cv=none; d=google.com; s=arc-20160816; b=cUrjrLu8Kh3nxTb5HcsTRnfB6UZxqjui00D37V7n/DhAuuWzkkXJllAVDFp83bc083 orXfWX9MS9GTJrAOtNmAJCc1fictWqAB4JhViSWMJdZo81pUU2qTscSBuGqXTH5GfREd wAG2JuzE6xoAOwe0qYW4qTwOyhhDgJegrVzmqyHNZnJfqqP8e43yRhcIL4kolpXPVNAh 7mXelBWObdWad06YMOuamUuekDMx0WTc2n/MnzUo9ABa8eWrfz1uwcKfBQDPTcZqVMRq cf4ja2+0/uAxGHphikyLQszJqlKA5A/TY6I+4ff9LG2Bv+kt6SHpCmDhd2VOwbah6Fa3 vG5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=gK+9YqVJCbtE3lQ5Don8jQgcKt63bQ7YNsENkuEVRUE=; b=gZ4oxJ1aw7kFAWqDtD9tf8TBwUlrH4L9g49ccvANyDd/CtWgJwVRpRd61WbuUme7Vc 5MMJSd2v/mqlBI698dhlixqr02cjiC6XQzz4ftgLb9f3nsYyCtwo3i0q95v1iI8WJ0B5 hox/USVreTcMXXxm/C0u8Z53X2OPSUClfGWfgPzNeuxk6fCsZsogJEEtZxaBxrUR1kVA GVE5cCX20/ESJ1mSYo2RYy+RIRUkcVqSoMewvvkx3q6hLw/EfIsIQKOKhYfmZj4wul54 +9dPJHeVtQmZiURM7ICouRWIu+Fg9/OO4t620YIOyip7t9rSQve5OV9Fbd8dDU2rSbmB rxwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=qPV3HGsE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y23si895183ejc.508.2020.12.15.06.12.18; Tue, 15 Dec 2020 06:12:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=qPV3HGsE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725890AbgLOOGm (ORCPT + 99 others); Tue, 15 Dec 2020 09:06:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38774 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727876AbgLOOGa (ORCPT ); Tue, 15 Dec 2020 09:06:30 -0500 Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D2ECBC06179C; Tue, 15 Dec 2020 06:05:49 -0800 (PST) Received: by mail-wr1-x441.google.com with SMTP id c5so16323486wrp.6; Tue, 15 Dec 2020 06:05:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=gK+9YqVJCbtE3lQ5Don8jQgcKt63bQ7YNsENkuEVRUE=; b=qPV3HGsEfqw5c3jtXuS+vSjHNl8VETOoc3VbCRnTuxTLnre2GeankDt5kkgTHBlOJJ zniL7Vhb0Z53drb6aw0O8UcvwXDy1N43yBXb0FZ4MtEaVzo8XCedNKEi0BadQubgcFWs 6bKMbvnDHi3/PeCKtvOYIrjE5kdFbchptbAyMPdhzAYpiGEb6uwJxSjZ3+93ipxfLoqc JiQqsDmsEkkdfLfsNDvjYdXiDj1X0mg/dn3sPMNtOQxy/BxRikgrr3iFc5po2UP+DFtj z/hvy+14U11M8J0D03oFSDyI09TWP5d2Aw5A69gmWPDmAcRgTqcaMtlisi9857V5NCns S0Rw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=gK+9YqVJCbtE3lQ5Don8jQgcKt63bQ7YNsENkuEVRUE=; b=aaMyhKsv+ij2r/QxXyoR2shQ+o7hhs2zqcn0EnJ8cXPV524km2CYfkNh0GJX27ppaW GmNLqh2jGD9uUQi18WKNSsWcsZpyctOW5NJMFAHzzquSJv3kNYT2yyM3uU5RcZvXuef3 eZ6vfmnEYrWU8K5sf4kyL2/MCL6/jh5BPZY8HDTP3cD2+R94L/lTdSmPsO7uymXw2z+3 VOZB0TR4JwRgRfFwj5/PcWxSdPhoys+wsuWGOG5A3QG13Kejfohd49Qqprkp/vUd3kK/ i2PUhluH4EaHwq4N5eOMZLntgLGqZ3rQQ0dEfS+zr/3v96kD21E33uRBwnZ3d/xAUrfW Sn0w== X-Gm-Message-State: AOAM531Ak9Ga877IuJ1qq4QJUy0sOKSGevC9A6GUsMpMjOCwpLg0tsRn 7hb0948pNpLmrqUbw5I0ODh9OfwsPy3mGRd6NKk= X-Received: by 2002:adf:e512:: with SMTP id j18mr2954037wrm.52.1608041148627; Tue, 15 Dec 2020 06:05:48 -0800 (PST) MIME-Version: 1.0 References: <20201215121816.1048557-1-jackmanb@google.com> <20201215121816.1048557-6-jackmanb@google.com> In-Reply-To: <20201215121816.1048557-6-jackmanb@google.com> From: =?UTF-8?B?QmrDtnJuIFTDtnBlbA==?= Date: Tue, 15 Dec 2020 15:05:36 +0100 Message-ID: Subject: Re: [PATCH bpf-next v5 04/11] bpf: Rename BPF_XADD and prepare to encode other atomics in .imm To: Brendan Jackman Cc: bpf , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , KP Singh , Florent Revest , LKML Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 15 Dec 2020 at 13:25, Brendan Jackman wrote: > > A subsequent patch will add additional atomic operations. These new > operations will use the same opcode field as the existing XADD, with > the immediate discriminating different operations. > > In preparation, rename the instruction mode BPF_ATOMIC and start > calling the zero immediate BPF_ADD. > > This is possible (doesn't break existing valid BPF progs) because the > immediate field is currently reserved MBZ and BPF_ADD is zero. > > All uses are removed from the tree but the BPF_XADD definition is > kept around to avoid breaking builds for people including kernel > headers. > > Signed-off-by: Brendan Jackman > --- > Documentation/networking/filter.rst | 30 +++++++----- > arch/arm/net/bpf_jit_32.c | 7 ++- > arch/arm64/net/bpf_jit_comp.c | 16 +++++-- > arch/mips/net/ebpf_jit.c | 11 +++-- > arch/powerpc/net/bpf_jit_comp64.c | 25 ++++++++-- > arch/riscv/net/bpf_jit_comp32.c | 20 ++++++-- > arch/riscv/net/bpf_jit_comp64.c | 16 +++++-- For RISC-V: Acked-by: Bj=C3=B6rn T=C3=B6pel