On Thu, 2019-05-30 at 11:08 -0700, Stephen Hemminger wrote:
> On Thu, 30 May 2019 20:03:41 +0200
> Davide Caratti <dcara...@redhat.com> wrote:
> 
> >  
> > +static inline int tc_skb_pull_vlans(struct sk_buff *skb,
> > +                               unsigned int *hdr_count,
> > +                               __be16 *proto)
> > +{
> > +   if (skb_vlan_tag_present(skb))
> > +           *proto = skb->protocol;
> > +
> > +   while (eth_type_vlan(*proto)) {
> > +           struct vlan_hdr *vlan;
> > +
> > +           if (unlikely(!pskb_may_pull(skb, VLAN_HLEN)))
> > +                   return -ENOMEM;
> > +
> > +           vlan = (struct vlan_hdr *)skb->data;
> > +           *proto = vlan->h_vlan_encapsulated_proto;
> > +           skb_pull(skb, VLAN_HLEN);
> > +           skb_reset_network_header(skb);
> > +           (*hdr_count)++;
> > +   }
> > +   return 0;
> > +}
> 
> Does this really need to be an inline, or could it just be
> part of the sched_api?

yes, you are right: I will send a v3.

thanks,
-- 
davide


Reply via email to