From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) (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 D9CF73BA8E for ; Tue, 21 Aug 2018 17:46:47 -0400 (EDT) Received: by mail-ed1-x52d.google.com with SMTP id b10-v6so151559eds.4 for ; Tue, 21 Aug 2018 14:46:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heistp.net; s=google; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=T8pK/HBSMLAyvRmHm2rQrpahM62NaIGtrtNn8bZksDU=; b=fqAVGBeWP2FB1dCwjr2ZhnDDoB6m/lnoHaq1/cVYgk8xh6Q7w/0/vz2Ip7TIzEsS5U 7ubAf4ps8xEFRm3ACQLLzJm6zah8M2gcPScKxZ0CKqSWRMGCgzB776FO6Fjo6m3si+Mu EGMBaRlWVtZDxONLymNds38GkQ85HjvaHe2h7fxlmzI5oVGsVYD2jsIC77qAeew3O6Vg /JvgnFykR3m/71MRlNx+BqqrA/8CxgxAOvGn1Oxy8TKiX8k/u88+Rn9CTWjc4/3NtUbr IokrXMjD8lCxlkmuIQne4ogB+t2thafX0fy/w4eQhmWeS4N6kc0gV2b4SBAuEjQfmPn4 kT0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=T8pK/HBSMLAyvRmHm2rQrpahM62NaIGtrtNn8bZksDU=; b=kcEwngcWejb7epoymEvrraMOM7Ce+F36YvkA9k8yvqGo/OTcFqKQRqhwY2JdTSHzjk WVOqy8kNrRcacjx2S/x3Bmb1M0pm6NUYwcFWkzgb/H8fKERPsbl3WJWDNnAQ5pBV17T+ zIe5CVs8nJV3Wunli6E6QsSgaArpNy+9Ioekb+tXsCSdhs7fT6O0khhogxLqVdZwDJA2 XY/OPh8EnXob1mBkZQvkJLVowMqSt8rP4csVtuM1oMgVskPLN8R7EUTIS9lVabNKUzXf VJMwJb9XP9WOExb5aS4eSNEn3wyNDTTk3TM3OVvcB9QiS75En1e+PH4y7gxG/ZJPRePH 2hNw== X-Gm-Message-State: AOUpUlEAFq8do+XpPrfB5j0BvEYZynW3e+gTVNGIzkNvmeqEvuOkSRPY 4YUYVkPGSe0L6ynnqKS0Op0khw== X-Google-Smtp-Source: AA+uWPyHC9w/hnWUxuQ6FCrBSX1K6NYxKZQhufCe0U9ESFS73EF2jzJTDXQya/wd58cCr3Jjtvgh/A== X-Received: by 2002:aa7:c910:: with SMTP id b16-v6mr65151243edt.22.1534888007022; Tue, 21 Aug 2018 14:46:47 -0700 (PDT) Received: from tron.luk.heistp.net (h-1169.lbcfree.net. [185.193.85.130]) by smtp.gmail.com with ESMTPSA id e38-v6sm77500eda.74.2018.08.21.14.46.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 21 Aug 2018 14:46:46 -0700 (PDT) From: Pete Heist Message-Id: <4C959DD8-62DC-4470-B5A6-F30EC3B702E9@heistp.net> Content-Type: multipart/alternative; boundary="Apple-Mail=_4C9CFC8F-36DC-4091-B631-124638F9E859" Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Date: Tue, 21 Aug 2018 23:46:44 +0200 In-Reply-To: <2689078D-1548-49E7-A9BC-B39980002278@toke.dk> Cc: Jonathan Morton , Cake List To: =?utf-8?Q?Toke_H=C3=B8iland-J=C3=B8rgensen?= References: <87h8jze5hk.fsf@toke.dk> <85C60B2F-78D0-4AEE-871C-BB637785BF62@gmail.com> <4D28C453-5378-4A5B-9E05-874F36C4DB30@gmail.com> <878t5aedj5.fsf@toke.dk> <87d0uc9d2f.fsf@toke.dk> <2689078D-1548-49E7-A9BC-B39980002278@toke.dk> X-Mailer: Apple Mail (2.3445.9.1) Subject: Re: [Cake] issue with Cake and bpf filter 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: Tue, 21 Aug 2018 21:46:48 -0000 --Apple-Mail=_4C9CFC8F-36DC-4091-B631-124638F9E859 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Aug 21, 2018, at 11:17 PM, Toke H=C3=B8iland-J=C3=B8rgensen = wrote: >>=20 >> Well that=E2=80=99s good timing for me as I=E2=80=99m wrapping up a = small utility/eBPF >> to classify an arbitrary username to either MAC or IP. Here=E2=80=99s = the work >> in progress, which is not done yet as flow fairness is still under >> construction, and I haven=E2=80=99t gotten my IPv6 support to pass = the rather >> stubborn eBPF verifier: https://github.com/heistp/tc-users >> > >=20 > Did you see my classifier? Does subnet-to-flow mapping. = https://github.com/tohojo/tc-classifier = Yes I did, that helped a lot with the eBPF code! I=E2=80=99ll consult it = for LPM trie usage, which will have to be ifdef=E2=80=99d out though for = pre-4.11 kernels. tc-users is similar really but I desired a few things (for FreeNet): - MAC and IPv6 support - to map arbitrary usernames to the least used class id - to minimize the number of map changes when there are a lot of users to = sync (not done yet) - flow fairness (though given your new info below, I think that just got = way easier) - to write the userspace utility in C, for practice >> - With the new major/minor ID distinction, I=E2=80=99d probably use = major for >> the user and minor for the flow hash? >=20 > Yes. See the latest commit in the tc-adv repo for a man page update = explaining it. You can also just set the major ID and let cake do the = flow hashing=E2=80=A6 Aha, that=E2=80=99s terribly convenient but also means I don=E2=80=99t = really need to solve the hashing problem (rats), and will be ripping out = some of what I started. :) >> Another thing I haven=E2=80=99t looked into yet is that when fq_codel = is the >> qdisc, the eBPF action is only called "once in a while=E2=80=9D = (start of a new >> flow?) With cake it=E2=80=99s called for every single packet, which = is what I >> expected to happen, but very different behavior. >=20 > Maybe because fq_codel is not splitting gso packets? Good one, I wonder, because I see it=E2=80=99s not just =E2=80=9Cnew = flow=E2=80=9D, I seem to see it called again on the same flow if = there=E2=80=99s a pause in packets on it for =E2=80=9Csome time=E2=80=9D. --Apple-Mail=_4C9CFC8F-36DC-4091-B631-124638F9E859 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8
On = Aug 21, 2018, at 11:17 PM, Toke H=C3=B8iland-J=C3=B8rgensen <toke@toke.dk> = wrote:

Well that=E2=80=99s = good timing for me as I=E2=80=99m wrapping up a small utility/eBPF
to classify an arbitrary username to either MAC or IP. = Here=E2=80=99s the work
in progress, which is not done yet = as flow fairness is still under
construction, and I = haven=E2=80=99t gotten my IPv6 support to pass the rather
stubborn eBPF verifier: https://github.com/heistp/tc-users
<https://github.com/heistp/tc-users>

Did you see my classifier? Does subnet-to-flow mapping. https://github.com/tohojo/tc-classifier

Yes I did, = that helped a lot with the eBPF code! I=E2=80=99ll consult it for LPM = trie usage, which will have to be ifdef=E2=80=99d out though for = pre-4.11 kernels.

tc-users is = similar really but I desired a few things (for FreeNet):
- MAC = and IPv6 support
- to map arbitrary usernames to the least = used class id
- to minimize the number of map changes when = there are a lot of users to sync (not done yet)
- flow = fairness (though given your new info below, I think that just got way = easier)
- to write the userspace utility in C, for = practice

- = With the new major/minor ID distinction, I=E2=80=99d probably use major = for
the user and minor for the flow hash?

Yes. See the latest commit in the tc-adv repo for a man page = update explaining it. You can also just set the major ID and let cake do = the flow hashing=E2=80=A6

Aha, that=E2=80=99s terribly convenient but also = means I don=E2=80=99t really need to solve the hashing problem (rats), = and will be ripping out some of what I started. :)

Another= thing I haven=E2=80=99t looked into yet is that when fq_codel is the
qdisc, the eBPF action is only called "once in a while=E2=80=9D= (start of a new
flow?) With cake it=E2=80=99s called for = every single packet, which is what I
expected to happen, = but very different behavior.

Maybe because fq_codel is not = splitting gso packets?

Good one, I wonder, because I see it=E2=80=99s not = just =E2=80=9Cnew flow=E2=80=9D, I seem to see it called again on the = same flow if there=E2=80=99s a pause in packets on it for =E2=80=9Csome = time=E2=80=9D.

= --Apple-Mail=_4C9CFC8F-36DC-4091-B631-124638F9E859--