Current-Users archive

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

re: panic: kernel diagnostic assertion "offset < map->dm_maps" failed



> hmmm, but in thie case, no buffers would should be set to
> be available for rx, so nowthing should pass RGE_OWN() at
> L1245 i'd hope.  i still see the problem with everything
> being depleted, but then it should just stop getting any
> rx packets at all...
>
> networking folks, am i missing something here?  i see the
> same problem in wm(4) as well.  if wm_add_rxbuf() fails,
> where will this ring entry's mbuf ever be replaced again?

i see the thing i missed.

i was looking at openbsd if_rge.c 1.16, which m_free()s
the mbuf in this case, which in our tree has nothing that
would refill it, but our if_rge.c has this comment:

   * If allocating a replacement mbuf fails,
   * reload the current one.

which means that when we have a mbuf allocation error,
we basically drop the current packet, and leave the mbuf
in place ready for use next time.  that means there is no
mbuf leak in our current code, and i think the only part
of openbsd if_rge.c 1.16 we want is the if_ierrors++
(that we call if_statinc(ifp, if_ierrors).)

i think i see the problem (no, really, this time :-).

when we have a memory failure, we don't re-load the
map with bus_dmamap_unload(), so that's why it has zero
size.

the fix isn't simple because the load of the new mbuf
can fail, and then we want to reload the old one, but
it was the load event that failed, why would it work
again for the old mbuf now?  seems like we need to have
a (very short) timer that tries to realloc it again,
but i'm hoping someone else has solved this problem and
we can use their method..


.mrg. 


Home | Main Index | Thread Index | Old Index