git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
net/mlx4: use standard macro to get array size
[dpdk.git]
/
drivers
/
net
/
enic
/
base
/
vnic_wq.c
diff --git
a/drivers/net/enic/base/vnic_wq.c
b/drivers/net/enic/base/vnic_wq.c
index
ab81c7e
..
7c4119c
100644
(file)
--- a/
drivers/net/enic/base/vnic_wq.c
+++ b/
drivers/net/enic/base/vnic_wq.c
@@
-142,6
+142,7
@@
void vnic_wq_init(struct vnic_wq *wq, unsigned int cq_index,
vnic_wq_init_start(wq, cq_index, 0, 0,
error_interrupt_enable,
error_interrupt_offset);
vnic_wq_init_start(wq, cq_index, 0, 0,
error_interrupt_enable,
error_interrupt_offset);
+ wq->last_completed_index = 0;
}
void vnic_wq_error_out(struct vnic_wq *wq, unsigned int error)
}
void vnic_wq_error_out(struct vnic_wq *wq, unsigned int error)
@@
-178,7
+179,7
@@
int vnic_wq_disable(struct vnic_wq *wq)
}
void vnic_wq_clean(struct vnic_wq *wq,
}
void vnic_wq_clean(struct vnic_wq *wq,
-
void (*buf_clean)(struct vnic_wq *wq,
struct vnic_wq_buf *buf))
+
void (*buf_clean)(
struct vnic_wq_buf *buf))
{
struct vnic_wq_buf *buf;
unsigned int to_clean = wq->tail_idx;
{
struct vnic_wq_buf *buf;
unsigned int to_clean = wq->tail_idx;
@@
-187,7
+188,7
@@
void vnic_wq_clean(struct vnic_wq *wq,
while (vnic_wq_desc_used(wq) > 0) {
while (vnic_wq_desc_used(wq) > 0) {
- (*buf_clean)(
wq,
buf);
+ (*buf_clean)(buf);
to_clean = buf_idx_incr(wq->ring.desc_count, to_clean);
buf = &wq->bufs[to_clean];
to_clean = buf_idx_incr(wq->ring.desc_count, to_clean);
buf = &wq->bufs[to_clean];
@@
-196,6
+197,8
@@
void vnic_wq_clean(struct vnic_wq *wq,
wq->head_idx = 0;
wq->tail_idx = 0;
wq->head_idx = 0;
wq->tail_idx = 0;
+ wq->last_completed_index = 0;
+ *((uint32_t *)wq->cqmsg_rz->addr) = 0;
iowrite32(0, &wq->ctrl->fetch_index);
iowrite32(0, &wq->ctrl->posted_index);
iowrite32(0, &wq->ctrl->fetch_index);
iowrite32(0, &wq->ctrl->posted_index);