From: Stephen Hemminger <stephen@networkplumber.org>
To: "Ouyang, Changchun" <changchun.ouyang@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH 3/4] virtio: use indirect ring elements
Date: Sun, 6 Sep 2015 11:43:55 -0700 [thread overview]
Message-ID: <20150906114355.5282e5b8@urahara> (raw)
In-Reply-To: <F52918179C57134FAEC9EA62FA2F962511CFDA3A@shsmsx102.ccr.corp.intel.com>
On Sun, 6 Sep 2015 08:40:44 +0000
"Ouyang, Changchun" <changchun.ouyang@intel.com> wrote:
> > @@ -220,11 +221,26 @@ virtqueue_enqueue_xmit(struct virtqueue *txvq,
> > struct rte_mbuf *cookie)
> > dxp = &txvq->vq_descx[idx];
> > dxp->cookie = (void *)cookie;
> > dxp->ndescs = needed;
> > -
> > start_dp = txvq->vq_ring.desc;
> > - start_dp[idx].addr =
> > - txvq->virtio_net_hdr_mem + idx * head_size;
> > - start_dp[idx].len = (uint32_t)head_size;
> > +
> > + if (use_indirect) {
> > + offs = offsetof(struct virtio_tx_region, tx_indir)
> > + + idx * sizeof(struct virtio_tx_region);
> > +
> > + start_dp[idx].addr = txvq->virtio_net_hdr_mem + offs;
> > + start_dp[idx].len = sizeof(struct vring_desc);
>
> Should the length be N * sizeof(struct vring_desc)?
Yes.
next prev parent reply other threads:[~2015-09-06 18:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-04 20:58 [dpdk-dev] [PATCH 0/4] RFC virtio performance enhancement and cleanups Stephen Hemminger
2015-09-04 20:58 ` [dpdk-dev] [PATCH 1/4] virtio: clean up space checks on xmit Stephen Hemminger
2015-09-04 20:58 ` [dpdk-dev] [PATCH 2/4] virtio: don't use unlikely for normal tx stuff Stephen Hemminger
2015-09-04 20:58 ` [dpdk-dev] [PATCH 3/4] virtio: use indirect ring elements Stephen Hemminger
2015-09-06 8:36 ` Ouyang, Changchun
2015-09-06 18:42 ` Stephen Hemminger
2015-09-06 8:40 ` Ouyang, Changchun
2015-09-06 18:43 ` Stephen Hemminger [this message]
2015-09-07 7:24 ` Thomas Monjalon
2015-09-04 20:58 ` [dpdk-dev] [PATCH 4/4] virtio: use any layout on transmit Stephen Hemminger
2015-09-07 7:04 ` [dpdk-dev] [PATCH 0/4] RFC virtio performance enhancement and cleanups Thomas Monjalon
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=20150906114355.5282e5b8@urahara \
--to=stephen@networkplumber.org \
--cc=changchun.ouyang@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).