WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] netback: tx stalls with default credit_bytes

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] netback: tx stalls with default credit_bytes
From: "Kirk Allan" <kallan@xxxxxxxxxx>
Date: Mon, 06 Nov 2006 15:50:30 -0700
Delivery-date: Mon, 06 Nov 2006 14:51:09 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
This situation happens when netif->credit_bytes is using the default of ~0UL, 
effectively -1.  Once the current tx packet size is greater than the 
netif->remaining_credit, transmits will stall until netif->remaining_credit 
wraps back to ~0UL in tx_add_credit().  The min(netif->remaining_credit + 
netif->credit_bytes, max_burst) has the effect of decrementing 
netif->remaining_credit by 1.  The min will continually be less than the 
current tx packet size until tx_add_credit() is called packet size times which 
allows netif->remaining_credit to wrap back to ~0UL.

The patch splits the min() into two steps to eliminate the case of adding by -1.

signed-of-by Kirk Allan <kallan@xxxxxxxxxx>

Attachment: netback.diff
Description: Binary data

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>