bcmgenet: don't panic the kernel just because of an skb alloc failure.
It's (rather rare but) normal to run out of memory in an interrupt handler;
that is definitely not worthy of a kernel BUG() call. We're getting several
of these crashes per day across GFiberTV. In our tests, this change
eliminates the crashes entirely. (If we fail to allocate memory, that's
still a lost packet though.)
In case of a memory allocation failure, we keep the device ring buffer full
by discarding the packet that *was* waiting in the ring buffer, then re-use
the already-allocated skb.
2 files changed