tech-net archive

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

Re: BNX driver problem when mbuf clusters run out

Joerg Sonnenberger <> writes:

> On Thu, Apr 19, 2012 at 07:39:33PM -0400, Beverly Schwartz wrote:
>> Note, there is another condition in which we recycle mbufs,
>> which suffers from the same problem.
> The easiest approach for this is generally to invert the order. *First*
> try to obtain an mbuf for the list. If that fails, just drop the newly
> received packet. That avoids most of the complications.

A fair point, but the driver doesn't actually free an mbuf with the
packet.  The 'drop' mechanism is to leave the cluster in place (to be
overwritten later), and the error is in the ring pointer accounting.

My approach would be to try to have the code path in the error case be
as similar to the normal case as possible (in terms of updating ring
pointers), and just not call *if_input with the received mbuf.

Attachment: pgpWrjqLxv5in.pgp
Description: PGP signature

Home | Main Index | Thread Index | Old Index