From: "David S. Miller" <davem@xxxxxxxxxxxxx>
Date: Fri, 03 Jun 2005 13:22:57 -0700 (PDT)
> This is why you should replenish RX packets _IN_ your
> RX packet receive processing, not via some tasklet
> or other seperate work processing context.
> No wonder I never see this on tg3.
Actually, the problem is slightly different.
E1000 processes the full QUOTA of RX packets,
_THEN_ replenishes with new RX buffers. No wonder
the chip runs out of RX descriptors.
You should replenish _AS_ you grab RX packets
off the receive queue, just as tg3 does. This
allows you to accomplish two things:
1) Keep up with the chip so that it does not starve,
regardless of dev->weight setting or system load.
2) Make intelligent decisions when RX buffer allocation
fails. When we look at a RX descriptor in tg3 we
never leave the descriptor empty.
If replacement RX buffer fails, we simply ignore the
RX packet we're looking at and give it back to the
chip. Every driver should implement this policy.
Drivers that do not do things this way run into all
kinds of RX ring chip starvation issues like the ones
you are seeing here.