[NET]: docbook fixes for netif_ functions

Documentation updates for network interfaces.

1. Add doc for netif_napi_add
2. Remove doc for unused returns from netif_rx
3. Add doc for netif_receive_skb

[ Incorporated minor mods from Randy Dunlap -DaveM ]

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Stephen Hemminger 2007-11-01 02:21:47 -07:00 committed by David S. Miller
parent d57a9212e0
commit 3b582cc14c
2 changed files with 25 additions and 3 deletions

View file

@ -739,6 +739,16 @@ static inline void *netdev_priv(const struct net_device *dev)
*/ */
#define SET_NETDEV_DEV(net, pdev) ((net)->dev.parent = (pdev)) #define SET_NETDEV_DEV(net, pdev) ((net)->dev.parent = (pdev))
/**
* netif_napi_add - initialize a napi context
* @dev: network device
* @napi: napi context
* @poll: polling function
* @weight: default weight
*
* netif_napi_add() must be used to initialize a napi context prior to calling
* *any* of the other napi related functions.
*/
static inline void netif_napi_add(struct net_device *dev, static inline void netif_napi_add(struct net_device *dev,
struct napi_struct *napi, struct napi_struct *napi,
int (*poll)(struct napi_struct *, int), int (*poll)(struct napi_struct *, int),

View file

@ -1751,9 +1751,6 @@ DEFINE_PER_CPU(struct netif_rx_stats, netdev_rx_stat) = { 0, };
* *
* return values: * return values:
* NET_RX_SUCCESS (no congestion) * NET_RX_SUCCESS (no congestion)
* NET_RX_CN_LOW (low congestion)
* NET_RX_CN_MOD (moderate congestion)
* NET_RX_CN_HIGH (high congestion)
* NET_RX_DROP (packet was dropped) * NET_RX_DROP (packet was dropped)
* *
*/ */
@ -2001,6 +1998,21 @@ static inline struct sk_buff *handle_ing(struct sk_buff *skb,
} }
#endif #endif
/**
* netif_receive_skb - process receive buffer from network
* @skb: buffer to process
*
* netif_receive_skb() is the main receive data processing function.
* It always succeeds. The buffer may be dropped during processing
* for congestion control or by the protocol layers.
*
* This function may only be called from softirq context and interrupts
* should be enabled.
*
* Return values (usually ignored):
* NET_RX_SUCCESS: no congestion
* NET_RX_DROP: packet was dropped
*/
int netif_receive_skb(struct sk_buff *skb) int netif_receive_skb(struct sk_buff *skb)
{ {
struct packet_type *ptype, *pt_prev; struct packet_type *ptype, *pt_prev;