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 2CA65C4360F for ; Sun, 24 Mar 2019 16:19:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D9AF9218AC for ; Sun, 24 Mar 2019 16:19:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Lnfte8fd" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728799AbfCXQTR (ORCPT ); Sun, 24 Mar 2019 12:19:17 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:41482 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726889AbfCXQTR (ORCPT ); Sun, 24 Mar 2019 12:19:17 -0400 Received: by mail-pg1-f194.google.com with SMTP id f6so607427pgs.8 for ; Sun, 24 Mar 2019 09:19:17 -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=lxH+Fl9/hEM1+Rt7nRgTP9ZH6A1TJ+KdDJAWmipsuoU=; b=Lnfte8fdA5hhctlpU0AEpriYGwoQhj7568ej0jZnYFb8xneZSzoLH+9EaC4lLYyvjh f77yD30bU5pAQulwx1p+BAyTa0sS6CuilswFD1rFSEQSufw9c0wLgNZuJf/4yaxwxflf vBZLrOCdkopmWrrH+NOSgs+KGzeWZvAUU1aWlclo3+OIq5HEPYOXofUbbPknjPpD76Id I20yT6oON1fO39DitUzKfECcEK5eAeUcrwnqfuoYlv0lHN07f2jX9zdxYkdG2QMc1mxG FxuW7JD5MzSERLYXPB9Ezu8k4S4Na/TBEd4x7aDsMX1lS9AX2A6DmGMiSaeHtTlt7vqk +RiQ== 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=lxH+Fl9/hEM1+Rt7nRgTP9ZH6A1TJ+KdDJAWmipsuoU=; b=WE3tWW5Q1+Gbzi1xy+jSMZXqgEGR4nccuUGitglyFBWuBnQBXGTtCB46ygZdq6Ct6T NDA2/OXSEK11bnlZuEvpzxQHtBzB1gz/iHxvBRczYawt0dkooFtXd+dw4mTKQ9DYZ87u vWmTqcsDwkKn+3QDrTmye2BhdXmziDG5stz9g8caEXcWwJJs0XxvUz6X4t0jvW58w/eU yMqJp/vNqI9W0bQANA+pAAkCiyG3hECmrE+wkYud+L6bLfvMBLNe35vtNJGhfAgyNg/e jRBBap8IySCwmq/w5M/YQd2x+yWx/x1vjXJIxUTwwmuwC7ZBQPFEHjYJoUYZZlPgYCaC DjQg== X-Gm-Message-State: APjAAAVY/42oi4rvtYBwkTNtpwFua0RxcpMRINiBCTzL8PyXbXRj5l1P Erfy/zJlkbIY3Gig1+EnQZc= X-Google-Smtp-Source: APXvYqxsthpf6A0cK6dYIDwPqfgnx+qi0ntsAN1O8jtDWF2vNOmZW0zvvyrBiqXUp7ZfW4E928B+cw== X-Received: by 2002:a63:570d:: with SMTP id l13mr11379494pgb.55.1553444356605; Sun, 24 Mar 2019 09:19:16 -0700 (PDT) Received: from ast-mbp ([2620:10d:c090:180::5256]) by smtp.gmail.com with ESMTPSA id z69sm23916098pfi.30.2019.03.24.09.19.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 24 Mar 2019 09:19:15 -0700 (PDT) Date: Sun, 24 Mar 2019 09:19:13 -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: <20190324161911.h5eotv2j7f5avcpm@ast-mbp> References: <20190323080542.173569-1-brakmo@fb.com> <704cb63c-13cd-f0ed-d546-18e3596bb63d@gmail.com> <20190323154124.gorqpaqex7ihfs6d@ast-mbp> <0841fe0d-7fcd-bb59-3694-af9969cec5af@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0841fe0d-7fcd-bb59-3694-af9969cec5af@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 10:36:24PM -0700, Eric Dumazet wrote: > > > On 03/23/2019 08:41 AM, Alexei Starovoitov wrote: > > 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. > > > > This has nothing to do with Google against Facebook really, it is a bit sad you react like this Alexei. > > We just upstreamed bpf_skb_ecn_set_ce(), so I doubt you already have numbers to show that this strategy > is not enough. > > All recent discussions about ECN (TCP Prague and SCE) do not _require_ instant feedback to the sender. > > Please show us experimental results before we have to carry these huge hacks. I have a feeling we're looking at different patches. All of your comments seems to be talking about something else. I have a hard time connecting them to this patch set. Have you read the cover letter and patches of _this_ set? The results are in the cover letter and there is no change in behavior in networking stack. Patches 1, 2, 3 are simple refactoring of bpf-cgroup return codes. Patch 4 is the only one that touches net/ipv4/ip_output.c only to pass the return code to tcp/udp layer. The concept works for both despite of what you're claiming being tcp only. Cover letter also explains why bpf_skb_ecn_set_ce is not enough. Please realize that existing qdiscs already doing this. The patchset allows bpf-cgroup to do the same. If you were arguing about sysctl knob in patch 5 that I would understand. Instead of a knob we can hard code the value for now. But please explain what issues you see with that knob. Also to be fair I applied your commit f11216b24219 ("bpf: add skb->tstamp r/w access from tc clsact and cg skb progs") without demanding 'experimental results' because the feature makes sense. Yet, you folks didn't produce a _single_ example or test result since then. This is not cool.