]> git.hungrycats.org Git - linux/commit
[NET]: NETIF_F_LLTX for devices
authorAndi Kleen <ak@suse.de>
Wed, 8 Sep 2004 06:32:57 +0000 (23:32 -0700)
committerDavid S. Miller <davem@nuts.davemloft.net>
Wed, 8 Sep 2004 06:32:57 +0000 (23:32 -0700)
commit73d0d56a2b2c8a7413f2ad74dcc923489da76dc7
treeab2fbc627da028b2990a3d56e9611cfc175cbacd
parentfb4a020e6ef676c284e8b30d898d2c6b96453712
[NET]: NETIF_F_LLTX for devices

New version of the NETIF_F_LLTX for network devices patch.

This allows network drivers to set the NETIF_F_LLTX flag
and then do their own locking in start_queue_xmit.
This lowers locking overhead in this critical path.

The drivers can use try lock if they want and return -1
when the lock wasn't grabbed. In this case the packet
will be requeued. For better compatibility this is only
done for drivers with LLTX set, others don't give a special
meaning to -1.

Most of the modern drivers who have a lock around hard_start_xmit
can just set this flag. It may be a good idea to convert the spin
lock there to a try lock. The only thing that should be audited
is that they do enough locking in the set_multicast_list function
too, and not also rely on xmit_lock here.

Now doesn't move any code around and does things with gotos instead.

The loop printk is also still there even for NETIF_F_LLTX

For drivers that don't set the new flag nothing changes.

Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/pktgen.c
net/sched/sch_generic.c