Skip to contentSkip to conversation

Ethernet Bridging on 8260

DISCUSSION Scott Rogerson 2 participants 2 messages Apr 12, 2001

lore
Share & tools
lore
#0 lore raw

I encountered the same problem with the FCC driver for the 8260. For the most part I agree with your analysis of the problem. I think however that you may have an unintended consequence with your solution.

As you stated a packet is queued by the driver via netif_rx() which before your modification occurred in the interrupt handler. This queue is then marked with mark_bh(NET_BH). The network queue (for that matter all bottom half queues) is normally drained prior to leaving the interrupt context when no further interrupts are pending. In other words the queue is normally drained immediately.

By scheduling the netif_rx() call you may have introduced a lag of up to 1 jiffy 1/100th of a second between receiving a packet and processing that packet. It's true that this delay is only associated with the first packet but it will be there every time you leave the driver interrupt service routine.

I solved it in a way similar to your suggestion of putting a quota on the rx bd ring processing. If while in the interrupt handler the quota is exceeded, the rx interrupt gets turned off for 1 jiffie (I schedule a task to turn it back on after 1 jiffy) thereby allowing user code to
run. I experimented with the quota to ensure that normal traffic that
I want to process does not cause me to disable the interrupt. It really is only abnormal stuff (ie smart bits or perhaps a broadcast storm) which will cause me to gate the rx process. The end result is the same in that the console responds normally under any smart bits load but there is no lag in processing normal network stuff.

Good luck

Scott Rogerson

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

#1 lore raw
Quoted 4 lines · Scott Rogerson

I encountered the same problem with the FCC driver for the 8260. For the most part I agree with your analysis of the problem. I think however that you may have an unintended consequence with your solution.

I think "problem" and "solution" are a little out of context here. I certainly don't have any emotional attachment to this code and actually hope for improvements, but I also have experience with developing software for bridges and routers. Based on that experience I would have used a completely different design than Linux provides if you are trying to build such equipment (or better, use Linux on something like MMC network processors).

As stated in a previous message, Linux does have the ability to relieve some of the memory pressure when the CPU core can't keep up with the incoming packet rate. If the CPU can't keep up, what else is there to do? The current driver will process Ethernet frames as fast as they come in. I would like to make a few changes to handle smaller BD fragments, which would be a little more memory efficient, but wouldn't do anything to solve the situation where the CPU core is too slow to handle the IP processing. Making changes in the Ethernet driver for resource scheduling the IP stack just doesn't seem like the right thing to do.

Adding a tasklet for the actual processing of incoming frames, so it can be scheduled against (or assist with) user tasks would be OK. Just remember that what this does is cause the FCC to discard incoming frames as the resource management. This may not be acceptable because it will increase the IP processing load by requesting retransmissions, and this really hurts for large UDP buffer sizes (because any missing fragment causes the entire UDP to be resent).

	-- Dan

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/