Todd Foggoa | a292c8c | 2016-04-06 09:57:01 -0400 | [diff] [blame] | 1 | From a31a1dbdf5e1ff46d04f50fea02e83453b84652c Mon Sep 17 00:00:00 2001 |
| 2 | From: John Daley <johndale@cisco.com> |
| 3 | Date: Tue, 8 Mar 2016 10:49:07 -0800 |
| 4 | Subject: [PATCH 12/22] enic: fix last packet not being sent |
John Lo | 23650e6 | 2016-03-29 16:14:35 -0400 | [diff] [blame] | 5 | |
John Lo | 23650e6 | 2016-03-29 16:14:35 -0400 | [diff] [blame] | 6 | The last packet of the tx burst function array was not being |
| 7 | emitted until the subsequent call. The nic descriptor index |
| 8 | was being set to the current tx descriptor instead of one past |
| 9 | the descriptor as required by the nic. |
Todd Foggoa | a292c8c | 2016-04-06 09:57:01 -0400 | [diff] [blame] | 10 | |
John Lo | 23650e6 | 2016-03-29 16:14:35 -0400 | [diff] [blame] | 11 | Fixes: d739ba4c6abf ("enic: improve Tx packet rate") |
Todd Foggoa | a292c8c | 2016-04-06 09:57:01 -0400 | [diff] [blame] | 12 | |
John Lo | 23650e6 | 2016-03-29 16:14:35 -0400 | [diff] [blame] | 13 | Signed-off-by: John Daley <johndale@cisco.com> |
Todd Foggoa | a292c8c | 2016-04-06 09:57:01 -0400 | [diff] [blame] | 14 | --- |
| 15 | drivers/net/enic/base/enic_vnic_wq.h | 6 +++--- |
| 16 | 1 file changed, 3 insertions(+), 3 deletions(-) |
John Lo | 23650e6 | 2016-03-29 16:14:35 -0400 | [diff] [blame] | 17 | |
| 18 | diff --git a/drivers/net/enic/base/enic_vnic_wq.h b/drivers/net/enic/base/enic_vnic_wq.h |
| 19 | index e3ea574..b019109 100644 |
| 20 | --- a/drivers/net/enic/base/enic_vnic_wq.h |
| 21 | +++ b/drivers/net/enic/base/enic_vnic_wq.h |
| 22 | @@ -69,11 +69,11 @@ static inline void enic_vnic_post_wq(struct vnic_wq *wq, |
| 23 | buf->wr_id = wrid; |
| 24 | |
| 25 | buf = buf->next; |
| 26 | - if (cq_entry) |
| 27 | - enic_vnic_post_wq_index(wq); |
| 28 | + wq->ring.desc_avail -= desc_skip_cnt; |
| 29 | wq->to_use = buf; |
| 30 | |
| 31 | - wq->ring.desc_avail -= desc_skip_cnt; |
| 32 | + if (cq_entry) |
| 33 | + enic_vnic_post_wq_index(wq); |
| 34 | } |
| 35 | |
| 36 | #endif /* _ENIC_VNIC_WQ_H_ */ |
Todd Foggoa | a292c8c | 2016-04-06 09:57:01 -0400 | [diff] [blame] | 37 | -- |
| 38 | 1.9.1 |
| 39 | |