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=-1.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS 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 35504C43381 for ; Sun, 24 Mar 2019 01:15:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D992C2183E for ; Sun, 24 Mar 2019 01:15:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=fb.com header.i=@fb.com header.b="qe6Xfd8x"; dkim=pass (1024-bit key) header.d=fb.onmicrosoft.com header.i=@fb.onmicrosoft.com header.b="MZcwkOWU" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727904AbfCXBPP (ORCPT ); Sat, 23 Mar 2019 21:15:15 -0400 Received: from mx0a-00082601.pphosted.com ([67.231.145.42]:55034 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727628AbfCXBPP (ORCPT ); Sat, 23 Mar 2019 21:15:15 -0400 Received: from pps.filterd (m0109334.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x2O1DWsg027908; Sat, 23 Mar 2019 18:15:02 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-id : content-transfer-encoding : mime-version; s=facebook; bh=KKv2VjL3l89qwnndll9Oy33ftKyXucuBn6LLBKlW2Yw=; b=qe6Xfd8xSDrQY58Qu9mPfm8rLmS3vvDq8N4NxUqis6/vhiCNMRtzF4rGP9xnFsoUlLXj p04L33WzmGHUZnTIp+l+1doLuS8B5E+mCO32WcxzBalAGZyOmdt2wwks1Zfq2Aospfny s8ZE8I6AB8mPQEt1nC1OtIGYPEKXYh6BM9Y= Received: from maileast.thefacebook.com ([199.201.65.23]) by mx0a-00082601.pphosted.com with ESMTP id 2rdm3ssxb3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Sat, 23 Mar 2019 18:15:02 -0700 Received: from frc-mbx05.TheFacebook.com (2620:10d:c0a1:f82::29) by frc-hub01.TheFacebook.com (2620:10d:c021:18::171) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.1.1713.5; Sat, 23 Mar 2019 18:15:01 -0700 Received: from frc-hub05.TheFacebook.com (2620:10d:c021:18::175) by frc-mbx05.TheFacebook.com (2620:10d:c0a1:f82::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.1.1713.5; Sat, 23 Mar 2019 18:15:00 -0700 Received: from NAM01-BY2-obe.outbound.protection.outlook.com (192.168.183.28) by o365-in.thefacebook.com (192.168.177.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.1.1713.5 via Frontend Transport; Sat, 23 Mar 2019 18:15:00 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.onmicrosoft.com; s=selector1-fb-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=KKv2VjL3l89qwnndll9Oy33ftKyXucuBn6LLBKlW2Yw=; b=MZcwkOWU6zOebn+F/a87TvuVOnpQaNm8ONGCNfGgTHdgN4BnvcI1oOUArEgMAtxrqe8b96QuV+7XdcKYkCupoVQkHFs/9iphbYoXoB189TsmoBR8MnToBMt3K4BeMiPBKyzCk1Y8+wjKnrTUjvobjEH1LMWnWD5ncnpLDdkitBc= Received: from BYAPR15MB2311.namprd15.prod.outlook.com (52.135.197.145) by BYAPR15MB2583.namprd15.prod.outlook.com (20.179.155.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1730.16; Sun, 24 Mar 2019 01:14:58 +0000 Received: from BYAPR15MB2311.namprd15.prod.outlook.com ([fe80::1803:10f2:3d80:c10c]) by BYAPR15MB2311.namprd15.prod.outlook.com ([fe80::1803:10f2:3d80:c10c%2]) with mapi id 15.20.1730.017; Sun, 24 Mar 2019 01:14:58 +0000 From: Lawrence Brakmo To: Eric Dumazet , netdev CC: Martin Lau , Alexei Starovoitov , "Daniel Borkmann" , Kernel Team Subject: Re: [PATCH bpf-next 0/7] bpf: Propagate cn to TCP Thread-Topic: [PATCH bpf-next 0/7] bpf: Propagate cn to TCP Thread-Index: AQHU4U9ujfPnGrZmt02PCRtAFgi95aYY7oGAgAAmdQA= Date: Sun, 24 Mar 2019 01:14:57 +0000 Message-ID: <148E4177-8064-4824-898A-997C145E19B6@fb.com> References: <20190323080542.173569-1-brakmo@fb.com> <704cb63c-13cd-f0ed-d546-18e3596bb63d@gmail.com> In-Reply-To: <704cb63c-13cd-f0ed-d546-18e3596bb63d@gmail.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-MacOutlook/10.14.0.181208 x-originating-ip: [24.5.57.54] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 6e158d58-5651-4bb8-50df-08d6aff621c1 x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(2017052603328)(7153060)(7193020);SRVR:BYAPR15MB2583; x-ms-traffictypediagnostic: BYAPR15MB2583: x-microsoft-antispam-prvs: x-forefront-prvs: 09860C2161 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(396003)(39860400002)(376002)(366004)(346002)(136003)(199004)(189003)(82746002)(33656002)(26005)(68736007)(186003)(76176011)(25786009)(99286004)(14454004)(6512007)(102836004)(4326008)(53546011)(6506007)(106356001)(105586002)(66066001)(71190400001)(71200400001)(83716004)(229853002)(36756003)(97736004)(53936002)(2906002)(446003)(3846002)(6116002)(8676002)(81166006)(81156014)(2616005)(5660300002)(6436002)(11346002)(486006)(86362001)(6486002)(8936002)(476003)(256004)(110136005)(7736002)(478600001)(54906003)(305945005)(6246003)(316002)(58126008);DIR:OUT;SFP:1102;SCL:1;SRVR:BYAPR15MB2583;H:BYAPR15MB2311.namprd15.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: fb.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: qcrrUBUtNF19jwYD50gVa1YzBYImLfdABoHEN7tmok17fYGkk66pa8X0GwvMUoZIfg5DLA/30nQvz+LSEhVbaTWFD9zGDWluRrwJV6/IAFP662+qf4iTw/dgULhMJI64W19tAXnizIb1EVlKe2BsHrvP7JpHziim3OdsEovisgNHYTUB4yJHJaEPppd24BMzBK9L5bPBS+y/lg2XFyE8ip07dUL1BhKiypqfIGUXQwABd+FrVbMjNJ5oAuBjz3A7Dhb1Ji5YSojufCJfzBtRHedhUTGurASrlPcwVisMuoVbdc5myflAxxIj98nyWd8ZSgtDrpEP7saPOg55rzvflfC7WTJaY6AP71kI5URGhLb/+uUBt6M9p3f5NqI9uuDQ+BVqroGMJYjVbSzDxVF7AjxiIGfRx5KxS73Ww0OUAws= Content-Type: text/plain; charset="utf-7" Content-ID: <3DA8F53216C4E549911DE112A02FB057@namprd15.prod.outlook.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 6e158d58-5651-4bb8-50df-08d6aff621c1 X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Mar 2019 01:14:58.1165 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 8ae927fe-1255-47a7-a2af-5f3a069daaa2 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR15MB2583 X-OriginatorOrg: fb.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-03-24_01:,, 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 On 3/23/19, 10:12 AM, +ACI-Eric Dumazet+ACI- +ADw-eric.dumazet+AEA-gmail.co= m+AD4- wrote: =20 =20 On 03/23/2019 01:05 AM, brakmo wrote: +AD4- This patchset adds support for propagating congestion notificatio= ns (cn) +AD4- to TCP from cgroup inet skb egress BPF programs. +AD4-=20 +AD4- Current cgroup skb BPF programs cannot trigger TCP congestion win= dow +AD4- reductions, even when they drop a packet. This patch-set adds sup= port +AD4- for cgroup skb BPF programs to send congestion notifications in t= he +AD4- return value when the packets are TCP packets. Rather than the +AD4- current 1 for keeping the packet and 0 for dropping it, they can +AD4- now return: +AD4- NET+AF8-XMIT+AF8-SUCCESS (0) - continue with packet out= put +AD4- NET+AF8-XMIT+AF8-DROP (1) - drop packet and do cn +AD4- NET+AF8-XMIT+AF8-CN (2) - continue with packet out= put and do cn +AD4- -EPERM - drop packet +AD4- =20 I believe I already mentioned this model is broken, if you have any vir= tual device before the cgroup BPF program. Current qdisc can return values 0 to 2, how is this different from the cgro= up BPF program returning these values? I understand that virtual devices befor= e the cgroup or qdisc may not propagate these values (and I would say the problem is then with the virtual device), but not everyone uses virtual devices like that. For them, HBM if not appropriate if they are using Cubic (however, it works with DCTCP or with fq's EDT). =20 Please think about offloading the pacing/throttling in the NIC, there is no way we will report back to tcp stack instant notifications. =20 Not everyone has the ability for offloading to the NIC. This patch series is going way too far for my taste. =20 Too far which way? I'm simply extending a mechanism that has been present for a while with qdiscs to cgroup egress BPF programs. I understand if it has no use in your environment, but we believe it has in ours. This idea is not new, you were at Google when it was experimented by Na= ndita and others, and we know it is not worth the pain. =20 There was no eBPF at that time. We like the flexibility we get by programin= g the algorithms in eBPF. These are not intrusive changes, they simply extend the current limited ret= urn values form cgroup skb egress BPF programs to be more in line with qdiscs. =20