Browse Source

Documentation: add a guideline for hard_start_xmit method

Add a guideline not to modify SKBs.

Signed-off-by: Matti Linnanvuori <mattilinnanvuori@yahoo.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Matti Linnanvuori 17 years ago
parent
commit
ce3ba1399d
1 changed files with 4 additions and 1 deletions
  1. 4 1
      Documentation/networking/driver.txt

+ 4 - 1
Documentation/networking/driver.txt

@@ -61,7 +61,10 @@ Transmit path guidelines:
 2) Do not forget to update netdev->trans_start to jiffies after
 2) Do not forget to update netdev->trans_start to jiffies after
    each new tx packet is given to the hardware.
    each new tx packet is given to the hardware.
 
 
-3) Do not forget that once you return 0 from your hard_start_xmit
+3) A hard_start_xmit method must not modify the shared parts of a
+   cloned SKB.
+
+4) Do not forget that once you return 0 from your hard_start_xmit
    method, it is your driver's responsibility to free up the SKB
    method, it is your driver's responsibility to free up the SKB
    and in some finite amount of time.
    and in some finite amount of time.