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] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZQM1IP6kx1WnsUr8@lincoln>
Date: Thu, 14 Sep 2023 18:30:24 +0200
From: Larysa Zaremba <larysa.zaremba@...el.com>
To: Alexander Lobakin <aleksander.lobakin@...el.com>
CC: <bpf@...r.kernel.org>, <ast@...nel.org>, <daniel@...earbox.net>,
	<andrii@...nel.org>, <martin.lau@...ux.dev>, <song@...nel.org>, <yhs@...com>,
	<john.fastabend@...il.com>, <kpsingh@...nel.org>, <sdf@...gle.com>,
	<haoluo@...gle.com>, <jolsa@...nel.org>, David Ahern <dsahern@...il.com>,
	Jakub Kicinski <kuba@...nel.org>, Willem de Bruijn <willemb@...gle.com>,
	Jesper Dangaard Brouer <brouer@...hat.com>, Anatoly Burakov
	<anatoly.burakov@...el.com>, Alexander Lobakin <alexandr.lobakin@...el.com>,
	Magnus Karlsson <magnus.karlsson@...il.com>, Maryam Tahhan
	<mtahhan@...hat.com>, <xdp-hints@...-project.net>, <netdev@...r.kernel.org>,
	Willem de Bruijn <willemdebruijn.kernel@...il.com>, Alexei Starovoitov
	<alexei.starovoitov@...il.com>, Simon Horman <simon.horman@...igine.com>,
	Tariq Toukan <tariqt@...lanox.com>, Saeed Mahameed <saeedm@...lanox.com>
Subject: Re: [RFC bpf-next 11/23] ice: use VLAN proto from ring packet
 context in skb path

On Thu, Sep 14, 2023 at 06:30:32PM +0200, Alexander Lobakin wrote:
> From: Larysa Zaremba <larysa.zaremba@...el.com>
> Date: Thu, 24 Aug 2023 21:26:50 +0200
> 
> > VLAN proto, used in ice XDP hints implementation is stored in ring packet
> > context. Utilize this value in skb VLAN processing too instead of checking
> > netdev features.
> > 
> > At the same time, use vlan_tci instead of vlan_tag in touched code,
> > because vlan_tag is misleading.
> 
> [...]
> 
> >  void
> > -ice_receive_skb(struct ice_rx_ring *rx_ring, struct sk_buff *skb, u16 vlan_tag)
> > +ice_receive_skb(struct ice_rx_ring *rx_ring, struct sk_buff *skb, u16 vlan_tci)
> >  {
> > -	netdev_features_t features = rx_ring->netdev->features;
> > -	bool non_zero_vlan = !!(vlan_tag & VLAN_VID_MASK);
> > -
> > -	if ((features & NETIF_F_HW_VLAN_CTAG_RX) && non_zero_vlan)
> > -		__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), vlan_tag);
> > -	else if ((features & NETIF_F_HW_VLAN_STAG_RX) && non_zero_vlan)
> > -		__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021AD), vlan_tag);
> > +	if (vlan_tci & VLAN_VID_MASK && rx_ring->pkt_ctx.vlan_proto)
> 
> I'd wrap the first expression into ()s to make it more readable (and no
> questions like "shouldn't these be three &&?").
>

OK
 
> > +		__vlan_hwaccel_put_tag(skb, rx_ring->pkt_ctx.vlan_proto,
> > +				       vlan_tci);
> >  
> >  	napi_gro_receive(&rx_ring->q_vector->napi, skb);
> >  }
> 
> [...]
> 
> Thanks,
> Olek

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ