enic: fix last packet not being sent

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 descriptor instead of one past
the descriptor as required by the nic.

Fixes: d739ba4c6a ("enic: improve Tx packet rate")

Signed-off-by: John Daley <johndale@cisco.com>
This commit is contained in:
John Daley 2016-03-08 10:49:07 -08:00 committed by Thomas Monjalon
parent 947d860c82
commit aba3129852

View File

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