[dpdk-dev] [PATCH 3/4] vhost: log vring changes

2015-12-09 Thread Xie, Huawei
On 12/2/2015 10:09 PM, Victor Kaplansky wrote: > On Wed, Dec 02, 2015 at 11:43:12AM +0800, Yuanhan Liu wrote: >> Invoking vhost_log_write() to mark corresponding page as dirty while >> updating used vring. > Looks good, thanks! > > I didn't find where you log the dirty pages in result of data > wri

[dpdk-dev] [PATCH 0/6] Add virtio support in arm/arm64

2015-12-08 Thread Xie, Huawei
> -Original Message- > From: Yuanhan Liu [mailto:yuanhan.liu at linux.intel.com] > Sent: Monday, December 07, 2015 10:12 AM > To: Santosh Shukla > Cc: dev at dpdk.org; thomas.monjalon at 6wind.com; Xie, Huawei > Subject: Re: [PATCH 0/6] Add virtio support in arm/arm64 &

[dpdk-dev] [PATCH 1/4] vhost: handle VHOST_USER_SET_LOG_BASE request

2015-12-08 Thread Xie, Huawei
On 12/2/2015 11:40 AM, Yuanhan Liu wrote: [...] > + > + addr = mmap(0, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, off); > + if (addr == MAP_FAILED) { > + RTE_LOG(ERR, VHOST_CONFIG, "mmap log base failed!\n"); > + return -1; > + } Yuanhan: mmap could fail with

[dpdk-dev] [RFC PATCH 2/2] lib/librte_eal: Remove unnecessary hugepage zero-filling

2015-11-25 Thread Xie, Huawei
On 11/23/2015 2:52 PM, Stephen Hemminger wrote: > On Mon, 23 Nov 2015 05:05:21 + > "Xie, Huawei" wrote: > >> On 11/23/2015 12:07 PM, Stephen Hemminger wrote: >>> On Mon, 23 Nov 2015 03:46:31 + >>> "Xie, Huawei" wrote: >>

[dpdk-dev] [PATCH] virtio: fix rx ring descriptor starvation

2015-11-25 Thread Xie, Huawei
On 11/13/2015 5:33 PM, Tom Kiely wrote: > If all rx descriptors are processed while transient > mbuf exhaustion is present, the rx ring ends up with > no available descriptors. Thus no packets are received > on that ring. Since descriptor refill is performed post > rx descriptor processing, in this

[dpdk-dev] [PATCH] virtio: fix rx ring descriptor starvation

2015-11-25 Thread Xie, Huawei
On 11/25/2015 9:47 AM, Yuanhan Liu wrote: > On Tue, Nov 24, 2015 at 10:20:22PM +0100, Thomas Monjalon wrote: >> Any review, please? > Huawei, would you review it? Sorry that I've not read too much > code about virtio PMD driver yet. Np. will do it by end of this week. > > --yliu > > >> 2015-1

[dpdk-dev] [RFC PATCH 2/2] lib/librte_eal: Remove unnecessary hugepage zero-filling

2015-11-23 Thread Xie, Huawei
On 11/23/2015 12:07 PM, Stephen Hemminger wrote: > On Mon, 23 Nov 2015 03:46:31 + > "Xie, Huawei" wrote: > >>> Why cannot we rely on the kernel zeroing the memory ? >>> If that behavior were to change, then we can zero out the memory >>> ourselve

[dpdk-dev] [RFC PATCH 2/2] lib/librte_eal: Remove unnecessary hugepage zero-filling

2015-11-23 Thread Xie, Huawei
On 11/19/2015 5:15 PM, Gonzalez Monroy, Sergio wrote: > On 18/11/2015 12:07, Xie, Huawei wrote: >> On 11/18/2015 6:45 PM, Wang, Zhihong wrote: >>>> -Original Message- >>>> From: Mcnamara, John >>>> Sent: Wednesday, November 18, 2015 6:4

[dpdk-dev] [RFC PATCH 2/2] lib/librte_eal: Remove unnecessary hugepage zero-filling

2015-11-23 Thread Xie, Huawei
On 11/19/2015 2:32 PM, Wang, Zhihong wrote: >> -Original Message- >> From: Xie, Huawei >> Sent: Thursday, November 19, 2015 2:05 PM >> To: Wang, Zhihong ; Stephen Hemminger >> ; Richardson, Bruce >> >> Cc: dev at dpdk.org >> Subject: Re: [

[dpdk-dev] [RFC PATCH 0/2] Virtio-net PMD Extension to work on host.

2015-11-20 Thread Xie, Huawei
On 11/20/2015 2:16 AM, Rich Lane wrote: > What's the reason for using qemu as a middleman? Couldn't the new PMD > itself open /dev/vhost-net or the vhost-user socket and send the commands > to set up virtqueues? That was the approach taken by Jianfeng's earlier RFC. Rich: Our initial POC also has a

[dpdk-dev] [RFC PATCH 2/2] lib/librte_eal: Remove unnecessary hugepage zero-filling

2015-11-19 Thread Xie, Huawei
On 11/19/2015 11:54 AM, Wang, Zhihong wrote: > >> -Original Message- >> From: Xie, Huawei >> Sent: Wednesday, November 18, 2015 8:08 PM >> To: Wang, Zhihong ; Mcnamara, John >> ; dev at dpdk.org >> Subject: Re: [dpdk-dev] [RFC PATCH 2/2] lib/librte_e

[dpdk-dev] [RFC PATCH 2/2] lib/librte_eal: Remove unnecessary hugepage zero-filling

2015-11-19 Thread Xie, Huawei
lto:dev-bounces at dpdk.org] On Behalf Of Stephen >>>> Hemminger >>>> Sent: Wednesday, November 18, 2015 4:00 PM >>>> To: Xie, Huawei >>>> Cc: dev at dpdk.org >>>> Subject: Re: [dpdk-dev] [RFC PATCH 2/2] lib/librte_eal: Remove >>

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

2015-11-18 Thread Xie, Huawei
On 11/18/2015 11:53 PM, Stephen Hemminger wrote: > On Wed, 18 Nov 2015 06:13:08 + > "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 ad

[dpdk-dev] [RFC PATCH 2/2] lib/librte_eal: Remove unnecessary hugepage zero-filling

2015-11-18 Thread Xie, Huawei
On 11/18/2015 6:45 PM, Wang, Zhihong wrote: >> -Original Message- >> From: Mcnamara, John >> Sent: Wednesday, November 18, 2015 6:40 PM >> To: Wang, Zhihong ; dev at dpdk.org >> Subject: RE: [dpdk-dev] [RFC PATCH 2/2] lib/librte_eal: Remove unnecessary >> hugepage zero-filling >> >> >> >>>

[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 ha

[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 gues

[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 gues

[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 > Li

[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 > --- > lib/librte_vho

[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 lockl

[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 rece

[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 applications/swit

[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 is

[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 4ec22fa

[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 conver

[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): > xe

[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 patch

[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 Q

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

2015-10-28 Thread Xie, Huawei
On 10/28/2015 11:48 AM, Tetsuya Mukawa wrote: > The patch fixes wrong handling of virtqueue array index when > GET_VRING_BASE message comes. > > Signed-off-by: Tetsuya Mukawa Acked-by: Huawei Xie > ---

[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 multi-

[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 VHOST_USER_SET_VR

[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] virtio:

[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, VI

[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] virti

[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 >= max_qp_i

[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 v5 1/4] vhost: eventfd_link: refactoring EVENTFD_COPY handler

2015-10-20 Thread Xie, Huawei
On 8/29/2015 2:51 AM, Pavel Boldin wrote: > * Move ioctl `EVENTFD_COPY' code to a separate function > * Remove extra #includes > * Introduce function fget_from_files > * Fix ioctl return values > > Signed-off-by: Pavel Boldin Basically OK with this patch since we have reviewed before. Could you sp

[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 to

[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 to

[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 rin

[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. We

[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 o

[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] [PATCH v5 resend 07/12] virtio: resolve for control queue

2015-10-12 Thread Xie, Huawei
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, >>> >>> >>> As I understand, the dead loop happened here (virtio_send_command): >>> while (vq->vq_used_cons_idx == vq->vq_r

[dpdk-dev] Unlinking hugepage backing file after initialiation

2015-10-12 Thread Xie, Huawei
On 10/5/2015 9:20 PM, Michael S. Tsirkin wrote: > But really, people should just use VFIO. Not sure if the app crashes, kernel a) unmap b) tears down IOMMU, if other app still has chance to allocate the same memory between step a and step b. Need to check whether memory are bound to huge page files

[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 t

[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 4.

[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 pe

[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 applic

[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 t

[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 >> +CONFIG_RTE_V

[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 k

[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: >>> >>> http://dpdk.org/browse/dpdk/commit/lib/librte_pmd_virtio?

[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 second

[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 10064

[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 b520e

[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 *) RTE_ALIGN_CEIL((u

<    1   2   3   4   5   6   >