From: Nelson Escobar Date: Wed, 29 Jun 2016 23:03:20 +0000 (-0700) Subject: net/enic: fix Tx crash after restart X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=a3d5f0c92a72addbd6719d783c320ce7e2789241;p=dpdk.git net/enic: fix Tx crash after restart 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: a3b1e9551c26 ("net/enic: streamline mbuf handling in Tx path") Signed-off-by: Nelson Escobar Reviewed-by: John Daley --- diff --git a/drivers/net/enic/base/vnic_wq.c b/drivers/net/enic/base/vnic_wq.c index 9b9ff4d7d0..7c4119c34a 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);