From: John Daley <johndale@cisco.com>
To: dev@dpdk.org
Cc: bruce.richardson@intel.com, John Daley <johndale@cisco.com>
Subject: [dpdk-dev] [PATCH 2/2] enic: fix Rx queue initialization after restarting a device
Date: Wed, 29 Jun 2016 16:03:21 -0700 [thread overview]
Message-ID: <1467241401-26210-2-git-send-email-johndale@cisco.com> (raw)
In-Reply-To: <1467241401-26210-1-git-send-email-johndale@cisco.com>
If you stop then start a port that had already received some packets,
the NIC could fetch discriptors from the wrong location. This could
effectivly reduce the size of the Rx queue by a random amount and
cause packet drop or reduced performance.
Reset the NIC fetch index to 0 when allocating and posting mbuf
addresses to the NIC.
Fixes: 947d860c821f ("enic: improve Rx performance")
Signed-off-by: John Daley <johndale@cisco.com>
Reviewed-by: Nelson Escobar <neescoba@cisco.com>
---
drivers/net/enic/enic_main.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c
index dc831b4..0475cc1 100644
--- a/drivers/net/enic/enic_main.c
+++ b/drivers/net/enic/enic_main.c
@@ -334,6 +334,7 @@ enic_alloc_rx_queue_mbufs(struct enic *enic, struct vnic_rq *rq)
dev_debug(enic, "port=%u, qidx=%u, Write %u posted idx, %u sw held\n",
enic->port_id, rq->index, rq->posted_index, rq->rx_nb_hold);
iowrite32(rq->posted_index, &rq->ctrl->posted_index);
+ iowrite32(0, &rq->ctrl->fetch_index);
rte_rmb();
return 0;
--
2.7.0
prev parent reply other threads:[~2016-06-29 23:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-29 23:03 [dpdk-dev] [PATCH 1/2] enic: fix segfault on Tx path " John Daley
2016-06-29 23:03 ` John Daley [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=1467241401-26210-2-git-send-email-johndale@cisco.com \
--to=johndale@cisco.com \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
/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).