]>
Commit | Line | Data |
---|---|---|
b5a39c4d JR |
1 | According to chas williams: |
2 | > >> so wherever clip_start_xmit() calls dev_free_skb() it should return 1 | |
3 | > >> instead of 0? | |
4 | > >> did i follow that correctly...? | |
5 | > | |
6 | > i believe that you should only return non zero if you want the ip | |
7 | > stack to requeue the skb and try to send it again (perhaps your | |
8 | > driver was busy). in practice this is rarely done. if you drop | |
9 | > the skb and return 1 this is going to create trouble. check out | |
10 | > Documentation/networking/driver.txt. it looks like br2684 should | |
11 | > simple not return 1 at the end of br2684_xmit_vcc. | |
12 | ||
13 | But that's br2684, not clip... and I posted the same thing about | |
14 | a week ago ;) | |
15 | ||
16 | --- linux-2.4.21-pre4/net/atm/br2684.c.orig 2002-08-03 02:39:46.000000000 +0200 | |
17 | +++ linux-2.4.21-pre4/net/atm/br2684.c 2003-02-26 15:11:48.000000000 +0100 | |
18 | @@ -219,17 +219,19 @@ | |
19 | /* netif_stop_queue(dev); */ | |
20 | dev_kfree_skb(skb); | |
21 | read_unlock(&devs_lock); | |
22 | - return -EUNATCH; | |
23 | + /* Pretend we succeeded so the packet is dropped. */ | |
24 | + return 0; | |
25 | } | |
26 | if (!br2684_xmit_vcc(skb, brdev, brvcc)) { | |
27 | /* | |
28 | * We should probably use netif_*_queue() here, but that | |
29 | * involves added complication. We need to walk before | |
30 | * we can run | |
31 | + * | |
32 | + * Note: at this point, skb is no longer valid. | |
33 | + * br2684_xmit_vcc() might have realloced or freed it. | |
34 | + * We don't need to worry about that. | |
35 | */ | |
36 | - /* don't free here! this pointer might be no longer valid! | |
37 | - dev_kfree_skb(skb); | |
38 | - */ | |
39 | brdev->stats.tx_errors++; | |
40 | brdev->stats.tx_fifo_errors++; | |
41 | } | |
42 | ||
43 | ||
44 | Mike. | |
45 | -- | |
46 | Anyone who is capable of getting themselves made President should | |
47 | on no account be allowed to do the job -- Douglas Adams. | |
48 | ||
49 | ||
50 | ------------------------------------------------------- | |
51 | This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger | |
52 | for complex code. Debugging C/C++ programs can leave you feeling lost and | |
53 | disoriented. TotalView can help you find your way. Available on major UNIX | |
54 | and Linux platforms. Try it free. www.etnus.com | |
55 | _______________________________________________ | |
56 | Linux-atm-general mailing list | |
57 | Linux-atm-general@lists.sourceforge.net | |
58 | https://lists.sourceforge.net/lists/listinfo/linux-atm-general |