Skip to content

Commit

Permalink
e1000: delete non NAPI code from the driver
Browse files Browse the repository at this point in the history
Compile-tested only.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
  • Loading branch information
Francois Romieu authored and Jeff Garzik committed Jul 22, 2008
1 parent 63cd31f commit c3570ac
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 173 deletions.
14 changes: 2 additions & 12 deletions Documentation/networking/e1000.txt
Original file line number Diff line number Diff line change
Expand Up @@ -513,21 +513,11 @@ Additional Configurations
Intel(R) PRO/1000 PT Dual Port Server Connection
Intel(R) PRO/1000 PT Dual Port Server Adapter
Intel(R) PRO/1000 PF Dual Port Server Adapter
Intel(R) PRO/1000 PT Quad Port Server Adapter
Intel(R) PRO/1000 PT Quad Port Server Adapter

NAPI
----
NAPI (Rx polling mode) is supported in the e1000 driver. NAPI is enabled
or disabled based on the configuration of the kernel. To override
the default, use the following compile-time flags.

To enable NAPI, compile the driver module, passing in a configuration option:

make CFLAGS_EXTRA=-DE1000_NAPI install

To disable NAPI, compile the driver module, passing in a configuration option:

make CFLAGS_EXTRA=-DE1000_NO_NAPI install
NAPI (Rx polling mode) is enabled in the e1000 driver.

See www.cyberus.ca/~hadi/usenix-paper.tgz for more information on NAPI.

Expand Down
14 changes: 0 additions & 14 deletions drivers/net/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1926,20 +1926,6 @@ config E1000
To compile this driver as a module, choose M here. The module
will be called e1000.

config E1000_NAPI
bool "Use Rx Polling (NAPI)"
depends on E1000
help
NAPI is a new driver API designed to reduce CPU and interrupt load
when the driver is receiving lots of packets from the card. It is
still somewhat experimental and thus not yet enabled by default.

If your estimated Rx load is 10kpps or more, or if the card will be
deployed on potentially unfriendly networks (e.g. in a firewall),
then say Y here.

If in doubt, say N.

config E1000_DISABLE_PACKET_SPLIT
bool "Disable Packet Split for PCI express adapters"
depends on E1000
Expand Down
10 changes: 1 addition & 9 deletions drivers/net/e1000/e1000.h
Original file line number Diff line number Diff line change
Expand Up @@ -253,9 +253,7 @@ struct e1000_adapter {
u16 link_speed;
u16 link_duplex;
spinlock_t stats_lock;
#ifdef CONFIG_E1000_NAPI
spinlock_t tx_queue_lock;
#endif
unsigned int total_tx_bytes;
unsigned int total_tx_packets;
unsigned int total_rx_bytes;
Expand Down Expand Up @@ -293,22 +291,16 @@ struct e1000_adapter {
bool detect_tx_hung;

/* RX */
#ifdef CONFIG_E1000_NAPI
bool (*clean_rx)(struct e1000_adapter *adapter,
struct e1000_rx_ring *rx_ring,
int *work_done, int work_to_do);
#else
bool (*clean_rx)(struct e1000_adapter *adapter,
struct e1000_rx_ring *rx_ring);
#endif
void (*alloc_rx_buf)(struct e1000_adapter *adapter,
struct e1000_rx_ring *rx_ring,
int cleaned_count);
struct e1000_rx_ring *rx_ring; /* One per active queue */
#ifdef CONFIG_E1000_NAPI
struct napi_struct napi;
struct net_device *polling_netdev; /* One per active queue */
#endif

int num_tx_queues;
int num_rx_queues;

Expand Down
Loading

0 comments on commit c3570ac

Please sign in to comment.