[dpdk-dev] [PATCH v4 02/12] vhost: support multiple queues in virtio dev

2015-08-19 Thread Yuanhan Liu
Hi Changchun, On Wed, Aug 12, 2015 at 04:02:37PM +0800, Ouyang Changchun wrote: > Each virtio device could have multiple queues, say 2 or 4, at most 8. > Enabling this feature allows virtio device/port on guest has the ability to > use different vCPU to receive/transmit packets from/to each

[dpdk-dev] [PATCH v4 02/12] vhost: support multiple queues in virtio dev

2015-08-19 Thread Yuanhan Liu
On Wed, Aug 19, 2015 at 05:54:09AM +, Ouyang, Changchun wrote: > Hi Yuanhan, > > > -Original Message- > > From: Yuanhan Liu [mailto:yuanhan.liu at linux.intel.com] > > Sent: Wednesday, August 19, 2015 11:53 AM > > To: Ouyang, Changchun > > Cc: dev

[dpdk-dev] [PATCH v4 02/12] vhost: support multiple queues in virtio dev

2015-08-19 Thread Yuanhan Liu
On Wed, Aug 19, 2015 at 02:28:51PM +0800, Yuanhan Liu wrote: > On Wed, Aug 19, 2015 at 05:54:09AM +, Ouyang, Changchun wrote: > > Hi Yuanhan, > > > > > -Original Message----- > > > From: Yuanhan Liu [mailto:yuanhan.liu at linux.intel.com] > > >

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

2015-08-24 Thread Yuanhan Liu
Signed-off-by: Yuanhan Liu --- 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 100644 --- a/lib/librte_vhost/vhost_rxtx.c +++ b/lib/librte_vhost/vhost_rxtx.c

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

2015-08-24 Thread Yuanhan Liu
_det => _dev Signed-off-by: Yuanhan Liu --- 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 b520ec5..b670992 100644 --- a/lib/librte_vhost/virtio-net.c +++ b/lib/librte_vh

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

2015-08-24 Thread Yuanhan Liu
Signed-off-by: Yuanhan Liu --- lib/librte_vhost/vhost_user/vhost-net-user.c | 36 1 file changed, 10 insertions(+), 26 deletions(-) diff --git a/lib/librte_vhost/vhost_user/vhost-net-user.c b/lib/librte_vhost/vhost_user/vhost-net-user.c index f406a94..d1f8877

[dpdk-dev] [PATCH 4/4] vhost: define callfd and kickfd as int type

2015-08-24 Thread Yuanhan Liu
So that we can remove the redundant (int) cast. Signed-off-by: Yuanhan Liu --- examples/vhost/main.c | 6 ++--- lib/librte_vhost/rte_virtio_net.h | 4 ++-- lib/librte_vhost/vhost_rxtx.c | 6 ++--- lib/librte_vhost/vhost_user/virtio-net

[dpdk-dev] [PATCH 0/4 for 2.3] vhost-user live migration support

2015-12-02 Thread Yuanhan Liu
Note: this patch set has mostly been based on Victor Kaplansk's demo work (vhost-user-bridge) at QEMU project. I was thinking to add Victor as the co-author. Victor, what do you think of that? :) Comments are welcome! --- Yuanhan Liu (4): vhost: handle VHOST_USER_SET_LOG_BASE request vhost: i

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

2015-12-02 Thread Yuanhan Liu
; } VhostUserLog; Also, a fd is delivered from QEMU by ancillary data. With those info given, an area of memory is mmaped, assigned to dev->log_base, for logging dirty pages. Signed-off-by: Yuanhan Liu --- lib/librte_vhost/rte_virtio_net.h | 2 ++ lib/librte_vhost/vhost_u

[dpdk-dev] [PATCH 2/4] vhost: introduce vhost_log_write

2015-12-02 Thread Yuanhan Liu
ase denotes the start of the dirty page bitmap. The page address is biased by log_guest_addr, which is derived from SET_VRING_ADDR request as part of the vring related addresses. Signed-off-by: Yuanhan Liu --- lib/librte_vhost/rte_virtio_net.h | 34 ++ lib/librte_vh

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

2015-12-02 Thread Yuanhan Liu
Invoking vhost_log_write() to mark corresponding page as dirty while updating used vring. Signed-off-by: Yuanhan Liu --- lib/librte_vhost/vhost_rxtx.c | 74 +-- 1 file changed, 50 insertions(+), 24 deletions(-) diff --git a/lib/librte_vhost/vhost_rxtx.c

[dpdk-dev] [PATCH 4/4] vhost: enable log_shmfd protocol feature

2015-12-02 Thread Yuanhan Liu
. Signed-off-by: Yuanhan Liu --- lib/librte_vhost/vhost_user/virtio-net-user.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/librte_vhost/vhost_user/virtio-net-user.h b/lib/librte_vhost/vhost_user/virtio-net-user.h index 013cf38..a3a889d 100644 --- a/lib/librte_vhost

[dpdk-dev] [PATCH] examples/vhost: add rate statistics for rx/tx and core

2015-12-02 Thread Yuanhan Liu
On Wed, Dec 02, 2015 at 06:32:54AM +0800, Jianfeng Tan wrote: > Currently, we only have aggregated statistics. This seems not > obvious to show how fast rx/tx and how busy of each core. > > This patch adds rx/tx rate of each period of option --stat. > And also a simple core busy rate is added to

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

2015-12-02 Thread Yuanhan Liu
On Wed, Dec 02, 2015 at 03:53:45PM +0200, Panu Matilainen wrote: > On 12/02/2015 05:43 AM, Yuanhan Liu wrote: > >VHOST_USER_SET_LOG_BASE request is used to tell the backend (dpdk > >vhost-user) where we should log dirty pages, and how big the log > >buffer is. > > >

[dpdk-dev] [PATCH 0/4 for 2.3] vhost-user live migration support

2015-12-02 Thread Yuanhan Liu
On Wed, Dec 02, 2015 at 04:10:56PM +0200, Victor Kaplansky wrote: ... > > Note: this patch set has mostly been based on Victor Kaplansk's demo > > work (vhost-user-bridge) at QEMU project. I was thinking to add Victor > > as the co-author. Victor, what do you think of that? :) > > Thanks for

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

2015-12-02 Thread Yuanhan Liu
On Wed, Dec 02, 2015 at 04:07:02PM +0200, 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 f

[dpdk-dev] [PATCH 2/4] vhost: introduce vhost_log_write

2015-12-02 Thread Yuanhan Liu
On Wed, Dec 02, 2015 at 03:53:01PM +0200, Victor Kaplansky wrote: > On Wed, Dec 02, 2015 at 11:43:11AM +0800, Yuanhan Liu wrote: > > Introduce vhost_log_write() helper function to log the dirty pages we > > touched. Page size is harded code to 4096 (VHOST_LOG_PAGE), and each >

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

2015-12-03 Thread Yuanhan Liu
On Wed, Dec 02, 2015 at 05:38:10PM +0100, Thomas Monjalon wrote: > 2015-12-02 22:31, Yuanhan Liu: > > Thomas, should I write an ABI deprecation note? Can I make it for > > v2.2 release If I make one tomorrow? (Sorry that I'm not awared > > of that it would be an ABI break). &

[dpdk-dev] [PATCH] vhost: reserve some spaces for virtio_net and vhost_virtqueue struct

2015-12-03 Thread Yuanhan Liu
them in future, btw) CC: Panu Matilainen CC: Thomas Monjalon CC: Michael S. Tsirkin CC: Victor Kaplansky Suggested-by: Panu Matilainen Signed-off-by: Yuanhan Liu --- Is the reservation a bit too large? :) --- lib/librte_vhost/rte_virtio_net.h | 2 ++ 1 file changed, 2 insertions(+) diff

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

2015-12-03 Thread Yuanhan Liu
On Wed, Dec 02, 2015 at 06:26:37PM +0200, Michael S. Tsirkin wrote: > On Wed, Dec 02, 2015 at 05:58:24PM +0200, Victor Kaplansky wrote: > > On Wed, Dec 02, 2015 at 10:38:02PM +0800, Yuanhan Liu wrote: > > > On Wed, Dec 02, 2015 at 04:07:02PM +0200, Victor Kaplansky wrote: >

[dpdk-dev] [PATCH 0/5 for 2.3] vhost rxtx refactor

2015-12-03 Thread Yuanhan Liu
rxtx side. It could be a standalone task for v2.3, and this series is more about refactor, hence I leave it for future enhancement. --- Yuanhan Liu (5): vhost: refactor rte_vhost_dequeue_burst vhost: refactor virtio_dev_rx vhost: refactor virtio_dev_merge_rx vhost: do not use

[dpdk-dev] [PATCH 1/5] vhost: refactor rte_vhost_dequeue_burst

2015-12-03 Thread Yuanhan Liu
bss dec hex filename 39348 0 0 3934899b4 /path/to/vhost_rxtx.o # with this patch $ size /path/to/vhost_rxtx.o textdata bss dec hex filename 37435 0 0 37435923b /path/to/vhost_rxtx.o Signed-off-by: Yuanha

[dpdk-dev] [PATCH 2/5] vhost: refactor virtio_dev_rx

2015-12-03 Thread Yuanhan Liu
/to/vhost_rxtx.o Signed-off-by: Yuanhan Liu --- lib/librte_vhost/vhost_rxtx.c | 275 -- 1 file changed, 129 insertions(+), 146 deletions(-) diff --git a/lib/librte_vhost/vhost_rxtx.c b/lib/librte_vhost/vhost_rxtx.c index b4c6cab..cb29459 100644 --- a/lib

[dpdk-dev] [PATCH 3/5] vhost: refactor virtio_dev_merge_rx

2015-12-03 Thread Yuanhan Liu
textdata bss dec hex filename 36171 0 0 361718d4b /path/to/vhost_rxtx.o Signed-off-by: Yuanhan Liu --- lib/librte_vhost/vhost_rxtx.c | 389 +- 1 file changed, 158 insertions(+), 231 deletions(-) diff --git a/lib

[dpdk-dev] [PATCH 4/5] vhost: do not use rte_memcpy for virtio_hdr copy

2015-12-03 Thread Yuanhan Liu
0 361718d4b /path/to/vhost_rxtx.o # with this patch $ size /path/to/vhost_rxtx.o textdata bss dec hex filename 24179 0 0 241795e73 /path/to/vhost_rxtx.o Signed-off-by: Yuanhan Liu --- lib/librte_vhost/vhost_rxtx.c | 20

[dpdk-dev] [PATCH 5/5] vhost: don't use unlikely for VIRTIO_NET_F_MRG_RXBUF detection

2015-12-03 Thread Yuanhan Liu
VIRTIO_NET_F_MRG_RXBUF is a default feature supported by vhost. Adding unlikely for VIRTIO_NET_F_MRG_RXBUF detection doesn't make sense to me at all. Signed-off-by: Yuanhan Liu --- lib/librte_vhost/vhost_rxtx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_vhost

[dpdk-dev] [PATCH v2] examples/vhost: fix statistics error

2015-12-03 Thread Yuanhan Liu
On Thu, Dec 03, 2015 at 06:01:33AM +0800, Jianfeng Tan wrote: > This issue was discovered under the case of software vm2vm > fowarding. When pkts are received from virtio device 0 and > tx_route to virtio device 1, tx of device 0 is not updated. > > To fix this problem, we check each rx/tx branch

[dpdk-dev] [PATCH v3] examples/vhost: fix statistics error

2015-12-03 Thread Yuanhan Liu
t; Tested-by: Qian Xu Acked-by: Yuanhan Liu Thanks. --yliu > --- > examples/vhost/main.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/examples/vhost/main.c b/examples/vhost/main.c > index 9bfda6d..dc3a012 100644 > --- a/examples/vho

[dpdk-dev] [PATCH 1/5] vhost: refactor rte_vhost_dequeue_burst

2015-12-03 Thread Yuanhan Liu
On Wed, Dec 02, 2015 at 11:02:44PM -0800, Stephen Hemminger wrote: > On Thu, 3 Dec 2015 14:06:09 +0800 > Yuanhan Liu wrote: > > > +#define COPY(dst, src) do { > > \ > > + cpy_len = RTE

[dpdk-dev] [PATCH 1/2] virtio: make sure rcv mbuf initialized correctly

2015-12-04 Thread Yuanhan Liu
On Thu, Dec 03, 2015 at 05:12:53PM -0800, Stephen Hemminger wrote: > The virtio driver was not initializing all the fields in > the receive mbuf. This would cause bugs where previous usage > of mbuf would leave stale TCI and offload flags. Acked-by: Yuanhan Liu Thanks. --yliu

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

2015-12-04 Thread Yuanhan Liu
_free_cnt + 1; > + need = txm->nb_segs - txvq->vq_free_cnt + 1; > + if (unlikely(need > 0)) { > + PMD_TX_LOG(ERR, > + "No free tx descriptors to > transmit"); > + break; > + } ^ Minor nit: I found a leading white space there. Otherwise, it looks good: Acked-by: Yuanhan Liu --yliu

[dpdk-dev] [PATCH] virtio: fix link state regression

2015-12-04 Thread Yuanhan Liu
On Thu, Dec 03, 2015 at 06:08:24PM -0800, Stephen Hemminger wrote: > Support for link state interrupt was broken on virtio by > > commit bda66c418c85 ("ethdev: add device fields from PCI layer") > > This is caused because the actual value of drv_flags is not set > until after the resource_init

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

2015-12-07 Thread Yuanhan Liu
On Mon, Dec 07, 2015 at 12:07:28AM +0100, Thomas Monjalon wrote: > 2015-12-02 15:53, Panu Matilainen: > > This (and other changes in patch 2 breaks the librte_vhost ABI again, so > > you'd need to at least add a deprecation note to 2.2 to be able to do it > > in 2.3 at all according to the ABI

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

2015-12-07 Thread Yuanhan Liu
On Fri, Dec 04, 2015 at 11:05:13PM +0530, Santosh Shukla wrote: > This patch set add basic infrastrucure to run virtio-net-pci pmd driver for > arm64/arm. Tested on ThunderX platfrom. Verified for existing dpdk(s) test > applications like: > - ovs-dpdk-vhost-user: across the VM's, for the

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

2015-12-07 Thread Yuanhan Liu
On Mon, Dec 07, 2015 at 03:03:24AM +0100, Thomas Monjalon wrote: > 2015-12-07 10:00, Yuanhan Liu: > > On Mon, Dec 07, 2015 at 12:07:28AM +0100, Thomas Monjalon wrote: > > > 2015-12-02 15:53, Panu Matilainen: > > > > This (and other changes in patch 2 breaks the librt

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

2015-12-08 Thread Yuanhan Liu
On Sat, Dec 05, 2015 at 11:50:07AM -0800, Stephen Hemminger wrote: > int error; > > > > > > @@ -846,58 +845,49 @@ virtio_xmit_pkts(void *tx_queue, struct rte_mbuf > > > **tx_pkts, uint16_t nb_pkts) > > > if (likely(nb_used > txvq->vq_nentries - txvq->vq_free_thresh)) > > >

[dpdk-dev] [PATCH v5 0/3] Add VHOST PMD

2015-12-08 Thread Yuanhan Liu
On Tue, Dec 08, 2015 at 10:12:52AM +0900, Tetsuya Mukawa wrote: > Hi Xie and Yuanhan, > > Please let me make sure whether this patch is differed. > If it is differed, I guess I may need to add ABI breakage notice before Tetsuya, What do you mean by "differed"? Do you mean "delayed"? Per my

[dpdk-dev] [PATCH] vhost: don't stall if guest is slow

2015-12-08 Thread Yuanhan Liu
logging just creates massive log spew/overflow which could even > act as a DoS attack against host. > > Reported-by: Nathan Law > Signed-off-by: Stephen Hemminger Acked-by: Yuanhan Liu Thanks. --yliu

[dpdk-dev] [PATCH] virtio: fix wrong queue index for VIRTIO_PCI_QUEUE_SEL

2015-12-08 Thread Yuanhan Liu
e. Fixes: 5382b188fb8a ("virtio: add queue release") Cc: Bernard Iremonger Signed-off-by: Yuanhan Liu --- drivers/net/virtio/virtio_ethdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c ind

[dpdk-dev] [PATCH] vhost: don't stall if guest is slow

2015-12-08 Thread Yuanhan Liu
On Tue, Dec 08, 2015 at 03:30:43AM +0100, Thomas Monjalon wrote: > 2015-12-08 10:23, Yuanhan Liu: > > On Mon, Dec 07, 2015 at 04:50:21PM -0800, Stephen Hemminger wrote: > > > When guest is booting (or any othertime guest is busy) it is possible > > > for the small rec

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

2015-12-08 Thread Yuanhan Liu
On Tue, Dec 08, 2015 at 05:57:54AM +, Xie, Huawei wrote: > 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_CO

[dpdk-dev] [PATCH 2/4] vhost: introduce vhost_log_write

2015-12-09 Thread Yuanhan Liu
On Wed, Dec 09, 2015 at 03:33:16AM +, Xie, Huawei wrote: ... > >> +static inline void __attribute__((always_inline)) > >> +vhost_log_write(struct virtio_net *dev, struct vhost_virtqueue *vq, > >> + uint64_t offset, uint64_t len) > >> +{ > >> + uint64_t addr = vq->log_guest_addr; > >>

[dpdk-dev] [PATCH 2/4] vhost: introduce vhost_log_write

2015-12-09 Thread Yuanhan Liu
On Wed, Dec 09, 2015 at 05:44:11AM +, Xie, Huawei wrote: > On 12/9/2015 11:41 AM, Yuanhan Liu wrote: > > On Wed, Dec 09, 2015 at 03:33:16AM +, Xie, Huawei wrote: > > ... > >>>> +static inline void __attribute__((always_inline)) > >>>> +v

[dpdk-dev] [PATCH] virtio: fix wrong queue index for VIRTIO_PCI_QUEUE_SEL

2015-12-10 Thread Yuanhan Liu
On Wed, Dec 09, 2015 at 09:09:27PM +0100, Thomas Monjalon wrote: > 2015-12-08 11:05, Yuanhan Liu: > > We should provide VIRTIO_PCI_QUEUE_SEL with vq->vq_queue_idx, > > but not vq->queue_id. > > > > vq->queue_id is the queue id from rte_eth_rx/tx_queue_set

[dpdk-dev] [PATCH 0/6 for 2.3] initial virtio 1.0 enabling

2015-12-10 Thread Yuanhan Liu
g is still in rough state, and it's likely I may miss something. So, comments are huge welcome! --yliu --- Yuanhan Liu (6): virtio: don't set vring address again at queue startup virtio: introduce struct virtio_pci_ops virtio: move left pci stuff to virtio_pci.c viritio: switch to 64 bi

[dpdk-dev] [PATCH 1/6] virtio: don't set vring address again at queue startup

2015-12-10 Thread Yuanhan Liu
As we have already set up it at virtio_dev_queue_setup(), and a vq restart will not reset the settings. Signed-off-by: Yuanhan Liu --- drivers/net/virtio/virtio_rxtx.c | 15 --- 1 file changed, 15 deletions(-) diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio

[dpdk-dev] [PATCH 2/6] virtio: introduce struct virtio_pci_ops

2015-12-10 Thread Yuanhan Liu
ets hw->vtpci_ops to legacy_ops as we don't support 1.0 yet. Signed-off-by: Yuanhan Liu --- drivers/net/virtio/virtio_ethdev.c | 22 ++--- drivers/net/virtio/virtio_pci.c| 162 ++--- drivers/net/virtio/virtio_pci.h| 27 +++ drivers/net/virtio/vi

[dpdk-dev] [PATCH 3/6] virtio: move left pci stuff to virtio_pci.c

2015-12-10 Thread Yuanhan Liu
virtio_pci.c is a more proper place for pci stuff; virtio_ethdev is not. Signed-off-by: Yuanhan Liu --- drivers/net/virtio/virtio_ethdev.c | 265 +--- drivers/net/virtio/virtio_pci.c| 270 - 2 files changed, 270 insertions

[dpdk-dev] [PATCH 4/6] viritio: switch to 64 bit features

2015-12-10 Thread Yuanhan Liu
Switch to 64 bit features, which virtio 1.0 supports. While legacy virtio only supports 32 bit features, it complains aloud and quit when trying to setting > 32 bit features. Signed-off-by: Yuanhan Liu --- drivers/net/virtio/virtio_ethdev.c | 8 drivers/net/virtio/virtio_pc

[dpdk-dev] [PATCH 5/6] virtio: set RTE_PCI_DRV_NEED_MAPPING flag

2015-12-10 Thread Yuanhan Liu
We need to to map pci bar space for enabling modern virtio pci device, as all modern configs are stored at pci bar space. Setting RTE_PCI_DRV_NEED_MAPPING flag will let eal do that for us. Signed-off-by: Yuanhan Liu --- drivers/net/virtio/virtio_ethdev.c | 2 +- 1 file changed, 1 insertion

[dpdk-dev] [PATCH 6/6] virtio: add virtio v1.0 support

2015-12-10 Thread Yuanhan Liu
io 1.0 introduces a new status field: FEATURES_OK, which is set after features negotiation is done. Last, set the VIRTIO_F_VERSION_1 feature flag. Signed-off-by: Yuanhan Liu --- drivers/net/virtio/virtio_ethdev.c | 16 +- drivers/net/virtio/virtio_ethdev.h | 3 +- drivers/net/virtio/virtio

[dpdk-dev] [PATCH 0/6 for 2.3] initial virtio 1.0 enabling

2015-12-10 Thread Yuanhan Liu
Michael, Sorry that I forgot to CC you. (In fact, I intended to, but there is a tiny bug at my send-email script :( It'd be great if you could take some time to review it. Thanks. --yliu On Thu, Dec 10, 2015 at 11:54:04AM +0800, Yuanhan Liu wrote: > Hi, > > Here is an initi

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

2015-12-10 Thread Yuanhan Liu
On Thu, Dec 10, 2015 at 11:46:50AM +0530, Santosh Shukla wrote: > On Tue, Dec 8, 2015 at 6:29 PM, Xie, Huawei wrote: > > > > > >> -Original Message----- > >> From: Yuanhan Liu [mailto:yuanhan.liu at linux.intel.com] > >> Sent: Monday, December 07, 201

[dpdk-dev] [PATCH 1/1] doc: correct Vhost Sample Application guide

2015-12-10 Thread Yuanhan Liu
On Wed, Dec 09, 2015 at 04:14:01PM +, Iremonger, Bernard wrote: > Hi John, > > > > 2015-12-09 14:50, Mcnamara, John: > > > Also, as a general note, not just to this document/patch. > > > > > > I don't think the "user at target:~$" prefixes used in some DPDK Doc > > > commandlines is useful.

[dpdk-dev] [PATCH v2 1/1] doc: correct Vhost Sample Application guide

2015-12-10 Thread Yuanhan Liu
On Wed, Dec 09, 2015 at 05:18:38PM +, Bernard Iremonger wrote: > correct sample console commands You'd state what exactly this patch corrects here, and why is that needed. > > changes in v2: > remove "user at target:~$" prefixes in command lines. > use continuation character to stay within

[dpdk-dev] [PATCH v3] doc: correct Vhost Sample Application guide

2015-12-10 Thread Yuanhan Liu
d0dff9ba445e ("doc: sample application user guide" > Fixes: 9bc23cb8209c ("doc: add vhost-user to sample guide") > Fixes: 43866bf71d58 ("doc: fix vhost sample parameter") > Signed-off-by: Bernard Iremonger Acked-by: Yuanhan Liu Thanks. --yliu

[dpdk-dev] [PATCH] examples/vhost: reduce number of hugepages needed

2015-12-10 Thread Yuanhan Liu
-#define MAX_QUEUES 512 > +/* decrease MAX_QUEUES from 512 to reduce number of hugepages needed */ Minor nit: I would suggest to simply remove this comment, which might be a bit confusing without the content (that 512 would let vhost-switch fail to start if given memory is small). Otherwise

[dpdk-dev] [PATCH] examples/vhost: reduce number of hugepages needed

2015-12-10 Thread Yuanhan Liu
quot; > > > > > > -#define MAX_QUEUES 512 > > > +/* decrease MAX_QUEUES from 512 to reduce number of hugepages > > needed > > > +*/ > > > > Minor nit: I would suggest to simply remove this comment, which might be a > > bit confusing without the conten

[dpdk-dev] [PATCH 0/4 for 2.3] vhost-user live migration support

2015-12-11 Thread Yuanhan Liu
On Fri, Dec 11, 2015 at 11:26:55AM +0300, Pavel Fedin wrote: > Hello! > > I am currently testing this patchset with qemu and have problems. Hi, Thanks for testing! > > The guest migrates correctly, but after the migration it cries in the log: > > Vhost user backend fails to broadcast fake

[dpdk-dev] [PATCH 2/5] vhost: refactor virtio_dev_rx

2015-12-14 Thread Yuanhan Liu
On Fri, Dec 11, 2015 at 12:42:33PM -0800, Rich Lane wrote: > On Wed, Dec 2, 2015 at 10:06 PM, Yuanhan Liu > wrote: > > +static inline int __attribute__((always_inline)) > +copy_mbuf_to_desc(struct virtio_net *dev, struct vhost_virtqueue *vq, > +? ? ? ? ? ? ? ? ?

[dpdk-dev] [PATCH 1/5] vhost: refactor rte_vhost_dequeue_burst

2015-12-14 Thread Yuanhan Liu
On Fri, Dec 11, 2015 at 10:55:48PM -0800, Rich Lane wrote: > On Wed, Dec 2, 2015 at 10:06 PM, Yuanhan Liu > wrote: > > +static inline struct rte_mbuf * > +copy_desc_to_mbuf(struct virtio_net *dev, struct vhost_virtqueue *vq, > +? ? ? ? ? ? ? ? ?uint16_t desc_idx,

[dpdk-dev] [PATCH] virtio: fix virtio_net_hdr desc pointing to the same buffer

2015-12-14 Thread Yuanhan Liu
-by: Huawei Xie Acked-by: Yuanhan Liu BTW, I found your email address is abnormal: From: Huawei at dpdk.org, Xie at dpdk.org Something wrong with your git send email config? --yliu

[dpdk-dev] [PATCH] virtio: fix virtio_net_hdr desc pointing to the same buffer

2015-12-14 Thread Yuanhan Liu
On Mon, Dec 14, 2015 at 10:32:24AM +0100, Thomas Monjalon wrote: > 2015-12-14 11:01, Yuanhan Liu: > > On Fri, Dec 11, 2015 at 12:07:32AM +0800, Huawei at dpdk.org wrote: > > > The virtio_net_hdr desc all pointed to the same buffer. It doesn't cause > > > issue becau

[dpdk-dev] [PATCH 0/4 for 2.3] vhost-user live migration support

2015-12-14 Thread Yuanhan Liu
On Mon, Dec 14, 2015 at 12:46:57PM +0300, Pavel Fedin wrote: > Hello! > > > > Host<--->openVSwitch<--->guest > > > LOCAL vhostuser > > > > > > So, in order to migrate the guest, i simply replicated this setup on > > > both hosts, with the > > same IPs on host

[dpdk-dev] [PATCH] virtio: fix virtio_net_hdr desc pointing to the same buffer

2015-12-14 Thread Yuanhan Liu
On Mon, Dec 14, 2015 at 01:44:54PM +0100, Thomas Monjalon wrote: > 2015-12-14 19:47, Yuanhan Liu: > > On Mon, Dec 14, 2015 at 10:32:24AM +0100, Thomas Monjalon wrote: > > > 2015-12-14 11:01, Yuanhan Liu: > > > > On Fri, Dec 11, 2015 at 12:07:32AM +

[dpdk-dev] [PATCH 0/4 for 2.3] vhost-user live migration support

2015-12-14 Thread Yuanhan Liu
On Mon, Dec 14, 2015 at 09:00:22PM +0800, Peter Xu wrote: > On Mon, Dec 14, 2015 at 08:09:37PM +0800, Yuanhan Liu wrote: > > It seems that we have exactly the same test environment set up: I have > > one server (where I normally do vhost test there) and one desktop

[dpdk-dev] [PATCH 0/4 for 2.3] vhost-user live migration support

2015-12-15 Thread Yuanhan Liu
On Mon, Dec 14, 2015 at 11:58:42AM +0800, Peter Xu wrote: > On Fri, Dec 11, 2015 at 01:22:23PM +0300, Pavel Fedin wrote: > > BTW, it works, and it was my bad. openvswitch was configured incorrectly > > on the other side, vhost port number was different for > > some reason, while ruleset was the

[dpdk-dev] [PATCH 0/4 for 2.3] vhost-user live migration support

2015-12-15 Thread Yuanhan Liu
On Tue, Dec 15, 2015 at 12:47:47PM +0100, Thibaut Collet wrote: > On Tue, Dec 15, 2015 at 12:43 PM, Thibaut Collet > wrote: > > > > > > > On Tue, Dec 15, 2015 at 11:05 AM, Peter Xu wrote: > > > >> On Tue, Dec 15, 2015 at 11:45:56AM +0300, Pavel Fedin wrote: > >> > To tell the truth, i don't

[dpdk-dev] [PATCH 0/4 for 2.3] vhost-user live migration support

2015-12-15 Thread Yuanhan Liu
On Tue, Dec 15, 2015 at 03:24:48PM +0300, Pavel Fedin wrote: > Hello! > > > After a migration, to avoid network outage, the guest must announce its new > > location to the L2 layer, typically with a GARP. Otherwise requests sent to > > the guest arrive to the old host until a ARP request is

[dpdk-dev] [PATCH 0/4 for 2.3] vhost-user live migration support

2015-12-15 Thread Yuanhan Liu
On Tue, Dec 15, 2015 at 04:48:12PM +0300, Pavel Fedin wrote: > Hello! > > > > Wrong. I tried to unconditionally enforce it in qemu (my guest does > > > support it), and the > > link stopped working at all. I don't understand why. > > > > I'm wondering how did you do that? Why do you need

[dpdk-dev] problem vhost-user sockets

2015-12-15 Thread Yuanhan Liu
On Tue, Dec 15, 2015 at 03:41:23PM +0300, Pavel Fedin wrote: > Hello! > > I have a question regarding vhostuser. If we cannot bind to a socket, why do > we simply fail with error instead of just unlink()ing > the path before binding? I'm thinking you can't simply unlink a file given by a user

[dpdk-dev] problem vhost-user sockets

2015-12-16 Thread Yuanhan Liu
On Tue, Dec 15, 2015 at 05:21:25PM +0300, Pavel Fedin wrote: > Hello! > > > I'm thinking you can't simply unlink a file given by a user inside > > a libraray unconditionaly. Say, what if a user gives a wrong socket > > path? > > Well... We can improve the security by checking that: > > a) The

[dpdk-dev] [PATCH 0/4 for 2.3] vhost-user live migration support

2015-12-16 Thread Yuanhan Liu
On Wed, Dec 16, 2015 at 10:38:03AM +0800, Peter Xu wrote: > On Tue, Dec 15, 2015 at 04:07:57PM +0100, Thibaut Collet wrote: > > After a migration, to avoid netwotk outage, all interfaces of the guest > > must send a packet to update switches mapping (ideally a GARP). > > As some interfaces do not

[dpdk-dev] [PATCH 0/4 for 2.3] vhost-user live migration support

2015-12-16 Thread Yuanhan Liu
On Tue, Dec 15, 2015 at 05:58:28PM +0300, Pavel Fedin wrote: > Hello! > > > No idea. Maybe you have changed some other configures (such as of ovs) > > without notice? Or, the ovs bridge interface resets? > > I don't touch the ovs at all. Just shut down the guest, rebuild the qemu, > reinstall

[dpdk-dev] [PATCH 0/4 for 2.3] vhost-user live migration support

2015-12-16 Thread Yuanhan Liu
On Wed, Dec 16, 2015 at 02:57:15PM +0300, Pavel Fedin wrote: > Hello! > > > I can reproduce your issue on my side with above patch (and only when > > F_GUEST_ANNOUNCE is not set at DPDK vhost lib). TBH, I don't know > > why that happened, the cause could be subtle, and I don't think it's > >

[dpdk-dev] [PATCH] eal: map io resources for non x86 architectures

2015-12-16 Thread Yuanhan Liu
On Wed, Dec 16, 2015 at 01:31:04PM +0100, David Marchand wrote: > x86 requires a special set of instructions to access ioports, but other > architectures let you remap io resources. > So let eal remap io resources by accepting IORESOURCE_IO flag for > architectures other than x86. One question:

[dpdk-dev] [PATCH 0/4 for 2.3] vhost-user live migration support

2015-12-16 Thread Yuanhan Liu
On Wed, Dec 16, 2015 at 03:43:06PM +0300, Pavel Fedin wrote: > rYR8N8f/ookveMRL7BfPnj5lw+EJZd+uG+v/lZnBuWidyQ4r > g586/P1rPsQw8p6wT+M7LnqvMLZM9eWq2ht53Bd5liqxFGckGmoxFxUnAgC5sFKthAIAAA== > Status: O > Content-Length: 4853 > Lines: 66 > > Hello! > > > However, I'm more curious about the

[dpdk-dev] [ [PATCH v2] 11/13] virtio_ioport: armv7/v8: mmap virtio iopci bar region

2015-12-16 Thread Yuanhan Liu
On Mon, Dec 14, 2015 at 06:30:30PM +0530, Santosh Shukla wrote: > Introducing module to mmap iopci bar region. Applicable for linuxapp for > non-x86 > archs, Tested for arm64/ThunderX platform for linux. For that adding two > global > api. > - virtio_ioport_init > - virtio_ioport_unmap > >

[dpdk-dev] [PATCH] eal: map io resources for non x86 architectures

2015-12-16 Thread Yuanhan Liu
On Wed, Dec 16, 2015 at 02:34:35PM +0100, David Marchand wrote: > Yuanhan, > > On Wed, Dec 16, 2015 at 1:48 PM, Yuanhan Liu > wrote: > > On Wed, Dec 16, 2015 at 01:31:04PM +0100, David Marchand wrote: > > x86 requires a special set of instructions to a

[dpdk-dev] [ [PATCH v2] 05/13] virtio: change io_base datatype from uint32_t to uint64_type

2015-12-16 Thread Yuanhan Liu
On Mon, Dec 14, 2015 at 06:30:24PM +0530, Santosh Shukla wrote: > In x86 case io_base to store ioport address not more than 65535 ioports. > i.e..0 > to but in non-x86 case in particular arm64 it need to store more than 32 > bit address so changing io_base datatype from 32 to 64. > >

[dpdk-dev] [ [PATCH v2] 05/13] virtio: change io_base datatype from uint32_t to uint64_type

2015-12-16 Thread Yuanhan Liu
On Wed, Dec 16, 2015 at 07:31:57PM +0530, Santosh Shukla wrote: > On Wed, Dec 16, 2015 at 7:18 PM, Yuanhan Liu > wrote: > > On Mon, Dec 14, 2015 at 06:30:24PM +0530, Santosh Shukla wrote: > >> In x86 case io_base to store ioport address not more than 65535 ioports. >

[dpdk-dev] [ [PATCH v2] 11/13] virtio_ioport: armv7/v8: mmap virtio iopci bar region

2015-12-16 Thread Yuanhan Liu
On Wed, Dec 16, 2015 at 07:50:51PM +0530, Santosh Shukla wrote: ... > >> + *resource_addr = (void *)((char *)ioport_map + > >> (ioport_map_cnt)*offset); > > > > Redundant (), and the void * cast seems to be unnecessary. > > > > (void *) is unnecessary, but couldn't get the redundant() part?

[dpdk-dev] [ [PATCH v2] 05/13] virtio: change io_base datatype from uint32_t to uint64_type

2015-12-16 Thread Yuanhan Liu
On Wed, Dec 16, 2015 at 08:09:40PM +0530, Santosh Shukla wrote: > On Wed, Dec 16, 2015 at 7:53 PM, Yuanhan Liu > wrote: > > On Wed, Dec 16, 2015 at 07:31:57PM +0530, Santosh Shukla wrote: > >> On Wed, Dec 16, 2015 at 7:18 PM, Yuanhan Liu > >> wrote: > >&g

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

2015-12-17 Thread Yuanhan Liu
; } VhostUserLog; Also, a fd is delivered from QEMU by ancillary data. With those info given, an area of memory is mmaped, assigned to dev->log_base, for logging dirty pages. Signed-off-by: Yuanhan Liu Signed-off-by: Victor Kaplansky protocol_features = protocol_features; } + +int +user_set_log_base(str

[dpdk-dev] [PATCH v2 0/6] vhost-user live migration support

2015-12-17 Thread Yuanhan Liu
migrated to VM2, and the "ping" command continues running, perfectly. Cc: Chen Zhihui Cc: Yang Maggie --- Yuanhan Liu (6): vhost: handle VHOST_USER_SET_LOG_BASE request vhost: introduce vhost_log_write vhost: log used vring changes vhost: log vring desc buffer changes

[dpdk-dev] [PATCH v2 3/6] vhost: log used vring changes

2015-12-17 Thread Yuanhan Liu
Introducing a vhost_log_write() wrapper, vhost_log_used_vring, to log used vring changes. Signed-off-by: Yuanhan Liu Signed-off-by: Victor Kaplansky log_guest_addr + offset; + vhost_log_write(dev, addr, len); +} + /** * This function adds buffers to the virtio devices RX virtqueue

[dpdk-dev] [PATCH v2 5/6] vhost: claim that we support GUEST_ANNOUNCE feature

2015-12-17 Thread Yuanhan Liu
It's actually a feature already enabled in Linux kernel. What we need to do is simply to claim that we support such feature, and nothing else. With that, the guest will send GARP messages after live migration. Signed-off-by: Yuanhan Liu --- lib/librte_vhost/virtio-net.c | 1 + 1 file changed

[dpdk-dev] [PATCH v2 4/6] vhost: log vring desc buffer changes

2015-12-17 Thread Yuanhan Liu
Every time we copy a buf to vring desc, we need to log it. Signed-off-by: Yuanhan Liu Signed-off-by: Victor Kaplansky addr + vb_offset, len_to_cpy); PRINT_PACKET(dev, (uintptr_t)(buff_addr + vb_offset), len_to_cpy, 0); @@ -232,6 +234,7

[dpdk-dev] [PATCH v2 6/6] vhost: enable log_shmfd protocol feature

2015-12-17 Thread Yuanhan Liu
. Signed-off-by: Yuanhan Liu --- lib/librte_vhost/vhost_user/virtio-net-user.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/librte_vhost/vhost_user/virtio-net-user.h b/lib/librte_vhost/vhost_user/virtio-net-user.h index 013cf38..a3a889d 100644 --- a/lib/librte_vhost

[dpdk-dev] [PATCH v2 1/2] mbuf: provide rte_pktmbuf_alloc_bulk API

2015-12-17 Thread Yuanhan Liu
On Mon, Dec 14, 2015 at 09:14:41AM +0800, Huawei Xie wrote: > v2 changes: > unroll the loop a bit to help the performance > > rte_pktmbuf_alloc_bulk allocates a bulk of packet mbufs. > > There is related thread about this bulk API. > http://dpdk.org/dev/patchwork/patch/4718/ > Thanks to

[dpdk-dev] [PATCH v2 2/2] vhost: call rte_pktmbuf_alloc_bulk in vhost dequeue

2015-12-17 Thread Yuanhan Liu
On Mon, Dec 14, 2015 at 09:14:42AM +0800, Huawei Xie wrote: > pre-allocate a bulk of mbufs instead of allocating one mbuf a time on demand > > Signed-off-by: Gerald Rogers > Signed-off-by: Huawei Xie > Acked-by: Konstantin Ananyev Acked-by: Yuanhan Liu Tested-by: Yuanh

[dpdk-dev] [ [PATCH v2] 05/13] virtio: change io_base datatype from uint32_t to uint64_type

2015-12-17 Thread Yuanhan Liu
On Wed, Dec 16, 2015 at 08:35:58PM +0530, Santosh Shukla wrote: > On Wed, Dec 16, 2015 at 8:28 PM, Yuanhan Liu > wrote: > > On Wed, Dec 16, 2015 at 08:09:40PM +0530, Santosh Shukla wrote: > >> On Wed, Dec 16, 2015 at 7:53 PM, Yuanhan Liu > >> wrote: > >&g

[dpdk-dev] [PATCH] eal: map io resources for non x86 architectures

2015-12-17 Thread Yuanhan Liu
On Wed, Dec 16, 2015 at 07:21:55PM +0530, Santosh Shukla wrote: > On Wed, Dec 16, 2015 at 6:18 PM, Yuanhan Liu > wrote: > > On Wed, Dec 16, 2015 at 01:31:04PM +0100, David Marchand wrote: > >> x86 requires a special set of instructions to access ioports, but other > >&g

[dpdk-dev] [PATCH v5 1/3] vhost: Add callback and private data for vhost PMD

2015-12-17 Thread Yuanhan Liu
On Tue, Nov 24, 2015 at 06:00:01PM +0900, Tetsuya Mukawa wrote: > The vhost PMD will be a wrapper of vhost library, but some of vhost > library APIs cannot be mapped to ethdev library APIs. > Becasue of this, in some cases, we still need to use vhost library APIs > for a port created by the vhost

[dpdk-dev] [PATCH v5 3/3] vhost: Add helper function to convert port id to virtio device pointer

2015-12-17 Thread Yuanhan Liu
On Tue, Nov 24, 2015 at 06:00:03PM +0900, Tetsuya Mukawa wrote: > This helper function is used to convert port id to virtio device > pointer. To use this function, a port should be managed by vhost PMD. > After getting virtio device pointer, it can be used for calling vhost > library APIs. I'm

[dpdk-dev] [PATCH] Unlink existing unused sockets at start up

2015-12-17 Thread Yuanhan Liu
On Wed, Dec 16, 2015 at 11:21:02PM -0500, Zhihong Wang wrote: > This patch unlinks existing unused sockets (which cause new bindings to fail, > e.g. vHost PMD) to ensure smooth startup. > In a lot of cases DPDK applications are terminated abnormally without proper > resource release. Therefore,

[dpdk-dev] [PATCH v2 0/6] vhost-user live migration support

2015-12-17 Thread Yuanhan Liu
On Thu, Dec 17, 2015 at 12:08:13PM +, Iremonger, Bernard wrote: > Hi Yuanhan, > > > -Original Message- > > From: Yuanhan Liu [mailto:yuanhan.liu at linux.intel.com] > > Sent: Thursday, December 17, 2015 3:12 AM > > To: dev at dpdk.org > >

[dpdk-dev] [ [PATCH v2] 01/13] virtio: Introduce config RTE_VIRTIO_INC_VECTOR

2015-12-18 Thread Yuanhan Liu
On Thu, Dec 17, 2015 at 03:24:35PM -0800, Stephen Hemminger wrote: > On Thu, 17 Dec 2015 17:32:38 +0530 > Santosh Shukla wrote: > > > On Mon, Dec 14, 2015 at 6:30 PM, Santosh Shukla > > wrote: > > > virtio_recv_pkts_vec and other virtio vector friend apis are written for > > > sse/avx > > >

[dpdk-dev] [PATCH v2 1/2] mbuf: provide rte_pktmbuf_alloc_bulk API

2015-12-18 Thread Yuanhan Liu
On Thu, Dec 17, 2015 at 03:42:19PM +, Ananyev, Konstantin wrote: > > > > -Original Message- > > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Yuanhan Liu > > Sent: Thursday, December 17, 2015 6:41 AM > > To: Xie, Huawei > > Cc: dev at

[dpdk-dev] [PATCH v5 1/3] vhost: Add callback and private data for vhost PMD

2015-12-18 Thread Yuanhan Liu
On Fri, Dec 18, 2015 at 12:15:42PM +0900, Tetsuya Mukawa wrote: > On 2015/12/17 20:42, Yuanhan Liu wrote: > > On Tue, Nov 24, 2015 at 06:00:01PM +0900, Tetsuya Mukawa wrote: > >> The vhost PMD will be a wrapper of vhost library, but some of vhost > >> library APIs

  1   2   3   4   5   6   7   8   9   10   >