- 论坛徽章:
- 0
|
From the device driver perspective, there are only two differences between NAPI
and non-NAPI. The first is that NAPI drivers must provide a poll
method, described in the section "net_device fields used by NAPI." The
second difference is the function called to schedule a frame: non-NAPI drivers
call netif_rx, whereas NAPI drivers call _ _netif_rx_schedule,
defined in include/linux/netdevice.h. (The kernel provides a wrapper
function named netif_rx_schedule, which checks to make sure that the
device is running and that the softirq is not already scheduled, and then it
calls _ _netif_rx_schedule. These checks are done with
netif_rx_schedule_prep. Some drivers call netif_rx_schedule,
and others call netif_rx_schedule_prep explicitly and then _
_netif_rx_schedule if needed).
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u1/46672/showart_1859823.html |
|