[dpdk-dev] dpdk/vpp and cross-version migration for vhost

2016-11-17 Thread Michael S. Tsirkin
On Thu, Nov 17, 2016 at 05:49:36PM +0800, Yuanhan Liu wrote: > On Thu, Nov 17, 2016 at 09:47:09AM +0100, Maxime Coquelin wrote: > > > > > > On 11/17/2016 09:29 AM, Yuanhan Liu wrote: > > >As usaual, sorry for late response :/ > > > > > >On

[dpdk-dev] [PATCH 0/2] enables vhost/virtio any layout feature

2016-11-10 Thread Michael S. Tsirkin
On Mon, Sep 26, 2016 at 02:40:54PM +0800, Yuanhan Liu wrote: > The feature is actually supported both in virtio PMD and vhost lib. > We just haven't enabled it yet. This patchset simply enables it. Any input on handling versioning? Do people prefer to handle it completely at the backend, or

[dpdk-dev] dpdk/vpp and cross-version migration for vhost

2016-10-13 Thread Michael S. Tsirkin
Hi! So it looks like we face a problem with cross-version migration when using vhost. It's not new but became more acute with the advent of vhost user. For users to be able to migrate between different versions of the hypervisor the interface exposed to guests by hypervisor must stay unchanged.

[dpdk-dev] [Qemu-devel] [PATCH 1/2] vhost: enable any layout feature

2016-10-10 Thread Michael S. Tsirkin
On Mon, Oct 10, 2016 at 04:16:19AM +, Wang, Zhihong wrote: > > > > -Original Message- > > From: Yuanhan Liu [mailto:yuanhan.liu at linux.intel.com] > > Sent: Monday, October 10, 2016 11:59 AM > > To: Michael S. Tsirkin > > Cc: Maxime Co

[dpdk-dev] [Qemu-devel] [PATCH 1/2] vhost: enable any layout feature

2016-10-10 Thread Michael S. Tsirkin
On Mon, Oct 10, 2016 at 12:22:09PM +0800, Yuanhan Liu wrote: > On Mon, Oct 10, 2016 at 07:17:06AM +0300, Michael S. Tsirkin wrote: > > On Mon, Oct 10, 2016 at 12:05:31PM +0800, Yuanhan Liu wrote: > > > On Fri, Sep 30, 2016 at 10:16:43PM +0300, Michael S. Tsirkin wrote: > &

[dpdk-dev] [Qemu-devel] [PATCH 1/2] vhost: enable any layout feature

2016-10-10 Thread Michael S. Tsirkin
On Mon, Oct 10, 2016 at 04:16:19AM +, Wang, Zhihong wrote: > > > > -Original Message- > > From: Yuanhan Liu [mailto:yuanhan.liu at linux.intel.com] > > Sent: Monday, October 10, 2016 11:59 AM > > To: Michael S. Tsirkin > > Cc: Maxime Co

[dpdk-dev] [Qemu-devel] [PATCH 1/2] vhost: enable any layout feature

2016-10-10 Thread Michael S. Tsirkin
On Mon, Oct 10, 2016 at 12:05:31PM +0800, Yuanhan Liu wrote: > On Fri, Sep 30, 2016 at 10:16:43PM +0300, Michael S. Tsirkin wrote: > > > > And the same is done is done in DPDK: > > > > > > > > static inline int __attribute__((always_inline)) > >

[dpdk-dev] [Qemu-devel] [PATCH 1/2] vhost: enable any layout feature

2016-10-10 Thread Michael S. Tsirkin
On Mon, Oct 10, 2016 at 11:37:44AM +0800, Yuanhan Liu wrote: > On Thu, Sep 29, 2016 at 11:21:48PM +0300, Michael S. Tsirkin wrote: > > On Thu, Sep 29, 2016 at 10:05:22PM +0200, Maxime Coquelin wrote: > > > > > > > > > On 09/29/2016 07:57 PM, Michael S. T

[dpdk-dev] [PATCH 1/2] vhost: enable any layout feature

2016-10-10 Thread Michael S. Tsirkin
On Mon, Oct 10, 2016 at 11:03:33AM +0800, Yuanhan Liu wrote: > On Mon, Oct 10, 2016 at 02:20:22AM +0300, Michael S. Tsirkin wrote: > > On Wed, Sep 28, 2016 at 10:28:48AM +0800, Yuanhan Liu wrote: > > > On Tue, Sep 27, 2016 at 10:56:40PM +0300, Michael S. Tsirkin wrote: > >

[dpdk-dev] [PATCH 1/2] vhost: enable any layout feature

2016-10-10 Thread Michael S. Tsirkin
On Wed, Sep 28, 2016 at 10:28:48AM +0800, Yuanhan Liu wrote: > On Tue, Sep 27, 2016 at 10:56:40PM +0300, Michael S. Tsirkin wrote: > > On Tue, Sep 27, 2016 at 11:11:58AM +0800, Yuanhan Liu wrote: > > > On Mon, Sep 26, 2016 at 10:24:55PM +0300, Michael S. Tsirkin wrote: > >

[dpdk-dev] [PATCH V2 2/2] virtio: support IOMMU platform

2016-10-07 Thread Michael S. Tsirkin
On Wed, Sep 28, 2016 at 04:25:12PM +0800, Jason Wang wrote: > Negotiate VIRTIO_F_IOMMU_PLATFORM to have IOMMU support. > > Signed-off-by: Jason Wang > --- > Changes from v1: > - remove unnecessary NEED_MAPPING flag One thing we probably should do is enable this flag with VFIO but not with UIO

[dpdk-dev] [PATCH 2/2] virtio: support IOMMU platform

2016-09-02 Thread Michael S. Tsirkin
On Fri, Sep 02, 2016 at 03:04:56PM +0200, Thomas Monjalon wrote: > 2016-09-02 14:37, Jason Wang: > > Virtio pmd doesn't support VFIO in the past since devices bypass IOMMU > > completely. But recently, the work of making virtio device work with > > IOMMU is near to complete. > > Good news! >

[dpdk-dev] [PATCH 4/6] vhost: workaround stale vring base

2016-06-14 Thread Michael S. Tsirkin
On Mon, May 09, 2016 at 11:22:04AM -0700, Yuanhan Liu wrote: > On Mon, May 09, 2016 at 04:25:38PM +, Xie, Huawei wrote: > > On 5/7/2016 2:36 PM, Yuanhan Liu wrote: > > > However, Michael claims some concerns: he made a good point: a crash > > > is happening means some memory is corrupted, and

[dpdk-dev] [PATCH 1/3] vhost: pre update used ring for Tx and Rx

2016-06-01 Thread Michael S. Tsirkin
the performance a bit. > > > > Pre update would be feasible as guest driver will not start processing > > those entries as far as we don't update "used->idx". (I'm not 100% > > certain I don't miss anything, though). > > > > Cc: Michael S. Tsirkin >

[dpdk-dev] [PATCH] virtio: use volatile to get used->idx in the loop

2016-05-25 Thread Michael S. Tsirkin
On Wed, May 25, 2016 at 10:47:30AM +0100, Bruce Richardson wrote: > On Wed, May 25, 2016 at 11:34:24AM +0300, Michael S. Tsirkin wrote: > > On Wed, May 25, 2016 at 08:25:20AM +, Xie, Huawei wrote: > > > On 5/25/2016 4:12 PM, Xie, Huawei wrote: > > > > There is no

[dpdk-dev] [PATCH] virtio: use volatile to get used->idx in the loop

2016-05-25 Thread Michael S. Tsirkin
On Wed, May 25, 2016 at 08:25:20AM +, Xie, Huawei wrote: > On 5/25/2016 4:12 PM, Xie, Huawei wrote: > > There is no external function call or any barrier in the loop, > > the used->idx would only be retrieved once. > > > > Signed-off-by: Huawei Xie > > --- > >

[dpdk-dev] [PATCH v4 6/8] virtio-user: add new virtual pci driver for virtio

2016-05-12 Thread Michael S. Tsirkin
On Thu, May 12, 2016 at 03:08:05PM +0800, Tan, Jianfeng wrote: > (2) It's more aligned to previous logic to hide the detail to differentiate > modern/legacy device. Why is there a need to support legacy interfaces at all? It's a container so if it's in use one can be reasonably sure you have a

[dpdk-dev] [PATCH 3/6] vhost: add reconnect ability

2016-05-10 Thread Michael S. Tsirkin
On Tue, May 10, 2016 at 09:00:45AM +, Xie, Huawei wrote: > On 5/10/2016 4:42 PM, Michael S. Tsirkin wrote: > > On Tue, May 10, 2016 at 08:07:00AM +, Xie, Huawei wrote: > >> On 5/10/2016 3:56 PM, Michael S. Tsirkin wrote: > >>> On Tue, May 10, 2016 at 07:24

[dpdk-dev] [PATCH 3/6] vhost: add reconnect ability

2016-05-10 Thread Michael S. Tsirkin
On Tue, May 10, 2016 at 08:07:00AM +, Xie, Huawei wrote: > On 5/10/2016 3:56 PM, Michael S. Tsirkin wrote: > > On Tue, May 10, 2016 at 07:24:10AM +, Xie, Huawei wrote: > >> On 5/10/2016 2:08 AM, Yuanhan Liu wrote: > >>> On Mon, May 09, 2016 at 04:47

[dpdk-dev] [PATCH 3/6] vhost: add reconnect ability

2016-05-10 Thread Michael S. Tsirkin
On Tue, May 10, 2016 at 07:24:10AM +, Xie, Huawei wrote: > On 5/10/2016 2:08 AM, Yuanhan Liu wrote: > > On Mon, May 09, 2016 at 04:47:02PM +, Xie, Huawei wrote: > >> On 5/7/2016 2:36 PM, Yuanhan Liu wrote: > >>> +static void * > >>> +vhost_user_client_reconnect(void *arg) > >>> +{ > >>> +

[dpdk-dev] [PATCH 2/6] vhost: add vhost-user client mode

2016-05-10 Thread Michael S. Tsirkin
On Mon, May 09, 2016 at 01:33:08PM -0700, Yuanhan Liu wrote: > On Mon, May 09, 2016 at 06:33:45AM -0400, Victor Kaplansky wrote: > > Adding a flag for a future extension seems fine to me. > > Could we manage without adding a flag? > > For example, could we always try a client mode for a while at

[dpdk-dev] [PATCH 4/6] vhost: workaround stale vring base

2016-05-09 Thread Michael S. Tsirkin
; virtio net completely, making it non-work any more, unless a driver reset > is done. > > So, instead of getting the stale vring base from QEMU, Huawei suggested > we could get a proper one from used->idx. > > Cc: "Michael S. Tsirkin" > Suggested-by: "Xie, Hua

[dpdk-dev] [RFC PATCH] avail idx update optimizations

2016-04-24 Thread Michael S. Tsirkin
On Sun, Apr 24, 2016 at 02:45:22AM +, Xie, Huawei wrote: > Forget to cc the mailing list. > > On 4/22/2016 9:53 PM, Xie, Huawei wrote: > > Hi: > > > > This is a series of virtio/vhost idx/ring update optimizations for cache > > to cache transfer. Actually I don't expect many of them as

[dpdk-dev] [PATCH v2 3/5] virtio/vdev: add embeded device emulation

2016-02-07 Thread Michael S. Tsirkin
On Fri, Feb 05, 2016 at 07:20:26PM +0800, Jianfeng Tan wrote: > diff --git a/drivers/net/virtio/vhost.h b/drivers/net/virtio/vhost.h > new file mode 100644 > index 000..73d4f5c > --- /dev/null > +++ b/drivers/net/virtio/vhost.h > @@ -0,0 +1,194 @@ > +/*- > + * BSD LICENSE > + * > + *

[dpdk-dev] virtio ring layout changes for optimal single-stream performance

2016-01-21 Thread Michael S. Tsirkin
On Thu, Jan 21, 2016 at 04:38:36PM +0100, Cornelia Huck wrote: > On Thu, 21 Jan 2016 15:39:26 +0200 > "Michael S. Tsirkin" wrote: > > > Hi all! > > I have been experimenting with alternative virtio ring layouts, > > in order to speed up single stream per

[dpdk-dev] virtio ring layout changes for optimal single-stream performance

2016-01-21 Thread Michael S. Tsirkin
Hi all! I have been experimenting with alternative virtio ring layouts, in order to speed up single stream performance. I have just posted a benchmark I wrote for the purpose, and a (partial) alternative layout implementation. This achieves 20-40% reduction in virtio overhead in the (default)

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

2015-12-02 Thread Michael S. Tsirkin
On Wed, Dec 02, 2015 at 06:58:03PM +0200, Panu Matilainen wrote: > On 12/02/2015 05:09 PM, Yuanhan Liu wrote: > >On Wed, Dec 02, 2015 at 04:48:14PM +0200, Panu Matilainen wrote: > >... > >diff --git a/lib/librte_vhost/rte_virtio_net.h > >b/lib/librte_vhost/rte_virtio_net.h > >index

[dpdk-dev] [PATCH] vfio: Include No-IOMMU mode

2015-12-02 Thread Michael S. Tsirkin
On Wed, Dec 02, 2015 at 05:19:18PM +0100, Thomas Monjalon wrote: > Hi, > > 2015-12-02 08:28, Alex Williamson: > > On Mon, 2015-11-16 at 19:12 +0200, Avi Kivity wrote: > > > On 11/16/2015 07:06 PM, Alex Williamson wrote: > > > > FYI, this is now in v4.4-rc1 (the slightly modified v2 version). I

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

2015-12-02 Thread Michael S. Tsirkin
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: > > > On Wed, Dec 02, 2015 at 11:43:12AM +0800, Yuanhan Liu wrote: > > > > Invoking

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

2015-11-17 Thread Michael S. Tsirkin
On Mon, Nov 16, 2015 at 02:20:57PM -0800, Flavio Leitner wrote: > On Wed, Oct 28, 2015 at 11:12:25PM +0200, Michael S. Tsirkin wrote: > > On Wed, Oct 28, 2015 at 06:30:41PM -0200, Flavio Leitner wrote: > > > On Sat, Oct 24, 2015 at 08:47:10PM +0300, Michael S. Tsirkin wrote: >

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

2015-11-09 Thread Michael S. Tsirkin
On Fri, Oct 30, 2015 at 06:48:09PM +0100, Thomas Monjalon wrote: > 2015-10-18 10:04, Michael S. Tsirkin: > > On Fri, Oct 16, 2015 at 02:52:30PM +0100, Bruce Richardson wrote: > > > On Thu, Oct 15, 2015 at 04:18:59PM +0300, Michael S. Tsirkin wrote: > > > > On Thu, Oc

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

2015-10-29 Thread Michael S. Tsirkin
On Wed, Oct 28, 2015 at 06:30:41PM -0200, Flavio Leitner wrote: > On Sat, Oct 24, 2015 at 08:47:10PM +0300, Michael S. Tsirkin wrote: > > On Sat, Oct 24, 2015 at 12:34:08AM -0200, Flavio Leitner wrote: > > > On Thu, Oct 22, 2015 at 02:32:31PM +0300, Michael S. Tsirkin wrote: >

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

2015-10-27 Thread Michael S. Tsirkin
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: > > > > Looking at tha

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

2015-10-27 Thread 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: > > On Tue, Oct 27, 2015 at 03:20:40PM +0900, Tetsuya Mukawa wrote: > > > On 2015/10/26 14:42, Yuanhan Liu wrote: > > > > On Mon, Oc

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

2015-10-27 Thread Michael S. Tsirkin
On Tue, Oct 27, 2015 at 03:20:40PM +0900, Tetsuya Mukawa wrote: > On 2015/10/26 14:42, Yuanhan Liu wrote: > > On Mon, Oct 26, 2015 at 02:24:08PM +0900, Tetsuya Mukawa wrote: > >> On 2015/10/22 21:35, Yuanhan Liu wrote: > > ... > >>> @@ -292,13 +300,13 @@ user_get_vring_base(struct vhost_device_ctx

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

2015-10-24 Thread Michael S. Tsirkin
On Sat, Oct 24, 2015 at 12:34:08AM -0200, Flavio Leitner wrote: > On Thu, Oct 22, 2015 at 02:32:31PM +0300, Michael S. Tsirkin wrote: > > On Thu, Oct 22, 2015 at 05:49:55PM +0800, Yuanhan Liu wrote: > > > On Wed, Oct 21, 2015 at 05:26:18PM +0300, Michael S. Tsirkin wrote: >

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

2015-10-22 Thread Michael S. Tsirkin
On Thu, Oct 22, 2015 at 10:07:10PM +0800, Yuanhan Liu wrote: > On Thu, Oct 22, 2015 at 02:32:31PM +0300, Michael S. Tsirkin wrote: > > On Thu, Oct 22, 2015 at 05:49:55PM +0800, Yuanhan Liu wrote: > > > On Wed, Oct 21, 2015 at 05:26:18PM +0300, Michael S. Tsirkin wrote: > >

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

2015-10-22 Thread Michael S. Tsirkin
On Thu, Oct 22, 2015 at 05:49:55PM +0800, Yuanhan Liu wrote: > On Wed, Oct 21, 2015 at 05:26:18PM +0300, Michael S. Tsirkin wrote: > > On Wed, Oct 21, 2015 at 08:48:15PM +0800, Yuanhan Liu wrote: > > > > Please note that for virtio devices, guest is supposed to > >

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

2015-10-21 Thread Michael S. Tsirkin
On Wed, Oct 21, 2015 at 11:48:10AM +0800, Yuanhan Liu wrote: > From: Changchun Ouyang > > Do not use VIRTIO_RXQ or VIRTIO_TXQ anymore; use the queue_id > instead, which will be set to a proper value for a specific queue > when we have multiple queue support enabled. > > For now, queue_id is

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

2015-10-18 Thread Michael S. Tsirkin
On Fri, Oct 16, 2015 at 02:52:30PM +0100, Bruce Richardson wrote: > On Thu, Oct 15, 2015 at 04:18:59PM +0300, Michael S. Tsirkin wrote: > > On Thu, Oct 15, 2015 at 02:08:39PM +0300, Marcel Apfelbaum wrote: > > > Make vhost-user virtio 1.0 compatible by adding it to the > &

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

2015-10-16 Thread Michael S. Tsirkin
On Fri, Oct 16, 2015 at 09:43:09AM +0200, Andriy Berestovskyy wrote: > Hi guys, > Just a minor note: ARM is bi-endian in fact. For instance, there are > both endians tool chains available on Linaro. > > Andriy Yea. BE support is around for legacy stuff. So I'm not sure it's all that important

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

2015-10-16 Thread Michael S. Tsirkin
On Fri, Oct 16, 2015 at 10:24:38AM +0800, Yuanhan Liu wrote: > On Thu, Oct 15, 2015 at 04:18:59PM +0300, Michael S. Tsirkin wrote: > > On Thu, Oct 15, 2015 at 02:08:39PM +0300, Marcel Apfelbaum wrote: > > > Make vhost-user virtio 1.0 compatible by adding it to the > &

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

2015-10-15 Thread Michael S. Tsirkin
On Thu, Oct 15, 2015 at 02:08:39PM +0300, Marcel Apfelbaum wrote: > Make vhost-user virtio 1.0 compatible by adding it to the > supported features and keeping the header length > the same as for mergeable RX buffers. > > Signed-off-by: Marcel Apfelbaum Looks good to me Acke

[dpdk-dev] [PATCH 2/2] uio: new driver to support PCI MSI-X

2015-10-06 Thread Michael S. Tsirkin
On Tue, Oct 06, 2015 at 05:49:21PM +0300, Vlad Zolotarov wrote: > >and read/write the config space. > >This means that a single userspace bug is enough to corrupt kernel > >memory. > > Could u, pls., provide and example of this simple bug? Because it's > absolutely not obvious... Stick a value

[dpdk-dev] [PATCH 2/2] uio: new driver to support PCI MSI-X

2015-10-06 Thread Michael S. Tsirkin
On Tue, Oct 06, 2015 at 03:15:57PM +0300, Avi Kivity wrote: > btw, (2) doesn't really add any insecurity. The user could already poke at > the msix tables (as well as perform DMA); they just couldn't get a useful > interrupt out of them. Poking at msix tables won't cause memory corruption unless

[dpdk-dev] [PATCH 2/2] uio: new driver to support PCI MSI-X

2015-10-06 Thread Michael S. Tsirkin
On Tue, Oct 06, 2015 at 11:23:11AM +0300, Vlad Zolotarov wrote: > Michael, how this or any other related patch is related to the problem u r > describing? > The above ability is there for years and if memory serves me > well it was u who wrote uio_pci_generic with this "security flaw". ;) I

[dpdk-dev] [PATCH 2/2] uio: new driver to support PCI MSI-X

2015-10-06 Thread Michael S. Tsirkin
On Tue, Oct 06, 2015 at 08:33:56AM +0100, Stephen Hemminger wrote: > Other than implementation objections, so far the two main arguments > against this reduce to: > 1. If you allow UIO ioctl then it opens an API hook for all the crap out > of tree UIO drivers to do what they want. > 2. If

[dpdk-dev] [PATCH 2/2] uio: new driver to support PCI MSI-X

2015-10-06 Thread Michael S. Tsirkin
On Tue, Oct 06, 2015 at 01:09:55AM +0300, Vladislav Zolotarov wrote: > How about instead of trying to invent the wheel just go and attack the problem > directly just like i've proposed already a few times in the last days: instead > of limiting the UIO limit the users that are allowed to use UIO

[dpdk-dev] [PATCH 2/2] uio: new driver to support PCI MSI-X

2015-10-06 Thread Michael S. Tsirkin
On Thu, Oct 01, 2015 at 11:33:06AM +0300, Michael S. Tsirkin wrote: > Just forwarding events is not enough to make a valid driver. > What is missing is a way to access the device in a safe way. Thinking about it some more, maybe some devices don't do DMA, and merely signal events with MSI

[dpdk-dev] Unlinking hugepage backing file after initialiation

2015-10-06 Thread Michael S. Tsirkin
On Mon, Oct 05, 2015 at 01:08:52PM +, Xie, Huawei wrote: > 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 sho

[dpdk-dev] Having troubles binding an SR-IOV VF to uio_pci_generic on Amazon instance

2015-10-04 Thread Michael S. Tsirkin
On Fri, Oct 02, 2015 at 03:07:24PM +0100, Bruce Richardson wrote: > On Fri, Oct 02, 2015 at 05:00:14PM +0300, Michael S. Tsirkin wrote: > > On Thu, Oct 01, 2015 at 02:02:24PM -0700, Alexander Duyck wrote: > > > validation and translation would add 10s if not 100s of nanoseconds

[dpdk-dev] Having troubles binding an SR-IOV VF to uio_pci_generic on Amazon instance

2015-10-02 Thread Michael S. Tsirkin
On Thu, Oct 01, 2015 at 02:02:24PM -0700, Alexander Duyck wrote: > validation and translation would add 10s if not 100s of nanoseconds to the > time needed to process each packet. In addition we are talking about doing > this in kernel space which means we wouldn't really be able to take >

[dpdk-dev] Having troubles binding an SR-IOV VF to uio_pci_generic on Amazon instance

2015-10-02 Thread Michael S. Tsirkin
On Thu, Oct 01, 2015 at 02:17:49PM -0700, Alexander Duyck wrote: > On 10/01/2015 02:42 AM, Michael S. Tsirkin wrote: > >On Thu, Oct 01, 2015 at 12:22:46PM +0300, Avi Kivity wrote: > >>even when they are some users > >>prefer to avoid the performance penalty. > >I

[dpdk-dev] [PATCH 2/2] uio: new driver to support PCI MSI-X

2015-10-01 Thread Michael S. Tsirkin
On Thu, Oct 01, 2015 at 10:26:19AM -0700, Stephen Hemminger wrote: > On Thu, 1 Oct 2015 19:31:08 +0300 > "Michael S. Tsirkin" wrote: > > > On Thu, Oct 01, 2015 at 11:33:06AM +0300, Michael S. Tsirkin wrote: > > > On Wed, Sep 30, 2015 at 03:28:5

[dpdk-dev] [PATCH 2/2] uio: new driver to support PCI MSI-X

2015-10-01 Thread Michael S. Tsirkin
On Thu, Oct 01, 2015 at 11:33:06AM +0300, Michael S. Tsirkin wrote: > On Wed, Sep 30, 2015 at 03:28:58PM -0700, Stephen Hemminger wrote: > > This driver allows using PCI device with Message Signalled Interrupt > > from userspace. The API is similar to the igb_uio driver used by th

[dpdk-dev] [PATCH 2/2] uio: new driver to support PCI MSI-X

2015-10-01 Thread Michael S. Tsirkin
On Thu, Oct 01, 2015 at 01:37:12PM +0300, Michael S. Tsirkin wrote: > On Thu, Oct 01, 2015 at 11:33:06AM +0300, Michael S. Tsirkin wrote: > > On Wed, Sep 30, 2015 at 03:28:58PM -0700, Stephen Hemminger wrote: > > > This driver allows using PCI device with Message Signalled In

[dpdk-dev] Having troubles binding an SR-IOV VF to uio_pci_generic on Amazon instance

2015-10-01 Thread Michael S. Tsirkin
On Thu, Oct 01, 2015 at 04:14:33PM +0300, Michael S. Tsirkin wrote: > On Thu, Oct 01, 2015 at 01:07:13PM +0100, Bruce Richardson wrote: > > > > This in itself is going to use up > > > > a good proportion of the processing time, as well as that we have to > >

[dpdk-dev] Having troubles binding an SR-IOV VF to uio_pci_generic on Amazon instance

2015-10-01 Thread Michael S. Tsirkin
On Thu, Oct 01, 2015 at 11:42:23AM +0200, Vincent JARDIN wrote: > There were some tentative to get it for other (older) drivers, named > 'bifurcated drivers', but it is stalled. That approach also has the advantage that userspace bugs can't do silly things like reprogram device's EEPROM by

[dpdk-dev] Having troubles binding an SR-IOV VF to uio_pci_generic on Amazon instance

2015-10-01 Thread Michael S. Tsirkin
On Thu, Oct 01, 2015 at 07:55:20AM -0700, Stephen Hemminger wrote: > On Thu, 1 Oct 2015 13:14:08 +0300 > "Michael S. Tsirkin" wrote: > > > On Thu, Oct 01, 2015 at 12:43:53PM +0300, Avi Kivity wrote: > > > >There were some tentative to get it for other (old

[dpdk-dev] Having troubles binding an SR-IOV VF to uio_pci_generic on Amazon instance

2015-10-01 Thread Michael S. Tsirkin
On Thu, Oct 01, 2015 at 08:01:00AM -0700, Stephen Hemminger wrote: > The per-driver ring method is what netmap did. IIUC netmap has a standard format for descriptors, so was slower: it still had to do all networking in kernel (it only bypasses part of the networking stack), and to have a thread

[dpdk-dev] Having troubles binding an SR-IOV VF to uio_pci_generic on Amazon instance

2015-10-01 Thread Michael S. Tsirkin
On Thu, Oct 01, 2015 at 06:19:33PM +0300, Avi Kivity wrote: > On 10/01/2015 06:11 PM, Michael S. Tsirkin wrote: > >On Thu, Oct 01, 2015 at 02:32:19PM +0300, Avi Kivity wrote: > >>> We already agreed this kernel > >>>is going to be tainted, and unsupportable.

[dpdk-dev] [PATCH 2/2] uio: new driver to support PCI MSI-X

2015-10-01 Thread Michael S. Tsirkin
On Thu, Oct 01, 2015 at 07:50:37AM -0700, Stephen Hemminger wrote: > On Thu, 1 Oct 2015 11:33:06 +0300 > "Michael S. Tsirkin" wrote: > > > On Wed, Sep 30, 2015 at 03:28:58PM -0700, Stephen Hemminger wrote: > > > This driver allows using PCI device with Mess

[dpdk-dev] Having troubles binding an SR-IOV VF to uio_pci_generic on Amazon instance

2015-10-01 Thread Michael S. Tsirkin
On Thu, Oct 01, 2015 at 02:32:19PM +0300, Avi Kivity wrote: > > We already agreed this kernel > >is going to be tainted, and unsupportable. > > Yes. So your only motivation in rejecting the patch is to get the author to > write the ring translation patch and port it to all relevant drivers >

[dpdk-dev] Having troubles binding an SR-IOV VF to uio_pci_generic on Amazon instance

2015-10-01 Thread Michael S. Tsirkin
On Thu, Oct 01, 2015 at 01:07:13PM +0100, Bruce Richardson wrote: > > > This in itself is going to use up > > > a good proportion of the processing time, as well as that we have to > > > spend cycles > > > copying the descriptors from one ring in memory to another. Given that > > > right now > >

[dpdk-dev] Having troubles binding an SR-IOV VF to uio_pci_generic on Amazon instance

2015-10-01 Thread Michael S. Tsirkin
On Thu, Oct 01, 2015 at 02:20:37PM +0300, Avi Kivity wrote: > > > On 10/01/2015 02:09 PM, Michael S. Tsirkin wrote: > >On Thu, Oct 01, 2015 at 01:50:10PM +0300, Avi Kivity wrote: > >>>>It's not just the lack of system calls, of course, the architecture

[dpdk-dev] Having troubles binding an SR-IOV VF to uio_pci_generic on Amazon instance

2015-10-01 Thread Michael S. Tsirkin
On Thu, Oct 01, 2015 at 02:20:37PM +0300, Avi Kivity wrote: > People will just use out of tree drivers (dpdk has several already). It's a > pain, but nowhere near what you are proposing. What's the issue with that? We already agreed this kernel is going to be tainted, and unsupportable.

[dpdk-dev] Having troubles binding an SR-IOV VF to uio_pci_generic on Amazon instance

2015-10-01 Thread Michael S. Tsirkin
On Thu, Oct 01, 2015 at 12:08:07PM +0100, Bruce Richardson wrote: > On Thu, Oct 01, 2015 at 01:38:37PM +0300, Michael S. Tsirkin wrote: > > On Thu, Oct 01, 2015 at 12:59:47PM +0300, Avi Kivity wrote: > > > > > > > > > On 10/01/2015 12:55 PM, Michael S. Tsirki

[dpdk-dev] Having troubles binding an SR-IOV VF to uio_pci_generic on Amazon instance

2015-10-01 Thread Michael S. Tsirkin
On Thu, Oct 01, 2015 at 01:50:10PM +0300, Avi Kivity wrote: > > > >>It's not just the lack of system calls, of course, the architecture is > >>completely different. > >Absolutely - I'm not saying move all of DPDK into kernel. > >We just need to protect the RX rings so hardware does > >not corrupt

[dpdk-dev] Having troubles binding an SR-IOV VF to uio_pci_generic on Amazon instance

2015-10-01 Thread Michael S. Tsirkin
On Thu, Oct 01, 2015 at 01:25:17PM +0300, Avi Kivity wrote: > Why use a VF on a non-virtualized system? 1. So a userspace bug does not destroy your hardware (PFs generally assume trusted non-buggy drivers, VFs generally don't). 2. So you can use a PF or another VF for regular networking.

[dpdk-dev] Having troubles binding an SR-IOV VF to uio_pci_generic on Amazon instance

2015-10-01 Thread Michael S. Tsirkin
On Thu, Oct 01, 2015 at 12:59:47PM +0300, Avi Kivity wrote: > > > On 10/01/2015 12:55 PM, Michael S. Tsirkin wrote: > >On Thu, Oct 01, 2015 at 12:22:46PM +0300, Avi Kivity wrote: > >>It's easy to claim that > >>a solution is around the corner, only no one was lo

[dpdk-dev] [PATCH 2/2] uio: new driver to support PCI MSI-X

2015-10-01 Thread Michael S. Tsirkin
On Thu, Oct 01, 2015 at 11:33:06AM +0300, Michael S. Tsirkin wrote: > On Wed, Sep 30, 2015 at 03:28:58PM -0700, Stephen Hemminger wrote: > > This driver allows using PCI device with Message Signalled Interrupt > > from userspace. The API is similar to the igb_uio driver used by th

[dpdk-dev] Having troubles binding an SR-IOV VF to uio_pci_generic on Amazon instance

2015-10-01 Thread Michael S. Tsirkin
On Thu, Oct 01, 2015 at 12:53:14PM +0300, Avi Kivity wrote: > Non-virtualized setups have an iommu available, but they can also use > pci_uio_generic without patching if they like. Not with VFs, they can't. -- MST

[dpdk-dev] Having troubles binding an SR-IOV VF to uio_pci_generic on Amazon instance

2015-10-01 Thread Michael S. Tsirkin
On Thu, Oct 01, 2015 at 12:43:53PM +0300, Avi Kivity wrote: > >There were some tentative to get it for other (older) drivers, named > >'bifurcated drivers', but it is stalled. > > IIRC they still exposed the ring to userspace. How much would a ring write syscall cost? 1-2 microseconds, isn't it?

[dpdk-dev] Having troubles binding an SR-IOV VF to uio_pci_generic on Amazon instance

2015-10-01 Thread Michael S. Tsirkin
On Thu, Oct 01, 2015 at 12:38:51PM +0300, Avi Kivity wrote: > The sad thing is that you can do this since forever on a non-virtualized > system, or on a virtualized system if you don't need interrupt support. All > you're doing is blocking interrupt support on virtualized systems. True, Linux

[dpdk-dev] Having troubles binding an SR-IOV VF to uio_pci_generic on Amazon instance

2015-10-01 Thread Michael S. Tsirkin
On Thu, Oct 01, 2015 at 12:22:46PM +0300, Avi Kivity wrote: > It's easy to claim that > a solution is around the corner, only no one was looking for it, but the > reality is that kernel bypass has been a solution for years for high > performance users, I never said that it's trivial. It's

[dpdk-dev] Having troubles binding an SR-IOV VF to uio_pci_generic on Amazon instance

2015-10-01 Thread Michael S. Tsirkin
On Thu, Oct 01, 2015 at 12:22:46PM +0300, Avi Kivity wrote: > even when they are some users > prefer to avoid the performance penalty. I don't think there's a measureable penalty from passing through the IOMMU, as long as mappings are mostly static (i.e. iommu=pt). I sure never saw any numbers

[dpdk-dev] Having troubles binding an SR-IOV VF to uio_pci_generic on Amazon instance

2015-10-01 Thread Michael S. Tsirkin
On Thu, Oct 01, 2015 at 12:15:49PM +0300, Avi Kivity wrote: > What userspace can't be allowed to do: > > access BAR > write rings > > > > > It can access the BAR by mmap()ing the resourceN files under sysfs.? You're > not > denying userspace the ability to oops

[dpdk-dev] Having troubles binding an SR-IOV VF to uio_pci_generic on Amazon instance

2015-10-01 Thread Michael S. Tsirkin
On Thu, Oct 01, 2015 at 11:44:28AM +0300, Michael S. Tsirkin wrote: > On Wed, Sep 30, 2015 at 11:40:16PM +0300, Michael S. Tsirkin wrote: > > > And for what, to prevent > > > root from touching memory via dma that they can access in a million other > > > ways? >

[dpdk-dev] Having troubles binding an SR-IOV VF to uio_pci_generic on Amazon instance

2015-10-01 Thread Michael S. Tsirkin
On Thu, Oct 01, 2015 at 11:52:26AM +0300, Avi Kivity wrote: > I still don't understand your objection to the patch: > > > MSI messages are memory writes so any generic device capable > of MSI is capable of corrupting kernel memory. > This means that a bug in userspace will lead to

[dpdk-dev] Having troubles binding an SR-IOV VF to uio_pci_generic on Amazon instance

2015-10-01 Thread Michael S. Tsirkin
On Wed, Sep 30, 2015 at 11:40:16PM +0300, Michael S. Tsirkin wrote: > > And for what, to prevent > > root from touching memory via dma that they can access in a million other > > ways? > > So one can be reasonably sure a kernel oops is not a result of a > userspace bug.

[dpdk-dev] [PATCH 0/2] uio_msi: device driver

2015-10-01 Thread Michael S. Tsirkin
On Wed, Sep 30, 2015 at 03:28:56PM -0700, Stephen Hemminger wrote: > This is a new UIO device driver to allow supporting MSI-X and MSI devices > in userspace. It has been used in environments like VMware and older versions > of QEMU/KVM where no IOMMU support is available. > > Stephen Hemminger

[dpdk-dev] [PATCH 2/2] uio: new driver to support PCI MSI-X

2015-10-01 Thread Michael S. Tsirkin
On Wed, Sep 30, 2015 at 03:28:58PM -0700, Stephen Hemminger wrote: > This driver allows using PCI device with Message Signalled Interrupt > from userspace. The API is similar to the igb_uio driver used by the DPDK. > Via ioctl it provides a mechanism to map MSI-X interrupts into event > file

[dpdk-dev] Having troubles binding an SR-IOV VF to uio_pci_generic on Amazon instance

2015-10-01 Thread Michael S. Tsirkin
On Wed, Sep 30, 2015 at 02:36:48PM -0700, Stephen Hemminger wrote: > On Wed, 30 Sep 2015 23:09:33 +0300 > Vlad Zolotarov wrote: > > > > > > > On 09/30/15 22:39, Michael S. Tsirkin wrote: > > > On Wed, Sep 30, 2015 at 10:06:52PM +0300, Vlad Zolot

[dpdk-dev] Having troubles binding an SR-IOV VF to uio_pci_generic on Amazon instance

2015-10-01 Thread Michael S. Tsirkin
On Wed, Sep 30, 2015 at 06:36:17PM +0300, Avi Kivity wrote: > As it happens, you're removing the functionality from the users who have no > other option. They can't use vfio because it doesn't work on virtualized > setups. ... > Root can already do anything. I think there's a contradiction

[dpdk-dev] Having troubles binding an SR-IOV VF to uio_pci_generic on Amazon instance

2015-10-01 Thread Michael S. Tsirkin
On Wed, Sep 30, 2015 at 11:00:49PM +0300, Gleb Natapov wrote: > > You are increasing interrupt latency by a huge factor by channeling > > interrupts through a scheduler. Let user install an > > interrupt handler function, and be done with it. > > > Interrupt latency is not always hugely

[dpdk-dev] Having troubles binding an SR-IOV VF to uio_pci_generic on Amazon instance

2015-09-30 Thread Michael S. Tsirkin
On Wed, Sep 30, 2015 at 10:06:52PM +0300, Vlad Zolotarov wrote: > >>How would iommu > >>virtualization change anything? > >Kernel can use an iommu to limit device access to memory of > >the controlling application. > > Ok, this is obvious but what it has to do with enabling using MSI/MSI-X >

[dpdk-dev] Having troubles binding an SR-IOV VF to uio_pci_generic on Amazon instance

2015-09-30 Thread Michael S. Tsirkin
On Wed, Sep 30, 2015 at 09:15:56PM +0300, Vlad Zolotarov wrote: > > > On 09/30/15 18:26, Michael S. Tsirkin wrote: > >On Wed, Sep 30, 2015 at 03:50:09PM +0300, Vlad Zolotarov wrote: > >>How not virtualizing iommu forces "all or nothing" approach? > >Looks

[dpdk-dev] Having troubles binding an SR-IOV VF to uio_pci_generic on Amazon instance

2015-09-30 Thread Michael S. Tsirkin
On Wed, Sep 30, 2015 at 10:43:04AM -0700, Stephen Hemminger wrote: > On Wed, 30 Sep 2015 20:39:43 +0300 > "Michael S. Tsirkin" wrote: > > > On Wed, Sep 30, 2015 at 10:28:07AM -0700, Stephen Hemminger wrote: > > > On Wed, 30 Sep 2015 13:37:22

[dpdk-dev] Having troubles binding an SR-IOV VF to uio_pci_generic on Amazon instance

2015-09-30 Thread Michael S. Tsirkin
On Wed, Sep 30, 2015 at 10:28:07AM -0700, Stephen Hemminger wrote: > On Wed, 30 Sep 2015 13:37:22 +0300 > Vlad Zolotarov wrote: > > > > > > > On 09/30/15 00:49, Michael S. Tsirkin wrote: > > > On Tue, Sep 29, 2015 at 02:46:16PM -0700, Stephen Hemminger wro

[dpdk-dev] Having troubles binding an SR-IOV VF to uio_pci_generic on Amazon instance

2015-09-30 Thread Michael S. Tsirkin
On Wed, Sep 30, 2015 at 03:50:09PM +0300, Vlad Zolotarov wrote: > How not virtualizing iommu forces "all or nothing" approach? Looks like you can't limit an assigned device to only access part of guest memory that belongs to a given process. Either let it access all of guest memory ("all") or

[dpdk-dev] Having troubles binding an SR-IOV VF to uio_pci_generic on Amazon instance

2015-09-30 Thread Michael S. Tsirkin
On Wed, Sep 30, 2015 at 05:53:54PM +0300, Avi Kivity wrote: > On 09/30/2015 05:39 PM, Michael S. Tsirkin wrote: > >On Wed, Sep 30, 2015 at 04:05:40PM +0300, Avi Kivity wrote: > >> > >>On 09/30/2015 03:27 PM, Michael S. Tsirkin wrote: > >>>On Wed, Sep 30, 2

[dpdk-dev] Having troubles binding an SR-IOV VF to uio_pci_generic on Amazon instance

2015-09-30 Thread Michael S. Tsirkin
On Wed, Sep 30, 2015 at 04:05:40PM +0300, Avi Kivity wrote: > > > On 09/30/2015 03:27 PM, Michael S. Tsirkin wrote: > >On Wed, Sep 30, 2015 at 03:16:04PM +0300, Vlad Zolotarov wrote: > >> > >>On 09/30/15 15:03, Michael S. Tsirkin wrote: > >>>O

[dpdk-dev] Having troubles binding an SR-IOV VF to uio_pci_generic on Amazon instance

2015-09-30 Thread Michael S. Tsirkin
On Wed, Sep 30, 2015 at 03:16:04PM +0300, Vlad Zolotarov wrote: > > > On 09/30/15 15:03, Michael S. Tsirkin wrote: > >On Wed, Sep 30, 2015 at 02:53:19PM +0300, Vlad Zolotarov wrote: > >> > >>On 09/30/15 14:41, Michael S. Tsirkin wrote: > >>>O

[dpdk-dev] Having troubles binding an SR-IOV VF to uio_pci_generic on Amazon instance

2015-09-30 Thread Michael S. Tsirkin
On Wed, Sep 30, 2015 at 02:53:19PM +0300, Vlad Zolotarov wrote: > > > On 09/30/15 14:41, Michael S. Tsirkin wrote: > >On Wed, Sep 30, 2015 at 02:26:01PM +0300, Vlad Zolotarov wrote: > >>The whole idea is to bypass kernel. Especially for networking... > >... on dumb

[dpdk-dev] Having troubles binding an SR-IOV VF to uio_pci_generic on Amazon instance

2015-09-30 Thread Michael S. Tsirkin
On Wed, Sep 30, 2015 at 02:26:01PM +0300, Vlad Zolotarov wrote: > The whole idea is to bypass kernel. Especially for networking... ... on dumb hardware that doesn't support doing that securely. Colour me unimpressed. -- MST

[dpdk-dev] Having troubles binding an SR-IOV VF to uio_pci_generic on Amazon instance

2015-09-30 Thread Michael S. Tsirkin
On Wed, Sep 30, 2015 at 01:37:22PM +0300, Vlad Zolotarov wrote: > > > On 09/30/15 00:49, Michael S. Tsirkin wrote: > >On Tue, Sep 29, 2015 at 02:46:16PM -0700, Stephen Hemminger wrote: > >>On Tue, 29 Sep 2015 23:54:54 +0300 > >>"Michael S. Tsirkin" wro

[dpdk-dev] Having troubles binding an SR-IOV VF to uio_pci_generic on Amazon instance

2015-09-30 Thread Michael S. Tsirkin
On Tue, Sep 29, 2015 at 02:46:16PM -0700, Stephen Hemminger wrote: > On Tue, 29 Sep 2015 23:54:54 +0300 > "Michael S. Tsirkin" wrote: > > > On Tue, Sep 29, 2015 at 07:41:09PM +0300, Vlad Zolotarov wrote: > > > The security breach motivation u brought in "

[dpdk-dev] Unlinking hugepage backing file after initialiation

2015-09-30 Thread Michael S. Tsirkin
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. -- MST

[dpdk-dev] Having troubles binding an SR-IOV VF to uio_pci_generic on Amazon instance

2015-09-30 Thread Michael S. Tsirkin
On Tue, Sep 29, 2015 at 07:41:09PM +0300, Vlad Zolotarov wrote: > The security breach motivation u brought in "[RFC PATCH] uio: > uio_pci_generic: Add support for MSI interrupts" thread seems a bit weak > since one u let the userland access to the bar it may do any funny thing > using the DMA

[dpdk-dev] Unlinking hugepage backing file after initialiation

2015-09-29 Thread Michael S. Tsirkin
On Tue, Sep 29, 2015 at 03:48:08PM +, shesha Sreenivasamurthy (shesha) wrote: > If huge pages are allocated for the guest and if the guest crashes there may > be > a chance that the new guest may not be able to get huge pages again as some > other guest or process on the host used it. But I

  1   2   >