Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp5869673ybl; Tue, 14 Jan 2020 16:47:14 -0800 (PST) X-Google-Smtp-Source: APXvYqx7Cnned3zamtAHTwkL2Jo1g07yDmXVruYX+JXjwf4OrDIQV6p3+Le47rSz5BiFnbfIxum0 X-Received: by 2002:a54:4f04:: with SMTP id e4mr17900295oiy.111.1579049234081; Tue, 14 Jan 2020 16:47:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579049234; cv=none; d=google.com; s=arc-20160816; b=o5FfJz/XhDMj55X0N+qmi11Wd/PXS1P7eR5xQcxBjUW5Bwek4/CSUet5Zh7GgIS4pC UThN2utGQRa1m1bC1AAu59ptS8qpImSzg0WCePoQe3HOqoMKMqzRPntG6IOfN3fXa9IS fOOR/pGnD8l3t6mIaLg76VJ0nylwzUVGddHdjah0Mq+NI6+LO2uMkYWbiVTXVoQZPUIB U9eo63Eck8CCfgCkU2idREditKRllq1XsLnQMhd406Qobfwx43HceqqcD0k4qgK4hMoj DOwBbM6dO1wvPRAG2e6Q3zY3H1j94mCW8K+N8i+A6YBHJxDiEi4rUkqrh+vn8vAQXCSg lRNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=s4r1q77v2s7ZfbF1lFyj2jG69/QqX8a/sPqCqv9z2TU=; b=b6UjFkdx+NntqigycBII1FXHvXI7LcFWMVUe6Lxu0qnVytdsSfO+0/xU1UdP98Yir0 5kU20hyEoqjzC0aY6gWIQYfZBHG+341WnFXcZiMcg4Zx6cJsU3MpFWRHGZwN1IeTC5RG kEicnKIm1SCzkzWbntaTq1q7wR9oAam4SOhvPx44aXDM/6M9lhdSa9Brbnc0Sr9bGo4t yktaenGMrU4K8Hp+fDCzFkRjccKf96qXYn8s6dW30BQZYyTVqyqWM7+D2Y9xyliUt6IM BhDUkftqRvWsnOpNqBpepj1k3y+99jF0iVsH6lFdT8tln2ABBtvKHhHn4sQdAQDCqPJS smBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="Q+w4ML/E"; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 8si9405332ota.266.2020.01.14.16.47.02; Tue, 14 Jan 2020 16:47:14 -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=@gmail.com header.s=20161025 header.b="Q+w4ML/E"; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728931AbgAOAqN (ORCPT + 99 others); Tue, 14 Jan 2020 19:46:13 -0500 Received: from mail-qt1-f196.google.com ([209.85.160.196]:43237 "EHLO mail-qt1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728795AbgAOAqN (ORCPT ); Tue, 14 Jan 2020 19:46:13 -0500 Received: by mail-qt1-f196.google.com with SMTP id d18so14280122qtj.10; Tue, 14 Jan 2020 16:46:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=s4r1q77v2s7ZfbF1lFyj2jG69/QqX8a/sPqCqv9z2TU=; b=Q+w4ML/ESIMWpC1fZG7nIOe9piH9hK34vUOcI8ptwCey5nH6SbQlk5tHgbWYxIaFOv V7gl3m21RueWZT/+6K3zxOzv+g1Q/CbFb7YcmeGFkFBUW4yGpHZO2uqml3CbqmLc8mKE +45q0e7j+uk3TJhBWYg7SU3+qQRuCW9Rbd5V39xiXv0+waCDCU17Fa3jkx8RZ85cgMKh /nmYxaOvN1XOrKKTNnmyBXYw1Ab55YCi5ebqHhJcgKQ91oo3/ekSmzt0Omn5ZL9Vthx6 n400S3wrTWTGB/Unai40vvgO/cLKUVFu6vqccktt4w43/Z0RhK7QKuF0HRBgcynxLZai WRmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=s4r1q77v2s7ZfbF1lFyj2jG69/QqX8a/sPqCqv9z2TU=; b=c/Al6pOm4PeiwtjilhM9mrzgoXXKQtn4bCKRXpgK+27Radz8bmUsTcC70GVNhL928q IFw/RgRai+cY5JJ0H4beLpjIZKjUbAZokZzi7bymqzW8yARaIFKLmbp8ETW62JoX+ZrP apMaoxlz5oVMv3sXPCkiepvjUn873NLaryyIxCV+rq2kDIh4N/e0TFKIJoSjkO6ZFoX6 h2jDaIGnyfLFM6qTyDKYZZ+ZqiPqmUZ8OSXTYO29Zec0gFVcusgH57bpeN++6Fx1ihfR EBQaAJTfQHdTa9p4kUPxm1E1PDW/ykVgu8FDwD87wguw+rQoMAJqU5vPmzBHcqV+Ln8j PkKw== X-Gm-Message-State: APjAAAVTy1kPKi9KzYnNohjMAezX8N5V452ZJxXYOccJKYDjw85Lwr5q ulFnXZz/R5pulJpo+4fpDXj9HX3HHyPuwj+W0D8= X-Received: by 2002:ac8:1385:: with SMTP id h5mr1212274qtj.59.1579049171812; Tue, 14 Jan 2020 16:46:11 -0800 (PST) MIME-Version: 1.0 References: <20200114164614.47029-1-brianvv@google.com> <20200114164614.47029-11-brianvv@google.com> In-Reply-To: <20200114164614.47029-11-brianvv@google.com> From: Andrii Nakryiko Date: Tue, 14 Jan 2020 16:46:00 -0800 Message-ID: Subject: Re: [PATCH v4 bpf-next 9/9] selftests/bpf: add batch ops testing to array bpf map To: Brian Vazquez Cc: Brian Vazquez , Alexei Starovoitov , Daniel Borkmann , "David S . Miller" , Yonghong Song , Stanislav Fomichev , Petar Penkov , Willem de Bruijn , open list , Networking , bpf 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 On Tue, Jan 14, 2020 at 8:46 AM Brian Vazquez wrote: > > Tested bpf_map_lookup_batch() and bpf_map_update_batch() > functionality. > > $ ./test_maps > ... > test_array_map_batch_ops:PASS > ... > > Signed-off-by: Brian Vazquez > Signed-off-by: Yonghong Song > --- > .../bpf/map_tests/array_map_batch_ops.c | 131 ++++++++++++++++++ > 1 file changed, 131 insertions(+) > create mode 100644 tools/testing/selftests/bpf/map_tests/array_map_batch_ops.c > > diff --git a/tools/testing/selftests/bpf/map_tests/array_map_batch_ops.c b/tools/testing/selftests/bpf/map_tests/array_map_batch_ops.c > new file mode 100644 > index 0000000000000..05b7caea6a444 > --- /dev/null > +++ b/tools/testing/selftests/bpf/map_tests/array_map_batch_ops.c > @@ -0,0 +1,131 @@ > +// SPDX-License-Identifier: GPL-2.0 > + > +#include > +#include > +#include > + > +#include > +#include > + > +#include > + > +static void map_batch_update(int map_fd, __u32 max_entries, int *keys, > + int *values) > +{ > + int i, err; > + > + DECLARE_LIBBPF_OPTS(bpf_map_batch_opts, opts, Here, below, and in other patch: DECLARE_LIBBPF_OPTS declares a local variable, so it shouldn't be separated from all the other variable declarations. > + .elem_flags = 0, > + .flags = 0, > + ); > + [...]