Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp5431133ybl; Tue, 14 Jan 2020 08:49:37 -0800 (PST) X-Google-Smtp-Source: APXvYqyUnOR9AUdota446E+AJJpUGOQoLuJYdtN+bNp/v/V6z26UDKPQWtkYoBVCiGO7MXUFZCHi X-Received: by 2002:a9d:6859:: with SMTP id c25mr17439258oto.205.1579020577588; Tue, 14 Jan 2020 08:49:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579020577; cv=none; d=google.com; s=arc-20160816; b=t9ZVZRQl0MyLuF26BV6rj2Bja6cCPSVO8lKevWpwe4wXf65rG9evLVbmxxQew7gxu6 G45NOw3u5aSxT05jL3GrevzSjuwU2wgd5E51+PyKSnZ+QhDLDUDGGYGXuAAqyPJHzqcj rSPagvRWwkviT3FAR9FyE1CfxdOIp75Ax5U7Udld3OTwjmmAULdejqPJO/LoGAXxpnjc HjOa1ddIqvtnzvNxGsmcqvxLwgPwwwwAUpfK866T/3QaFD2DHdYrYhK7tK6w5R1BZanU 3+I2BkU0fU1TmEoAunZ9GBnFqvmE4B0AerNljFwkOadMO4Pkn4NrExhDbBxIcroFOiyS nWQg== 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=bTzv6GNpgfrRZmeHOV0jVc+oFdZ9HuTWtPYHIUcg/W4=; b=c7NXuMa//Gn8U+ZpiaTkhZuig4pYZLLUqXYEnYYeAqkIJxfy6GpquWHVpYAOSa0K4I 4JqdmN36aQg3Mxw9a0VMWqRA1eHjNzHAwDb8aKus2e8P5i0N3r9QpDCj7zT5M5TD9Ox7 ED+cbf9/bsuN7jqwkpMe0UYzJZDp8lYzDy3Xs/5+ffUWV4ZSjCaS1s6dy6ICsr1anzQx PdQxKH8gH9hYubA6MhU5sNNksn1fCEV3hiUgQdCzAyjFdWIgObbRJo3wKK9SBtBEsiiZ DEdjnHUDTx6Zdw1nJxzqQ+h8Ym5XWC91vswMZtD54AhXpVePl/c78HuiJBt3dR2ZFC5A 6njw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=S70B1gZP; 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 d5si6432598otp.174.2020.01.14.08.49.26; Tue, 14 Jan 2020 08:49:37 -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=S70B1gZP; 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 S1729025AbgANQqu (ORCPT + 99 others); Tue, 14 Jan 2020 11:46:50 -0500 Received: from mail-vk1-f202.google.com ([209.85.221.202]:42524 "EHLO mail-vk1-f202.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728994AbgANQqr (ORCPT ); Tue, 14 Jan 2020 11:46:47 -0500 Received: by mail-vk1-f202.google.com with SMTP id w186so5830952vke.9 for ; Tue, 14 Jan 2020 08:46:47 -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=bTzv6GNpgfrRZmeHOV0jVc+oFdZ9HuTWtPYHIUcg/W4=; b=S70B1gZPy/hQdsMI3k2PIeDncvGnKD4+33/gDuZ4XKA2/sUizILM7mWuAQp/UGsq0K Sfx74WC6dkf9O7Puh8BR1bYEp8OD4mkhSouiJOzM/dPBybExzOAawG+QKta2BE0fFC4L I3Gk14zSgsFpw3ui1F2HWlvm4O0pXiolI38oHwk1hGpNZB2ETWyyLs2tuDBePt0sAhUJ 6DhRs703GqXiGt+kXnPPo6fmu4rjMUVsBqR6xpHb9E/o2RGXL3vk7Tfk9kuxnNYP9es5 UNhxKPbhCp7cr2KWhFgTaRjXS1A2GrzW0eErqULc325gA0Xk8dZeFvJttcpxcJaUExnb hnaQ== 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=bTzv6GNpgfrRZmeHOV0jVc+oFdZ9HuTWtPYHIUcg/W4=; b=rvrpmeooDf7ZaSTTAc+3LrwdW7ilMfxh3L3QKcwG6+xpkd65iHkJ3+eKmOJ2UtOeq9 Zv3SVo2Fy65LvWn3X1VSHKaoY9oCRoSbmWZ0yaFL+bykPECUbbzV3vmcRxYjp744Qn72 2Jl4oglsvNGuxLVHobGnkPbqBojf2MlKIseaoajPr8NcTKO6pddlYsIJDA5oXiUmIrC3 XAtX+nh56oWmuQqwR7v5/6jYvgzb+MS/h0KpwUJlXJCXbxcGdydJYtGb5h7BERVlWpsK RiFaRpJcdA2Zzw2RgQtGFeNiu4gUBUkHmbA2/aLozohgzschbu3IYHpZ6yJ2phWj+98p c5ZA== X-Gm-Message-State: APjAAAWTWBiaINacQnnlpOdLOPTshqNMQh6eyAKheuvoyWU2d5rPghWS /BFWjg9X4cn+Fl4LuLxeiYhHCwTW5NUj X-Received: by 2002:a67:be13:: with SMTP id x19mr1832482vsq.20.1579020406547; Tue, 14 Jan 2020 08:46:46 -0800 (PST) Date: Tue, 14 Jan 2020 08:46:09 -0800 In-Reply-To: <20200114164614.47029-1-brianvv@google.com> Message-Id: <20200114164614.47029-6-brianvv@google.com> Mime-Version: 1.0 References: <20200114164614.47029-1-brianvv@google.com> X-Mailer: git-send-email 2.25.0.rc1.283.g88dfdc4193-goog Subject: [PATCH v4 bpf-next 4/9] bpf: add lookup and updated batch ops to arraymap From: Brian Vazquez To: Brian Vazquez , Brian Vazquez , Alexei Starovoitov , Daniel Borkmann , "David S . Miller" Cc: Yonghong Song , Andrii Nakryiko , Stanislav Fomichev , Petar Penkov , Willem de Bruijn , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, bpf@vger.kernel.org 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 Acked-by: Yonghong Song --- kernel/bpf/arraymap.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/bpf/arraymap.c b/kernel/bpf/arraymap.c index f0d19bbb9211e..95d77770353c9 100644 --- a/kernel/bpf/arraymap.c +++ b/kernel/bpf/arraymap.c @@ -503,6 +503,8 @@ const struct bpf_map_ops array_map_ops = { .map_mmap = array_map_mmap, .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.25.0.rc1.283.g88dfdc4193-goog