ARPQuerier: add ENTRY_PACKET_CAPACITY

This parameter limits how many packets an ARPQuerier stores for any
given ARP entry. The default (and existing behaviour) is to store an
unlimited number of packets (subject to PACKET_CAPACITY).  A packet that
arrives for an ARP entry that has reached ENTRY_PACKET_CAPACITY is
dropped.

Also, fix a packet leak for the case that append_query() returns
-ENOMEM.  Previously, this leak probably wasn't that important /
noticeable since it would only occur on memory allocation failure.
However, we now hit this case whenever ENTRY_PACKET_CAPACITY is
exceeded.

Reviewed-by: asa@meraki.com
ARPQuerier-08.testie: add valgrind support

Cliff spotted this.
Speedup radiotap parser

Scan the radiotap header once per packet thus reducing
the parser complexity from O(n^2) to O(n)
compile fix
click/todevice: fix excessive skb_copy_expand of tailroom in queue_packet

This code was doing something weird, expanding tailroom to be tailroom plus
need_tail, instead of just need_tail.  This was presumably not the intent,
since tailroom is only expanded if it is less than need_tail to begin with.
click/todevice: memset tailroom after expand

After tailroom is expanded, it is full of existing data.  This is an
information leak.  I've seen pointers and (potentially-sensitive) strings
appear in this padding on the wire, which could be up to 18 bytes.
Speedup radiotap parser

Scan the radiotap header once per packet thus reducing
the parser complexity from O(n^2) to O(n)

Signed-off-by: Matteo Croce <rootkit85@yahoo.it>
Merge branch 'master' of github.com:teknoraver/click
Merge pull request #101 from teknoraver/master

Speedup radiotap parser
Testie: Support -e on file sections and --path argument.
RecycledSkbPool: force lock to relax

This spinlock does a lot of spinning.  Instead of doing /* nothing */, make
it relax instead.  I believe this also means we can make _lock non-volatile
but that can be a separate commit.  In the future, it might be worth just
making this a Spinlock.
RecycledSkbPool: make _lock non-volatile

Since click_relax_fence is a memory barrier, _lock does not need to be
volatile.  All other uses are with atomic operations.
ToDevice: netdev->tx_lock locking no-op

This commit moves the netdev tx_lock code out of ToDevice::run_task and into
utility functions.  It should be a no-op.  The intention is to use these new
functions in a later commit to fix a deadlock issue in this Task.
ToDevice: remove deadlock

ToDevice calls Element::pull with the tx_lock spinlock held.  Since Elements
might do something that schedules, this can lead to deadlock.

I noticed this because in our click config, an Element schedules a timer in
the pull path, which should be allowed but which also acquires a mutex in
order to update the TimerSet.

The fix is to release the lock around input(0).pull() and then trylock.  On
fail, we bail out, skipping all of the code that might require the lock to
be held.  There is relatively little performance hit in this solution.

An alternative fix would be to create a Deque<Pair<Packet*,click_jiffies_t>>
and pre-fill it with _burst packets before acquiring the lock.  I tried this
and performance suffered.  It might work if the netdev could tell us roughly
how many Packets it would be willing to TX.  Without that information, we
add an extra, unnecessary layer of buffering.
click/ToDevice: move a couple of counters

After the ToDevice deadlock fix, these counted were not being counted since
they come after bail:.  This commit moves them to after we release the
tx_lock.
Support for NOACK when sending packets through radiotap
Element that sets NOACK on outgoing packet
Derp: correct ipsumdump binary output of Ethernet addresses.

Reported by Romain Fontugne.
Looks like Mac OS X libraries define static_assert sometimes.
Update CLP from other software.

- Add Clp_vsnprintf and friends.
- Add support for Clp_ValLong.