right linux definition for m_copydata
generic: fix rx notification bug with mitigation
generic: fix null ring size bug
fix comment in netmap.h
move ?xsync() to new (kring,flags) signature

Conflicts:
	sys/dev/netmap/cxgbe_netmap.h
	sys/dev/netmap/if_bge_netmap.h
	sys/dev/netmap/if_sfxge_netmap.h
linux: prevent ring params change in netmap mode

We override the set_ringparam (change number of rx/tx descripts)
and set_channels (change number of rings) ethtool callbacks
while the adapter is in netmap mode, so that they return EBUSY.

Previously, if ring params where changed while the adapter was
in netmap mode, we simply crashed.
linux: fix compilation for older kernels

Only override ethtool_set_channels if ETHTOOL_SCHANNELS is
defined.
[generic] different tx/rx magic priority number

We were using the same NM_MAGIC_PRIORITY for both tx and rx path
of the generic netmap adapter, without any reasons.

This was ok until we ran into veth, where the sk_buff trasmitted
onto a veth is the same sk_buff that comes out of the peer veth
(see dev_skb_forward()).
This means that the sk_buff "received" by the peer veth has
(erroneously) the magic priority.

Just change the magic numbers and veth forwarding will work
with generic adapters.
[pkt-gen] avoid segfault when not using netmap

Before this patch pkg-gen used to segfault if you
try to open a tap from the file descriptor side.
force use of existing na if pipes are using it

We need to tweak the netmap-adapter selection logic
of netmap_get_hw_na(). If there exists some pipe created
from the adapter, we cannot switch to another adapter.

This is a temporary measure. The ideal solution would be
to not have pipes keep a reference to the parent netmap_adapter,
but only to the proper memory allocator. We can delay
this solution to when we will have proper memory allocator
objects, with their own rerefence counting.
Remove unused `min` function

This was failing to compile with:

    testlock.c:112:19: error: unused function 'min' [-Werror,-Wunused-function]
    static inline int min(int a, int b) { return a < b ? a : b; }
                      ^
    1 error generated.
free the mbufs in rxsync_from_host()
bwrap: make hostna krings point back to hostna

Commit bcbb8d993 broke vale-ctl -h, since now
the netmap adapter used for forwarding is the one
pointed to by the kring.