Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
netpoll.c File Reference
#include <linux/moduleparam.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/string.h>
#include <linux/if_arp.h>
#include <linux/inetdevice.h>
#include <linux/inet.h>
#include <linux/interrupt.h>
#include <linux/netpoll.h>
#include <linux/sched.h>
#include <linux/delay.h>
#include <linux/rcupdate.h>
#include <linux/workqueue.h>
#include <linux/slab.h>
#include <linux/export.h>
#include <linux/if_vlan.h>
#include <net/tcp.h>
#include <net/udp.h>
#include <asm/unaligned.h>
#include <trace/events/napi.h>

Go to the source code of this file.

Macros

#define pr_fmt(fmt)   KBUILD_MODNAME ": " fmt
 
#define MAX_UDP_CHUNK   1460
 
#define MAX_SKBS   32
 
#define USEC_PER_POLL   50
 
#define NETPOLL_RX_ENABLED   1
 
#define NETPOLL_RX_DROP   2
 
#define MAX_SKB_SIZE
 
#define np_info(np, fmt,...)   pr_info("%s: " fmt, np->name, ##__VA_ARGS__)
 
#define np_err(np, fmt,...)   pr_err("%s: " fmt, np->name, ##__VA_ARGS__)
 
#define np_notice(np, fmt,...)   pr_notice("%s: " fmt, np->name, ##__VA_ARGS__)
 

Functions

 module_param (carrier_timeout, uint, 0644)
 
void netpoll_send_skb_on_dev (struct netpoll *np, struct sk_buff *skb, struct net_device *dev)
 
 EXPORT_SYMBOL (netpoll_send_skb_on_dev)
 
void netpoll_send_udp (struct netpoll *np, const char *msg, int len)
 
 EXPORT_SYMBOL (netpoll_send_udp)
 
int __netpoll_rx (struct sk_buff *skb, struct netpoll_info *npinfo)
 
void netpoll_print_options (struct netpoll *np)
 
 EXPORT_SYMBOL (netpoll_print_options)
 
int netpoll_parse_options (struct netpoll *np, char *opt)
 
 EXPORT_SYMBOL (netpoll_parse_options)
 
int __netpoll_setup (struct netpoll *np, struct net_device *ndev, gfp_t gfp)
 
 EXPORT_SYMBOL_GPL (__netpoll_setup)
 
int netpoll_setup (struct netpoll *np)
 
 EXPORT_SYMBOL (netpoll_setup)
 
 core_initcall (netpoll_init)
 
void __netpoll_cleanup (struct netpoll *np)
 
 EXPORT_SYMBOL_GPL (__netpoll_cleanup)
 
void __netpoll_free_rcu (struct netpoll *np)
 
 EXPORT_SYMBOL_GPL (__netpoll_free_rcu)
 
void netpoll_cleanup (struct netpoll *np)
 
 EXPORT_SYMBOL (netpoll_cleanup)
 
int netpoll_trap (void)
 
 EXPORT_SYMBOL (netpoll_trap)
 
void netpoll_set_trap (int trap)
 
 EXPORT_SYMBOL (netpoll_set_trap)
 

Macro Definition Documentation

#define MAX_SKB_SIZE
Value:
(sizeof(struct ethhdr) + \

Definition at line 51 of file netpoll.c.

#define MAX_SKBS   32

Definition at line 41 of file netpoll.c.

#define MAX_UDP_CHUNK   1460

Definition at line 40 of file netpoll.c.

#define NETPOLL_RX_DROP   2

Definition at line 49 of file netpoll.c.

#define NETPOLL_RX_ENABLED   1

Definition at line 48 of file netpoll.c.

#define np_err (   np,
  fmt,
  ... 
)    pr_err("%s: " fmt, np->name, ##__VA_ARGS__)

Definition at line 65 of file netpoll.c.

#define np_info (   np,
  fmt,
  ... 
)    pr_info("%s: " fmt, np->name, ##__VA_ARGS__)

Definition at line 63 of file netpoll.c.

#define np_notice (   np,
  fmt,
  ... 
)    pr_notice("%s: " fmt, np->name, ##__VA_ARGS__)

Definition at line 67 of file netpoll.c.

#define pr_fmt (   fmt)    KBUILD_MODNAME ": " fmt

Definition at line 12 of file netpoll.c.

#define USEC_PER_POLL   50

Definition at line 47 of file netpoll.c.

Function Documentation

void __netpoll_cleanup ( struct netpoll np)

Definition at line 917 of file netpoll.c.

void __netpoll_free_rcu ( struct netpoll np)

Definition at line 955 of file netpoll.c.

int __netpoll_rx ( struct sk_buff skb,
struct netpoll_info npinfo 
)

Definition at line 559 of file netpoll.c.

int __netpoll_setup ( struct netpoll np,
struct net_device ndev,
gfp_t  gfp 
)

Definition at line 736 of file netpoll.c.

core_initcall ( netpoll_init  )
EXPORT_SYMBOL ( netpoll_send_skb_on_dev  )
EXPORT_SYMBOL ( netpoll_send_udp  )
EXPORT_SYMBOL ( netpoll_print_options  )
EXPORT_SYMBOL ( netpoll_parse_options  )
EXPORT_SYMBOL ( netpoll_setup  )
EXPORT_SYMBOL ( netpoll_cleanup  )
EXPORT_SYMBOL ( netpoll_trap  )
EXPORT_SYMBOL ( netpoll_set_trap  )
EXPORT_SYMBOL_GPL ( __netpoll_setup  )
EXPORT_SYMBOL_GPL ( __netpoll_cleanup  )
EXPORT_SYMBOL_GPL ( __netpoll_free_rcu  )
module_param ( carrier_timeout  ,
uint  ,
0644   
)
void netpoll_cleanup ( struct netpoll np)

Definition at line 961 of file netpoll.c.

int netpoll_parse_options ( struct netpoll np,
char opt 
)

Definition at line 669 of file netpoll.c.

void netpoll_print_options ( struct netpoll np)

Definition at line 658 of file netpoll.c.

void netpoll_send_skb_on_dev ( struct netpoll np,
struct sk_buff skb,
struct net_device dev 
)

Definition at line 310 of file netpoll.c.

void netpoll_send_udp ( struct netpoll np,
const char msg,
int  len 
)

Definition at line 376 of file netpoll.c.

void netpoll_set_trap ( int  trap)

Definition at line 981 of file netpoll.c.

int netpoll_setup ( struct netpoll np)

Definition at line 803 of file netpoll.c.

int netpoll_trap ( void  )

Definition at line 975 of file netpoll.c.