]> git.pld-linux.org Git - packages/kernel.git/blame - atm-12-br2684-xmit-return.patch
- obsolete
[packages/kernel.git] / atm-12-br2684-xmit-return.patch
CommitLineData
b5a39c4d
JR
1According 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
13But that's br2684, not clip... and I posted the same thing about
14a 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
44Mike.
45--
46Anyone who is capable of getting themselves made President should
47on no account be allowed to do the job -- Douglas Adams.
48
49
50-------------------------------------------------------
51This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger
52for complex code. Debugging C/C++ programs can leave you feeling lost and
53disoriented. TotalView can help you find your way. Available on major UNIX
54and Linux platforms. Try it free. www.etnus.com
55_______________________________________________
56Linux-atm-general mailing list
57Linux-atm-general@lists.sourceforge.net
58https://lists.sourceforge.net/lists/listinfo/linux-atm-general
This page took 0.106386 seconds and 4 git commands to generate.