X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=Documentation%2Fnetworking%2Fdriver.txt;h=03283daa64fef72360667fb979a256aa10a3bb91;hb=c4fd308ed62f292518363ea9c6c2adb3c2d95f9d;hp=4f7da5a2bf4f8ce7c3300f49fae7e073cdf51380;hpb=946b92437e550d6ed80213bf54a1f383e141aede;p=karo-tx-linux.git diff --git a/Documentation/networking/driver.txt b/Documentation/networking/driver.txt index 4f7da5a2bf4f..03283daa64fe 100644 --- a/Documentation/networking/driver.txt +++ b/Documentation/networking/driver.txt @@ -13,7 +13,7 @@ Transmit path guidelines: static int drv_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) { - struct drv *dp = dev->priv; + struct drv *dp = netdev_priv(dev); lock_tx(dp); ... @@ -61,7 +61,10 @@ Transmit path guidelines: 2) Do not forget to update netdev->trans_start to jiffies after 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 and in some finite amount of time.