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: <5370208b08c9e25c05b6a7cc0e8dfae79721da4d.camel@redhat.com>
Date:   Fri, 31 May 2019 11:02:13 +0200
From:   Davide Caratti <dcaratti@...hat.com>
To:     Stephen Hemminger <stephen@...workplumber.org>
Cc:     Eric Dumazet <eric.dumazet@...il.com>,
        Cong Wang <xiyou.wangcong@...il.com>,
        Jiri Pirko <jiri@...nulli.us>,
        Jamal Hadi Salim <jhs@...atatu.com>,
        "David S . Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
        shuali@...hat.com, Eli Britstein <elibr@...lanox.com>
Subject: Re: [PATCH net v2 1/3] net/sched: act_csum: pull all VLAN headers
 before checksumming

On Thu, 2019-05-30 at 11:08 -0700, Stephen Hemminger wrote:
> On Thu, 30 May 2019 20:03:41 +0200
> Davide Caratti <dcaratti@...hat.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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ