Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp3570071ybc; Mon, 18 Nov 2019 17:46:05 -0800 (PST) X-Google-Smtp-Source: APXvYqx3GLrcDv+cpi++3mMNSd8sY2hAAiRl2YNFuxbi+GHat/tMh4p9eccAAzT1/eUzxKAuyXC5 X-Received: by 2002:a05:600c:506:: with SMTP id i6mr2657926wmc.153.1574127965364; Mon, 18 Nov 2019 17:46:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574127965; cv=none; d=google.com; s=arc-20160816; b=DsNAk6BWhj5h75k7hVYvCFvGdaGGCYRctaTehzEazixd93P5C9FtdfnHpQrfiSjm0Y SuX/kBugpAAn+9qDYnT8+XMN/PLmsILnsvEu+KdRAJqGZduYW1fFVVGGTKVVXPgWtsrL VkT+pJ10xlfLS873P/xTE/tPSVLBjIMXyr1hVVL8LaUGFo68/Wlp5n+2x+DPJAf/y8rg i0CX6CT7R2H1iy3SZT+DfeO4x9FM4fyaf75x0GGt1Xl03ecEd0kTi9dLguMfrjqj2djw ekXAxedLVeLEWpJ9mB4mSevXwQBoN1vX7XtDUGtztVxP8YVipBRHDCPPp4RwZoN677+l 0deQ== 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=mEcRo3aiWHiIKFP34Eb5VgEVEc7h/cL1t8hz6ygXA8UdI7vY1NNMkMvbw1rXWXuGz5 J3H/h89YFzefHr1lJo59VHke8ZvhAzDsGHCdTV5HEISjPWoGxW9sS+HUlCpsaHmCCpqg 8osdODIrHw5P5IRf7Ljj0QGMMF975mO8uCYneScAPft0o+QFhzs5F5YafqnMGMyuxJMP HpOGcEzR3282w/ykxY4dNTEHT6yzQ8g574lBjVEDiNZmrN3lQeOHBv+Er075A6P+adBu ODizaxxuyKCdiVNb++bHEcVFoyyU2Ks+xF9xRWK2q5mmsbrnLe70s0nPE28KAhyDmsi1 OdOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=XuRXY+Uo; 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 c44si14354559ede.398.2019.11.18.17.45.41; Mon, 18 Nov 2019 17:46:05 -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=XuRXY+Uo; 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 S1727343AbfKSBo2 (ORCPT + 99 others); Mon, 18 Nov 2019 20:44:28 -0500 Received: from mail-yb1-f201.google.com ([209.85.219.201]:50863 "EHLO mail-yb1-f201.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727316AbfKSBoY (ORCPT ); Mon, 18 Nov 2019 20:44:24 -0500 Received: by mail-yb1-f201.google.com with SMTP id u10so13668657ybj.17 for ; Mon, 18 Nov 2019 17:44:24 -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=XuRXY+Uojn4XMwzMfwawiXvnYay5fnux5+uJeb3ziZ3R5w/vbNhsqKzQ/EKcdHNva/ bTVABpEbKe34fuMWa+rwVkf9oUB+ETllNbUdUuEV0kMV27/I5J46qEvTfjgr3geFNG+s VuSKrsE9MCPhH2N0/LwdjCjUe+e+7kT1wnb7rWBqjNaQZyzKPXI8ZtCdQjtjJ4NT+QVx GGYs8he60Apg56auefYNhlsWUk/3YYn80LCHN2SQIEPH+cUJtaYM/Gi894vrfxz39I65 SfD/FmVf683ut0qb6rCIBdLpkfRwi72MeVlTL7TmwAh1xuxqQFLA90nnUry9c6MB5Zpy j0pQ== 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=KtJvRd4RF5BfsZcUtEVVOozbRis0JE+UQdIhd5DJ62wcDtcrnbVkURqYCaFgMihVxp sHRdFDZUuBpFjdxxejOmN6Q8+X/K3jZ0Jscb39pirxT0DgpEpuVL29+4H0vX8146bVCZ HpiXmPTi9pNjurqSX37nW6jVrr7FlXuVowCS01pTU9YTSRLNIjgS9BqVM+tB+YpexmY0 g5jf3LAyA6n3jaQDctFjxGNSFTUAeIrB2MDiO9j2Z6lrsgM1Huhf8Mtp5EZl4R1lPn1l Wyq1femjkQjtTLpeM8zdsziGZDNY+WMmOEE9RVchZY3i/UJ71mcCXzCBWF0V6SC2TAaR ZSQg== X-Gm-Message-State: APjAAAXx6J2h4wvkQAFsZrL63lGOvnQfjVNA/YJVQ5Fg//LRywEk2N9N pRr+tSNaMfVxKCXNhdMF5trSXEapWHxi X-Received: by 2002:a81:36c9:: with SMTP id d192mr10218854ywa.304.1574127863941; Mon, 18 Nov 2019 17:44:23 -0800 (PST) Date: Mon, 18 Nov 2019 17:43:52 -0800 In-Reply-To: <20191119014357.98465-1-brianvv@google.com> Message-Id: <20191119014357.98465-5-brianvv@google.com> Mime-Version: 1.0 References: <20191119014357.98465-1-brianvv@google.com> X-Mailer: git-send-email 2.24.0.432.g9d3f5f5b63-goog Subject: [PATCH 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