Skip to contentSkip to conversation

network hang trigger

DISCUSSION James Harper 1 participant 1 message Sep 15, 2004

lore
Share & tools
lore
#0 lore raw

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

Quoted 7 lines

-----Original Message-----
From: [email protected] [mailto:xen-devel- [email protected]] On Behalf Of Bin Ren
Sent: Thursday, 16 September 2004 08:11
To: [email protected]
Subject: Re: [Xen-devel] network hang trigger

Quoted 8 lines

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

Quoted 1 line

the caller, seeing a non-zero return value, will free the ***skb***.

Let's

Quoted 12 lines

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;
}

...

Quoted 7 lines

out_kfree_skb:

        kfree_skb(skb);
out:
        return rc;

======================================

Bingo, it doesn't. And take a look at other network driver source

codes,

Quoted 2 lines

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

Quoted 11 lines

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

Quoted 9 lines

-------------------------------------------------------
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 [email protected]
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