Don't lock the TX queue of a device in newer Linux kernels.

This bug was revealed by commit 5b88803. Regardless of the
NETIF_F_LLTX flag, we should not lock the TX queue of the device
ourselves with newer kernels, since we call the dev_queue_xmit()
function that locks the queue if needed.
Improve compilability on Linux 3.5.
Proclikefs: Make it work on 3.5.

And make it not work any more on <2.4.10.

Signed-off-by: Eddie Kohler <ekohler@gmail.com>
Uninitialized timestamp variable fix
ethernet: add functionality for storing enet addrs in anno area

This roughly correspond to the get/set/store ipaddress elements.

Signed-off-by: Cliff Frey <cliff@meraki.com>
linuxmodule/todevce: don't attempt to defer packet after dev_queue_xmit

After dev_queue_xmit, the packet has been consumed regardless of ret. If ret
were not zero, _q = p despite this fact and it will be Packet::kill'd by
ToDevice::cleanup.  We could skb_clone but that seems wasteful; instead,
drop.

We could also skb_get and then consume_skb on success except that there are
some network drivers (e.g. ppp_generic) that assume the skb it unshared and
will BUG otherwise.
{Get,Store}EtherAddress: Clean up warnings.
Linuxmodule proclikefs: Use mutexes instead of spinlocks.

Mutexes are friendlier to kernels that use CONFIG_PREEMPT and
CONFIG_LOCKDEP.

Original versions of this and related commits to come were provided by
Kevin Paul Herbert at Meraki.

Signed-off-by: Eddie Kohler <ekohler@gmail.com>
Signed-off-by: Kevin Paul Herbert <kph@meraki.net>
Linuxmodule clickfs: Synchronize using mutexes, not spinlocks.

This allows handlers to be able to sleep, and is generally friendlier
as code can take spinlocks when holding a mutex, but not the other way
around. This also makes Click friendlier to kernels which use
CONFIG_PREEMPT and CONFIG_LOCKDEP.

A version of Kevin's commit.

Signed-off-by: Kevin Paul Herbert <kph@meraki.net>
Signed-off-by: Eddie Kohler <ekohler@gmail.com>
Maybe someone actually needs <asm/system.h>

which I preemptively removed in be5aaf113.
Huh, fix awk syntax.
Internal: Use click_ino methods for inode number analysis.

Not macros.

Signed-off-by: Eddie Kohler <ekohler@gmail.com>
Linuxmodule clickfs: Revalidate directory entries.

The clickfs-01.testie test failed sporadically. Investigation showed
that, at least on recent Linuxes (3.5), /click dcache entries for
previous configuration generations were sticking around and polluting
the cache. Should we call d_genocide for each superblock? Unclear; but
it does work if we add a true d_revalidate callback and revalidate the
dentry on use. This in turn requires updates to proclikefs, or a
handler file held open across module unload causes a crash.

I'm sure these updates to clickfs/proclikefs break prior linuxes, we
will wait to hear from users.

Signed-off-by: Eddie Kohler <ekohler@gmail.com>
Clickfs nit: 2.6.38 also has the new signature.
Linuxmodule: Compile on Ubuntu 8.04 (2.6.24) and 10.04 (2.6.32).
Fix 522448e1 wrt Linux's sb_lock.

This should probably be removed since it is 2.4 era.
Linuxmodule proclikefs: Use a static array of proclikefses.

Rather than dynamically allocating proclikefses. Kevin Herbert
provided a similar patch, since he compiles at Meraki with lock
checking, and (apparently) proclikefs's dynamic allocation defeated
lock checking. Since only Click uses proclikefs, why not simplify it.

Signed-off-by: Eddie Kohler <ekohler@gmail.com>
FilterFailures: Record the correct maximum number of outputs.
Update NetmapInfo for netmap v3 (20120813).

Signed-off-by: Eddie Kohler <ekohler@gmail.com>
FromDevice.u: Use _fd only if it's declared.