Roman Mashak <m...@mojatatu.com> writes: > Toke Høiland-Jørgensen <t...@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