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

RE: [Xen-devel] network hang trigger

To: "Bin Ren" <br260@xxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-devel] network hang trigger
From: "James Harper" <JamesH@xxxxxxxxxxxxxxxx>
Date: Thu, 16 Sep 2004 09:53:06 +1000
Delivery-date: Thu, 16 Sep 2004 01:07:11 +0100
Envelope-to: steven.hand@xxxxxxxxxxxx
List-archive: <http://sourceforge.net/mailarchive/forum.php?forum=xen-devel>
List-help: <mailto:xen-devel-request@lists.sourceforge.net?subject=help>
List-id: List for Xen developers <xen-devel.lists.sourceforge.net>
List-post: <mailto:xen-devel@lists.sourceforge.net>
List-subscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=subscribe>
List-unsubscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=unsubscribe>
Sender: xen-devel-admin@xxxxxxxxxxxxxxxxxxxxx
Thread-index: AcSbci30/uqG+BCJQiCgB/9HXYgFwAADJ7+g
Thread-topic: [Xen-devel] network hang trigger
I see this problem after 1 ping of size > MTU (which probably explains
why NFS hangs too!). If I understand correctly, the situation you
describe should only come about if an error occurs for other reasons.

So do we still have another outstanding bug?

Thanks

James

> -----Original Message-----
> From: xen-devel-admin@xxxxxxxxxxxxxxxxxxxxx [mailto:xen-devel-
> admin@xxxxxxxxxxxxxxxxxxxxx] On Behalf Of Bin Ren
> Sent: Thursday, 16 September 2004 08:11
> To: xen-devel@xxxxxxxxxxxxxxxxxxxxx
> Subject: Re: [Xen-devel] network hang trigger
> 
> Here is what I find out:
> 
> In netfront.c, the transmit function is:
> 
> network_start_xmit(struct sk_buff *skb, struct net_device *dev)
> 
> Currently, whenever there is an error, it returns 1 or -ENOBUFS
> ***WITHOUT*** freeing the ***skb***. This is based on the assumption
that
> the caller, seeing a non-zero return value, will free the ***skb***.
Let's
> take a look at the caller:
> 
> int dev_queue_xmit(struct sk_buff *skb)
> 
> in file net/core.c
> ======================================
> if (!dev->hard_start_xmit(skb, dev)) {
>         HARD_TX_UNLOCK_BH(dev);
>         goto out;
> }
> ...
> 
> out_kfree_skb:
>         kfree_skb(skb);
> out:
>         return rc;
> ======================================
> 
> Bingo, it doesn't. And take a look at other network driver source
codes,
> e.g. 8139too.c, 3c501.c etc, they all ***free skb*** upon error and
> ***always return 0***. This is *hidden contract* between the caller
and
> the
> callee.
> 
> So, skbuffs don't get freed until gc'ed.
> 
> I'm going to modify the files and see the result.
> Keep tuned.
> 
> -- Bin Ren
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by: thawte's Crypto Challenge Vl
> Crack the code and win a Sony DCRHC40 MiniDV Digital Handycam
> Camcorder. More prizes in the weekly Lunch Hour Challenge.
> Sign up NOW http://ad.doubleclick.net/clk;10740251;10262165;m
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxxxx
> https://lists.sourceforge.net/lists/listinfo/xen-devel



-------------------------------------------------------
This SF.Net email is sponsored by: thawte's Crypto Challenge Vl
Crack the code and win a Sony DCRHC40 MiniDV Digital Handycam
Camcorder. More prizes in the weekly Lunch Hour Challenge.
Sign up NOW http://ad.doubleclick.net/clk;10740251;10262165;m
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-devel