Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp92687ybl; Wed, 11 Dec 2019 14:35:38 -0800 (PST) X-Google-Smtp-Source: APXvYqxgDJKgp1hvA7a9m416OrLrb76cJcSMhU1RqQAJFa/Hc/MxzzMSu8unpQWbXvS+4xOLym1r X-Received: by 2002:a05:6830:16d0:: with SMTP id l16mr4436422otr.176.1576103738234; Wed, 11 Dec 2019 14:35:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576103738; cv=none; d=google.com; s=arc-20160816; b=q3oAVVWqs+WEak9Ier/MKvHeBahvap/bQmVyE73e7g0x+N4u/SUMI2tGas8Xrm67uv ITffiykBBSJICf8hMYhAQfFfl4+iitYon4W0R7KIjiTk6FUpWeiT2jTHV2QEmvvhytUn ES80rkiWs65AcXRcvXBIE+Llnxrn9zpSCI5kcUPSOBR7nEOsyJeMtRYDlKmNrTWxjoYn kgxxNnbYQva2YyYjqud1i+dEOb5fyEQXlgVmqppMLmIYjWH05KIsCGG7LzkIlRd683NF REp0a89VXoyB7g1AcSaKOrCOrsl0cY2quhGHGoKobNrFnDVFAxO5gwVl7nYiBgFChuQa 966Q== 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=5AhdXmPKS0JiQuHlniKRJHWxS22JqYuwMDsvrT9JMfs=; b=mtz4xId5lLx9FxGDlREHLJAJSzabErZse54o7FJzok8nvv6bDjADwZ71vyfaViUdik d2nVm6OCulnJAsWGOFw0myB+bz/x9X3qvovsWafCULu266T4TfcQMKvHLZbGq8+d1ViC YFCHe37CruN2iAf405fOsJnZjz1KgZ+uZxQORnzHS0yAvACGvPY2f0HtR8E0cDAFjxdd ar+lJdzxf6jmsVNIC6EbKgEX+btVITZFPTowXbiO9kjLhafJ7x3ONtf7ETrIfrULPyp9 XBladuGz/XyfvDyJUpo4O5SKpAlWA1HKXgPvGmNHUGJzGgTmcFAYy/DL4gVOxTVt/t/0 yAiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="lB/oei63"; 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 e10si1733160oti.61.2019.12.11.14.35.26; Wed, 11 Dec 2019 14:35:38 -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="lB/oei63"; 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 S1726777AbfLKWeh (ORCPT + 99 others); Wed, 11 Dec 2019 17:34:37 -0500 Received: from mail-pl1-f201.google.com ([209.85.214.201]:52381 "EHLO mail-pl1-f201.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727067AbfLKWee (ORCPT ); Wed, 11 Dec 2019 17:34:34 -0500 Received: by mail-pl1-f201.google.com with SMTP id 62so185510ple.19 for ; Wed, 11 Dec 2019 14:34:34 -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=5AhdXmPKS0JiQuHlniKRJHWxS22JqYuwMDsvrT9JMfs=; b=lB/oei63/sAcH89+V93til6fN/6F4X/UcwDCuMEW2z20zvLpRYxp6tbM7sW3X9BZlo /QtDi+qmTeJzFlCzIUcXsgjp2JA+qx9E7EvVKpKIHAy+hvQQSdzV5jPGAe0Wa8bmPB3y 7eweDWffEI1IaCtN/Fp0OtuL6QF+RNRC73BGNLZtoqCuB8LZEHimoYzhFMpIy5kqEYFC X5bc13g9GwWLNfQMaZG+MoifnE9u3uLUqdRDboe309tfHmdqzpkbZP8zcnbNIf9waAUo qxMp3jfxIub34hDAOim4pcHB1e92YhnZHAYJYSWAQcrmYrwomrFCrwX+8Axu3BN7PXEd fvKg== 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=5AhdXmPKS0JiQuHlniKRJHWxS22JqYuwMDsvrT9JMfs=; b=oJmdexzfkglyyPUVNT6p6XiUvAXGrOI1bMHRtzrhjXIg0l2gA7xHS4IcSoDJgHgLsl QXKnqIGyqbXLAe0lZG94MP6X6p1sXZ9dY9+nzdASC9wVhMX+3ck+35znEv2XM1JGLPtV Hh1ae0zRqdwi7zbt4998qZdw27S2h7/UrHOfGuWHmgwTY0Ju7P+umdCafx8iotLOgp0f oZc9jyGCXqophml17OgW6bwmUaSg8o6LPBf4+Ge03jDvosx0rCVrKr6GsrCHuH96hAG1 KCA6ixRXOOvkaHXT6j5muOFzojnd5folzoeMmyJNbY++R3ktDFR/Z/ZBtuYeBKWtRL5j 7rZw== X-Gm-Message-State: APjAAAUCfINL6zsaFJ7uM1PpqcXjGB7/IouG641MMPtp4wVjcgTF1UFL 9kVqeZUnN6xQm6E4k3RM+WzqPxiaGIOG X-Received: by 2002:a65:4c06:: with SMTP id u6mr7000062pgq.412.1576103673604; Wed, 11 Dec 2019 14:34:33 -0800 (PST) Date: Wed, 11 Dec 2019 14:33:38 -0800 In-Reply-To: <20191211223344.165549-1-brianvv@google.com> Message-Id: <20191211223344.165549-6-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 05/11] bpf: add generic_batch_ops to lpm_trie map 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 lpm_trie. Signed-off-by: Brian Vazquez --- kernel/bpf/lpm_trie.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kernel/bpf/lpm_trie.c b/kernel/bpf/lpm_trie.c index 56e6c75d354d9..92c47b4f03337 100644 --- a/kernel/bpf/lpm_trie.c +++ b/kernel/bpf/lpm_trie.c @@ -743,4 +743,8 @@ const struct bpf_map_ops trie_map_ops = { .map_update_elem = trie_update_elem, .map_delete_elem = trie_delete_elem, .map_check_btf = trie_check_btf, + .map_lookup_batch = generic_map_lookup_batch, + .map_lookup_and_delete_batch = generic_map_lookup_and_delete_batch, + .map_delete_batch = generic_map_delete_batch, + .map_update_batch = generic_map_update_batch, }; -- 2.24.1.735.g03f4e72817-goog