From: Stephen Hemminger <stephen@networkplumber.org>
To: Vithal S Mohare <vmohare@arubanetworks.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
"mac_leehk@yahoo.com.hk" <mac_leehk@yahoo.com.hk>
Subject: Re: [dpdk-dev] [PATCH] The VMXNET3 PMD can't receive packet suddenly after a lot of traffic coming in. The root cause is due to mbuf allocation fail in vmxnet3_post_rx_bufs() and there is no error handling when it is called from vmxnet3_recv_pkts(). Th...
Date: Thu, 23 Jul 2015 09:45:33 -0700 [thread overview]
Message-ID: <20150723094533.71c3dc97@urahara> (raw)
In-Reply-To: <98DB008FA2AC6644B40AD8C766FAB271020CB2EC2B@BOREAL.arubanetworks.com>
On Thu, 23 Jul 2015 07:31:01 +0000
Vithal S Mohare <vmohare@arubanetworks.com> wrote:
> + /* VMXNET3
> + * In the above loop, vmxnet3_post_rx_bufs would fai if all the mbufs currently allocated.
> + * In such scenarios where hw device hasn't left with any of 'rx' descriptors, packets from
> + * network will not be 'DMA'd to driver. While the only way to refresh 'rxd' back to hw is
> + * though above i.e. when packet is received from hw. So, there is potential dead-lock.
> + *
> + * Now, to break the deadlock, vmxnet3_post_rx_bufs() is triggered below when the poll
> + * goes empty 'rcd'. vmxnet3_post_rx_bufs() is no-op if all the descriptors are allocated
> + * in hw
> + */
This is the kind of thing which should be in the git change log
description not the code. Comments like this are too wordy and get out
of date.
prev parent reply other threads:[~2015-07-23 16:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-23 1:48 [dpdk-dev] [PATCH] The VMXNET3 PMD can't receive packet suddenly after a lot of traffic coming in. The root cause is due to mbuf allocation fail in vmxnet3_post_rx_bufs() and there is no error handling when it is called from vmxnet3_recv_pkts(). The RXD will not have "free" mbuf for it but the counter still increment. Finally, no packet can be received. This fix is allocate the mbuf first, if the allocation is failed, then don't receive any packet and the packet will remain in RXD to prevent any packet drop.If the allocation is sucess, the vmxnet3_post_rx_bufs() will call vmxnet3_renew_desc() and RXD will be renew inside mac_leehk
2015-07-23 5:27 ` Stephen Hemminger
2015-07-23 5:44 ` [dpdk-dev] 回覆︰ " MAC Lee
2015-07-23 7:31 ` [dpdk-dev] [PATCH] The VMXNET3 PMD can't receive packet suddenly after a lot of traffic coming in. The root cause is due to mbuf allocation fail in vmxnet3_post_rx_bufs() and there is no error handling when it is called from vmxnet3_recv_pkts(). Th Vithal S Mohare
2015-07-23 16:45 ` Stephen Hemminger [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=20150723094533.71c3dc97@urahara \
--to=stephen@networkplumber.org \
--cc=dev@dpdk.org \
--cc=mac_leehk@yahoo.com.hk \
--cc=vmohare@arubanetworks.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).