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
examples/ipsec-secgw: fix session mempool initialisation
[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
a4c08a7
..
fc6dde5
100644
(file)
--- a/
drivers/net/enic/base/vnic_wq.c
+++ b/
drivers/net/enic/base/vnic_wq.c
@@
-20,7
+20,7
@@
static inline
int vnic_wq_alloc_ring(struct vnic_dev *vdev, struct vnic_wq *wq,
unsigned int desc_count, unsigned int desc_size)
{
int vnic_wq_alloc_ring(struct vnic_dev *vdev, struct vnic_wq *wq,
unsigned int desc_count, unsigned int desc_size)
{
- char res_name[
NAME_MAX
];
+ char res_name[
RTE_MEMZONE_NAMESIZE
];
static int instance;
snprintf(res_name, sizeof(res_name), "%d-wq-%u", instance++, wq->index);
static int instance;
snprintf(res_name, sizeof(res_name), "%d-wq-%u", instance++, wq->index);
@@
-89,10
+89,10
@@
void vnic_wq_init_start(struct vnic_wq *wq, unsigned int cq_index,
unsigned int error_interrupt_enable,
unsigned int error_interrupt_offset)
{
unsigned int error_interrupt_enable,
unsigned int error_interrupt_offset)
{
- u
64
paddr;
+ u
int64_t
paddr;
unsigned int count = wq->ring.desc_count;
unsigned int count = wq->ring.desc_count;
- paddr = (u
64
)wq->ring.base_addr | VNIC_PADDR_TARGET;
+ paddr = (u
int64_t
)wq->ring.base_addr | VNIC_PADDR_TARGET;
writeq(paddr, &wq->ctrl->ring_base);
iowrite32(count, &wq->ctrl->ring_size);
iowrite32(fetch_index, &wq->ctrl->fetch_index);
writeq(paddr, &wq->ctrl->ring_base);
iowrite32(count, &wq->ctrl->ring_size);
iowrite32(fetch_index, &wq->ctrl->fetch_index);
@@
-113,6
+113,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->cq_pend = 0;
wq->last_completed_index = 0;
}
wq->last_completed_index = 0;
}
@@
-136,7
+137,7
@@
int vnic_wq_disable(struct vnic_wq *wq)
for (wait = 0; wait < 1000; wait++) {
if (!(ioread32(&wq->ctrl->running)))
return 0;
for (wait = 0; wait < 1000; wait++) {
if (!(ioread32(&wq->ctrl->running)))
return 0;
- u
delay
(10);
+ u
sleep
(10);
}
pr_err("Failed to disable WQ[%d]\n", wq->index);
}
pr_err("Failed to disable WQ[%d]\n", wq->index);