DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Xie, Huawei" <huawei.xie@intel.com>
To: "dev@dpdk.org" <dev@dpdk.org>
Subject: [dpdk-dev] vring_init bug
Date: Wed, 9 Sep 2015 03:00:15 +0000	[thread overview]
Message-ID: <C37D651A908B024F974696C65296B57B2BDC1D8F@SHSMSX101.ccr.corp.intel.com> (raw)

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;


             reply	other threads:[~2015-09-09  3:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-09  3:00 Xie, Huawei [this message]
2015-09-09  3:18 ` Ouyang, Changchun
2015-09-09  3:20   ` Xie, Huawei

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=C37D651A908B024F974696C65296B57B2BDC1D8F@SHSMSX101.ccr.corp.intel.com \
    --to=huawei.xie@intel.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).