Re: [patch] forcedeth: fix the NAPI poll function

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Jeff Garzik
Date: Monday, October 15, 2007 - 3:40 pm

Ingo Molnar wrote:

Two comments:

1) we have a vague definition of "RX work processed."  Due to error 
conditions and goto's in that function, rx_processed_cnt may or may not 
equal the number of packets actually processed.

2) man I dislike these inline C statement combinations (ranting at 
original code style, not you).  I would much rather waste a few extra 
lines of source code and make the conditions obvious:

	while (... && (rx_processed_cnt < limit)) {
		rx_processed_cnt++;

		...
	}

or even

	while (1) {
		...
		if (rx_processed_cnt == limit)
			break;
		rx_processed_cnt++;
	}

The compiler certainly doesn't care, and IMO it prevents bugs.

	Jeff


-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
WARNING: at net/core/dev.c:2161 net_rx_action(), Ingo Molnar, (Mon Oct 15, 4:24 am)
Re: WARNING: at net/core/dev.c:2161 net_rx_action(), Ingo Molnar, (Mon Oct 15, 4:27 am)
Re: WARNING: at net/core/dev.c:2161 net_rx_action(), Ingo Molnar, (Mon Oct 15, 9:18 am)
Re: WARNING: at net/core/dev.c:2161 net_rx_action(), David Miller, (Mon Oct 15, 12:57 pm)
Re: WARNING: at net/core/dev.c:2161 net_rx_action(), Ingo Molnar, (Mon Oct 15, 3:03 pm)
Re: WARNING: at net/core/dev.c:2161 net_rx_action(), Ingo Molnar, (Mon Oct 15, 3:07 pm)
Re: WARNING: at net/core/dev.c:2161 net_rx_action(), David Miller, (Mon Oct 15, 3:18 pm)
Re: WARNING: at net/core/dev.c:2161 net_rx_action(), Jeff Garzik, (Mon Oct 15, 3:20 pm)
Re: WARNING: at net/core/dev.c:2161 net_rx_action(), David Miller, (Mon Oct 15, 3:21 pm)
[patch] forcedeth: fix the NAPI poll function, Ingo Molnar, (Mon Oct 15, 3:30 pm)
Re: [patch] forcedeth: fix the NAPI poll function, David Miller, (Mon Oct 15, 3:39 pm)
Re: [patch] forcedeth: fix the NAPI poll function, Jeff Garzik, (Mon Oct 15, 3:40 pm)
Re: [patch] forcedeth: fix the NAPI poll function, Jeff Garzik, (Mon Oct 15, 3:41 pm)
Re: [patch] forcedeth: fix the NAPI poll function, Ingo Molnar, (Mon Oct 15, 10:42 pm)
Re: [patch] forcedeth: fix the NAPI poll function, Jeff Garzik, (Mon Oct 15, 10:47 pm)
Re: [patch] forcedeth: fix the NAPI poll function, Ingo Molnar, (Mon Oct 15, 11:40 pm)
Re: [patch] forcedeth: fix the NAPI poll function, Jeff Garzik, (Tue Oct 16, 12:17 am)
Re: [patch] forcedeth: fix the NAPI poll function, Ingo Molnar, (Tue Oct 16, 12:49 am)
Re: [patch] forcedeth: fix the NAPI poll function, Jeff Garzik, (Tue Oct 16, 9:52 am)
Re: [patch] forcedeth: fix the NAPI poll function, Jeff Garzik, (Tue Oct 16, 2:20 pm)
Re: [patch] forcedeth: fix the NAPI poll function, Ingo Molnar, (Wed Oct 17, 12:25 am)
[patch] forcedeth: fix the NAPI poll function, take #2, Ingo Molnar, (Wed Oct 17, 3:18 am)