[dpdk-dev,v3] enic: fix last packet being not sent bug
Commit Message
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 <johndale@cisco.com>
---
Forgot sign-off, annotated message in wrong spot.
drivers/net/enic/base/enic_vnic_wq.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
@@ -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_ */