DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] vring_init bug
@ 2015-09-09  3:00 Xie, Huawei
  2015-09-09  3:18 ` Ouyang, Changchun
  0 siblings, 1 reply; 3+ messages in thread
From: Xie, Huawei @ 2015-09-09  3:00 UTC (permalink / raw)
  To: dev

static inline void
vring_init(struct vring *vr, unsigned int num, uint8_t *p,
    unsigned long align)
{
    vr->num = num;
    vr->desc = (struct vring_desc *) p;
    vr->avail = (struct vring_avail *) (p +
        num * sizeof(struct vring_desc));
    vr->used = (void *)
        RTE_ALIGN_CEIL((uintptr_t)(&vr->avail->ring[num]), align);
}

There is a bug in vr->used calculation. 2 bytes of used_event_idx isn't
considered. Would submit a fix.
__u16 available[num];
__u16 used_event_idx;


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-09-09  3:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-09  3:00 [dpdk-dev] vring_init bug Xie, Huawei
2015-09-09  3:18 ` Ouyang, Changchun
2015-09-09  3:20   ` Xie, Huawei

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).