Messages in this thread | | | Date | Thu, 15 Jul 2010 18:39:13 -0700 (PDT) | Subject | Re: [PATCH 2.6.35-rc1] net-next: vmxnet3 fixes [1/5] Spare skb to avoid starvation | From | David Miller <> |
| |
From: Shreyas Bhatewara <sbhatewara@vmware.com> Date: Thu, 15 Jul 2010 18:19:39 -0700 (PDT)
> > Reposting this patch with struct vmxnet3_cmd_ring *ring made const > according to Stephen's feedback.
Please address my feedback, which is that this is not the way to handle this problem.
You can prevent all forms of starvation, without hacky spare-skbs or things like that, by trying to allocate the replacement SKB _before_ sending the packet up to the stack.
If the replacement SKB allocation fails, you do not give the packet to the network stack. Instead, you give it back to the card's RX ring.
See drivers/net/tg3.c, drivers/net/niu.c, etc. for examples of this.
| |