[dpdk-dev] [PATCH] vhost: avoid buffer overflow in update_secure_len

2015-11-18 Thread Xie, Huawei
On 11/18/2015 4:47 PM, Yuanhan Liu wrote: > On Wed, Nov 18, 2015 at 07:53:24AM +0000, Xie, Huawei wrote: > ... >>> do { >>> + if (vec_id >= BUF_VECTOR_MAX) >>> + break; >>> + >>> next_desc = 0; >&g

[dpdk-dev] [PATCH] vhost: avoid buffer overflow in update_secure_len

2015-11-18 Thread Xie, Huawei
On 11/18/2015 2:25 PM, Yuanhan Liu wrote: > On Wed, Nov 18, 2015 at 06:13:08AM +0000, Xie, Huawei wrote: >> On 11/18/2015 10:56 AM, Yuanhan Liu wrote: >>> On Tue, Nov 17, 2015 at 08:39:30AM -0800, Rich Lane wrote: >>>> I don't think that adding a SIGINT handler

[dpdk-dev] [PATCH] vhost: avoid buffer overflow in update_secure_len

2015-11-18 Thread Xie, Huawei
On 11/18/2015 10:56 AM, Yuanhan Liu wrote: > On Tue, Nov 17, 2015 at 08:39:30AM -0800, Rich Lane wrote: >> I don't think that adding a SIGINT handler is the right solution, though. The >> guest app could be killed with another signal (SIGKILL). > Good point. > >> Worse, a malicious or >> buggy

[dpdk-dev] [PATCH] vhost: avoid buffer overflow in update_secure_len

2015-11-18 Thread Xie, Huawei
On 11/18/2015 10:56 AM, Yuanhan Liu wrote: > On Tue, Nov 17, 2015 at 08:39:30AM -0800, Rich Lane wrote: >> I don't think that adding a SIGINT handler is the right solution, though. The >> guest app could be killed with another signal (SIGKILL). > Good point. > >> Worse, a malicious or >> buggy

[dpdk-dev] [PATCH v2] vhost: fix mmap failure as len not aligned with hugepage size

2015-11-12 Thread Xie, Huawei
On 11/12/2015 1:04 PM, Tan, Jianfeng wrote: > This patch fixes a bug under lower version linux kernel, mmap() > fails when length is not aligned with hugepage size. mmap() > without flag of MAP_ANONYMOUS, should be called with length > argument aligned with hugepagesz at older longterm version >

[dpdk-dev] [PATCH] vhost: fix mmap failure as len not aligned with hugepage size

2015-11-12 Thread Xie, Huawei
On 11/12/2015 10:35 AM, Tan, Jianfeng wrote: > >> -Original Message- >> From: Xie, Huawei >> Sent: Wednesday, November 11, 2015 11:57 AM >> To: Tan, Jianfeng; dev at dpdk.org >> Subject: Re: [dpdk-dev] [PATCH] vhost: fix mmap failure as len not aligned >

[dpdk-dev] [PATCH] vhost: fix mmap failure as len not aligned with hugepage size

2015-11-11 Thread Xie, Huawei
On 10/30/2015 2:52 PM, Jianfeng Tan wrote: > This patch fixes a bug under lower version linux kernel, mmap() fails when Since which version Linux hugetlbfs changes the requirement of size alignment? > length is not aligned with hugepage size. > > Signed-off-by: Jianfeng Tan > --- >

[dpdk-dev] [RFC PATCH] vhost: remove lockless enqueue to virt ring

2015-11-06 Thread Xie, Huawei
On 11/6/2015 9:48 AM, Changchun Ouyang wrote: > > > > From: huawei.xie at intel.com > > To: huawei.xie at intel.com; dev at dpdk.org > > Date: Thu, 5 Nov 2015 10:21:41 + > > CC: haifeng.lin at intel.com; ann.zhuangyanying at huawei.com > > Subject: Re: [dpdk-dev] [RFC PATCH] vhost: remove

[dpdk-dev] [RFC PATCH] vhost: remove lockless enqueue to virt ring

2015-11-06 Thread Xie, Huawei
On 11/6/2015 9:43 AM, Tetsuya Mukawa wrote: > On 2015/11/05 19:21, Xie, Huawei wrote: >> If no objections, would remove the internal cmpset enqueue, should get >> some improved performance. >> >> No idea why commit message is lost: >> DPDK doesn't support re

[dpdk-dev] [RFC PATCH] vhost: remove lockless enqueue to virt ring

2015-11-05 Thread Xie, Huawei
If no objections, would remove the internal cmpset enqueue, should get some improved performance. No idea why commit message is lost: DPDK doesn't support receiving/transmitting packets from/to the same port/queue. Vhost pmd wraps vhost device as normal dpdk port. dpdkvhost based

[dpdk-dev] [PATCH v6 0/8] virtio ring layout optimization and simple rx/tx processing

2015-11-03 Thread Xie, Huawei
On 11/3/2015 6:12 AM, Thomas Monjalon wrote: > 2015-11-02 23:09, Thomas Monjalon: >>> Acked-by: Jianfeng Tan >> Applied with the modifications discussed in this thread, thanks. > Please Huawei, > Could you share some numbers for these optimizations? Thomas, thanks for the effort. My optimization

[dpdk-dev] [PATCH] vhost-user: enable virtio 1.0

2015-11-03 Thread Xie, Huawei
On 11/3/2015 4:03 PM, Marcel Apfelbaum wrote: > On 11/03/2015 05:49 AM, Xu, Qian Q wrote: >> Sorry, correct the kernel info, my kernel version is >> 4.1.8-100.fc21.x86_64. > > Hi, > > This is weird, VIRTIO_F_VERSION_1 is defined in 4.0 (I think), and for > sure in 4.1 . > You can see commit

[dpdk-dev] [PATCH v6 5/8] virtio: virtio vec rx

2015-11-02 Thread Xie, Huawei
On 11/2/2015 3:31 PM, Thomas Monjalon wrote: > 2015-11-02 02:18, Xie, Huawei: >> On 10/31/2015 2:21 AM, Thomas Monjalon wrote: >>> Sorry, there is a clang error. >>> >>> 2015-10-29 22:53, Huawei Xie: >>>> + _mm_prefetch((const void *)rused, _MM

[dpdk-dev] [PATCH v6 5/8] virtio: virtio vec rx

2015-11-02 Thread Xie, Huawei
On 10/31/2015 2:21 AM, Thomas Monjalon wrote: > Sorry, there is a clang error. > > 2015-10-29 22:53, Huawei Xie: >> +_mm_prefetch((const void *)rused, _MM_HINT_T0); > virtio_rxtx_simple.c:197:2: error: cast from 'const void *' to > 'void *' drops const qualifier This is weird. This

[dpdk-dev] [PATCH v2 0/2] xenvirt hotplug support

2015-10-30 Thread Xie, Huawei
On 10/28/2015 12:07 AM, Bernard Iremonger wrote: > add Port Hotplug support to the xenvirt PMD > > This patch depends on v5 of the following patch set: > > remove-pci-driver-from-vdevs.patch > > Changes in v2: > Rebase > Update release notes. Acked-by: Huawei Xie > > Bernard Iremonger (2): >

[dpdk-dev] [PATCH v6 0/3] vhost: eventfd_link refactoring

2015-10-29 Thread Xie, Huawei
On 10/29/2015 2:34 AM, Pavel Boldin wrote: > The patchset contains an attempt at the refactoring the `eventfd_link` > kernel module that is used to steal an FD in DPDK. > > The first patch refactors old EVENTFD_COPY handler fixing the codepath > and errors returned from the kernel space. This

[dpdk-dev] [RFC PATCH v3 2/2] vhost: Add VHOST PMD

2015-10-29 Thread Xie, Huawei
On 10/22/2015 5:48 PM, Tetsuya Mukawa wrote: > The patch introduces a new PMD. This PMD is implemented as thin wrapper > of librte_vhost. It means librte_vhost is also needed to compile the PMD. > The vhost messages will be handled only when a port is started. So start > a port first, then invoke

[dpdk-dev] [PATCH v2] vhost: Fix wrong handling of virtqueue array index

2015-10-28 Thread Xie, Huawei
Missed signoff? On 10/28/2015 11:00 AM, Tetsuya Mukawa wrote: > The patch fixes wrong handling of virtqueue array index when > GET_VRING_BASE message comes. > --- > lib/librte_vhost/vhost_user/virtio-net-user.c | 10 +++--- > 1 file changed, 3 insertions(+), 7 deletions(-) > >

[dpdk-dev] [PATCH v8 3/8] vhost: vring queue setup for multiple queue support

2015-10-27 Thread Xie, Huawei
On 10/27/2015 5:56 PM, Michael S. Tsirkin wrote: > On Tue, Oct 27, 2015 at 10:51:14AM +0100, Thomas Monjalon wrote: >> 2015-10-27 11:42, Michael S. Tsirkin: >>> On Tue, Oct 27, 2015 at 05:30:41PM +0800, Yuanhan Liu wrote: On Tue, Oct 27, 2015 at 11:17:16AM +0200, Michael S. Tsirkin wrote:

[dpdk-dev] [PATCH] vhost: Fix wrong handling of virtqueue array index

2015-10-27 Thread Xie, Huawei
On 10/27/2015 4:39 PM, Yuanhan Liu wrote: > On Tue, Oct 27, 2015 at 08:24:00AM +0000, Xie, Huawei wrote: >> On 10/27/2015 3:52 PM, Tetsuya Mukawa wrote: >>> The patch fixes wrong handling of virtqueue array index when >>> GET_VRING_BASE message comes. >>> The vh

[dpdk-dev] [PATCH] vhost: Fix wrong handling of virtqueue array index

2015-10-27 Thread Xie, Huawei
On 10/27/2015 3:52 PM, Tetsuya Mukawa wrote: > The patch fixes wrong handling of virtqueue array index when > GET_VRING_BASE message comes. > The vhost backend will receive the message per virtqueue. > Also we should call a destroy callback handler when both RXQ > and TXQ receives the message. > >

[dpdk-dev] [PATCH v2 0/5] virtio: Tx performance improvements

2015-10-27 Thread Xie, Huawei
as far as we know though num_buffers might not be used. So far not a big deal for us. Let us get clarification from mst later. > > On Tue, Oct 27, 2015 at 10:56 AM, Xie, Huawei <mailto:huawei.xie at intel.com>> wrote: > > On 10/27/2015 7:52 AM, Stephen Hemminger wrote: >

[dpdk-dev] [PATCH v2 0/5] virtio: Tx performance improvements

2015-10-27 Thread Xie, Huawei
On 10/27/2015 7:52 AM, Stephen Hemminger wrote: > On Fri, 23 Oct 2015 09:00:38 + > "Xie, Huawei" wrote: > >>>> Why use merge-able rx header here in the tx region? >>> If mergeable rx is negotiated then the header must be used for >>> both Tx

[dpdk-dev] [PATCH v2 0/5] virtio: Tx performance improvements

2015-10-26 Thread Xie, Huawei
On 10/19/2015 1:16 PM, Stephen Hemminger wrote: > This is a tested version of the virtio Tx performance improvements > that I posted earlier on the list, and described at the DPDK Userspace > meeting in Dublin. Together they get a 25% performance improvement for > both small packet and large

[dpdk-dev] [PATCH v5 3/4] vhost: using EVENTFD_COPY2

2015-10-26 Thread Xie, Huawei
On 10/21/2015 8:16 PM, Pavel Boldin wrote: > Xie, > > Please find my comments intermixed below. > > On Tue, Oct 20, 2015 at 12:52 PM, Xie, Huawei <mailto:huawei.xie at intel.com>> wrote: > > Thanks Pavel for this work. > This is what we think is the

[dpdk-dev] [PATCH v8 0/8] vhost-user multiple queues enabling

2015-10-26 Thread Xie, Huawei
On 10/22/2015 8:35 PM, Yuanhan Liu wrote: > This patch set enables vhost-user multiple queue feature. > > > --- > Changchun Ouyang (3): > vhost: rxtx: use queue id instead of constant ring index > virtio: fix deadloop due to reading virtio_net_config incorrectly > vhost: add

[dpdk-dev] [PATCH v4 4/7] virtio: fill RX avail ring with blank mbufs

2015-10-25 Thread Xie, Huawei
On 10/23/2015 1:56 PM, Tan, Jianfeng wrote: > On 10/23/2015 1:51 PM, Jianfeng wrote: > >> -Original Message- >> From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Huawei Xie >> Sent: Thursday, October 22, 2015 8:10 PM >> To: dev at dpdk.org >> Subject: [dpdk-dev] [PATCH v4 4/7]

[dpdk-dev] [PATCH v2 0/5] virtio: Tx performance improvements

2015-10-23 Thread Xie, Huawei
On 10/23/2015 12:05 AM, Stephen Hemminger wrote: > On Thu, 22 Oct 2015 10:38:33 + > "Xie, Huawei" wrote: > >> On 10/21/2015 9:20 PM, Thomas Monjalon wrote: >>> 2015-10-18 22:16, Stephen Hemminger: >>>> This is a tested version of the virtio

[dpdk-dev] [PATCH v4 6/7] virtio: simple tx routine

2015-10-23 Thread Xie, Huawei
On 10/23/2015 10:17 AM, Xie, Huawei wrote: > On 10/23/2015 12:57 AM, Stephen Hemminger wrote: >> On Thu, 22 Oct 2015 20:09:50 +0800 >> Huawei Xie wrote: >> >>> Changes in v4: >>> - move virtio_xmit_cleanup ahead to free descriptors earlier >>> &

[dpdk-dev] [PATCH v4 6/7] virtio: simple tx routine

2015-10-23 Thread Xie, Huawei
On 10/23/2015 12:57 AM, Stephen Hemminger wrote: > On Thu, 22 Oct 2015 20:09:50 +0800 > Huawei Xie wrote: > >> Changes in v4: >> - move virtio_xmit_cleanup ahead to free descriptors earlier >> >> Changes in v3: >> - Remove return at the end of void function >> - Remove always_inline attribute for

[dpdk-dev] [PATCH v4 7/7] virtio: pick simple rx/tx func

2015-10-23 Thread Xie, Huawei
On 10/23/2015 12:59 AM, Stephen Hemminger wrote: > On Thu, 22 Oct 2015 20:09:51 +0800 > Huawei Xie wrote: > >> +/* Use simple rx/tx func if single segment and no offloads */ >> +if ((tx_conf->txq_flags & VIRTIO_SIMPLE_FLAGS) == VIRTIO_SIMPLE_FLAGS && >> + !vtpci_with_feature(hw,

[dpdk-dev] [PATCH v2 0/5] virtio: Tx performance improvements

2015-10-22 Thread Xie, Huawei
On 10/22/2015 6:39 PM, Xie, Huawei wrote: > On 10/21/2015 9:20 PM, Thomas Monjalon wrote: >> 2015-10-18 22:16, Stephen Hemminger: >>> This is a tested version of the virtio Tx performance improvements >>> that I posted earlier on the list, and described at the DPDK User

[dpdk-dev] [PATCH v3 7/7] virtio: pick simple rx/tx func

2015-10-22 Thread Xie, Huawei
On 10/22/2015 10:50 AM, Tan, Jianfeng wrote: > On 10/22/2015 10:45 AM, Jianfeng wrote: > >> -Original Message- >> From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Huawei Xie >> Sent: Tuesday, October 20, 2015 11:30 PM >> To: dev at dpdk.org >> Subject: [dpdk-dev] [PATCH v3 7/7]

[dpdk-dev] [PATCH v2 0/5] virtio: Tx performance improvements

2015-10-22 Thread Xie, Huawei
On 10/21/2015 9:20 PM, Thomas Monjalon wrote: > 2015-10-18 22:16, Stephen Hemminger: >> This is a tested version of the virtio Tx performance improvements >> that I posted earlier on the list, and described at the DPDK Userspace >> meeting in Dublin. Together they get a 25% performance improvement

[dpdk-dev] [PATCH v7 1/8] vhost-user: add protocol features support

2015-10-22 Thread Xie, Huawei
On 10/21/2015 11:48 AM, Yuanhan Liu wrote: [...] > > VHOST_USER_PROTOCOL_FEATURES is initated to 0, as we don't support > s/initiated/initialized/

[dpdk-dev] [PATCH v7 3/8] vhost: vring queue setup for multiple queue support

2015-10-22 Thread Xie, Huawei
On 10/21/2015 11:48 AM, Yuanhan Liu wrote: > All queue pairs, including the default (the first) queue pair, > are allocated dynamically, when a vring_call message is received > first time for a specific queue pair. > > This is a refactor work for enabling vhost-user multiple queue; > it should not

[dpdk-dev] [PATCH v7 2/8] vhost-user: add VHOST_USER_GET_QUEUE_NUM message

2015-10-22 Thread Xie, Huawei
On 10/21/2015 11:48 AM, Yuanhan Liu wrote: > To tell the frontend (qemu) how many queue pairs we support. > > And it is initiated to VIRTIO_NET_CTRL_MQ_VQ_PAIRS_MAX. s/initiated/initialized/

[dpdk-dev] [PATCH v7 4/8] vhost: rxtx: use queue id instead of constant ring index

2015-10-22 Thread Xie, Huawei
On 10/21/2015 11:48 AM, Yuanhan Liu wrote: [...] > > #define MAX_PKT_BURST 32 > > +static inline int __attribute__((always_inline)) > +is_valid_virt_queue_idx(uint32_t virtq_idx, int is_tx, uint32_t max_qp_idx) > +{ > + if ((is_tx ^ (virtq_idx & 0x1)) || > + (virtq_idx >=

[dpdk-dev] [PATCH v3 5/7] virtio: virtio vec rx

2015-10-22 Thread Xie, Huawei
On 10/22/2015 12:04 PM, Wang, Zhihong wrote: > Wonder if the prefetch will actually help here. > Will prefetching rx_pkts[i] be more helpful? What is your concern prefetch the virtio ring? rx_pkts is local array, Why do we need to prefetch it?

[dpdk-dev] [PATCH v3 6/7] virtio: simple tx routine

2015-10-22 Thread Xie, Huawei
On 10/21/2015 2:58 AM, Stephen Hemminger wrote: > On Tue, 20 Oct 2015 23:30:06 +0800 > Huawei Xie wrote: > >> +desc_idx = (uint16_t)(vq->vq_used_cons_idx & >> +((vq->vq_nentries >> 1) - 1)); >> +free[0] = (struct rte_mbuf *)vq->vq_descx[desc_idx++].cookie; >> +nb_free = 1;

[dpdk-dev] [PATCH v7 4/8] vhost: rxtx: use queue id instead of constant ring index

2015-10-21 Thread Xie, Huawei
On 10/21/2015 12:44 PM, Stephen Hemminger wrote: > On Wed, 21 Oct 2015 11:48:10 +0800 > Yuanhan Liu wrote: > >> >> +static inline int __attribute__((always_inline)) >> +is_valid_virt_queue_idx(uint32_t virtq_idx, int is_tx, uint32_t max_qp_idx) >> +{ >> +if ((is_tx ^ (virtq_idx & 0x1)) ||

[dpdk-dev] [PATCH v2 2/7] virtio: add software rx ring, fake_buf into virtqueue

2015-10-20 Thread Xie, Huawei
On 10/19/2015 1:07 PM, Xie, Huawei wrote: > On 10/19/2015 12:20 PM, Stephen Hemminger wrote: > > On Sun, 18 Oct 2015 14:28:59 +0800 > Huawei Xie <mailto:huawei.xie at intel.com> wrote: > > > > + if (vq->sw_ring) > + rte_free(v

[dpdk-dev] [PATCH v5 3/4] vhost: using EVENTFD_COPY2

2015-10-20 Thread Xie, Huawei
Thanks Pavel for this work. This is what we think is the better implementation for eventfd proxy, in our last review. Could you add an additional patch to remove the old implementation? Again, please run checkpatch.pl against your patch. On 8/29/2015 2:51 AM, Pavel Boldin wrote: [...] > + > +int

[dpdk-dev] [PATCH v5 2/4] vhost: add EVENTFD_COPY2 ioctl

2015-10-20 Thread Xie, Huawei
On 8/29/2015 2:51 AM, Pavel Boldin wrote: > Signed-off-by: Pavel Boldin > --- > OK with the patch. Please run checkpatch.pl against your patch.

[dpdk-dev] [PATCH v6 09/13] vhost: add API bind a virtq to a specific core

2015-10-20 Thread Xie, Huawei
On 10/9/2015 1:46 PM, Yuanhan Liu wrote: > From: Changchun Ouyang > > The new API rte_vhost_core_id_set() is to bind a virtq to a specific > core, while the another API rte_vhost_core_id_get() is for getting > the bind core for a virtq. Where is the absolute necessity to put switching/application

[dpdk-dev] [PATCH 5/5] virtio: optimize transmit enqueue

2015-10-20 Thread Xie, Huawei
On 10/19/2015 1:16 PM, Stephen Hemminger wrote: > All the error checks in virtqueue_enqueue_xmit are already done > by the caller. Therefore they can be removed to improve performance. > > Signed-off-by: Stephen Hemminger Exactly the same thought as i commented in previous patch. We should remove

[dpdk-dev] [PATCH 4/5] virtio: use any layout on transmit

2015-10-19 Thread Xie, Huawei
On 10/20/2015 12:43 AM, Stephen Hemminger wrote: > On Mon, 19 Oct 2015 16:28:30 + > "Xie, Huawei" wrote: > >> On 10/19/2015 1:16 PM, Stephen Hemminger wrote: >>> Virtio supports a feature that allows sender to put transmit >>> header prepended to da

[dpdk-dev] [PATCH 4/5] virtio: use any layout on transmit

2015-10-19 Thread Xie, Huawei
On 10/19/2015 1:16 PM, Stephen Hemminger wrote: > Virtio supports a feature that allows sender to put transmit > header prepended to data. It requires that the mbuf be writeable, correct > alignment, and the feature has been negotiatied. If all this works out, > then it will be the optimum way

[dpdk-dev] [PATCH 1/5] virtio: clean up space checks on xmit

2015-10-19 Thread Xie, Huawei
On 10/19/2015 11:48 PM, Stephen Hemminger wrote: > On Mon, 19 Oct 2015 08:02:07 + > "Xie, Huawei" wrote: > >> On 10/19/2015 1:16 PM, Stephen Hemminger wrote: >>> The space check for transmit ring only needs a single conditional. >>> I.e only need

[dpdk-dev] [PATCH 3/5] virtio: use indirect ring elements

2015-10-19 Thread Xie, Huawei
On 10/19/2015 11:47 PM, Stephen Hemminger wrote: > On Mon, 19 Oct 2015 13:19:50 + > "Xie, Huawei" wrote: > >>> static int >>> -virtqueue_enqueue_xmit(struct virtqueue *txvq, struct rte_mbuf *cookie) >>> +virtqueue_enqueue_xmit(s

[dpdk-dev] [PATCH 3/5] virtio: use indirect ring elements

2015-10-19 Thread Xie, Huawei
On 10/19/2015 1:16 PM, Stephen Hemminger wrote: > The virtio ring in QEMU/KVM is usually limited to 256 entries > and the normal way that virtio driver was queuing mbufs required > nsegs + 1 ring elements. By using the indirect ring element feature > if available, each packet will take only one

[dpdk-dev] [PATCH 1/5] virtio: clean up space checks on xmit

2015-10-19 Thread Xie, Huawei
On 10/19/2015 1:16 PM, Stephen Hemminger wrote: > The space check for transmit ring only needs a single conditional. > I.e only need to recheck for space if there was no space in first check. I see you reorganized the code. It is more clear and readable with your change, but no check is removed.

[dpdk-dev] [PATCH v2 6/7] virtio: simple tx routine

2015-10-19 Thread Xie, Huawei
On 10/19/2015 12:17 PM, Stephen Hemminger wrote: > On Sun, 18 Oct 2015 14:29:03 +0800 > Huawei Xie wrote: > >> bulk free of mbufs when clean used ring. >> shift operation of idx could be further saved if vq_free_cnt means >> free slots rather than free descriptors. >> >> Signed-off-by: Huawei Xie

[dpdk-dev] [PATCH v2 6/7] virtio: simple tx routine

2015-10-19 Thread Xie, Huawei
On 10/19/2015 12:17 PM, Stephen Hemminger wrote: > On Sun, 18 Oct 2015 14:29:03 +0800 > Huawei Xie wrote: > >> + >> +for (i = 1; i < VIRTIO_TX_FREE_NR; i++) { >> +m = (struct rte_mbuf *)vq->vq_descx[desc_idx++].cookie; >> +if (likely(m->pool == free[0]->pool)) >> +

[dpdk-dev] [PATCH v2 6/7] virtio: simple tx routine

2015-10-19 Thread Xie, Huawei
On 10/19/2015 12:19 PM, Stephen Hemminger wrote: > +static inline void __attribute__((always_inline)) > +virtio_xmit_cleanup(struct virtqueue *vq) > +{ > > Please don't use always inline, frustrating the compiler isn't going > to help. always inline is scattered elsewhere in the dpdk code. What is

[dpdk-dev] [PATCH v2 2/7] virtio: add software rx ring, fake_buf into virtqueue

2015-10-19 Thread Xie, Huawei
On 10/19/2015 12:20 PM, Stephen Hemminger wrote: On Sun, 18 Oct 2015 14:28:59 +0800 Huawei Xie wrote: + if (vq->sw_ring) + rte_free(vq->sw_ring); + Do not need to test for NULL before calling rte_free. Better to just rely

[dpdk-dev] [PATCH v5 resend 07/12] virtio: resolve for control queue

2015-10-12 Thread Xie, Huawei
On 10/12/2015 10:33 AM, Xie, Huawei wrote: > On 10/12/2015 9:39 AM, Yuanhan Liu wrote: >> On Thu, Oct 08, 2015 at 10:51:02PM +0200, Steffen Bauch wrote: >>> On 10/08/2015 05:32 PM, Nikita Kalyazin wrote: >>>> Hi Yuanhan, >>>> >>>

[dpdk-dev] Regarding MMIO

2015-10-05 Thread Xie, Huawei
On 10/5/2015 12:41 PM, Venkateswara Rao Dokku wrote: > Thanks for the response Stephen. > > Are you referring to Virt-IO 0.9 in specific here in the response or for > any Virt-IO versions in general? > > On Thu, Oct 1, 2015 at 8:12 PM, Stephen Hemminger < > stephen at networkplumber.org> wrote: >

[dpdk-dev] Unlinking hugepage backing file after initialiation

2015-10-05 Thread Xie, Huawei
On 9/30/2015 5:36 AM, Michael S. Tsirkin wrote: > On Tue, Sep 29, 2015 at 05:50:00PM +, shesha Sreenivasamurthy (shesha) > wrote: >> Sure. Then, is there any real reason why the backing files should not be >> unlinked ? > AFAIK qemu unlinks them already. Sorry, i didn't make it clear. Let us

[dpdk-dev] [PATCH 0/8] virtio: virtio ring layout optimization and RX vector processing

2015-09-29 Thread Xie, Huawei
Thomas: Let us review first, then discuss the macro after that. My preference is use the configure macro and then fix this before next release. We could give some development features or aggressive changes a time buffer. On 9/29/2015 10:46 PM, Huawei Xie wrote: > Copied some message from patch

[dpdk-dev] [PATCH] vhost: vhost injects interrupts to guest for each packet

2015-09-29 Thread Xie, Huawei
On 9/25/2015 4:00 AM, Thomas Monjalon wrote: > Please reword the title (no need to re-send the patch), > so that you describe what the patch do (batch interrupt). > > 2015-09-21 16:16, Huawei Xie: >> In merge-able RX path, vhost injects interrupts to guest for each packet. >> This should degrade

[dpdk-dev] Unlinking hugepage backing file after initialiation

2015-09-29 Thread Xie, Huawei
On 9/29/2015 10:38 AM, Xie, Huawei wrote: > On 9/29/2015 8:04 AM, shesha Sreenivasamurthy (shesha) wrote: >> Hello, >> As of DPDK2.1, backing files are created in hugetablefs during mapping (in >> eal_memory.c::rte_eal_hugepage_init()) and these files are not cleaned up

[dpdk-dev] Unlinking hugepage backing file after initialiation

2015-09-29 Thread Xie, Huawei
On 9/29/2015 8:04 AM, shesha Sreenivasamurthy (shesha) wrote: > Hello, > As of DPDK2.1, backing files are created in hugetablefs during mapping (in > eal_memory.c::rte_eal_hugepage_init()) and these files are not cleaned up > (unlinked) after initialization (mmap-ing). This means, when the

[dpdk-dev] [PATCH 1/3] vhost: Fix return value of GET_VRING_BASE message

2015-09-28 Thread Xie, Huawei
On 9/25/2015 9:15 PM, Thomas Monjalon wrote: > Huawei, Changchun, > Please could you review this series? > Thanks > > Sorry, recently quite busy. Would check this and Pavel's patch after Chinese Holiday(Oct.1-Oct.7). Btw, Changchun left Intel and could be no longer reached by this mail address. I

[dpdk-dev] [PATCH] virtio: fix used ring address calculation

2015-09-25 Thread Xie, Huawei
On 9/25/2015 5:01 AM, Stephen Hemminger wrote: > On Thu, 24 Sep 2015 18:35:37 + > "Xie, Huawei" wrote: > >> On 9/25/2015 12:36 AM, Stephen Hemminger wrote: >>> On Thu, 24 Sep 2015 07:30:41 + >>> "Xie, Huawei" wrote: >>>

[dpdk-dev] [PATCH] virtio: fix used ring address calculation

2015-09-24 Thread Xie, Huawei
On 9/25/2015 12:36 AM, Stephen Hemminger wrote: > On Thu, 24 Sep 2015 07:30:41 + > "Xie, Huawei" wrote: > >> On 9/21/2015 11:39 AM, Xie, Huawei wrote: >> vring_size calculation should consider both used_event_idx at the tail >> of avail ring and ava

[dpdk-dev] [PATCH] virtio: fix used ring address calculation

2015-09-24 Thread Xie, Huawei
On 9/21/2015 11:39 AM, Xie, Huawei wrote: vring_size calculation should consider both used_event_idx at the tail of avail ring and avail_event_idx at the tail of used ring. Will merge those two fixes and send a new patch. > used event idx is put at the end of available ring. It isn't ta

[dpdk-dev] [RFC PATCH] virtio: virtio ring layout optimization and vectorization rx

2015-09-22 Thread Xie, Huawei
On 9/22/2015 4:38 PM, Thomas Monjalon wrote: > 2015-09-18 00:17, Huawei Xie: >> --- a/config/common_linuxapp >> +++ b/config/common_linuxapp >> @@ -241,6 +241,7 @@ CONFIG_RTE_LIBRTE_ENIC_DEBUG=n >> # Compile burst-oriented VIRTIO PMD driver >> # >> CONFIG_RTE_LIBRTE_VIRTIO_PMD=y >>

[dpdk-dev] vhost-net stops sending to virito pmd -- already fixed?

2015-09-18 Thread Xie, Huawei
On 9/14/2015 5:44 AM, Thomas Monjalon wrote: > Hi, > > 2015-09-11 12:32, Kyle Larose: >> Looking through the version tree for virtio_rxtx.c, I saw the following >> commit: >> >> http://dpdk.org/browse/dpdk/commit/lib/librte_pmd_virtio?id=8c09c20fb4cde76e53d87bd50acf2b441ecf6eb8 >> >> Does anybody

[dpdk-dev] vhost-net stops sending to virito pmd -- already fixed?

2015-09-18 Thread Xie, Huawei
On 9/17/2015 1:25 AM, Kyle Larose wrote: > Hi Huawei, > >> Kyle: >> Could you tell us how did you produce this issue, very small pool size >> or you are using pipeline model? > If I understand correctly, by pipeline model you mean a model whereby > multiple threads handle a given packet, with some

[dpdk-dev] virtio optimization idea

2015-09-17 Thread Xie, Huawei
On 9/8/2015 11:54 PM, Xie, Huawei wrote: > On 9/8/2015 11:39 PM, Stephen Hemminger wrote: >> On Fri, 4 Sep 2015 08:25:05 +0000 >> "Xie, Huawei" wrote: >> >>> Hi: >>> >>> Recently I have done one virtio optimization proof of concept. The

[dpdk-dev] vhost-net stops sending to virito pmd -- already fixed?

2015-09-16 Thread Xie, Huawei
On 9/16/2015 5:05 AM, Kyle Larose wrote: > On Sun, Sep 13, 2015 at 5:43 PM, Thomas Monjalon > wrote: >> Hi, >> >> 2015-09-11 12:32, Kyle Larose: >>> Looking through the version tree for virtio_rxtx.c, I saw the following >>> commit: >>> >>>

[dpdk-dev] vhost compliant virtio based networking interface in container

2015-09-14 Thread Xie, Huawei
On 9/8/2015 12:45 PM, Tetsuya Mukawa wrote: > On 2015/09/07 14:54, Xie, Huawei wrote: >> On 8/26/2015 5:23 PM, Tetsuya Mukawa wrote: >>> On 2015/08/25 18:56, Xie, Huawei wrote: >>>> On 8/25/2015 10:59 AM, Tetsuya Mukawa wrote: >>>>> Hi Xie and

[dpdk-dev] virtio optimization idea

2015-09-14 Thread Xie, Huawei
On 9/10/2015 3:20 PM, Michael S. Tsirkin wrote: > On Thu, Sep 10, 2015 at 06:32:35AM +0000, Xie, Huawei wrote: >> On 9/9/2015 3:34 PM, Michael S. Tsirkin wrote: >>> On Fri, Sep 04, 2015 at 08:25:05AM +, Xie, Huawei wrote: >>>> Hi: >>>> >>>&

[dpdk-dev] virtio optimization idea

2015-09-10 Thread Xie, Huawei
On 9/9/2015 3:34 PM, Michael S. Tsirkin wrote: > On Fri, Sep 04, 2015 at 08:25:05AM +0000, Xie, Huawei wrote: >> Hi: >> >> Recently I have done one virtio optimization proof of concept. The >> optimization includes two parts: >> 1) avail ring set with fixed d

[dpdk-dev] [PATCH 4/4 v2] vhost: fix wrong usage of eventfd_t

2015-09-09 Thread Xie, Huawei
Acked-by: Huawei Xie Thanks for fixing this. On 9/9/2015 1:32 PM, Yuanhan Liu wrote: > According to eventfd man page: > > typedef uint64_t eventfd_t; > > int eventfd_read(int fd, eventfd_t *value); > int eventfd_write(int fd, eventfd_t value); > > eventfd_t is defined for the

[dpdk-dev] [PATCH 1/4] vhost: remove redundant ;

2015-09-09 Thread Xie, Huawei
On 8/24/2015 11:54 AM, Yuanhan Liu wrote: > Signed-off-by: Yuanhan Liu Acked-by: Huawei Xie > --- > lib/librte_vhost/vhost_rxtx.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lib/librte_vhost/vhost_rxtx.c b/lib/librte_vhost/vhost_rxtx.c > index 0d07338..d412293

[dpdk-dev] [PATCH 2/4] vhost: fix typo

2015-09-09 Thread Xie, Huawei
On 8/24/2015 11:54 AM, Yuanhan Liu wrote: > _det => _dev > > Signed-off-by: Yuanhan Liu Acked-by: Huawei Xie > --- > lib/librte_vhost/virtio-net.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lib/librte_vhost/virtio-net.c b/lib/librte_vhost/virtio-net.c > index

[dpdk-dev] [PATCH 3/4] vhost: get rid of duplicate code

2015-09-09 Thread Xie, Huawei
On 8/24/2015 11:54 AM, Yuanhan Liu wrote: > Signed-off-by: Yuanhan Liu Acked-by: Huawei Xie > --- > lib/librte_vhost/vhost_user/vhost-net-user.c | 36 > > 1 file changed, 10 insertions(+), 26 deletions(-) > >

[dpdk-dev] virtio_dev_merge_rx send more interrupts than needed

2015-09-09 Thread Xie, Huawei
In virtio_dev_merge_rx, we inject interrupts to guest for each packet rather than for the burst of packets. Would submit the fix. /huawei

[dpdk-dev] vring_init bug

2015-09-09 Thread Xie, Huawei
> -Original Message- > From: Ouyang, Changchun > Sent: Wednesday, September 09, 2015 11:18 AM > To: Xie, Huawei; dev at dpdk.org > Cc: Ouyang, Changchun > Subject: RE: vring_init bug > > > > -Original Message- > > From: dev [mailto:dev-b

[dpdk-dev] vring_init bug

2015-09-09 Thread Xie, Huawei
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 *)

[dpdk-dev] virtio optimization idea

2015-09-08 Thread Xie, Huawei
On 9/8/2015 11:39 PM, Stephen Hemminger wrote: > On Fri, 4 Sep 2015 08:25:05 + > "Xie, Huawei" wrote: > >> Hi: >> >> Recently I have done one virtio optimization proof of concept. The >> optimization includes two parts: >> 1) avail ring

[dpdk-dev] virtio optimization idea

2015-09-08 Thread Xie, Huawei
On 9/8/2015 4:21 PM, Tetsuya Mukawa wrote: > On 2015/09/05 1:50, Xie, Huawei wrote: >> There is some format issue with the ascii chart of the tx ring. Update >> that chart. >> Sorry for the trouble. > Hi XIe, > > Thanks for sharing a way to optimize virtio. > I

[dpdk-dev] vhost compliant virtio based networking interface in container

2015-09-07 Thread Xie, Huawei
On 8/26/2015 5:23 PM, Tetsuya Mukawa wrote: > On 2015/08/25 18:56, Xie, Huawei wrote: >> On 8/25/2015 10:59 AM, Tetsuya Mukawa wrote: >>> Hi Xie and Yanping, >>> >>> >>> May I ask you some questions? >>> It seems we are also developing an

[dpdk-dev] virtio optimization idea

2015-09-04 Thread Xie, Huawei
There is some format issue with the ascii chart of the tx ring. Update that chart. Sorry for the trouble. On 9/4/2015 4:25 PM, Xie, Huawei wrote: > Hi: > > Recently I have done one virtio optimization proof of concept. The > optimization includes two parts: > 1) avail ring

[dpdk-dev] virtio optimization idea

2015-09-04 Thread Xie, Huawei
Hi: Recently I have done one virtio optimization proof of concept. The optimization includes two parts: 1) avail ring set with fixed descriptors 2) RX vectorization With the optimizations, we could have several times of performance boost for purely vhost-virtio throughput. Here i will only cover

[dpdk-dev] [PATCH] vchost: Notify application of ownership change

2015-08-12 Thread Xie, Huawei
On 8/8/2015 1:21 AM, Jan Kiszka wrote: > On VHOST_*_RESET_OWNER, we reinitialize the device but without telling > the application. That will cause crashes when it continues to invoke > vhost services on the device. Fix it by calling the destruction hook if > the device is still in use. > >

[dpdk-dev] abi change announce

2015-07-30 Thread Xie, Huawei
Hi Thomas: I am doing virtio/vhost performance optimization, so there is possibly some change, for example to virtio or vhost virtqueue data structure. Do i need to announce the ABI change even if the change hasn't been determined? /huawei

[dpdk-dev] [PATCH v5 4/5] vhost: eventfd_link: replace copy-pasted sys_close

2015-07-13 Thread Xie, Huawei
On 7/11/2015 11:08 PM, Pavel Boldin wrote: > Xie, All, > > Please find my comments intermixed below. > > On Fri, Jul 10, 2015 at 6:42 PM, Xie, Huawei <mailto:huawei.xie at intel.com>> wrote: > > Don't know why previous mail get messed. > > On 7/

[dpdk-dev] [PATCH v5 4/5] vhost: eventfd_link: replace copy-pasted sys_close

2015-07-10 Thread Xie, Huawei
On 7/10/2015 11:50 PM, Thomas Monjalon wrote: > 2015-07-10 15:42, Xie, Huawei: >> Don't know why previous mail get messed. > Same problem with this one. > It's maybe because you send HTML mail which is wrongly translated in plain > text. Have something to to with Pavel? :). I r

[dpdk-dev] [PATCH v5 4/5] vhost: eventfd_link: replace copy-pasted sys_close

2015-07-10 Thread Xie, Huawei
#L248 Pavel On Fri, Jul 10, 2015 at 5:27 PM, Xie, Huawei mailto:huawei.xie at intel.com>> wrote: On 6/17/2015 11:24 PM, Thomas Monjalon wrote: > 2015-05-07 06:54, Xie, Huawei: >> On 4/16/2015 7:48 PM, Pavel Boldin wrote: >>> + /* Closing the source_fd */

[dpdk-dev] [PATCH v5 4/5] vhost: eventfd_link: replace copy-pasted sys_close

2015-07-10 Thread Xie, Huawei
is allocate a new fd, and install the file on the newly allocated fd. new_fd = get_unused_fd_flags(...) fd_install(new_fd, get_file(fp[i])); /huawei [1] https://github.com/torvalds/linux/blob/master/net/core/scm.c#L248 Pavel On Fri, Jul 10, 2015 at 5:27 PM, Xie, Huawei mailto:huawei.xie

[dpdk-dev] [PATCH v5 4/5] vhost: eventfd_link: replace copy-pasted sys_close

2015-07-10 Thread Xie, Huawei
On 6/17/2015 11:24 PM, Thomas Monjalon wrote: > 2015-05-07 06:54, Xie, Huawei: >> On 4/16/2015 7:48 PM, Pavel Boldin wrote: >>> + /* Closing the source_fd */ >>> + ret = sys_close(eventfd_copy.source_fd); >> Pavel: >> Here we close the fd and

[dpdk-dev] [PATCH v2 0/3] Fix vhost startup issue

2015-07-10 Thread Xie, Huawei
Acked-by: Huawei Xie On 7/6/2015 10:27 AM, Ouyang, Changchun wrote: > The patch set fix vhost sample fails to start up in second time: > > It should call api to unregister vhost driver when sample exit/quit, then > the socket file will be removed(by calling unlink), and thus make vhost sample

[dpdk-dev] [PATCH] virtio: fix the vq size issue

2015-07-10 Thread Xie, Huawei
Thomas: Could we roll back that commit or apply Changchun's patch? /Huawei On 7/1/2015 11:53 PM, Xie, Huawei wrote: > On 7/1/2015 3:49 PM, Ouyang Changchun wrote: >> This commit breaks virtio basic packets rx functionality: >> d78deadae4dca240e85054bf2d604a801676becc >>

[dpdk-dev] [PATCH 3/3] vhost: call api to unregister vhost driver

2015-07-02 Thread Xie, Huawei
On 7/2/2015 11:33 AM, Ouyang, Changchun wrote: > The commit will break vhost sample when it runs in second time: > 292959c71961acde0cda6e77e737bb0a4df1559c > > It should call api to unregister vhost driver when sample exit/quit, then > the socket file will be removed(by calling unlink), and thus

[dpdk-dev] [PATCH 2/3] vhost: fix the comments and log

2015-07-02 Thread Xie, Huawei
On 7/2/2015 11:33 AM, Ouyang, Changchun wrote: > It fixes the wrong log info when fails to unregister vhost driver. As commented elsewhere, fails in unregistering, not fails to unregister. :).

[dpdk-dev] [PATCH 1/3] vhost: add log if fails to bind a socket

2015-07-02 Thread Xie, Huawei
On 7/2/2015 11:33 AM, Ouyang, Changchun wrote: > It adds more readable log info if a socket fails to bind to local device file > name. fails in binding, not fail to bind, :). >

[dpdk-dev] [PATCH 1/3] vhost: add log if fails to bind a socket

2015-07-02 Thread Xie, Huawei
On 7/2/2015 11:33 AM, Ouyang, Changchun wrote: > It adds more readable log info if a socket fails to bind to local device file > name. local socket file, not device file. :). > > Signed-off-by: Changchun Ouyang > --- > lib/librte_vhost/vhost_user/vhost-net-user.c | 5 - > 1 file changed, 4

<    1   2   3   4   5   >