Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp93894ybl; Wed, 11 Dec 2019 14:36:59 -0800 (PST) X-Google-Smtp-Source: APXvYqyYu7uEDTMdM+xD2M3fIBZHAWfWWC71e2GQ5Kk+CA1AfjPpS8raUwQoUxw0dR+osDV0h+aN X-Received: by 2002:a05:6830:50:: with SMTP id d16mr4618380otp.155.1576103819096; Wed, 11 Dec 2019 14:36:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576103819; cv=none; d=google.com; s=arc-20160816; b=k3CqGf3MP4NxYBERim5Nd8UG6u1Afymq9UoIDOUSS8RoIvSPzPJxZ3gaDb1CyeGpm4 x+6Wc5kGIaKPdRrvAu4RT9dTtc9Goo+OvVxoMvL5rPspHRM1gOk65SZW08cIsMybUhz+ B1gqbvdbm8IbIyhMK1OuiwMw1zIL0k66GnjHXpS4hZUn1zU8mzg/MplUth35kz6QmhIk Vbb32bRIm1YyMQYobh+6eqy1DjZ3aNEdt5J0DAY3J96iXS9HqfTJBqO7pwYY0uNA+TkU BkFFNmrkri7uaJob+h3sRphUm7SMD1mwukNTDmsQ+dhqbRqt3pXZOvkbNxlD+qRgIgHo /sKg== 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=32U3png4dzMqFX2eRDO2dCbQbOL/7+0IfZtgOUFBf0A=; b=biriSQTWL1TUfYBw08b029T1SWm7garBE698Tf7wuM/vKvvO+3cw+a+c8vG/57dlr5 0lUVC8ecl52Vmhc/JkG9iU9UAHt26mr2ToOTk5sieanlbdlMMBF4szgSpCtcmDCAGACV AC8gRzoCknsRsryrBZKf35wN0jAJwp2CLBbD/iRWGR7XtFNL0EsznQUk27ixs5lSalnS 7T0A4VE2IAB6IxT8gvP1PgffsPD8AkUlDejHTU9gU61oIwfnlC7qXjBdIePFUBwGxMkP Hq8PbEhfNm4tQrCDj2g6vDPtO0RjdeV0eJxIN5k0RDpxqcsnPHOMwu3MyZIotH3dYxeO 42AQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="Jtn/gEWQ"; 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 f4si1949860oib.104.2019.12.11.14.36.47; Wed, 11 Dec 2019 14:36:59 -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="Jtn/gEWQ"; 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 S1727077AbfLKWef (ORCPT + 99 others); Wed, 11 Dec 2019 17:34:35 -0500 Received: from mail-pg1-f202.google.com ([209.85.215.202]:34796 "EHLO mail-pg1-f202.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727043AbfLKWe3 (ORCPT ); Wed, 11 Dec 2019 17:34:29 -0500 Received: by mail-pg1-f202.google.com with SMTP id w9so217108pgl.1 for ; Wed, 11 Dec 2019 14:34:29 -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=32U3png4dzMqFX2eRDO2dCbQbOL/7+0IfZtgOUFBf0A=; b=Jtn/gEWQD7EIy6Bjrl5YvoRO959WbqPKaUQlDLnoRDEImaXWJvFLaFqaEeczCp0g9h 7qyyodzuklWb9l1hpaUI1/sdZZRc7dsnKtExMT64sUgQhCFVbqZrNq3CZ+SNciD/FRA6 hk+P2/9MSu8NHmKYd5U0kpnfbWAJGHYVCoRPCmCmrifHLSqosXIA31Ys2Y5NGUXN3vqQ f89DvdMylPXXnvTdWbhHX85RVDNujkBbCF2JxyC2tNfESxA8XkHtCOyrQQZ98A3U9a4+ CDOL1MkRE10kDhOJbY05MpuIEGothGjv5rkbv8d+AzZjvXEzkIkn4sr4H73emfkNVN2P Z3Hg== 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=32U3png4dzMqFX2eRDO2dCbQbOL/7+0IfZtgOUFBf0A=; b=d71/4WW03cx7voNyAlNJXzMP9HydCTHwyspjZ30dvEBJsLZwbWxy5JVe6s/MUWZc1d 4eCj70KqBhISSS4eY01j5WVUhxlJ74D3hAO3cHXP9g+XdQwVnRRc6PZmao4KmHgycmVj KnEY0dKp7yzjAy+kUr9VsMZXbDXTqNb+2Z9UKB3x78X7CB+40O1IjOWEeZu6QGx3IXrT on6nJjRShHYoMgZTyECBgwM/htjzWsfb1J528DpC7oRc2E4MuYsV69Xvi5iH2mZrPri1 Uz2Uz/lNDgE9Y+SCUsSnHvw8ehLBrawAkGcvWS575xGlGg4FTVVl09AfB4liHZZD3Dsk v74w== X-Gm-Message-State: APjAAAXM3pibU71FeBSPu4jaQ9J5CpojQKG8WWU9KN4mn7BHXTufJDig SWPiHx6l5BBeVSCr8qRjaaAP3CQ+gdNh X-Received: by 2002:a63:647:: with SMTP id 68mr6839227pgg.202.1576103669219; Wed, 11 Dec 2019 14:34:29 -0800 (PST) Date: Wed, 11 Dec 2019 14:33:37 -0800 In-Reply-To: <20191211223344.165549-1-brianvv@google.com> Message-Id: <20191211223344.165549-5-brianvv@google.com> Mime-Version: 1.0 References: <20191211223344.165549-1-brianvv@google.com> X-Mailer: git-send-email 2.24.1.735.g03f4e72817-goog Subject: [PATCH v3 bpf-next 04/11] 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 , 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 --- 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.24.1.735.g03f4e72817-goog