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=-2.9 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS,USER_AGENT_NEOMUTT 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 D9781C43381 for ; Sat, 23 Mar 2019 15:41:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9B03C2192B for ; Sat, 23 Mar 2019 15:41:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ikzaBOKx" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727588AbfCWPlb (ORCPT ); Sat, 23 Mar 2019 11:41:31 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:33212 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726118AbfCWPla (ORCPT ); Sat, 23 Mar 2019 11:41:30 -0400 Received: by mail-pf1-f193.google.com with SMTP id i19so3516440pfd.0 for ; Sat, 23 Mar 2019 08:41:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=/cRGnWcggi5VpStqBtKrQIV8mx1NrFOayAPYnZxkO4M=; b=ikzaBOKxiz0pEZIEqqEsgaln0WYLmu/ty9xWpJ4M7tno8TKevt3/Qga8ZPFggeh68k VAXrVYh2kMmFmJ8m2f4ia4N0184r6zMo7GF3C6Pfb9o62grP04ZqEGTWRnrDn2BUlwpz iu3UcEsnoa2GI2o2zfAi7MRdheyjGxD5SHJNaXeYYXYPJLT2lbCjfwQgkFB6ihfEjF4z vqX3S/HW242PqSzqMbMaAyXVrG9lNYpsoJ0K1AodlwgT7kK9DXHeSFEfwrxUDJY9ih9v /NjQZwaZBvT6PRORdjgNH5bSR+jYvM72carDta03B9mpbV6tN6llpZzVUUVN2gXm+s7N kImw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=/cRGnWcggi5VpStqBtKrQIV8mx1NrFOayAPYnZxkO4M=; b=BAefu5/JvDgvdefzvhVjquNDOezeyf8yNSfWpQPnO05DQSk9Q5YR0ZQq5Zea/NG1LQ s5bKK5V6uaQLratmg/YKOQQ/9lfD2tu4K0cDsA4H0a5QX0R9GH9ihYGH5oyUYWA9ql4s HEcfVIxRVaRrtq/b+2yshT126APLumejYu/csK0ct3KdlHAywVP4+DK5IIaUGWVru+CR Pq5b64o6wZdOB0JOlFxTjVTTMt8y3GdwNJtHXYv6I1pSb/5A5Uat2ExnM2S8Ot4tz4ct xH1/KZ16T7Ve8l9l/H9FVFgATFXJ7mQFIKniFUJegqLD3OgoGh8HqvTaiejW1z3AtckF /0Tw== X-Gm-Message-State: APjAAAUh0B/GeS4UatWnBfHInQDHfMxEdMVv/7F9sybkUA8bXA+MSrgU xjFo4upYr7mF0K1CTC/2aTo= X-Google-Smtp-Source: APXvYqzRlNKxZPcBHgSImhq/BuwF6J6+n+vgmocDrwNZvJg9vUzk2pxzHJta5LZTYYdDPU5oCBqOug== X-Received: by 2002:a63:5b64:: with SMTP id l36mr14856508pgm.182.1553355689822; Sat, 23 Mar 2019 08:41:29 -0700 (PDT) Received: from ast-mbp ([2620:10d:c090:180::9fd1]) by smtp.gmail.com with ESMTPSA id e21sm2757718pfd.177.2019.03.23.08.41.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 23 Mar 2019 08:41:28 -0700 (PDT) Date: Sat, 23 Mar 2019 08:41:26 -0700 From: Alexei Starovoitov To: Eric Dumazet Cc: brakmo , netdev , Martin Lau , Alexei Starovoitov , Daniel Borkmann , Kernel Team Subject: Re: [PATCH bpf-next 0/7] bpf: Propagate cn to TCP Message-ID: <20190323154124.gorqpaqex7ihfs6d@ast-mbp> References: <20190323080542.173569-1-brakmo@fb.com> <704cb63c-13cd-f0ed-d546-18e3596bb63d@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <704cb63c-13cd-f0ed-d546-18e3596bb63d@gmail.com> User-Agent: NeoMutt/20180223 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Sat, Mar 23, 2019 at 02:12:39AM -0700, Eric Dumazet wrote: > > > On 03/23/2019 01:05 AM, brakmo wrote: > > This patchset adds support for propagating congestion notifications (cn) > > to TCP from cgroup inet skb egress BPF programs. > > > > Current cgroup skb BPF programs cannot trigger TCP congestion window > > reductions, even when they drop a packet. This patch-set adds support > > for cgroup skb BPF programs to send congestion notifications in the > > return value when the packets are TCP packets. Rather than the > > current 1 for keeping the packet and 0 for dropping it, they can > > now return: > > NET_XMIT_SUCCESS (0) - continue with packet output > > NET_XMIT_DROP (1) - drop packet and do cn > > NET_XMIT_CN (2) - continue with packet output and do cn > > -EPERM - drop packet > > > > I believe I already mentioned this model is broken, if you have any virtual > device before the cgroup BPF program. > > Please think about offloading the pacing/throttling in the NIC, > there is no way we will report back to tcp stack instant notifications. I don't think 'offload to google proprietary nic' is a suggestion that folks can practically follow. Very few NICs can offload pacing to hw and there are plenty of limitations. This patch set represents a pure sw solution that works and scales to millions of flows. > This patch series is going way too far for my taste. I would really appreciate if you can do a technical review of the patches. Our previous approach didn't quite work due to complexity around locked/non-locked socket. This is a cleaner approach. Either we go with this one or will add a bpf hook into __tcp_transmit_skb. This approach is better since it works for other protocols and can be used by qdiscs w/o any bpf. > This idea is not new, you were at Google when it was experimented by Nandita and > others, and we know it is not worth the pain. google networking needs are different from the rest of the world. Thank you.