Thread (9 messages) flat view 9 messages, 4 authors, 2014-06-11

Re: [PATCH net] xen-netback: Fix handling of skbs requiring too many slots

From: Zoltan Kiss <hidden>
Date: 2014-06-04 10:15:19

On 04/06/14 09:50, David Laight wrote:
From: netdev-owner@vger.kernel.org
quoted
A recent commit (a02eb4 "xen-netback: worse-case estimate in xenvif_rx_action is
underestimating") capped the slot estimation to MAX_SKB_FRAGS, but that triggers
the next BUG_ON a few lines down, as the packet consumes more slots than
estimated.
This patch introduces full_coalesce on the skb callback buffer, which is used in
start_new_rx_buffer() to decide whether netback needs coalescing more
aggresively. By doing that, no packet should need more than
XEN_NETIF_MAX_TX_SIZE / PAGE_SIZE data slots, as the provided buffers are fully
utilized.
...
quoted
-static bool start_new_rx_buffer(int offset, unsigned long size, int head)
+static bool start_new_rx_buffer(int offset,
+				unsigned long size,
+				int head,
+				bool full_coalesce)
The above is completely incorrect layout ...
Can you elaborate a bit please on "above"?
...
quoted
  	BUG_ON(size > MAX_BUFFER_OFFSET);
-	if ((offset + size > MAX_BUFFER_OFFSET) && offset && !head)
+	if ((offset + size > MAX_BUFFER_OFFSET) &&
+	    offset &&
+	    !head &&
+	    !full_coalesce)
  		return true;
As is that.

	David



--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help