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.2 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 8CAC5C43381 for ; Thu, 21 Feb 2019 03:19:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 462DB2089F for ; Thu, 21 Feb 2019 03:19:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=fb.com header.i=@fb.com header.b="JbFc/BMa"; dkim=pass (1024-bit key) header.d=fb.onmicrosoft.com header.i=@fb.onmicrosoft.com header.b="enuabYrr" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727123AbfBUDS6 (ORCPT ); Wed, 20 Feb 2019 22:18:58 -0500 Received: from mx0b-00082601.pphosted.com ([67.231.153.30]:49066 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725989AbfBUDS6 (ORCPT ); Wed, 20 Feb 2019 22:18:58 -0500 Received: from pps.filterd (m0001303.ppops.net [127.0.0.1]) by m0001303.ppops.net (8.16.0.27/8.16.0.27) with SMTP id x1L3CZ1x021068; Wed, 20 Feb 2019 19:18:38 -0800 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=3zdJ8jpNg1mdHJ0m9g8vsRFjh1byxNkGzBm0NjAT9Y4=; b=JbFc/BMagZvkxVl8XF04QENI583brfaMkGbz8GXx+rH9W1nNzDD33tdclLaDhs6mntpc c5mKuRLu8X8RRpbSxpgblgt2KcDlOM31gco5tzZucR2LDTuH0D7AJX/+0HcmYLiexp+7 VpANAux6bL+503WvkxxoJIHmSXNian9wFOQ= Received: from mail.thefacebook.com ([199.201.64.23]) by m0001303.ppops.net with ESMTP id 2qsgpw8h1e-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 20 Feb 2019 19:18:38 -0800 Received: from prn-hub03.TheFacebook.com (2620:10d:c081:35::127) by prn-hub03.TheFacebook.com (2620:10d:c081:35::127) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.1.1531.3; Wed, 20 Feb 2019 19:18:36 -0800 Received: from NAM03-CO1-obe.outbound.protection.outlook.com (192.168.54.28) by o365-in.thefacebook.com (192.168.16.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.1.1531.3 via Frontend Transport; Wed, 20 Feb 2019 19:18:36 -0800 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=3zdJ8jpNg1mdHJ0m9g8vsRFjh1byxNkGzBm0NjAT9Y4=; b=enuabYrr1G+jZhWnT+HlYhM6Jn1WSrbXH/Yyzb8c1tKCuxCRO8YB5h/peFrhQorqL5ynvHnnsiv2yo9DinqPfO+WBFqSGI2+HYNckdxUtDWau+b5DXNdH0RO9JOYuxudaYny2oPkhUld2jPbvkwGiyr38IVmde/SsCBALsluZSg= Received: from BYAPR15MB2311.namprd15.prod.outlook.com (52.135.197.145) by BYAPR15MB2533.namprd15.prod.outlook.com (20.179.154.214) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1622.19; Thu, 21 Feb 2019 03:18:35 +0000 Received: from BYAPR15MB2311.namprd15.prod.outlook.com ([fe80::e538:f6a2:82db:3d9c]) by BYAPR15MB2311.namprd15.prod.outlook.com ([fe80::e538:f6a2:82db:3d9c%3]) with mapi id 15.20.1622.018; Thu, 21 Feb 2019 03:18:35 +0000 From: Lawrence Brakmo To: Eric Dumazet , netdev CC: Martin Lau , Alexei Starovoitov , "Daniel Borkmann" Subject: Re: [PATCH bpf-next 1/9] bpf: Add bpf helper bpf_tcp_enter_cwr Thread-Topic: [PATCH bpf-next 1/9] bpf: Add bpf helper bpf_tcp_enter_cwr Thread-Index: AQHUyBV4Wph3Y08KRUiPY1ZtYLvW8aXncj+AgAGfuwA= Date: Thu, 21 Feb 2019 03:18:35 +0000 Message-ID: <107E47EF-72F7-46EC-BD5E-94EAF511C3B1@fb.com> References: <20190219053830.2086578-1-brakmo@fb.com> <67c8aaa3-81a5-b1c2-5be4-938a139f3013@gmail.com> In-Reply-To: <67c8aaa3-81a5-b1c2-5be4-938a139f3013@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: [2620:10d:c090:180::1:8fa] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 69476572-c4a4-4267-4fe2-08d697ab4426 x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600110)(711020)(4605104)(2017052603328)(7153060)(7193020);SRVR:BYAPR15MB2533; x-ms-traffictypediagnostic: BYAPR15MB2533: x-microsoft-exchange-diagnostics: 1;BYAPR15MB2533;20:lQaSu1d8jr9v9FNXWXnlOeI46xy2L1R1Hewh5ZJ7LC7WJmlNo3kCaxw9VO17NzlH83psl8JxV4YG64B8J4BzwHrGDhhvUi2WVnbSvbovrFC3CNo/BYipNzlWDhjnkub1BPUQt5rPRJv5M1O+M7cUvH+/taHGPawIZDDRkzZGzQs= x-microsoft-antispam-prvs: x-forefront-prvs: 09555FB1AD x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(39860400002)(366004)(346002)(396003)(376002)(136003)(199004)(189003)(25786009)(229853002)(97736004)(14454004)(316002)(99286004)(5660300002)(6486002)(256004)(54906003)(58126008)(486006)(11346002)(4744005)(14444005)(76176011)(86362001)(68736007)(5024004)(6512007)(446003)(71190400001)(8676002)(83716004)(6436002)(46003)(33656002)(478600001)(8936002)(81156014)(81166006)(6116002)(71200400001)(305945005)(82746002)(7736002)(53936002)(2616005)(2906002)(36756003)(53546011)(110136005)(4326008)(6506007)(6246003)(476003)(105586002)(106356001)(102836004)(186003);DIR:OUT;SFP:1102;SCL:1;SRVR:BYAPR15MB2533;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: g+jAyhB9QuuNPMB0nEqTJclcX40Z3NMLsNW4lmwOp8IyFSR/RwXaFb753c6RGhQlnFf7eRxV4ipWr5PoXpMJz708p35q3Bp9s5Fse5uHejivenH8O2S3G8fhLOAZjLkRsr9ddoRkQ9ZoGfX7RMoa+4ZBZG6u87HLWIyTZG8mDNWnc6Gv7D39EX1Im2hBC8Cx3WJaasjdPa9+JEL9fslwp9l47UHdU9//8+826JFMskK4zH/vPSeYeIeb2KvG87YXAyjM3ZUNZGoQC3uZC+ChpENYsqC4nk6UxBWxIgbCaoQCsct0hSEJpNnaoyLaPh+2aoLZhC2zgDlAjc4ffKVp8Si7hRUqkyU+W285xaCrkINE/xKSbpf6EwG51CEYUCaxlIFFj98aCi2FOy2h4ClZuSD/p95QO5yRYO8vcmccnQY= Content-Type: text/plain; charset="utf-7" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 69476572-c4a4-4267-4fe2-08d697ab4426 X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Feb 2019 03:18:35.6175 (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: BYAPR15MB2533 X-OriginatorOrg: fb.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-02-21_03:,, 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 2/19/19, 10:30 AM, +ACI-Eric Dumazet+ACI- +ADw-eric.dumazet+AEA-gmail.co= m+AD4- wrote: =20 =20 On 02/18/2019 09:38 PM, brakmo wrote: +AD4- This patch adds a new bpf helper BPF+AF8-FUNC+AF8-tcp+AF8-enter+A= F8-cwr +AD4- +ACI-int bpf+AF8-tcp+AF8-enter+AF8-cwr(struct bpf+AF8-tcp+AF8-soc= k +ACo-tp)+ACI-. +AD4- It is added to BPF+AF8-PROG+AF8-TYPE+AF8-CGROUP+AF8-SKB typed bpf= +AF8-prog +AD4- which currently can be attached to the ingress and egress +AD4- path. +AD4- =20 Do we have the guarantee socket is a tcp one, and that the caller owns the socket lock ? Yes. The BPF verifier insures that a pointer to bpf+AF8-tcp+AF8-sock points= to a non-NULL full tcp socket. =20 Please describe the exact context for this helper being used. >From cgroup skb egress bpf program. When the BPF program determines that a = flow needs to slow down, it will call bpf+AF8-tcp+AF8-enter+AF8-cwr(tp). =20