From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.2 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E9058C43381 for ; Tue, 19 Feb 2019 05:39:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BA05F217D7 for ; Tue, 19 Feb 2019 05:39:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=fb.com header.i=@fb.com header.b="APapxr02" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726864AbfBSFjH (ORCPT ); Tue, 19 Feb 2019 00:39:07 -0500 Received: from mx0b-00082601.pphosted.com ([67.231.153.30]:52138 "EHLO mx0b-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725963AbfBSFjE (ORCPT ); Tue, 19 Feb 2019 00:39:04 -0500 Received: from pps.filterd (m0109331.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x1J5d0rH003570 for ; Mon, 18 Feb 2019 21:39:02 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=facebook; bh=47FOUqvzobxurHB9UoESlPqHO97YijiB7tubjNIIVVo=; b=APapxr02w6DRAyVB/q+oZpd8MNcU5lJOkBbDdp4ntXalfjWLka7yDqUjqOMf8sSPsd3G CVhQ/Ha32N+7FsWwN78kGDZqQkP7Wnk0nsSJ9fmWPws2hxg6PEdZiMkbXEV5Fv9y56ZV CWzihcDFu5x7dqwAn/U87zYKG0xQCNob1rw= Received: from maileast.thefacebook.com ([199.201.65.23]) by mx0a-00082601.pphosted.com with ESMTP id 2qr8yhgbbk-3 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Mon, 18 Feb 2019 21:39:00 -0800 Received: from mx-out.facebook.com (2620:10d:c0a1:3::13) by mail.thefacebook.com (2620:10d:c021:18::171) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA) id 15.1.1531.3; Mon, 18 Feb 2019 21:38:29 -0800 Received: by devbig009.ftw2.facebook.com (Postfix, from userid 10340) id 2ECC05AE1EBC; Mon, 18 Feb 2019 21:38:29 -0800 (PST) Smtp-Origin-Hostprefix: devbig From: brakmo Smtp-Origin-Hostname: devbig009.ftw2.facebook.com To: netdev CC: Martin Lau , Alexei Starovoitov , Daniel Borkmann --cc=Kernel Team <"daniel@iogearbox.netKernel-team"@fb.com> Smtp-Origin-Cluster: ftw2c04 Subject: [PATCH bpf-next 0/9] bpf: Network Resource Manager (NRM) Date: Mon, 18 Feb 2019 21:38:29 -0800 Message-ID: <20190219053829.2086512-1-brakmo@fb.com> X-Mailer: git-send-email 2.17.1 X-FB-Internal: Safe MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-02-19_04:,, signatures=0 X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Network Resource Manager is a framework for limiting the bandwidth used by v2 cgroups. It consists of 4 BPF helpers and a sample BPF program to limit egress bandwdith as well as a sample user program and script to simplify NRM testing. The sample NRM BPF program is not meant to be production quality, it is provided as proof of concept. A lot more information, including sample runs in some cases, are provided in the commit messages of the individual patches. Two more BPF programs, one to limit ingress and one that limits egress and uses fq's Earliest Departure Time feature, will be provided in an upcomming patchset. brakmo (9): bpf: Add bpf helper bpf_tcp_enter_cwr bpf: Test bpf_tcp_enter_cwr in test_verifier bpf: add bpf helper bpf_skb_set_ecn bpf: Add bpf helper bpf_tcp_check_probe_timer bpf: sync bpf.h to tools and update bpf_helpers.h bpf: Sample program to load cg skb BPF programs bpf: Sample NRM BPF program to limit egress bw bpf: User program for testing NRM bpf: NRM test script include/linux/bpf.h | 1 + include/uapi/linux/bpf.h | 27 +- kernel/bpf/verifier.c | 4 + net/core/filter.c | 70 ++++ samples/bpf/Makefile | 7 + samples/bpf/do_nrm_test.sh | 429 +++++++++++++++++++ samples/bpf/load_cg_skb.c | 109 +++++ samples/bpf/nrm.c | 439 ++++++++++++++++++++ samples/bpf/nrm.h | 31 ++ samples/bpf/nrm_kern.h | 109 +++++ samples/bpf/nrm_out_kern.c | 213 ++++++++++ tools/include/uapi/linux/bpf.h | 27 +- tools/testing/selftests/bpf/bpf_helpers.h | 6 + tools/testing/selftests/bpf/verifier/sock.c | 33 ++ 14 files changed, 1503 insertions(+), 2 deletions(-) create mode 100755 samples/bpf/do_nrm_test.sh create mode 100644 samples/bpf/load_cg_skb.c create mode 100644 samples/bpf/nrm.c create mode 100644 samples/bpf/nrm.h create mode 100644 samples/bpf/nrm_kern.h create mode 100644 samples/bpf/nrm_out_kern.c -- 2.17.1