From: Stephen Hemminger <stephen@networkplumber.org>
To: Marco Lee <mac_leehk@yahoo.com.hk>
Cc: dev@dpdk.org
Subject: Re: [PATCH] The VMXNET3 PMD can't receive packet suddenly after a lot of traffic coming in
Date: Thu, 23 Jul 2015 09:49:13 -0700 [thread overview]
Message-ID: <20150723094913.27cc335f@urahara> (raw)
In-Reply-To: <1437641492-7622-1-git-send-email-mac_leehk@yahoo.com.hk>
On Thu, 23 Jul 2015 16:51:32 +0800
Marco Lee <mac_leehk@yahoo.com.hk> wrote:
> The RX of VMXNET3 PMD will have deadlock when 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 reuse the old mbuf
> If the allocation is sucess, the vmxnet3_post_rx_bufs() will call vmxnet3_renew_desc()
> and RXD will be renew inside.
>
> Signed-off-by: Marco Lee <mac_leehk@yahoo.com.hk/marco.lee@ruckuswireless.com>
Much better. I ran this patch through checkpatch and the following
things should be fixed.
WARNING: Possible unwrapped commit description (prefer a maximum 75 chars per line)
#69:
The root cause is due to mbuf allocation fail in vmxnet3_post_rx_bufs() and there is no error handling when it is called
WARNING: 'sucess' may be misspelled - perhaps 'success'?
#74:
If the allocation is sucess, the vmxnet3_post_rx_bufs() will call vmxnet3_renew_desc()
WARNING: line over 80 characters
#91: FILE: drivers/net/vmxnet3/vmxnet3_rxtx.c:425:
+vmxnet3_renew_desc(vmxnet3_rx_queue_t *rxq, uint8_t ring_id,struct rte_mbuf *mbuf)
ERROR: space required after that ',' (ctx:VxV)
#91: FILE: drivers/net/vmxnet3/vmxnet3_rxtx.c:425:
+vmxnet3_renew_desc(vmxnet3_rx_queue_t *rxq, uint8_t ring_id,struct rte_mbuf *mbuf)
^
WARNING: braces {} are not necessary for any arm of this statement
#101: FILE: drivers/net/vmxnet3/vmxnet3_rxtx.c:435:
+ if (ring->rid == 0) {
[...]
+ } else {
[...]
ERROR: space required after that ',' (ctx:VxV)
#145: FILE: drivers/net/vmxnet3/vmxnet3_rxtx.c:694:
+ vmxnet3_renew_desc(rxq, ring_idx,rep);
^
next prev parent reply other threads:[~2015-07-23 16:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-23 8:51 [PATCH] The VMXNET3 PMD can't receive packet suddenly after a lot of traffic coming in Marco Lee
2015-07-23 16:49 ` Stephen Hemminger [this message]
-- strict thread matches above, loose matches on Subject: below --
2015-07-24 0:53 Marco Lee
2015-07-24 7:58 ` Thomas Monjalon
2015-10-21 16:39 ` Thomas Monjalon
2015-12-22 21:36 ` Yong Wang
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=20150723094913.27cc335f@urahara \
--to=stephen@networkplumber.org \
--cc=dev@dpdk.org \
--cc=mac_leehk@yahoo.com.hk \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.