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: <20160114.165456.1025501284568544813.davem@davemloft.net>
Date:	Thu, 14 Jan 2016 16:54:56 -0500 (EST)
From:	David Miller <davem@...emloft.net>
To:	david.vrabel@...rix.com
Cc:	netdev@...r.kernel.org, xen-devel@...ts.xenproject.org,
	ian.campbell@...rix.com, wei.liu2@...rix.com
Subject: Re: [PATCHv1 net] xen-netback: use skb to determine number of
 required guest Rx requests

From: David Vrabel <david.vrabel@...rix.com>
Date: Thu, 14 Jan 2016 15:18:30 +0000

> -	needed = xenvif_rx_ring_slots_needed(queue->vif);
> +	skb = skb_peek(&queue->rx_queue);
> +	if (!skb)
> +		return false;
> +
> +	needed = DIV_ROUND_UP(skb->len, XEN_PAGE_SIZE);
> +	if (skb_is_gso(skb))
> +		needed++;

If I am not mistaken, we moved away from this kind of test exactly because
it is inaccurate and may under-estimate the needs.

It is possible for an N byte SKB to require N segments.  Therefore, the:

	DIV_ROUND_UP(skb->len, XEN_PAGE_SIZE);

calculation doesn't cut it.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ