From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by lists.bufferbloat.net (Postfix) with ESMTPS id 5D1073B2A4 for ; Fri, 3 Jul 2020 16:22:49 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1593807769; 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=SSKfs+k7KWs+Ghy582Ro4O+rljoRJShI5w68ibRr9W8=; b=LxGqkurs+dl4itRyiimGYRxOBF1JkjNTAmVKV/6DQIbmFSZLAJuXcaTPwzHG12abocLgMd rF4s3ylW6gJI3uRcvtMg+itBdHLejWMiBMBaHvXgamql47XcUggTjxo7PJL0E4xi2Cx/Wy jj1L7YlgYAYLiEtKW6qzYq1iJ8IP3pw= Received: from mail-qv1-f69.google.com (mail-qv1-f69.google.com [209.85.219.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-455-86PuNWwXOZabFJNED6tPtA-1; Fri, 03 Jul 2020 16:22:47 -0400 X-MC-Unique: 86PuNWwXOZabFJNED6tPtA-1 Received: by mail-qv1-f69.google.com with SMTP id cv20so10317249qvb.12 for ; Fri, 03 Jul 2020 13:22:47 -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=s0bOOykRbSP71Y9q/RxlG+HHNAGiz0/Va3IAVPaB7pI=; b=S+3sCco5/rYcwSBOOhus6VWffjCogCriRYMTkEdzkNGsJ3Omf5vCBYqifajKcIbJDu j/szjjVnWk0LXPSSZDfAc8yNPsGh6td0QfZkkhFfWU1f3159jJ6P1rpklwV3l9PjY6b8 EnaHoxQHEcXZjjmh7Zzjvyj5eNbe32wcB7daNswB6XL+IEc9o41cDmAmb6R4pgmrVp58 dRls84BIO7jm6a6iGxpzdLDWVpQ869oK+OStDNQY/DYvisWacsj3f+JWimr7Go5HtCEs 61KCE0fUv+0NJT8ebEe9AWFWdH7yNKad3eKlmV2/TkpFQZAB1B9dJKCkFVI2DTpnuieh 0u+w== X-Gm-Message-State: AOAM532H27kDAV63a1zCcHylSuSk0SlZtJsJ/WDsXQ2R2QnVfMMlWauA ONp6RVeI10Xb1PjVrOvL4dn5nBYwWdXCKH8O/e+pWwUI8zXwla6II7/aRHvwhFUceyMYbPjMlc2 vubAH7RCmv9d5PHsbCJ4isw== X-Received: by 2002:a37:aa87:: with SMTP id t129mr36885110qke.70.1593807766901; Fri, 03 Jul 2020 13:22:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwH9YKEGxb7TOlmxT4oJXSsUaaopLdXHc7EcazKMQ/EVfpCBvoYZGTZl1h2NM5CjHOoSan96w== X-Received: by 2002:a37:aa87:: with SMTP id t129mr36885095qke.70.1593807766692; Fri, 03 Jul 2020 13:22:46 -0700 (PDT) Received: from alrua-x1.borgediget.toke.dk ([2a0c:4d80:42:443::2]) by smtp.gmail.com with ESMTPSA id t48sm13060329qtb.50.2020.07.03.13.22.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Jul 2020 13:22:45 -0700 (PDT) Received: by alrua-x1.borgediget.toke.dk (Postfix, from userid 1000) id 0155B1804A8; Fri, 3 Jul 2020 22:22:42 +0200 (CEST) From: Toke =?utf-8?Q?H=C3=B8iland-J=C3=B8rgensen?= To: Roman Mashak Cc: Davide Caratti , Jiri Pirko , netdev@vger.kernel.org, Jamal Hadi Salim , cake@lists.bufferbloat.net, Ilya Ponetayev , Cong Wang , davem@davemloft.net In-Reply-To: <85sge82w34.fsf@mojatatu.com> References: <20200703152239.471624-1-toke@redhat.com> <85sge82w34.fsf@mojatatu.com> X-Clacks-Overhead: GNU Terry Pratchett Date: Fri, 03 Jul 2020 22:22:42 +0200 Message-ID: <87k0zkmjql.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 v2] 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 20:22:49 -0000 Roman Mashak writes: > Toke H=C3=B8iland-J=C3=B8rgensen writes: > > > [...] > >> +/* A getter for the SKB protocol field which will handle VLAN tags cons= istently >> + * whether VLAN acceleration is enabled or not. >> + */ >> +static inline __be16 skb_protocol(const struct sk_buff *skb, bool skip_= vlan) >> +{ >> +=09unsigned int offset =3D skb_mac_offset(skb) + sizeof(struct ethhdr); >> +=09__be16 proto =3D skb->protocol; >> +=09struct vlan_hdr vhdr, *vh; > > Nit: you could move vhdr and *vh definitions inside the while loop, > because of their inner scope use. Sure, can do. -Toke