From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by lists.bufferbloat.net (Postfix) with ESMTPS id DE0713B2A4 for ; Fri, 3 Jul 2020 10:37:26 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1593787046; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=diHfsq0rXnLaq8z+P8hpE4mUEjDJ4fv5IrD+f0fwMfU=; b=DKzagHoQGyHJB8hcRpqoYv6gDn2xuI6c++nLX3jWgbfJgSE0v6ues5+hnZrB7qam2IvhQs wQssaBRU/V/VFICrF4jo0ts7obRSrXhbYYBozNLwzjI5g1/Jg7H0h/WUy7caDxyCbqsilH dR6TclhjU355jH5QJi+Pbj5eTcLZpHA= Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-272-R2kmmDSyMbykXEM28qulPA-1; Fri, 03 Jul 2020 10:37:25 -0400 X-MC-Unique: R2kmmDSyMbykXEM28qulPA-1 Received: by mail-qk1-f199.google.com with SMTP id q192so11553939qka.13 for ; Fri, 03 Jul 2020 07:37:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version:content-transfer-encoding; bh=7h3VIBynGAlk+pxIYoEzFod8/JhmRY6WxDm0pv5l3KQ=; b=l1zCZt1Qbp8o7PwrK+WTCytOcPMRVe0oj4b9zxKsDWDaSaIRE4qyfM7BH19rgnamuO g9Tbz72gr6EmvXqKYP55iTxtBKaQqAUGkAxQAc2ggiIZ+zS7bLzGTIhV6+F+4bdtfVAM n3vTXo69x7XYnX+bb91tbFRh77UffkKsfUvOrdKgH0sUxu+v4ul8X+6mTYXZtptuki4S gbIOMD1OhzFh6JjTCeeELmhPaAA6P8uuoqcQwfn0vdVvcOVh4j/86Rti5VCbMYNLMkoF r2QFHLunystLYCmAaQrw3SSzVdIw1zMQ7PmI1TwV/p2/0TZ/WtNjGc1QheQCDP4fnDHH HB3Q== X-Gm-Message-State: AOAM532iLZ1jp7QuOO6T1PyXHU9mFvhxct02aoX6a5B99bX7EFi+47Pq V49HBpU8VHTil6bTN/CJAfi5wc4U7w3jCrRnUwJPjpVw6uPy4f7DLBimxesCTP+nWM/pI/CfvPa pnK7X+X7nqZ3IFCPLdeW7Eg== X-Received: by 2002:a37:5b46:: with SMTP id p67mr34023941qkb.346.1593787044529; Fri, 03 Jul 2020 07:37:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy/rfayxSbJbu3yk98ojqDffk/hNVOL8EuEKT5F/T8VpEAS/bHNmrwscdBkv/Nu2oiHHiwkTg== X-Received: by 2002:a37:5b46:: with SMTP id p67mr34023909qkb.346.1593787044160; Fri, 03 Jul 2020 07:37:24 -0700 (PDT) Received: from alrua-x1.borgediget.toke.dk ([2a0c:4d80:42:443::2]) by smtp.gmail.com with ESMTPSA id j52sm12168959qtc.49.2020.07.03.07.37.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Jul 2020 07:37:23 -0700 (PDT) Received: by alrua-x1.borgediget.toke.dk (Postfix, from userid 1000) id F03F51828E4; Fri, 3 Jul 2020 16:37:20 +0200 (CEST) From: Toke =?utf-8?Q?H=C3=B8iland-J=C3=B8rgensen?= To: Davide Caratti , davem@davemloft.net Cc: netdev@vger.kernel.org, cake@lists.bufferbloat.net, Jiri Pirko , Jamal Hadi Salim , Ilya Ponetayev , Cong Wang In-Reply-To: <4297936b4cc7d6cdcb51ccc10331467f39978795.camel@redhat.com> References: <20200703120523.465334-1-toke@redhat.com> <4297936b4cc7d6cdcb51ccc10331467f39978795.camel@redhat.com> X-Clacks-Overhead: GNU Terry Pratchett Date: Fri, 03 Jul 2020 16:37:20 +0200 Message-ID: <873668ekbj.fsf@toke.dk> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=toke@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Cake] [PATCH net] sched: consistently handle layer3 header accesses in the presence of VLANs 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 Jul 2020 14:37:26 -0000 Davide Caratti writes: > hello Toke, > > thanks for answering! > > On Fri, 2020-07-03 at 14:05 +0200, Toke H=C3=B8iland-J=C3=B8rgensen wrote= : >> while (proto =3D=3D htons(ETH_P_8021Q) || proto =3D=3D htons(ETH_P_802= 1AD)) { > > maybe this line be shortened, since if_vlan.h has [1]: > > while (eth_type_vlan(proto)) { > =09... > } Good point, missed that! Will fix and send a v2. > If I read well, the biggest change from functional point of view is that > now qdiscs can set the ECN bit also on non-accelerated VLAN packets and > QinQ-tagged packets, if the IP header is the outer-most header after VLAN= ; > and the same applies to almost all net/sched former users of skb->protoco= l=20 > or tc_skb_protocol(). Yup, that's the idea. > Question (sorry in advance because it might be a dumb one :) ): > > do you know why cls_flower, act_ct, act_mpls and act_connmark keep readin= g > skb->protocol? is that intentional? Hmm, no not really. I only checked for calls to tc_skb_protocol(), not for direct uses of skb->protocol. Will fix those as well :) > (for act_mpls that doesn't look intentional, and probably the result is > that the BOS bit is not set correctly if someone tries to push/pop a labe= l > for a non-accelerated or QinQ packet. But I didn't try it experimentally > :) ) Hmm, you're certainly right that the MPLS code should use the helper to get consistent use between accelerated/non-accelerated VLAN usage. But I don't know enough about MPLS to judge whether it should be skipping the VLAN tags or not. Sounds like you're saying the right thing is to skip the VLAN tags there as well? Looking at the others, it looks like act_connmark and act_ct both ought to skip VLAN tags, while act_flower should probably keep it, since it seems it has a VLAN match type. Or? -Toke