From mboxrd@z Thu Jan 1 00:00:00 1970 From: johndale Subject: [PATCH] enic: fix last packet being not sent bug Date: Sun, 21 Feb 2016 17:06:30 -0800 Message-ID: <1456103190-1824-1-git-send-email-johndale@cisco.com> Cc: johndale To: dev@dpdk.org Return-path: Received: from rcdn-iport-5.cisco.com (rcdn-iport-5.cisco.com [173.37.86.76]) by dpdk.org (Postfix) with ESMTP id 7F9715690 for ; Mon, 22 Feb 2016 02:06:35 +0100 (CET) List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" The last packet of the tx burst function array was not being emitted until the subsequent call. The nic descriptor index was being set to the current tx descriptr instead of one past the the descriptor as required by nic. Signed-off-by: johndale --- drivers/net/enic/base/enic_vnic_wq.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/enic/base/enic_vnic_wq.h b/drivers/net/enic/base/enic_vnic_wq.h index e3ea574..b019109 100644 --- a/drivers/net/enic/base/enic_vnic_wq.h +++ b/drivers/net/enic/base/enic_vnic_wq.h @@ -69,11 +69,11 @@ static inline void enic_vnic_post_wq(struct vnic_wq *wq, buf->wr_id = wrid; buf = buf->next; - if (cq_entry) - enic_vnic_post_wq_index(wq); + wq->ring.desc_avail -= desc_skip_cnt; wq->to_use = buf; - wq->ring.desc_avail -= desc_skip_cnt; + if (cq_entry) + enic_vnic_post_wq_index(wq); } #endif /* _ENIC_VNIC_WQ_H_ */ -- 2.7.0