From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.toke.dk (mail.toke.dk [52.28.52.200]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.bufferbloat.net (Postfix) with ESMTPS id 7795F3B2A4 for ; Sun, 29 Jul 2018 15:14:52 -0400 (EDT) From: Toke =?utf-8?Q?H=C3=B8iland-J=C3=B8rgensen?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=toke.dk; s=20161023; t=1532891688; bh=WK9r1ZJE3HVL2ppXJhblyRB57xyAi+ptyIRdHfBGzMw=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=NzVB6E2r9D7vkJ69rSNfw30FGO48u8NY2cHTvB9LDBqBVSRNS69r7GSHBw+Z6LwIS wKLi1iUML5FwHCMaIpRA2/hmWq+utUcMCrsdaS2xrr5YtsTgXy7gDYh4iAJxmz/qsC PuXT7DBII5hKiM/YNWrd2Yjzlrjt9ATLDfB/KMUgYKZ4b9IRJKHc0D9lCfcnCxCyqI n8lsMjYyQvytOETkogLGxqEths5kxcgRshribiH9w5LMctMSRXs9JZrBuFL2PQnMsq I2qOAKtvf/CRb3/lSSdmreaNLECY4/fKC7WU7gBhKmYX6VX8pt2umIH/nKDiKr0QTf Tp1MwygJe0GVw== To: Pete Heist Cc: Dave Taht , Cake List In-Reply-To: References: <1357421162.31089.1531812291583@webmail.strato.de> <1c323544b3076c0ab31b887d6113f25f572e41ae.camel@coverfire.com> <87woth28rw.fsf@toke.dk> <87tvol1z6h.fsf@toke.dk> <87wotfzql8.fsf@toke.dk> Date: Sun, 29 Jul 2018 21:14:47 +0200 X-Clacks-Overhead: GNU Terry Pratchett Message-ID: <87r2jlzwew.fsf@toke.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Cake] =?utf-8?q?Using_cake_to_shape_1000=E2=80=99s_of_users=2E?= 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: Sun, 29 Jul 2018 19:14:52 -0000 Pete Heist writes: >> On Jul 28, 2018, at 8:12 PM, Toke H=C3=B8iland-J=C3=B8rgensen wrote: >>=20 >> Priority field sets tin, class sets flow. Both need the qdisc is as its = major number, iirc. And both can be set from the same bpf filter which can = be run in direct action mode... > > This works for me. :) > > I only tested so far by setting classid with u32 to map 3 macs to two mem= bers IDs, then verified fairness: > > # IFACE is cake=E2=80=99s interface > # MAJOR_ID is from cake > while read mac id; do > tc filter add dev $IFACE parent $MAJOR_ID: \ > u32 match ether src $mac classid $MAJOR_ID:$id > done << EOF > aa:bb:cc:11:22:33 1 > bb:cc:dd:22:33:44 1 > cc:dd:ee:33:44:55 2 > EOF > > This should use eBPF and a map lookup for performance, so I=E2=80=99ll se= e if I can make that work. > > Caveats that I know of: > - Limited to 1024 members > - No fairness between flows You could assign more than one queue per customer and hash traffic between them in BPF... > - Non-member traffic would have to be dealt with somehow, maybe put in > its own queue or split among multiple queues, otherwise there can be > hash collisions with member queues Yeah, an "overflow queue" is definitely needed in this kind of deployment :) I actually wrote an eBPF classifier a few months back, that can lookup subnets in a BPF map and map them into different classes: https://github.com/tohojo/tc-classifier -Toke