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]
Date:   Tue, 19 Nov 2019 15:57:44 -0800
From:   Jakub Kicinski <jakub.kicinski@...ronome.com>
To:     <sameehj@...zon.com>
Cc:     <davem@...emloft.net>, <netdev@...r.kernel.org>, <dwmw@...zon.com>,
        <zorik@...zon.com>, <matua@...zon.com>, <saeedb@...zon.com>,
        <msw@...zon.com>, <aliguori@...zon.com>, <nafea@...zon.com>,
        <gtzalik@...zon.com>, <netanel@...zon.com>, <alisaidi@...zon.com>,
        <benh@...zon.com>, <akiyano@...zon.com>
Subject: Re: [PATCH V2 net-next v2 1/3] net: ena: implement XDP drop support

On Tue, 19 Nov 2019 15:34:17 +0200, sameehj@...zon.com wrote:
> @@ -1082,11 +1180,16 @@ static int ena_clean_rx_irq(struct ena_ring *rx_ring, struct napi_struct *napi,
>  			  rx_ring->qid, ena_rx_ctx.descs, ena_rx_ctx.l3_proto,
>  			  ena_rx_ctx.l4_proto, ena_rx_ctx.hash);
>  
> +		if (ena_xdp_present_ring(rx_ring))
> +			xdp_verdict = ena_xdp_handle_buff(rx_ring, &xdp);
> +
>  		/* allocate skb and fill it */
> -		skb = ena_rx_skb(rx_ring, rx_ring->ena_bufs, ena_rx_ctx.descs,
> -				 &next_to_clean);
> +		if (xdp_verdict == XDP_PASS)
> +			skb = ena_rx_skb(rx_ring,
> +					 rx_ring->ena_bufs,
> +					 ena_rx_ctx.descs,
> +					 &next_to_clean);

XDP may move the start of frame (consume or add headers), the start of
frame used when constructing the skb must reflect the changes made by
XDP.

>  
> -		/* exit if we failed to retrieve a buffer */
>  		if (unlikely(!skb)) {
>  			for (i = 0; i < ena_rx_ctx.descs; i++) {
>  				rx_ring->free_ids[next_to_clean] =

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ