Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp5431458ybl; Tue, 14 Jan 2020 08:49:59 -0800 (PST) X-Google-Smtp-Source: APXvYqzHR8XkYDt2vK1zKk1QAVtmZXLDDpMqaz+IBnM3m3jGrCiSBLKJ0D0PZ/ZKtTwdjYROx+FH X-Received: by 2002:a05:6808:f:: with SMTP id u15mr17844645oic.100.1579020599704; Tue, 14 Jan 2020 08:49:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579020599; cv=none; d=google.com; s=arc-20160816; b=j8KTfiZGG9bea3GXiPOHgWpZSqPMolCb8VTq7oK6LUe0u48JxKOF+cNkjgaSZcBUuh I1TqvO4V3PSaBYlvFdcPM16MD2x0DH7HAMZPI6vOq2lVGFkKLGZ1O0vZA7bPIsh4mhgT tGmS2ocUKloEgOdHj0kPVlaAfRrh0Hy+he9WzczKOb3Ko+q1sQS6X4EJYhEq1cU7sApi 8fdu/2Nv+D0GdyzgADgYk4nvRktxJ72LGSDH5IRT1uyIoM1aObTSKooPxLxHe6VMCl/T 1n0gjFwqHjguw+UdPnqpvv5qLdQBE/T1MPFELlkTBHwg7R92dnjH1913huMHFZeDPhLt B4RQ== 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=XitR2/dNYhdvcmdDQZpiB+KfdDZnKCpXlD88oKObDNFjqSiPDg9h+SXlxXF4jpjpXp IYqs6ps+KaT/hIdm+h1El5EXgbdhhcRRFR5vlnvybp24HaxVFXyvc3Y2NFDSX194AyAD o1E2dUpl5vVfKuMtMYVy4GS6kV0BVvEoGwrY+gO8WJiGt2+v78UlpnWi6Sn6QqyVF4BI EActQlI1bHwN92not7iWerip03G6iXn1fprsZyv2W9Peuxz1yvxVJH9P0W1nUu+/u14T 25rzOgcwxyUqF+XSvXGK2wVF+D89cjHveHYLP2lNpc72Ok7v995CHNKmSd7y0lU7FcNj DexA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=QNnMhi1W; 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 l6si8979701otq.132.2020.01.14.08.49.48; Tue, 14 Jan 2020 08:49: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=QNnMhi1W; 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 S1729140AbgANQr0 (ORCPT + 99 others); Tue, 14 Jan 2020 11:47:26 -0500 Received: from mail-pl1-f202.google.com ([209.85.214.202]:48258 "EHLO mail-pl1-f202.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728982AbgANQqp (ORCPT ); Tue, 14 Jan 2020 11:46:45 -0500 Received: by mail-pl1-f202.google.com with SMTP id bc5so1314083plb.15 for ; Tue, 14 Jan 2020 08:46:44 -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=QNnMhi1W2Lwr9MiJV1KUIy84wUVGideJuBgoE8jzj7ATu3d+8Iej5m7jE4wEyrUloG PmCzBN3Y/FcSXfgNrjtdeca6SP75c21ZSFxwQ33whfSl8Llc/Tfs931jR7JFlKvtpL7R OVQD2+sf7pxwqUSXltEoe9xWiW8qtliCn4a6dmeqj6LHT9vtAQItMQikhZnofmzBG3ZN SY4j+4f9chtw5cTVKbA+v/YxZpuJTUPdcuSaDlkWIegcBGwvg2oifZEqpMBK4bDDbS8f oJPCU+5ZciMpiDheJSoUQnu4UnxzEBByQdSSTGsNpWfzD/C9yoO51HaQXhDAknnJLTT/ RP5A== 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=T8xLPJRzPwKK6OKHKdca6OEz0AK8fjqUvW2PZgUsgxBje8Flq2KoPzTCOWgtR2XEJP ENRCcJUd2Lz5Lb9l6lIcpvKuNRy+fRC8arF/jB6qwwmzLKJ0FKMtMs6wU2f4ikBnO5Hy L0Ii/W84mE2lTKtOChw0fOF7i46lLUmkCUXtZ26iKwkWdsrYk7ISuJ/gVGxrhkf0TXTG k3AO79pHNN/wzHOblgXtZ0DLgwYoNOlbSPbWTzCEmW12SYPtp1rIgKBduErPR/yPlBeo zmJA8pReOK+gTXVxCXjZTl7Y4lp6fwHZ18PH1Q9dJdXIfWsWFwrchkKb8dBWks0pq/XC 8SQg== X-Gm-Message-State: APjAAAUYEWqIgg7t9vv5MDZoJxcMuWohwLGTZAEGrR59cnxn44ENDiY9 r8qmfbj7X2XFs0WH8dMBYWnQ3gTQ1Cl5 X-Received: by 2002:a63:7843:: with SMTP id t64mr27824323pgc.144.1579020404127; Tue, 14 Jan 2020 08:46:44 -0800 (PST) Date: Tue, 14 Jan 2020 08:46:08 -0800 In-Reply-To: <20200114164614.47029-1-brianvv@google.com> Message-Id: <20200114164614.47029-5-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 update 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