From: "Toke Høiland-Jørgensen" <toke@redhat.com>
To: Roman Mashak <mrv@mojatatu.com>
Cc: Davide Caratti <dcaratti@redhat.com>,
Jiri Pirko <jiri@resnulli.us>,
netdev@vger.kernel.org, Jamal Hadi Salim <jhs@mojatatu.com>,
cake@lists.bufferbloat.net,
Ilya Ponetayev <i.ponetaev@ndmsystems.com>,
Cong Wang <xiyou.wangcong@gmail.com>,
davem@davemloft.net
Subject: Re: [Cake] [PATCH net v2] sched: consistently handle layer3 header accesses in the presence of VLANs
Date: Fri, 03 Jul 2020 22:22:42 +0200 [thread overview]
Message-ID: <87k0zkmjql.fsf@toke.dk> (raw)
In-Reply-To: <85sge82w34.fsf@mojatatu.com>
Roman Mashak <mrv@mojatatu.com> writes:
> Toke Høiland-Jørgensen <toke@redhat.com> writes:
>
>
> [...]
>
>> +/* A getter for the SKB protocol field which will handle VLAN tags consistently
>> + * whether VLAN acceleration is enabled or not.
>> + */
>> +static inline __be16 skb_protocol(const struct sk_buff *skb, bool skip_vlan)
>> +{
>> + unsigned int offset = skb_mac_offset(skb) + sizeof(struct ethhdr);
>> + __be16 proto = skb->protocol;
>> + struct 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
prev parent reply other threads:[~2020-07-03 20:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-03 15:22 Toke Høiland-Jørgensen
2020-07-03 19:19 ` Cong Wang
2020-07-03 20:09 ` Toke Høiland-Jørgensen
2020-07-03 20:16 ` Roman Mashak
2020-07-03 20:22 ` Toke Høiland-Jørgensen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://lists.bufferbloat.net/postorius/lists/cake.lists.bufferbloat.net/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87k0zkmjql.fsf@toke.dk \
--to=toke@redhat.com \
--cc=cake@lists.bufferbloat.net \
--cc=davem@davemloft.net \
--cc=dcaratti@redhat.com \
--cc=i.ponetaev@ndmsystems.com \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=mrv@mojatatu.com \
--cc=netdev@vger.kernel.org \
--cc=xiyou.wangcong@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox