|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH RFC] xen-netback: calculate the number of slots required for large MTU vifs
On 2013-7-11 3:37, Wei Liu wrote: On Wed, Jul 10, 2013 at 09:13:33AM +0100, Wei Liu wrote:On Tue, Jul 09, 2013 at 10:40:59PM +0000, Matt Wilson wrote:From: Xi Xiong <xixiong@xxxxxxxxxx> [ note: I've just cherry picked this onto net-next, and only compile tested. This a RFC only. -msw ]Should probably rebase it on net.git because it is a bug fix. Let's worry about that later...Currently the number of RX slots required to transmit a SKB to xen-netfront can be miscalculated when an interface uses a MTU larger than PAGE_SIZE. If the slot calculation is wrong, xen-netback can pause the queue indefinitely or reuse slots. The former manifests as a loss of connectivity to the guest (which can be restored by lowering the MTU set on the interface). The latter manifests with "Bad grant reference" messages from Xen such as: (XEN) grant_table.c:1797:d0 Bad grant reference 264241157 and kernel messages within the guest such as: [ 180.419567] net eth0: Invalid extra type: 112 [ 180.868620] net eth0: rx->offset: 0, size: 4294967295 [ 180.868629] net eth0: rx->offset: 0, size: 4294967295 BUG_ON() assertions can also be hit if RX slots are exhausted while handling a SKB. This patch changes xen_netbk_rx_action() to count the number of RX slots actually consumed by netbk_gop_skb() instead of using nr_frags + 1. This prevents under-counting the number of RX slots consumed when a SKB has a large linear buffer. Additionally, we now store the estimated number of RX slots required to handle a SKB in the cb overlay. This value is used to determine if the next SKB in the queue can be processed. Finally, the logic in start_new_rx_buffer() can cause RX slots to be wasted when setting up copy grant table operations for SKBs with large linear buffers. For example, a SKB with skb_headlen() equal to 8157 bytes that starts 64 bytes 64 bytes from the start of the page willDuplicated "64 bytes". And this change looks like an improvement not a bug fix. Probably submit a separate patch for this? I agree, two patches looks fine.xen_netbk_skb_count_slots returns wrong value, this could be fixed by my patch. protection from overrunning the ring, this could be implemented by Wei's/Matt's patch. Thanks Annie Wei.Wei. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |