Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2512882imm; Thu, 27 Sep 2018 14:14:41 -0700 (PDT) X-Google-Smtp-Source: ACcGV61TIwjI8ONuWibQk3SI02A+vqfutwIuL49IaeSQY03qSMAsFWgBT6brFIgmPhKRs8oevMKz X-Received: by 2002:a63:9e0a:: with SMTP id s10-v6mr12105582pgd.326.1538082881503; Thu, 27 Sep 2018 14:14:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538082881; cv=none; d=google.com; s=arc-20160816; b=nfJwzSdFJ1tIJqh0oS+fnvVoRPWJdz6PTH3skMw3Zro5o86A2ZGhaOQDAQ5hHwBHfJ YW7U/KvsLjTl1UEnokjNZafyxAMz2fGwc+4lX/rEbL5QJOawlIrHeqBEWkQITVt65Ykn TeHG/C+cDuubvrASbfQZ2RJN+43n2UCSalUgRC4vGd1aJOQnE6fuWmvnno7Im9STRCXC mQIc/oDIpH9sXcvKWUhJez0Gw6KvefZUL1/aKXeHL7tftnLxCM2sQZEKrW1LCobj5a7w E/WV5bGEh5/lMgKAiW+ahfN2Weo7hf3O8fbCgpyuqjYIbW7KSErkvr8rQ0VsyXH5/l57 oEDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=HdYniLzmXPC5S3ZOw1/cyvMtRVB2R4HcZ8rEtKNNWWY=; b=sYDKnU9mibrmkS08gTVXXmj4dd0EthL0cq3CbRtKfAuTB2jICcIE3rvtXbW/rBAgAA PjYgJf88u7dAsve0jN6YOBP1Ao67FdhP1XeZXAgu6kSznvQ7vUHYRL1nMzKKDoiI/ILJ E6D3i8C0wHwop3ByNzM3N+pjewtfevEbHiw68ZxZRS8amVNl3oGyj9aSOiL+T+bGP7Hq 5u+qh8qv6z6GtJlkgt8xLKS6WUfRw1A6qqnAwqG/bx+56YddRFpSGiZgydeqjoFMBphe edStqSHf3FnPQqK2kfIJFLNPDKBwgIGAkLASNP5ItTzdh4/I95cRfgXkNOU6FSjbqsRQ 6NqQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 203-v6si3095787pfv.101.2018.09.27.14.14.25; Thu, 27 Sep 2018 14:14:41 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728568AbeI1DeI (ORCPT + 99 others); Thu, 27 Sep 2018 23:34:08 -0400 Received: from www62.your-server.de ([213.133.104.62]:37313 "EHLO www62.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727331AbeI1DeI (ORCPT ); Thu, 27 Sep 2018 23:34:08 -0400 Received: from [78.46.172.3] (helo=sslproxy06.your-server.de) by www62.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.85_2) (envelope-from ) id 1g5dbc-0004nQ-QB; Thu, 27 Sep 2018 23:13:52 +0200 Received: from [178.197.248.15] (helo=linux.home) by sslproxy06.your-server.de with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89) (envelope-from ) id 1g5dbc-000M4u-Kg; Thu, 27 Sep 2018 23:13:52 +0200 Subject: Re: [PATCH v3 bpf-next 00/10] bpf: per-cpu cgroup local storage To: Roman Gushchin , netdev@vger.kernel.org Cc: Song Liu , linux-kernel@vger.kernel.org, kernel-team@fb.com References: <20180926113326.29069-1-guro@fb.com> From: Daniel Borkmann Message-ID: <34e73535-8e95-c7b8-0f1a-acd4a7053c5f@iogearbox.net> Date: Thu, 27 Sep 2018 23:13:50 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <20180926113326.29069-1-guro@fb.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Authenticated-Sender: daniel@iogearbox.net X-Virus-Scanned: Clear (ClamAV 0.100.1/24987/Thu Sep 27 18:52:11 2018) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/26/2018 01:33 PM, Roman Gushchin wrote: > This patchset implements per-cpu cgroup local storage and provides > an example how per-cpu and shared cgroup local storage can be used > for efficient accounting of network traffic. > > v3->v2: > 1) incorporated Song's feedback > 2) rebased on top of current bpf-next > > v2->v1: > 1) added a selftest implementing network counters > 2) added a missing free() in cgroup local storage selftest > > Roman Gushchin (10): > bpf: extend cgroup bpf core to allow multiple cgroup storage types > bpf: rework cgroup storage pointer passing > bpf: introduce per-cpu cgroup local storage > bpf: don't allow create maps of per-cpu cgroup local storages > bpf: sync include/uapi/linux/bpf.h to tools/include/uapi/linux/bpf.h > bpftool: add support for PERCPU_CGROUP_STORAGE maps > selftests/bpf: add verifier per-cpu cgroup storage tests > selftests/bpf: extend the storage test to test per-cpu cgroup storage > samples/bpf: extend test_cgrp2_attach2 test to use per-cpu cgroup > storage > selftests/bpf: cgroup local storage-based network counters > > include/linux/bpf-cgroup.h | 55 ++++-- > include/linux/bpf.h | 12 +- > include/linux/bpf_types.h | 1 + > include/uapi/linux/bpf.h | 1 + > kernel/bpf/cgroup.c | 74 +++++--- > kernel/bpf/helpers.c | 25 ++- > kernel/bpf/local_storage.c | 167 +++++++++++++++--- > kernel/bpf/map_in_map.c | 3 +- > kernel/bpf/syscall.c | 20 ++- > kernel/bpf/verifier.c | 23 ++- > net/bpf/test_run.c | 20 ++- > samples/bpf/test_cgrp2_attach2.c | 19 +- > tools/bpf/bpftool/map.c | 4 +- > tools/include/uapi/linux/bpf.h | 1 + > tools/testing/selftests/bpf/Makefile | 6 +- > tools/testing/selftests/bpf/netcnt_common.h | 23 +++ > tools/testing/selftests/bpf/netcnt_prog.c | 71 ++++++++ > .../selftests/bpf/test_cgroup_storage.c | 60 ++++++- > tools/testing/selftests/bpf/test_netcnt.c | 153 ++++++++++++++++ > tools/testing/selftests/bpf/test_verifier.c | 139 ++++++++++++++- > 20 files changed, 778 insertions(+), 99 deletions(-) > create mode 100644 tools/testing/selftests/bpf/netcnt_common.h > create mode 100644 tools/testing/selftests/bpf/netcnt_prog.c > create mode 100644 tools/testing/selftests/bpf/test_netcnt.c > Applied to bpf-next, thanks Roman!