From: David Miller <davem@davemloft.net>
To: sbhatewara@vmware.com
Cc: netdev@vger.kernel.org, pv-drivers@vmware.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2.6.35-rc1] net-next: vmxnet3 fixes [1/5] Spare skb to avoid starvation
Date: Thu, 15 Jul 2010 18:39:13 -0700 (PDT) [thread overview]
Message-ID: <20100715.183913.71134002.davem@davemloft.net> (raw)
In-Reply-To: <alpine.LRH.2.00.1007151656140.10176@localhost.localdomain>
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.
prev parent reply other threads:[~2010-07-16 1:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-07 9:21 [PATCH 2.6.35-rc1] net: vmxnet3 fixes [1/5] Spare skb to avoid starvation Shreyas Bhatewara
2010-07-07 17:46 ` Stephen Hemminger
2010-07-14 0:46 ` [PATCH 2.6.35-rc1] net-next: " Shreyas Bhatewara
2010-07-16 1:19 ` Shreyas Bhatewara
2010-07-16 1:39 ` David Miller [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100715.183913.71134002.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pv-drivers@vmware.com \
--cc=sbhatewara@vmware.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).