Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp930905ybc; Tue, 19 Nov 2019 11:35:43 -0800 (PST) X-Google-Smtp-Source: APXvYqwUUEoc63zzSYmDJkh/ZQ8wot+/p2GF/kA6YNGZ5vF/cZ6a1da6LwFPKsylfFBIDVm74pRj X-Received: by 2002:a17:906:5c0d:: with SMTP id e13mr7422940ejq.82.1574192143700; Tue, 19 Nov 2019 11:35:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574192143; cv=none; d=google.com; s=arc-20160816; b=FJg7UkGI7D9+v7ugyKVLHFXlfKgHjrrg1ZinUzDPIebtc9VzR/ZXEiQEOyc3xZOuvE xrSP7x/xmzKtCD3TX+/iJiOMtc/HPFpnFKWnX9/jn2+uVexwJnQGez5QFxAl2HGMZqbi dAxU4LwZHeC7fYwoSNsQ0aj8fMHHNvROEQU6gNS8IlmSl8lyzzvWV/Co1slmttmrBKth 9rQS4/Lm7//bcEbCVTQ2qzLd5qf99iP0sLTzTZmQ/COAkCvb2oB0q1hfk1xIxKGbRjV+ XfUPttSKaCYRjME1htMAv7u/J0j0n6jQLbbgjhSuCNwH7OobZHybKF4f4yZlkn6ej/eJ HsrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:from:subject:references :mime-version:message-id:in-reply-to:date:dkim-signature; bh=+X4EfDiauElJOC7RvUHMTNrf0yIKJ6Yo/r1JySL4OmE=; b=Er7gC4xPFcd/kVZjNkslhfX+y96CI8XCY5bt3fW07KoH/kymGKlmIJX0uLSpqmC3N3 h0QenCV/OVk5ETyN9JU81M9FAnoOwXQWJcLVxI/OcKgBJMtbv7y9HslSISvYqhnrIcM+ 2Hbj+JxPnx6LuNDqLEfwT+oAmiVSF+n/ppMG46LdA5Q47YYGdghjzTmIFV9yaWx/X8+s tEJOMVDYc5u5f7HWxEfsi7pwXkGglnOcT3rJcgQMh3Taj6eKrnnnA1pdSKl6I7lsaKVK yjIW3Eq3az5h5mqK+F9jh5+6jJgl/K7oMcCKgLa8/bDCfXPwbwciya+J3p64k2ArtsPU qifQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=KKfy6cGF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d12si9960330ejt.334.2019.11.19.11.35.18; Tue, 19 Nov 2019 11:35:43 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=KKfy6cGF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727423AbfKSTaz (ORCPT + 99 others); Tue, 19 Nov 2019 14:30:55 -0500 Received: from mail-pg1-f201.google.com ([209.85.215.201]:50011 "EHLO mail-pg1-f201.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727324AbfKSTay (ORCPT ); Tue, 19 Nov 2019 14:30:54 -0500 Received: by mail-pg1-f201.google.com with SMTP id 14so7133971pgv.16 for ; Tue, 19 Nov 2019 11:30:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=+X4EfDiauElJOC7RvUHMTNrf0yIKJ6Yo/r1JySL4OmE=; b=KKfy6cGFJzrvbZ+zaVtoIK6lbKkij8Ez+QP+UrABS7jTH6fWRYIOLXrUNxMuEhYho2 gIJ0Z3z9EY5uAfnR/RT2mxFOPeuEJXtf0gOs2iwNjq7C89kcDwoPU+pkr6Fv7S2kIllI cgnJ4vZ95Lh6qUuqJ/b9vUDGOMJMIfF8TbS9XjBvp0KfxklTpcbFSSHiC/EoGqm4VvGT xheYmmAUWYh+0a+EgLJGRRBp61JZWwI/gvzpV9x8oFIiT98N8UwQNBptCNGx50kVH004 1+eZVNTge9RNKalRpnP80Z9HZjoDuuoslzDpFkhj0dZ0CTDwUuoGXV0HxvGcGYxjt6Rv G3Rw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=+X4EfDiauElJOC7RvUHMTNrf0yIKJ6Yo/r1JySL4OmE=; b=BCp9BR79inSvGTNri9NsSRAht5Mggy8v8PxSy8TRtW6T03/iB839etFGzX0Q6iG3LZ kghbOYERmjrjMxSHIaDIcJ0r177oXnLiuSzVoCaYE3YFWilFqNHVKakSBFW8CHI0S6kS IhTzXUyC5YoOG+pHxew5QYEKM5ayJB8PDXI5EugTqvWu/QetA3DLCcos9+L+XN2ntR1X +46LwHB4TBo+zSiFlb+hdKG6vApZTFWRYIL/xDbBSCTBmVlAZWjgXFuYD+lzF9QLhExc 0lHiRuAPdQFcnMbuD+Z/jBIr81r7xU1qmJqZLq+ACsA4MV78Dg80TFc/CLm9m+1pp6m7 bUHw== X-Gm-Message-State: APjAAAUKs3XClztmRN2QjJIAUE9LxNkA72hjk6c18TjudHgdkJmbteXM xG+X5bazHs5GTD+xkwFmgCWqI6/VL2zj X-Received: by 2002:a63:3587:: with SMTP id c129mr7516833pga.211.1574191853520; Tue, 19 Nov 2019 11:30:53 -0800 (PST) Date: Tue, 19 Nov 2019 11:30:31 -0800 In-Reply-To: <20191119193036.92831-1-brianvv@google.com> Message-Id: <20191119193036.92831-5-brianvv@google.com> Mime-Version: 1.0 References: <20191119193036.92831-1-brianvv@google.com> X-Mailer: git-send-email 2.24.0.432.g9d3f5f5b63-goog Subject: [PATCH v2 bpf-next 4/9] bpf: add lookup and updated batch ops to arraymap From: Brian Vazquez To: Brian Vazquez , Alexei Starovoitov , Daniel Borkmann , "David S . Miller" Cc: Yonghong Song , Stanislav Fomichev , Petar Penkov , Willem de Bruijn , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, bpf@vger.kernel.org, Brian Vazquez Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This adds the generic batch ops functionality to bpf arraymap, note that since deletion is not a valid operation for arraymap, only batch and lookup are added. Signed-off-by: Brian Vazquez --- kernel/bpf/arraymap.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/bpf/arraymap.c b/kernel/bpf/arraymap.c index 1c65ce0098a95..680d4e99ef583 100644 --- a/kernel/bpf/arraymap.c +++ b/kernel/bpf/arraymap.c @@ -457,6 +457,8 @@ const struct bpf_map_ops array_map_ops = { .map_direct_value_meta = array_map_direct_value_meta, .map_seq_show_elem = array_map_seq_show_elem, .map_check_btf = array_map_check_btf, + .map_lookup_batch = generic_map_lookup_batch, + .map_update_batch = generic_map_update_batch, }; const struct bpf_map_ops percpu_array_map_ops = { -- 2.24.0.432.g9d3f5f5b63-goog