lkml.org 
[lkml]   [2010]   [Jul]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 2.6.35-rc1] net-next: vmxnet3 fixes [1/5] Spare skb to avoid starvation
From
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.


\
 
 \ /
  Last update: 2010-07-16 03:41    [W:0.026 / U:0.260 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site