From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-x244.google.com (mail-wm0-x244.google.com [IPv6:2a00:1450:400c:c09::244]) (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 6A1BE3CB35 for ; Wed, 22 Aug 2018 06:32:44 -0400 (EDT) Received: by mail-wm0-x244.google.com with SMTP id j192-v6so1339765wmj.1 for ; Wed, 22 Aug 2018 03:32:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heistp.net; s=google; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=KVRetQu55q6tHMS/JJtXpJDNnTejkqaSqJhR1PhBsvg=; b=fYsd5xaPonRhvTPz/0I1etkKpHhU7toThENHp54uaezegbvy1orA4Zsv06i/teluQH I8tx2qF8ZUlXPzeKfydmNeTFA3IY4EIt/S7+LRYg3aBlHs7bVBgVbZK4ald8Gys704l3 Xo51w8K95NiLjDWAYaC0YvUoZFLFMCIpH76MYV5gQgg55DII1B/zRP9Bsin5Yupj1/EZ P0gTfxhHLDswO5cfLeZDQRoFrUfPgI6c4xG1tSOPopHI9sDuyNOd2P4jCTJFJEIldjG8 R5du3XbngSaPw6LssQV7fhTvILY1Dl2fSn+ktjcn+DVOM3gZvlNMChiHI379noSZBFm9 b+GQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=KVRetQu55q6tHMS/JJtXpJDNnTejkqaSqJhR1PhBsvg=; b=DMR/stZDeri9fT5CKpWDkvDZxt24MAKi6B+mF74MVp9s5VKevcFoBWbxDyCZacq1Q1 AJZLFKJdMJxLpXzol5it3gufYPP7DalA+jFCSFcBxaV2M1kM3SctSN7S4Ty1pomjnJ7f FpAHZ4IotNANCZ+XR7qR3YM4Pj22iHYBTZxTmBN3kl0M4OG5cql+KEO89c2IPweMiwGu aLjAfobLuMXfT41cmpgL51I0Z+b+DZI4NR9EUIhggeMffRq3QCPfaPgZxv3UsqgNWOSm eynH/oph8R8QfPQa8hX+DFbt0Is1XXWH6fQCkP5mfrNVhIygxr0mwBikjPY0IPRHETUV vohw== X-Gm-Message-State: APzg51CcvKsWzY3jlH4JUkIimlfkAYZ+3WAkRn7DZvggv+I04sNAtU/Z pu+z5ZFAV2AplzaPwWSOOWaITA== X-Google-Smtp-Source: ANB0VdYIGTiEToSpObJJMeOSLp5W5RnKbkZYovz1zINAEZYTL7Ba0pBdLCYNuNTfCD/+iBUvuk46kw== X-Received: by 2002:a1c:b6d6:: with SMTP id g205-v6mr2129772wmf.17.1534933963563; Wed, 22 Aug 2018 03:32:43 -0700 (PDT) Received: from tron.lt2.drhleny.cz ([185.15.109.151]) by smtp.gmail.com with ESMTPSA id t70-v6sm1615785wmt.30.2018.08.22.03.32.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 Aug 2018 03:32:42 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) From: Pete Heist In-Reply-To: <87in4290ae.fsf@toke.dk> Date: Wed, 22 Aug 2018 12:32:41 +0200 Cc: Jonathan Morton , Cake List Content-Transfer-Encoding: quoted-printable Message-Id: <5D0CA99B-C471-4CA2-BBF4-CDF573262F2F@heistp.net> 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> <03B32CF6-2926-42A7-A407-CBD16BA38F0D@heistp.net> <87tvnm91yy.fsf@toke.dk> <70F2DBF2-5B11-43AC-82FD-899A2B0931EC@heistp.net> <87in4290ae.fsf@toke.dk> To: =?utf-8?Q?Toke_H=C3=B8iland-J=C3=B8rgensen?= 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: Wed, 22 Aug 2018 10:32:44 -0000 > On Aug 22, 2018, at 12:13 PM, Toke H=C3=B8iland-J=C3=B8rgensen = wrote: >=20 > Jonathan Morton writes: >=20 >>> On 22 Aug, 2018, at 12:51 pm, Pete Heist wrote: >>>=20 >>> "math between pkt pointer and 4294901760 is not allowed" >>=20 >> As a possible clue here, 4294901760 =3D=3D (2^32) - (2^16). >>=20 >> I suspect both errors are being caused by the call to memcpy(). This >> potentially inlines a substantial amount of code which may not be >> eBPF-clean. >=20 > Yeah, I think this is a good guess. You could try using > __builtin_memcpy() instead; that may do fewer pointer shenanigans than > the function-header-defined one... Thanks for those ideas. It sounded good to me too, but __builtin_memcpy = does the same, as does replacing memcpy with a manually unrolled loop = (committed as IPV6_SUPPORT_V3). Backing up, I=E2=80=99m not even sure why I have to put the IPv6 address = on the stack. For IPv4, I just have a pointer to a =E2=80=9Cstruct = iphdr=E2=80=9D set at an offset from head, not on the stack at all, and = it works fine to reference &ip4->daddr directly. For IPv6 = (IPV6_SUPPORT_V1), it doesn=E2=80=99t. I have to look at that (2^32) - = (2^16) value, seems key, and I might find some clues in the example Dave = sent. Or understand the bytecode=E2=80=A6 :)=