* [dpdk-dev] [PATCH 1/2] enic: fix segfault on Tx path after restarting a device
@ 2016-06-29 23:03 John Daley
2016-06-29 23:03 ` [dpdk-dev] [PATCH 2/2] enic: fix Rx queue initialization " John Daley
0 siblings, 1 reply; 2+ messages in thread
From: John Daley @ 2016-06-29 23:03 UTC (permalink / raw)
To: dev; +Cc: bruce.richardson, Nelson Escobar
From: Nelson Escobar <neescoba@cisco.com>
If you stop then start a port that had already sent some packets,
there was a segfault due to not resetting the number of completed
sends to zero.
Fixes: d5d882fe1a11 ("Tx path rewrite to reduce Host CPU overhead")
Signed-off-by: Nelson Escobar <neescoba@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
---
drivers/net/enic/base/vnic_wq.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/enic/base/vnic_wq.c b/drivers/net/enic/base/vnic_wq.c
index 9b9ff4d..7c4119c 100644
--- a/drivers/net/enic/base/vnic_wq.c
+++ b/drivers/net/enic/base/vnic_wq.c
@@ -197,6 +197,8 @@ void vnic_wq_clean(struct vnic_wq *wq,
wq->head_idx = 0;
wq->tail_idx = 0;
+ wq->last_completed_index = 0;
+ *((uint32_t *)wq->cqmsg_rz->addr) = 0;
iowrite32(0, &wq->ctrl->fetch_index);
iowrite32(0, &wq->ctrl->posted_index);
--
2.7.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* [dpdk-dev] [PATCH 2/2] enic: fix Rx queue initialization after restarting a device
2016-06-29 23:03 [dpdk-dev] [PATCH 1/2] enic: fix segfault on Tx path after restarting a device John Daley
@ 2016-06-29 23:03 ` John Daley
0 siblings, 0 replies; 2+ messages in thread
From: John Daley @ 2016-06-29 23:03 UTC (permalink / raw)
To: dev; +Cc: bruce.richardson, John Daley
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-06-29 23:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-29 23:03 [dpdk-dev] [PATCH 1/2] enic: fix segfault on Tx path after restarting a device John Daley
2016-06-29 23:03 ` [dpdk-dev] [PATCH 2/2] enic: fix Rx queue initialization " John Daley
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).