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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ingo Molnar wrote:
* Jeff Garzik <[email protected]> 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.

agreed. Do you have an uptodate patch/git-URI for the forcedeth rewrite you did? I can throw it into the testbed.

Branch 'fe-lock' of
git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/netdev-2.6.git

It works here locally, but at this very minute I am rewriting those changesets yet again :)

	Jeff



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux