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 2/6] netfront: rx counter should be unsigned

To: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH 2/6] netfront: rx counter should be unsigned
From: Stephen Hemminger <shemminger@xxxxxxxx>
Date: Wed, 17 May 2006 14:28:37 -0700
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Wed, 17 May 2006 14:36:40 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20060517142648.439befd9@xxxxxxxxxxxxxxxxxxxxx>
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>
Organization: OSDL
References: <20060517142648.439befd9@xxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User shemminger@xxxxxxxxxxxxxxxxxxxxx
# Node ID a471b0faf794558e8cc0cd595b293f45924a561c
# Parent  f767d5dc33930e12d267ccf4a0fbe908414d06e2
The receive buffer accounting should be unsigned to avoid
range comparison issues.

Signed-off-by: Stephen Hemminger <shemminger@xxxxxxxx>

diff -r f767d5dc3393 -r a471b0faf794 
linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c
--- a/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c      Wed May 17 
20:41:25 2006
+++ b/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c      Wed May 17 
20:43:22 2006
@@ -106,7 +106,7 @@
 #define RX_MIN_TARGET 8
 #define RX_DFL_MIN_TARGET 64
 #define RX_MAX_TARGET min_t(int, NET_RX_RING_SIZE, 256)
-       int rx_min_target, rx_max_target, rx_target;
+       unsigned rx_min_target, rx_max_target, rx_target;
        struct sk_buff_head rx_batch;
 
        struct timer_list rx_refill_timer;

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel