lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <87k0zkmjql.fsf@toke.dk>
Date:   Fri, 03 Jul 2020 22:22:42 +0200
From:   Toke Høiland-Jørgensen <toke@...hat.com>
To:     Roman Mashak <mrv@...atatu.com>
Cc:     Davide Caratti <dcaratti@...hat.com>,
        Jiri Pirko <jiri@...nulli.us>, netdev@...r.kernel.org,
        Jamal Hadi Salim <jhs@...atatu.com>,
        cake@...ts.bufferbloat.net,
        Ilya Ponetayev <i.ponetaev@...systems.com>,
        Cong Wang <xiyou.wangcong@...il.com>, davem@...emloft.net
Subject: Re: [Cake] [PATCH net v2] sched: consistently handle layer3 header accesses in the presence of VLANs

Roman Mashak <mrv@...atatu.com> writes:

> Toke Høiland-Jørgensen <toke@...hat.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ