netpoll: Move all receive processing under CONFIG_NETPOLL_TRAP
authorEric W. Biederman <ebiederm@xmission.com>
Sat, 15 Mar 2014 03:50:58 +0000 (20:50 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 17 Mar 2014 19:48:12 +0000 (15:48 -0400)
commite1bd4d3d7dd2a4a0e731ffe07c439927c23f16ea
tree1ea21340270dcd91feda2d8ed397dffa3d22a5ae
parent18b37535f861b7eb053040b0b9502331a781c782
netpoll: Move all receive processing under CONFIG_NETPOLL_TRAP

Make rx_skb_hook, and rx in struct netpoll depend on
CONFIG_NETPOLL_TRAP Make rx_lock, rx_np, and neigh_tx in struct
netpoll_info depend on CONFIG_NETPOLL_TRAP

Make the functions netpoll_rx_on, netpoll_rx, and netpoll_receive_skb
no-ops when CONFIG_NETPOLL_TRAP is not set.

Only build netpoll_neigh_reply, checksum_udp service_neigh_queue,
pkt_is_ns, and __netpoll_rx when CONFIG_NETPOLL_TRAP is defined.

Add helper functions netpoll_trap_setup, netpoll_trap_setup_info,
netpoll_trap_cleanup, and netpoll_trap_cleanup_info that initialize
and cleanup the struct netpoll and struct netpoll_info receive
specific fields when CONFIG_NETPOLL_TRAP is enabled and do nothing
otherwise.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/netpoll.h
net/core/netpoll.c