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

xen-devel

[Top] [All Lists]

[Xen-devel] [1/4] [NET] back: Fix off-by-one error in netbk_tx_err

To: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Subject: [Xen-devel] [1/4] [NET] back: Fix off-by-one error in netbk_tx_err
From: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 3 Jul 2006 14:44:45 +1000
Cc: Xen Development Mailing List <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: 2006年7月02日 21:46:14 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20060701123825.GA4387@xxxxxxxxxxxxxxxxxxx>
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>
References: <20060630124703.GA23466@xxxxxxxxxxxxxxxxxxx> <69ce918a310b3e9597230c7d8521eed3@xxxxxxxxxxxx> <20060630132141.GA23719@xxxxxxxxxxxxxxxxxxx> <6119c0c588ef3a01c19119bda86298fd@xxxxxxxxxxxx> <20060701032609.GA29803@xxxxxxxxxxxxxxxxxxx> <20060701033315.GA30050@xxxxxxxxxxxxxxxxxxx> <69b713d882b30e730f7e83514eebe737@xxxxxxxxxxxx> <20060701095948.GA387@xxxxxxxxxxxxxxxxxxx> <c477aa32d369946fc4eeb9d1e33887da@xxxxxxxxxxxx> <20060701123825.GA4387@xxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.9i
Hi Keir:
Here are the GSO changes again which should address your concerns. Let me
know if you have any other problems.
[NET] back: Fix off-by-one error in netbk_tx_err
The generalised extra request info patch introduced a bug with the use
of netbk_tx_err since it advanced the req_cons pointer by one. This
patch fixes thing by delaying the increment in netbk_tx_err.
Signed-off-by: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
diff -r 3fe11185adfb -r 3656a2985ae1 
linux-2.6-xen-sparse/drivers/xen/netback/netback.c
--- a/linux-2.6-xen-sparse/drivers/xen/netback/netback.c Sat Jul 01 
09:37:24 2006 +0100
+++ b/linux-2.6-xen-sparse/drivers/xen/netback/netback.c Mon Jul 03 
14:18:54 2006 +1000
@@ -496,9 +496,9 @@ static void netbk_tx_err(netif_t *netif,
 
 do {
 make_tx_response(netif, txp, NETIF_RSP_ERROR);
- if (++cons >= end)
+ if (cons >= end)
 break;
- txp = RING_GET_REQUEST(&netif->tx, cons);
+ txp = RING_GET_REQUEST(&netif->tx, cons++);
 } while (1);
 netif->tx.req_cons = cons;
 netif_schedule_work(netif);
@@ -764,11 +764,11 @@ static void net_tx_action(unsigned long 
 if (txreq.flags & NETTXF_extra_info) {
 work_to_do = netbk_get_extras(netif, extras,
 work_to_do);
+ i = netif->tx.req_cons;
 if (unlikely(work_to_do < 0)) {
- netbk_tx_err(netif, &txreq, 0);
+ netbk_tx_err(netif, &txreq, i);
 continue;
 }
- i = netif->tx.req_cons;
 }
 
 ret = netbk_count_requests(netif, &txreq, work_to_do);
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
Previous by Date: Re: [Xen-devel] [PATCH] xenconsole: fix xencons=tty[0-9]+ param , Mark McLoughlin
Next by Date: [Xen-devel] [2/4] [NET] back: Add GSO features field and check gso_size , Herbert Xu
Previous by Thread: [Xen-devel] Re: [1/4] [NET] back: Fix maximum fragment check , Herbert Xu
Next by Thread: [Xen-devel] Re: [1/4] [NET] back: Fix off-by-one error in netbk_tx_err , Keir Fraser
Indexes: [Date] [Thread] [Top] [All Lists]

Copyright ©, Citrix Systems Inc. All rights reserved. Legal and Privacy
Citrix This site is hosted by Citrix

AltStyle によって変換されたページ (->オリジナル) /