From: "Ouyang, Changchun" <changchun.ouyang@intel.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [RFC 08/10] virtio: remove redundant vq_alignment
Date: Tue, 26 Aug 2014 08:41:58 +0000 [thread overview]
Message-ID: <F52918179C57134FAEC9EA62FA2F96251183B2A7@shsmsx102.ccr.corp.intel.com> (raw)
In-Reply-To: <20140826020853.851222673@networkplumber.org>
Acked by: Changchun Ouyang <Changchun.ouyang@intel.com>
> -----Original Message-----
> From: Stephen Hemminger [mailto:stephen@networkplumber.org]
> Sent: Tuesday, August 26, 2014 10:08 AM
> To: Ouyang, Changchun
> Cc: dev@dpdk.org; Stephen Hemminger
> Subject: [RFC 08/10] virtio: remove redundant vq_alignment
>
> Since vq_alignment is constant (always 4K), it does not need to be part of the
> vring struct.
>
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
>
> ---
> lib/librte_pmd_virtio/virtio_ethdev.c | 1 -
> lib/librte_pmd_virtio/virtio_rxtx.c | 2 +-
> lib/librte_pmd_virtio/virtqueue.h | 3 +--
> 3 files changed, 2 insertions(+), 4 deletions(-)
>
> --- a/lib/librte_pmd_virtio/virtio_ethdev.c 2014-08-25
> 19:00:09.918550097 -0700
> +++ b/lib/librte_pmd_virtio/virtio_ethdev.c 2014-08-25
> 19:00:09.918550097 -0700
> @@ -290,7 +290,6 @@ int virtio_dev_queue_setup(struct rte_et
> vq->port_id = dev->data->port_id;
> vq->queue_id = queue_idx;
> vq->vq_queue_index = vtpci_queue_idx;
> - vq->vq_alignment = VIRTIO_PCI_VRING_ALIGN;
> vq->vq_nentries = vq_size;
> vq->vq_free_cnt = vq_size;
>
> --- a/lib/librte_pmd_virtio/virtio_rxtx.c 2014-08-25 19:00:09.918550097 -0700
> +++ b/lib/librte_pmd_virtio/virtio_rxtx.c 2014-08-25
> 19:00:09.918550097 -0700
> @@ -258,7 +258,7 @@ virtio_dev_vring_start(struct virtqueue
> * Reinitialise since virtio port might have been stopped and restarted
> */
> memset(vq->vq_ring_virt_mem, 0, vq->vq_ring_size);
> - vring_init(vr, size, ring_mem, vq->vq_alignment);
> + vring_init(vr, size, ring_mem, VIRTIO_PCI_VRING_ALIGN);
> vq->vq_used_cons_idx = 0;
> vq->vq_desc_head_idx = 0;
> vq->vq_avail_idx = 0;
> --- a/lib/librte_pmd_virtio/virtqueue.h 2014-08-25 19:00:09.918550097 -0700
> +++ b/lib/librte_pmd_virtio/virtqueue.h 2014-08-25
> 19:00:09.918550097 -0700
> @@ -139,8 +139,7 @@ struct virtqueue {
> uint8_t port_id; /**< Device port identifier. */
>
> void *vq_ring_virt_mem; /**< linear address of vring*/
> - int vq_alignment;
> - int vq_ring_size;
> + unsigned int vq_ring_size;
> phys_addr_t vq_ring_mem; /**< physical address of vring */
>
> struct vring vq_ring; /**< vring keeping desc, used and avail */
next prev parent reply other threads:[~2014-08-26 8:38 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-26 2:07 [dpdk-dev] [RFC 00/10] virtio patches Stephen Hemminger
2014-08-26 2:07 ` [dpdk-dev] [RFC 01/10] virtio: rearrange resource initialization Stephen Hemminger
2014-08-26 7:14 ` Ouyang, Changchun
2014-08-26 2:07 ` [dpdk-dev] [RFC 02/10] virtio: use weak barriers Stephen Hemminger
2014-08-26 2:07 ` [dpdk-dev] [RFC 03/10] virtio: allow starting with link down Stephen Hemminger
2014-08-26 2:07 ` [dpdk-dev] [RFC 04/10] virtio: add support for Link State interrupt Stephen Hemminger
2014-08-26 2:07 ` [dpdk-dev] [RFC 05/10] ether: add soft vlan encap/decap functions Stephen Hemminger
2014-08-26 2:07 ` [dpdk-dev] [RFC 06/10] virtio: use software vlan stripping Stephen Hemminger
2014-08-26 8:37 ` Ouyang, Changchun
2014-08-26 16:24 ` Stephen Hemminger
2014-08-27 5:42 ` Ouyang, Changchun
2014-08-27 18:04 ` Stephen Hemminger
2014-08-26 2:07 ` [dpdk-dev] [RFC 07/10] virtio: remove unnecessary adapter structure Stephen Hemminger
2014-08-26 6:43 ` Ouyang, Changchun
2014-08-26 2:07 ` [dpdk-dev] [RFC 08/10] virtio: remove redundant vq_alignment Stephen Hemminger
2014-08-26 8:41 ` Ouyang, Changchun [this message]
2014-08-26 2:07 ` [dpdk-dev] [RFC 09/10] virtio: fix how states are handled during initialization Stephen Hemminger
2014-08-26 2:07 ` [dpdk-dev] [RFC 10/10] virtio: add support for promiscious and multicast Stephen Hemminger
2014-08-26 6:55 ` Ouyang, Changchun
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=F52918179C57134FAEC9EA62FA2F96251183B2A7@shsmsx102.ccr.corp.intel.com \
--to=changchun.ouyang@intel.com \
--cc=dev@dpdk.org \
--cc=stephen@networkplumber.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).