1DEV_QUEUE_XMIT(9) Network device support DEV_QUEUE_XMIT(9)
2
3
4
6 dev_queue_xmit - transmit a buffer
7
9 int dev_queue_xmit(struct sk_buff * skb);
10
12 skb
13 buffer to transmit
14
16 Queue a buffer for transmission to a network device. The caller must
17 have set the device and priority and built the buffer before calling
18 this function. The function can be called from an interrupt.
19
20 A negative errno code is returned on a failure. A success does not
21 guarantee the frame will be transmitted as it may be dropped due to
22 congestion or traffic shaping.
23
24 -----------------------------------------------------------------------------------
25 I notice this method can also return errors from the queue disciplines,
26 including NET_XMIT_DROP, which is a positive value. So, errors can also
27 be positive.
28
29 Regardless of the return value, the skb is consumed, so it is currently
30 difficult to retry a send to this method. (You can bump the ref count
31 before sending to hold a reference for retry if you are careful.)
32
33 When calling this method, interrupts MUST be enabled. This is because
34 the BH enable code must have IRQs enabled so that it will not deadlock.
35 --BLG
36
38Kernel Hackers Manual 2.6. November 2011 DEV_QUEUE_XMIT(9)