[virtio-dev] RE: [PATCH] pci-iov: Add support for unmanaged SR-IOV

2018-03-02 Thread Tian, Kevin
> From: Alex Williamson [mailto:alex.william...@redhat.com] > Sent: Saturday, March 3, 2018 2:14 AM > > On Fri, 2 Mar 2018 06:54:17 + > "Tian, Kevin" wrote: > > > > From: Alex Williamson > > > Sent: Friday, March 2, 2018 4:22 AM > > > > > > > > I am pretty sure that you are describing is tru

[virtio-dev] Re: [PATCH 1/3] pci-iov: Add support for unmanaged SR-IOV

2018-03-02 Thread Alexander Duyck
On Fri, Mar 2, 2018 at 3:59 PM, Alex Williamson wrote: > On Fri, 02 Mar 2018 15:44:25 -0800 > Alexander Duyck wrote: > >> From: Alexander Duyck >> >> This patch is meant to add some basic functionality to support for SR-IOV >> on devices when the VFs are not managed by the kernel. The functions

Re: [virtio-dev] Re: [PATCH v4 2/2] virtio_net: Extend virtio to use VF datapath when available

2018-03-02 Thread Siwei Liu
On Fri, Mar 2, 2018 at 3:12 PM, Samudrala, Sridhar wrote: > On 3/2/2018 1:11 PM, Siwei Liu wrote: >> >> On Thu, Mar 1, 2018 at 12:08 PM, Sridhar Samudrala >> wrote: >>> >>> This patch enables virtio_net to switch over to a VF datapath when a VF >>> netdev is present with the same MAC address. It

[virtio-dev] Re: [PATCH v4 2/2] virtio_net: Extend virtio to use VF datapath when available

2018-03-02 Thread Siwei Liu
On Fri, Mar 2, 2018 at 1:36 PM, Michael S. Tsirkin wrote: > On Fri, Mar 02, 2018 at 01:11:56PM -0800, Siwei Liu wrote: >> On Thu, Mar 1, 2018 at 12:08 PM, Sridhar Samudrala >> wrote: >> > This patch enables virtio_net to switch over to a VF datapath when a VF >> > netdev is present with the same

[virtio-dev] [PATCH 3/3] virtio_pci: Add support for unmanaged SR-IOV on virtio_pci devices

2018-03-02 Thread Alexander Duyck
From: Alexander Duyck Hardware-realized virtio_pci devices can implement SR-IOV, so this patch enables its use. The device in question is an upcoming Intel NIC that implements both a virtio_net PF and virtio_net VFs. These are hardware realizations of what has been up to now been a software inter

[virtio-dev] [PATCH 2/3] vfio: Add support for unmanaged or userspace managed SR-IOV

2018-03-02 Thread Alexander Duyck
From: Alexander Duyck This patch is meant to allow assignment of an SR-IOV enabled PF, as in VFs have been generated, with vfio-pci. My understanding is the primary use case for this is something like DPDK running the PF while the VFs are all assigned to guests. A secondary effect of this is tha

[virtio-dev] [PATCH 0/3] pci-iov: Add support for unmanaged SR-IOV

2018-03-02 Thread Alexander Duyck
This series is meant to add support for SR-IOV on devices when the VFs are not managed by the kernel. Examples of recent patches attempting to do this include: virto - https://patchwork.kernel.org/patch/10241225/ pci-stub - https://patchwork.kernel.org/patch/10109935/ vfio - https://patchwork.kerne

[virtio-dev] [PATCH 1/3] pci-iov: Add support for unmanaged SR-IOV

2018-03-02 Thread Alexander Duyck
From: Alexander Duyck This patch is meant to add some basic functionality to support for SR-IOV on devices when the VFs are not managed by the kernel. The functions provided here can be used by drivers such as vfio-pci and virtio to enable SR-IOV on devices that are either managed by userspace, o

Re: [virtio-dev] Re: [PATCH v4 2/2] virtio_net: Extend virtio to use VF datapath when available

2018-03-02 Thread Samudrala, Sridhar
On 3/2/2018 1:11 PM, Siwei Liu wrote: On Thu, Mar 1, 2018 at 12:08 PM, Sridhar Samudrala wrote: This patch enables virtio_net to switch over to a VF datapath when a VF netdev is present with the same MAC address. It allows live migration of a VM with a direct attached VF without the need to set

Re: [virtio-dev] Re: [PATCH v4 2/2] virtio_net: Extend virtio to use VF datapath when available

2018-03-02 Thread Siwei Liu
On Fri, Mar 2, 2018 at 1:31 PM, Michael S. Tsirkin wrote: > On Fri, Mar 02, 2018 at 12:44:56PM -0800, Siwei Liu wrote: >> On Fri, Mar 2, 2018 at 12:10 PM, Michael S. Tsirkin wrote: >> > On Fri, Mar 02, 2018 at 11:52:27AM -0800, Samudrala, Sridhar wrote: >> >> >> >> >> >> On 3/2/2018 11:41 AM, Mic

[virtio-dev] Re: [PATCH v4 2/2] virtio_net: Extend virtio to use VF datapath when available

2018-03-02 Thread Michael S. Tsirkin
On Fri, Mar 02, 2018 at 01:11:56PM -0800, Siwei Liu wrote: > On Thu, Mar 1, 2018 at 12:08 PM, Sridhar Samudrala > wrote: > > This patch enables virtio_net to switch over to a VF datapath when a VF > > netdev is present with the same MAC address. It allows live migration > > of a VM with a direct a

Re: [virtio-dev] Re: [PATCH v4 2/2] virtio_net: Extend virtio to use VF datapath when available

2018-03-02 Thread Michael S. Tsirkin
On Fri, Mar 02, 2018 at 12:56:21PM -0800, Samudrala, Sridhar wrote: > > > On 3/2/2018 12:44 PM, Siwei Liu wrote: > > On Fri, Mar 2, 2018 at 12:10 PM, Michael S. Tsirkin wrote: > > > On Fri, Mar 02, 2018 at 11:52:27AM -0800, Samudrala, Sridhar wrote: > > > > > > > > On 3/2/2018 11:41 AM, Michael

Re: [virtio-dev] Re: [PATCH v4 2/2] virtio_net: Extend virtio to use VF datapath when available

2018-03-02 Thread Michael S. Tsirkin
On Fri, Mar 02, 2018 at 12:44:56PM -0800, Siwei Liu wrote: > On Fri, Mar 2, 2018 at 12:10 PM, Michael S. Tsirkin wrote: > > On Fri, Mar 02, 2018 at 11:52:27AM -0800, Samudrala, Sridhar wrote: > >> > >> > >> On 3/2/2018 11:41 AM, Michael S. Tsirkin wrote: > >> > On Fri, Mar 02, 2018 at 07:26:25AM -

[virtio-dev] Re: [PATCH v4 2/2] virtio_net: Extend virtio to use VF datapath when available

2018-03-02 Thread Siwei Liu
On Thu, Mar 1, 2018 at 12:08 PM, Sridhar Samudrala wrote: > This patch enables virtio_net to switch over to a VF datapath when a VF > netdev is present with the same MAC address. It allows live migration > of a VM with a direct attached VF without the need to setup a bond/team > between a VF and v

Re: [virtio-dev] Re: [PATCH v4 2/2] virtio_net: Extend virtio to use VF datapath when available

2018-03-02 Thread Samudrala, Sridhar
On 3/2/2018 12:44 PM, Siwei Liu wrote: On Fri, Mar 2, 2018 at 12:10 PM, Michael S. Tsirkin wrote: On Fri, Mar 02, 2018 at 11:52:27AM -0800, Samudrala, Sridhar wrote: On 3/2/2018 11:41 AM, Michael S. Tsirkin wrote: On Fri, Mar 02, 2018 at 07:26:25AM -0800, Alexander Duyck wrote: The design

Re: [virtio-dev] Re: [PATCH v4 2/2] virtio_net: Extend virtio to use VF datapath when available

2018-03-02 Thread Siwei Liu
On Fri, Mar 2, 2018 at 11:42 AM, Michael S. Tsirkin wrote: > On Fri, Mar 02, 2018 at 05:20:17PM +0100, Jiri Pirko wrote: >> >Yeah, this code essentially calls out the "shareable" code with a >> >comment at the start and end of the section what defines the >> >virtio_bypass functionality. It would

Re: [virtio-dev] Re: [PATCH v4 2/2] virtio_net: Extend virtio to use VF datapath when available

2018-03-02 Thread Siwei Liu
On Fri, Mar 2, 2018 at 12:10 PM, Michael S. Tsirkin wrote: > On Fri, Mar 02, 2018 at 11:52:27AM -0800, Samudrala, Sridhar wrote: >> >> >> On 3/2/2018 11:41 AM, Michael S. Tsirkin wrote: >> > On Fri, Mar 02, 2018 at 07:26:25AM -0800, Alexander Duyck wrote: >> > > The design limits things to a 1:1 r

[virtio-dev] Re: [PATCH 4/4] virtio-net: add linkspeed and duplex settings to virtio-net

2018-03-02 Thread Michael S. Tsirkin
On Fri, Mar 02, 2018 at 11:59:00AM -0500, Jason Baron wrote: > On 03/02/2018 02:14 AM, Jason Wang wrote: > > > > > > On 2018年03月02日 11:46, Jason Baron wrote: > >> Although linkspeed and duplex can be set in a linux guest via 'ethtool > >> -s', > >> this requires custom ethtool commands for virtio

[virtio-dev] Re: [PATCH 4/4] virtio-net: add linkspeed and duplex settings to virtio-net

2018-03-02 Thread Michael S. Tsirkin
On Fri, Mar 02, 2018 at 03:14:01PM +0800, Jason Wang wrote: > > > On 2018年03月02日 11:46, Jason Baron wrote: > > Although linkspeed and duplex can be set in a linux guest via 'ethtool -s', > > this requires custom ethtool commands for virtio-net by default. > > > > Introduce a new feature flag, VI

[virtio-dev] Re: [PATCH v4 2/2] virtio_net: Extend virtio to use VF datapath when available

2018-03-02 Thread Michael S. Tsirkin
On Fri, Mar 02, 2018 at 11:52:27AM -0800, Samudrala, Sridhar wrote: > > > On 3/2/2018 11:41 AM, Michael S. Tsirkin wrote: > > On Fri, Mar 02, 2018 at 07:26:25AM -0800, Alexander Duyck wrote: > > > The design limits things to a 1:1 relationship since we just have the > > > child and backup pointer

[virtio-dev] [PATCH] README.md: add hints for contributors

2018-03-02 Thread Michael S. Tsirkin
Add links to admin repo and mailing lists. Signed-off-by: Michael S. Tsirkin --- README.md | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 7dadb68..a4fdc4e 100644 --- a/README.md +++ b/README.md @@ -27,13 +27,19 @@ + Further

[virtio-dev] Re: [PATCH v4 2/2] virtio_net: Extend virtio to use VF datapath when available

2018-03-02 Thread Samudrala, Sridhar
On 3/2/2018 11:41 AM, Michael S. Tsirkin wrote: On Fri, Mar 02, 2018 at 07:26:25AM -0800, Alexander Duyck wrote: The design limits things to a 1:1 relationship since we just have the child and backup pointers, but I don't think I am seeing exception handling to prevent us from overwriting the

[virtio-dev] Re: [PATCH v4 2/2] virtio_net: Extend virtio to use VF datapath when available

2018-03-02 Thread Michael S. Tsirkin
On Fri, Mar 02, 2018 at 05:20:17PM +0100, Jiri Pirko wrote: > >Yeah, this code essentially calls out the "shareable" code with a > >comment at the start and end of the section what defines the > >virtio_bypass functionality. It would just be a matter of mostly > >cutting and pasting to put it into

[virtio-dev] Re: [PATCH v4 2/2] virtio_net: Extend virtio to use VF datapath when available

2018-03-02 Thread Michael S. Tsirkin
On Fri, Mar 02, 2018 at 07:26:25AM -0800, Alexander Duyck wrote: > The design limits things to a 1:1 relationship since we just have the > child and backup pointers, but I don't think I am seeing exception > handling to prevent us from overwriting the child pointers so there > may be a leak there.

[virtio-dev] Re: [PATCH v3 2/3] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT

2018-03-02 Thread Michael S. Tsirkin
On Fri, Mar 02, 2018 at 04:47:29PM +0800, Wei Wang wrote: > diff --git a/include/sysemu/balloon.h b/include/sysemu/balloon.h > index af49e19..16a2aae 100644 > --- a/include/sysemu/balloon.h > +++ b/include/sysemu/balloon.h ... > +typedef void (QEMUBalloonFreePageStart)(void *opaque); > +typedef v

[virtio-dev] Re: [PATCH v3 2/3] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT

2018-03-02 Thread Michael S. Tsirkin
On Fri, Mar 02, 2018 at 04:47:29PM +0800, Wei Wang wrote: > The new feature enables the virtio-balloon device to receive hints of > guest free pages from the free page vq. Callers call the > free_page_start API to start the reporting, which creates a thread to > poll for free page hints. The free_p

[virtio-dev] Re: [PATCH 2/4] rocker: drop local duplex definitions

2018-03-02 Thread Michael S. Tsirkin
On Thu, Mar 01, 2018 at 10:46:34PM -0500, Jason Baron wrote: > Make use of duplex definitions from net/eth.h. > > Signed-off-by: Jason Baron > Cc: "Michael S. Tsirkin" > Cc: Jason Wang > Cc: Jiri Pirko > Cc: virtio-dev@lists.oasis-open.org > --- > hw/net/rocker/rocker_fp.c | 6 +- > 1 fil

[virtio-dev] Re: [PATCH 1/4] eth: add speed and duplex definitions

2018-03-02 Thread Michael S. Tsirkin
On Thu, Mar 01, 2018 at 10:46:33PM -0500, Jason Baron wrote: > Pull in definitions for SPEED_UNKNOWN, DUPLEX_UNKNOWN, DUPLEX_HALF, > and DUPLEX_FULL. > > Signed-off-by: Jason Baron > Cc: "Michael S. Tsirkin" > Cc: Jason Wang > Cc: virtio-dev@lists.oasis-open.org > --- > include/net/eth.h | 7 +

[virtio-dev] Re: [PATCH v4 2/2] virtio_net: Extend virtio to use VF datapath when available

2018-03-02 Thread Alexander Duyck
On Fri, Mar 2, 2018 at 8:37 AM, Samudrala, Sridhar wrote: > > > On 3/2/2018 8:20 AM, Jiri Pirko wrote: > > Fri, Mar 02, 2018 at 04:26:25PM CET, alexander.du...@gmail.com wrote: > > On Fri, Mar 2, 2018 at 12:36 AM, Jiri Pirko wrote: > > Thu, Mar 01, 2018 at 09:08:43PM CET, sridhar.samudr...@intel.

[virtio-dev] Re: [PATCH 4/4] virtio-net: add linkspeed and duplex settings to virtio-net

2018-03-02 Thread Jason Baron
On 03/02/2018 02:14 AM, Jason Wang wrote: > > > On 2018年03月02日 11:46, Jason Baron wrote: >> Although linkspeed and duplex can be set in a linux guest via 'ethtool >> -s', >> this requires custom ethtool commands for virtio-net by default. >> >> Introduce a new feature flag, VIRTIO_NET_F_SPEED_DUP

[virtio-dev] Re: [PATCH v4 2/2] virtio_net: Extend virtio to use VF datapath when available

2018-03-02 Thread Samudrala, Sridhar
On 3/2/2018 8:20 AM, Jiri Pirko wrote: Fri, Mar 02, 2018 at 04:26:25PM CET, alexander.du...@gmail.com wrote: On Fri, Mar 2, 2018 at 12:36 AM, Jiri Pirko wrote: Thu, Mar 01, 2018 at 09:08:43PM CET, sridhar.samudr...@intel.com wrote: This patch enables virtio_net to switch over to a VF datapa

[virtio-dev] Re: [PATCH v4 2/2] virtio_net: Extend virtio to use VF datapath when available

2018-03-02 Thread Alexander Duyck
On Fri, Mar 2, 2018 at 12:36 AM, Jiri Pirko wrote: > Thu, Mar 01, 2018 at 09:08:43PM CET, sridhar.samudr...@intel.com wrote: >>This patch enables virtio_net to switch over to a VF datapath when a VF >>netdev is present with the same MAC address. It allows live migration >>of a VM with a direct att

[virtio-dev] Re: [PATCH v2 1/3] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT

2018-03-02 Thread Wei Wang
On 02/07/2018 09:04 AM, Michael S. Tsirkin wrote: On Tue, Feb 06, 2018 at 07:08:17PM +0800, Wei Wang wrote: The new feature enables the virtio-balloon device to receive the hint of guest free pages from the free page vq, and clears the corresponding bits of the free page from the dirty bitmap, s

[virtio-dev] [PATCH v3 2/3] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT

2018-03-02 Thread Wei Wang
The new feature enables the virtio-balloon device to receive hints of guest free pages from the free page vq. Callers call the free_page_start API to start the reporting, which creates a thread to poll for free page hints. The free_page_stop API stops the reporting and makes the thread exit. Signe

[virtio-dev] [PATCH v3 1/3] migration: API to clear bits of guest free pages from the dirty bitmap

2018-03-02 Thread Wei Wang
This patch adds an API to clear bits corresponding to guest free pages from the dirty bitmap. Spilt the free page block if it crosses the QEMU RAMBlock boundary. Signed-off-by: Wei Wang CC: Dr. David Alan Gilbert CC: Juan Quintela CC: Michael S. Tsirkin --- include/migration/misc.h | 2 ++ m

[virtio-dev] [PATCH v3 0/3] virtio-balloon: free page hint reporting support

2018-03-02 Thread Wei Wang
This is the deivce part implementation to add a new feature, VIRTIO_BALLOON_F_FREE_PAGE_HINT to the virtio-balloon device. The device receives the guest free page hints from the driver and clears the corresponding bits in the dirty bitmap, so that those free pages are not transferred by the migrati

[virtio-dev] [PATCH v3 3/3] migration: use the free page hint feature from balloon

2018-03-02 Thread Wei Wang
Start the free page optimization when the bulk stage starts. In case the guest is slow in reporting, actively stops it when the bulk stage ends. The optimization avoids sending guest free pages during the bulk stage. Currently, the optimization is added to precopy only. Signed-off-by: Wei Wang CC