From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk0-x229.google.com (mail-qk0-x229.google.com [IPv6:2607:f8b0:400d:c09::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.bufferbloat.net (Postfix) with ESMTPS id 636253B29E for ; Thu, 2 Aug 2018 20:22:22 -0400 (EDT) Received: by mail-qk0-x229.google.com with SMTP id x192-v6so2922275qkb.3 for ; Thu, 02 Aug 2018 17:22:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=euyj9FiTiLaocqwqXBW7DdENjuokYmLUGPpVaCwAHrg=; b=V6oXtl9DnlkJ0/emm2fGGCzA1o7YqFaMiH4Y7qYrL8xdMkkrFFregb3Yao28mVuQCp WtykX03gYiloJRCH6g8FP8b7lfu4MQLskEi5HUSvOQBfnBEHYeynDbENRmIaqBuBiPS7 OykmYOCh9/kNh+8P6d2BrnS2GDfjuA1Dybo1Ae9kMBXM1e90vmjr/WN6Y/Fpv14hyawo qGx9rZ+MYZ357OYN55q908JnRZJgtUfJjg6TUINfZ2oUmOneObnpU6iaIyvcltUYTFML OnY3VU6h7yHLooHmKYbbLZN7lt3a2nVguBrmWdNqMEKKq8Imxinz1QtA8osENo2m9DaB WiSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=euyj9FiTiLaocqwqXBW7DdENjuokYmLUGPpVaCwAHrg=; b=tic4NRT72Y1EvB/7lrCEbRj1oFz4M0Ij8MAwY2RI5rwWBzwxCkmzWAy+9PKzPLqhgc ZtusgYABuWwPR8rtOh9Lr13EE9y+ayu0BW3Ef0Z4NGtTvKLljvf/WE4+5Db+n8RJnbL1 qO5+xlV4LH4LKCKhi5zFdNOaxkAjZgplks0aT5S7YwD5rKAwlQtesdKD0tlrOhP6/MfS hp0X3LlOVVBEy1Y1/Yd36QTAZxAGss9ONIDg8RwZ5h7FJDcG6hc5XgEBYkR9GaoayoX7 qogIY11fMTzI3LA5aqvFqb+NoHXvCfz9+B4+Bg/B6GSkX5AQlYs8Wf5qNN//yKtpsFXe kPRQ== X-Gm-Message-State: AOUpUlEo7FuthQIOgbmj1RnkTsIIpDM1MY/h0Jgu4khOh+F1qyCaXfI5 wq5v0O2vS9No64N81HK2+tF7K7P8mjVmoZkPF28= X-Google-Smtp-Source: AAOMgpfy1VvB6fDk8wLhIlj3QywhaKcwegfuwHRiDL7MCbblxOkLNtwHA1otnuQpBr/mOO9nmVMQmITjxvr2IyRhfic= X-Received: by 2002:a37:210a:: with SMTP id h10-v6mr1602420qkh.263.1533255741462; Thu, 02 Aug 2018 17:22:21 -0700 (PDT) MIME-Version: 1.0 References: <87ftzwy1pw.fsf@toke.dk> In-Reply-To: <87ftzwy1pw.fsf@toke.dk> From: Dave Taht Date: Thu, 2 Aug 2018 17:22:43 -0700 Message-ID: To: =?UTF-8?B?VG9rZSBIw7hpbGFuZC1Kw7hyZ2Vuc2Vu?= Cc: Jonathan Morton , Cake List Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [Cake] codel in ebpf? X-BeenThere: cake@lists.bufferbloat.net X-Mailman-Version: 2.1.20 Precedence: list List-Id: Cake - FQ_codel the next generation List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Aug 2018 00:22:22 -0000 On Thu, Aug 2, 2018 at 1:04 PM Toke H=C3=B8iland-J=C3=B8rgensen wrote: > > Dave Taht writes: > > > On Wed, Aug 1, 2018 at 10:25 AM Dave Taht wrote: > >> > >> I wonder if ebpf has opcode space for an invsqrt? > > > > bpf_ktime_get_ns() exists... > > > > one thing that I don't know if bpf can do is read/write the > > skb->tstamp field. The plan would be to rigorously write it (if not > > supplied by hw) on all ingress ports and check it on all egress ports. > > An XDP eBPF program (run at earliest possible ingress) has access to a > buffer of arbitrary data that is attached to the skb and that can be > read from later eBPF programs. So it doesn't need to muck with > skb->tstamp for this. It does? All I see is maps. If you clone or otherwise split the packet, what happens? > > That said, every time I've tried to do something in ebpf I hit a > > limitation I'd not thunk of yet. > > Yeah, the whole XDP/eBPF system is somewhat of a work in progress ;) > > > For example, where can you attach the egress filter? > > > > My thought would be to use a bfifo > bpf -> bql, but from what little > > I understand, it's bpf -> bfifo -> bql > > Yeah, it is. Don't think there's a way to run an eBPF program after the > qdisc... Well, it seems possible to move this typical part of an ebpf specific qdisc from ingress to egress. Gawd knows what that would break, but, essentially.= ... filter =3D rcu_dereference_bh(q->filter_list); retry: skb =3D dequeue(); ... if(filter) { *qerr =3D NET_XMIT_SUCCESS | __NET_XMIT_BYPASS; result =3D tcf_classify(skb, filter, &res, false); switch (result) { case TC_ACT_SHOT: clean up stuff; goto retry; } ... > -Toke --=20 Dave T=C3=A4ht CEO, TekLibre, LLC http://www.teklibre.com Tel: 1-669-226-2619