aboutsummaryrefslogtreecommitdiff
path: root/net/core
diff options
context:
space:
mode:
authorBen Greear <greearb@candelatech.com>2005-04-24 20:12:36 -0700
committerDavid S. Miller <davem@davemloft.net>2005-04-24 20:12:36 -0700
commitaf191367a752625b9f05a25a9a76c727b9b17cab (patch)
tree3f4ad2da9cb293f4ab0f8c25899b23ed0fd18e3f /net/core
parentdb7530797992bb2be703f9f3cc69b1a578f812f8 (diff)
[NET]: Document ->hard_start_xmit() locking in comments.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/dev.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index 42344d90369..7bd4cd4502c 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -1214,6 +1214,19 @@ int __skb_linearize(struct sk_buff *skb, int gfp_mask)
* A negative errno code is returned on a failure. A success does not
* guarantee the frame will be transmitted as it may be dropped due
* to congestion or traffic shaping.
+ *
+ * -----------------------------------------------------------------------------------
+ * I notice this method can also return errors from the queue disciplines,
+ * including NET_XMIT_DROP, which is a positive value. So, errors can also
+ * be positive.
+ *
+ * Regardless of the return value, the skb is consumed, so it is currently
+ * difficult to retry a send to this method. (You can bump the ref count
+ * before sending to hold a reference for retry if you are careful.)
+ *
+ * When calling this method, interrupts MUST be enabled. This is because
+ * the BH enable code must have IRQs enabled so that it will not deadlock.
+ * --BLG
*/
int dev_queue_xmit(struct sk_buff *skb)