diff mbox

[dpdk-dev,v4] enic: fix last packet being not sent bug

Message ID 1457462947-22845-1-git-send-email-johndale@cisco.com (mailing list archive)
State Accepted, archived
Delegated to: Bruce Richardson
Headers show

Commit Message

John Daley March 8, 2016, 6:49 p.m. UTC
From: johndale <johndale@cisco.com>

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.

Fixes: d739ba4c6abf ("enic: improve Tx packet rate")
Signed-off-by: John Daley <johndale@cisco.com>
---
Use full nime in 'Signed-off-by', add 'Fixes:'.

 drivers/net/enic/base/enic_vnic_wq.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Bruce Richardson March 11, 2016, 5:23 p.m. UTC | #1
On Tue, Mar 08, 2016 at 10:49:07AM -0800, John Daley wrote:
> From: johndale <johndale@cisco.com>
> 
> 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.
> 
> Fixes: d739ba4c6abf ("enic: improve Tx packet rate")
> Signed-off-by: John Daley <johndale@cisco.com>

Applied to dpdk-next-net/rel_16_04

/Bruce
diff mbox

Patch

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_ */