Re: [PATCH net-next v5 15/15] virtio-net: xsk zero copy xmit kick by threshold

2021-06-16 Thread Xuan Zhuo
On Thu, 17 Jun 2021 11:08:34 +0800, Jason Wang wrote: > > 在 2021/6/10 下午4:22, Xuan Zhuo 写道: > > After testing, the performance of calling kick every time is not stable. > > And if all the packets are sent and kicked again, the performance is not > > good. So add a module parameter to specify how

Re: [PATCH net-next v5 14/15] virtio-net: xsk direct xmit inside xsk wakeup

2021-06-16 Thread Xuan Zhuo
On Thu, 17 Jun 2021 11:07:17 +0800, Jason Wang wrote: > > 在 2021/6/10 下午4:22, Xuan Zhuo 写道: > > Calling virtqueue_napi_schedule() in wakeup results in napi running on > > the current cpu. If the application is not busy, then there is no > > problem. But if the application itself is busy, it will

Re: [PATCH net-next v5 13/15] virtio-net: support AF_XDP zc rx

2021-06-16 Thread Xuan Zhuo
On Thu, 17 Jun 2021 11:23:52 +0800, Jason Wang wrote: > > 在 2021/6/10 下午4:22, Xuan Zhuo 写道: > > Compared to the case of xsk tx, the case of xsk zc rx is more > > complicated. > > > > When we process the buf received by vq, we may encounter ordinary > > buffers, or xsk buffers. What makes the

Re: [PATCH] drivers: gpio: add virtio-gpio guest driver

2021-06-16 Thread Viresh Kumar
On 16-06-21, 17:04, Enrico Weigelt, metux IT consult wrote: > Half correct: I sent it to the list, but this wasn't tex'ified yet. > > When we had an email conversation about this, it was about submitting > the existing spec in a formal correct way. Don't get me wrong: I > apreciate that

Re: [PATCH net-next v5 13/15] virtio-net: support AF_XDP zc rx

2021-06-16 Thread Jason Wang
在 2021/6/10 下午4:22, Xuan Zhuo 写道: Compared to the case of xsk tx, the case of xsk zc rx is more complicated. When we process the buf received by vq, we may encounter ordinary buffers, or xsk buffers. What makes the situation more complicated is that in the case of mergeable, when num_buffer >

Re: [PATCH net-next v5 15/15] virtio-net: xsk zero copy xmit kick by threshold

2021-06-16 Thread Jason Wang
在 2021/6/10 下午4:22, Xuan Zhuo 写道: After testing, the performance of calling kick every time is not stable. And if all the packets are sent and kicked again, the performance is not good. So add a module parameter to specify how many packets are sent to call a kick. 8 is a relatively stable

Re: [PATCH net-next v5 14/15] virtio-net: xsk direct xmit inside xsk wakeup

2021-06-16 Thread Jason Wang
在 2021/6/10 下午4:22, Xuan Zhuo 写道: Calling virtqueue_napi_schedule() in wakeup results in napi running on the current cpu. If the application is not busy, then there is no problem. But if the application itself is busy, it will cause a lot of scheduling. If the application is continuously

Re: [PATCH net-next v5 12/15] virtio-net: support AF_XDP zc tx

2021-06-16 Thread Jason Wang
在 2021/6/16 下午8:57, Xuan Zhuo 写道: On Wed, 16 Jun 2021 20:51:41 +0800, Jason Wang wrote: 在 2021/6/16 下午6:19, Xuan Zhuo 写道: + * In this way, even if xsk has been unbundled with rq/sq, or a new xsk and + * rq/sq are bound, and a new virtnet_xsk_ctx_head is created. It will not + * affect the

Re: [virtio-dev] banned on virtio list ? [Re: [PATCH] drivers: gpio: add virtio-gpio guest driver]

2021-06-16 Thread Chet Ensign
Hi mtx - I checked our logs and I don't see you as subscribed to either list. That should explain why you're being blocked. To subscribe to virtio-comment, follow the instructions at https://www.oasis-open.org/committees/comments/index.php?wg_abbrev=virtio To subscribe to virtio-dev, you can

[PATCH linux-next v3 6/6] vdpa/mlx5: Forward only packets with allowed MAC address

2021-06-16 Thread Parav Pandit
From: Eli Cohen Add rules to forward packets to the net device's TIR only if the destination MAC is equal to the configured MAC. This is required to prevent the netdevice from receiving traffic not destined to its configured MAC. Signed-off-by: Eli Cohen Reviewed-by: Parav Pandit ---

[PATCH linux-next v3 3/6] vdpa: Enable user to set mac and mtu of vdpa device

2021-06-16 Thread Parav Pandit
$ vdpa dev add name bar mgmtdev vdpasim_net $ vdpa dev config set bar mac 00:11:22:33:44:55 mtu 9000 $ vdpa dev config show bar: mac 00:11:22:33:44:55 link up link_announce false mtu 9000 speed 0 duplex 0 $ vdpa dev config show -jp { "config": { "bar": { "mac":

[PATCH linux-next v3 5/6] vdpa/mlx5: Support configuration of MAC

2021-06-16 Thread Parav Pandit
From: Eli Cohen Add code to accept MAC configuration through vdpa tool. The MAC is written into the config struct and later can be retrieved through get_config(). Examples: 1. Configure MAC: $ vdpa dev config set vdpa0 mac 00:11:22:33:44:55 2. Show configured params: $ vdpa dev config show

[PATCH linux-next v3 4/6] vdpa_sim_net: Enable user to set mac address and mtu

2021-06-16 Thread Parav Pandit
Enable user to set the mac address and mtu so that each vdpa device can have its own user specified mac address and mtu. This is done by implementing the management device's configuration layout fields setting callback routine. Now that user is enabled to set the mac address, remove the module

[PATCH linux-next v3 2/6] vdpa: Introduce query of device config layout

2021-06-16 Thread Parav Pandit
Introduce a command to query a device config layout. An example query of network vdpa device: $ vdpa dev add name bar mgmtdev vdpasim_net $ vdpa dev config show bar: mac 00:35:09:19:48:05 link up link_announce false mtu 1500 speed 0 duplex 0 $ vdpa dev config show -jp { "config": {

[PATCH linux-next v3 0/6] vdpa: enable user to set mac, mtu

2021-06-16 Thread Parav Pandit
Currently user cannot set the mac address and mtu of the vdpa device. This patchset enables users to set the mac address and mtu of the vdpa device once the device is created. If a vendor driver supports such configuration user can set it otherwise user gets unsupported error. vdpa mac address

[PATCH linux-next v3 1/6] vdpa: Introduce and use vdpa device get, set config helpers

2021-06-16 Thread Parav Pandit
Subsequent patches enable get and set configuration either via management device or via vdpa device' config ops. This requires synchronization between multiple callers to get and set config callbacks. Features setting also influence the layout of the configuration fields endianness. To avoid

Re: [PATCH v5 3/6] x86/sev-es: Split up runtime #VC handler for correct state tracking

2021-06-16 Thread Joerg Roedel
Hi Peter, sorry, missed this email before sending out v6. On Wed, Jun 16, 2021 at 06:04:26PM +0200, Peter Zijlstra wrote: > On Mon, Jun 14, 2021 at 03:53:24PM +0200, Joerg Roedel wrote: > > _ASM_NOKPROBE(\asmsym) > > SYM_CODE_END(\asmsym) > > Consistency with idtentry_mce_db would seem to

[PATCH v6 2/2] x86/sev: Split up runtime #VC handler for correct state tracking

2021-06-16 Thread Joerg Roedel
From: Joerg Roedel Split up the #VC handler code into a from-user and a from-kernel part. This allows clean and correct state tracking, as the #VC handler needs to enter NMI-state when raised from kernel mode and plain IRQ state when raised from user-mode. Fixes: 62441a1fb532 ("x86/sev-es:

[PATCH v6 1/2] x86/sev: Make sure IRQs are disabled while GHCB is active

2021-06-16 Thread Joerg Roedel
From: Joerg Roedel The #VC handler only cares about IRQs being disabled while the GHCB is active, as it must not be interrupted by something which could cause another #VC while it holds the GHCB (NMI is the exception for which the backup GHCB exits). Make sure nothing interrupts the code path

[PATCH v6 0/2] x86/sev: Fixes for SEV-ES Guest Support

2021-06-16 Thread Joerg Roedel
From: Joerg Roedel Hi, here are the remainig patches in my queue for SEV-ES guest support. Changes to the previous version are: - Rebased to tip/x86/sev - Merged Boris' diff to patch 1 and fixed two minor issues in the result The patches are again tested with a

Re: [PATCH v4 5/6] iommu/dma: Simplify calls to iommu_setup_dma_ops()

2021-06-16 Thread Robin Murphy
On 2021-06-10 08:51, Jean-Philippe Brucker wrote: dma-iommu uses the address bounds described in domain->geometry during IOVA allocation. The address size parameters of iommu_setup_dma_ops() are useful for describing additional limits set by the platform firmware, but aren't needed for drivers

Re: [PATCH v5 3/6] x86/sev-es: Split up runtime #VC handler for correct state tracking

2021-06-16 Thread Peter Zijlstra
On Mon, Jun 14, 2021 at 03:53:24PM +0200, Joerg Roedel wrote: > --- a/arch/x86/entry/entry_64.S > +++ b/arch/x86/entry/entry_64.S > @@ -506,7 +506,7 @@ SYM_CODE_START(\asmsym) > > movq%rsp, %rdi /* pt_regs pointer */ > > - call\cfunc > + call

Re: [PATCH v4 6/6] iommu/virtio: Enable x86 support

2021-06-16 Thread Eric Auger
Hi jean, On 6/10/21 9:51 AM, Jean-Philippe Brucker wrote: > With the VIOT support in place, x86 platforms can now use the > virtio-iommu. > > Because the other x86 IOMMU drivers aren't yet ready to use the > acpi_dma_setup() path, x86 doesn't implement arch_setup_dma_ops() at the > moment.

Re: [PATCH v4 5/6] iommu/dma: Simplify calls to iommu_setup_dma_ops()

2021-06-16 Thread Eric Auger
Hi Jean, On 6/10/21 9:51 AM, Jean-Philippe Brucker wrote: > dma-iommu uses the address bounds described in domain->geometry during > IOVA allocation. The address size parameters of iommu_setup_dma_ops() > are useful for describing additional limits set by the platform > firmware, but aren't

Re: [PATCH v4 4/6] iommu/dma: Pass address limit rather than size to iommu_setup_dma_ops()

2021-06-16 Thread Eric Auger
Hi Jean, On 6/10/21 9:51 AM, Jean-Philippe Brucker wrote: > Passing a 64-bit address width to iommu_setup_dma_ops() is valid on > virtual platforms, but isn't currently possible. The overflow check in > iommu_dma_init_domain() prevents this even when @dma_base isn't 0. Pass > a limit address

Re: [PATCH v4 3/6] ACPI: Add driver for the VIOT table

2021-06-16 Thread Eric Auger
Hi Jean, On 6/10/21 9:51 AM, Jean-Philippe Brucker wrote: > The ACPI Virtual I/O Translation Table describes topology of > para-virtual platforms, similarly to vendor tables DMAR, IVRS and IORT. > For now it describes the relation between virtio-iommu and the endpoints > it manages. > > Three

Re: [PATCH] vhost: add vhost_test to Kconfig & Makefile

2021-06-16 Thread Leon Romanovsky
On Wed, Jun 16, 2021 at 08:07:34PM +0800, Cai Huoqing wrote: > When running vhost test, make it easier to config > > Signed-off-by: Cai Huoqing > --- > drivers/vhost/Kconfig | 12 > drivers/vhost/Makefile | 3 +++ > 2 files changed, 15 insertions(+) > > diff --git

Re: [PATCH net-next v5 12/15] virtio-net: support AF_XDP zc tx

2021-06-16 Thread Xuan Zhuo
On Wed, 16 Jun 2021 20:51:41 +0800, Jason Wang wrote: > > 在 2021/6/16 下午6:19, Xuan Zhuo 写道: > >>> + * In this way, even if xsk has been unbundled with rq/sq, or a new xsk > >>> and > >>> + * rq/sq are bound, and a new virtnet_xsk_ctx_head is created. It will > >>> not > >>> + * affect the old

Re: [PATCH net-next v5 12/15] virtio-net: support AF_XDP zc tx

2021-06-16 Thread Jason Wang
在 2021/6/16 下午6:19, Xuan Zhuo 写道: + * In this way, even if xsk has been unbundled with rq/sq, or a new xsk and + * rq/sq are bound, and a new virtnet_xsk_ctx_head is created. It will not + * affect the old virtnet_xsk_ctx to be recycled. And free all head and ctx when + * ref is 0. This

Re: [PATCH v4 0/6] Add support for ACPI VIOT

2021-06-16 Thread Eric Auger
Hi Jean, On 6/10/21 9:51 AM, Jean-Philippe Brucker wrote: > Add a driver for the ACPI VIOT table, which provides topology > information for para-virtual IOMMUs. Enable virtio-iommu on > non-devicetree platforms, including x86. > > Since v3 [1] I fixed a build bug for !CONFIG_IOMMU_API. Joerg

Re: [PATCH] drivers: gpio: add virtio-gpio guest driver

2021-06-16 Thread Viresh Kumar
On 16-06-21, 10:31, Linus Walleij wrote: > Hi Enrico, > > On Tue, Jun 15, 2021 at 7:49 PM Enrico Weigelt, metux IT consult > wrote: > > > Introduce new GPIO driver for virtual GPIO devices via virtio. > > > > The driver implements the virtio-gpio protocol (ID 41), which can be > > used by

Re: [PATCH net-next v5 03/15] virtio-net: add priv_flags IFF_NOT_USE_DMA_ADDR

2021-06-16 Thread Xuan Zhuo
On Wed, 16 Jun 2021 17:27:59 +0800, Jason Wang wrote: > > 在 2021/6/10 下午4:21, Xuan Zhuo 写道: > > virtio-net not use dma addr directly. So add this priv_flags > > IFF_NOT_USE_DMA_ADDR. > > > > Signed-off-by: Xuan Zhuo > > --- > > drivers/net/virtio_net.c | 2 +- > > 1 file changed, 1

Re: [PATCH net-next v5 12/15] virtio-net: support AF_XDP zc tx

2021-06-16 Thread Xuan Zhuo
On Wed, 16 Jun 2021 17:26:33 +0800, Jason Wang wrote: > > 在 2021/6/10 下午4:22, Xuan Zhuo 写道: > > AF_XDP(xdp socket, xsk) is a high-performance packet receiving and > > sending technology. > > > > This patch implements the binding and unbinding operations of xsk and > > the virtio-net queue for xsk

Re: [PATCH v4 1/6] ACPI: arm64: Move DMA setup operations out of IORT

2021-06-16 Thread Eric Auger
Hi jean, On 6/10/21 9:51 AM, Jean-Philippe Brucker wrote: > Extract generic DMA setup code out of IORT, so it can be reused by VIOT. > Keep it in drivers/acpi/arm64 for now, since it could break x86 > platforms that haven't run this code so far, if they have invalid > tables. > > Signed-off-by:

Re: [PATCH v4 2/6] ACPI: Move IOMMU setup code out of IORT

2021-06-16 Thread Eric Auger
Hi jean, On 6/10/21 9:51 AM, Jean-Philippe Brucker wrote: > Extract the code that sets up the IOMMU infrastructure from IORT, since > it can be reused by VIOT. Move it one level up into a new > acpi_iommu_configure_id() function, which calls the IORT parsing > function which in turn calls the

Re: [PATCH net-next v5 03/15] virtio-net: add priv_flags IFF_NOT_USE_DMA_ADDR

2021-06-16 Thread Jason Wang
在 2021/6/10 下午4:21, Xuan Zhuo 写道: virtio-net not use dma addr directly. So add this priv_flags IFF_NOT_USE_DMA_ADDR. Signed-off-by: Xuan Zhuo --- drivers/net/virtio_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c

Re: [PATCH net-next v5 12/15] virtio-net: support AF_XDP zc tx

2021-06-16 Thread Jason Wang
在 2021/6/10 下午4:22, Xuan Zhuo 写道: AF_XDP(xdp socket, xsk) is a high-performance packet receiving and sending technology. This patch implements the binding and unbinding operations of xsk and the virtio-net queue for xsk zero copy xmit. The xsk zero copy xmit depends on tx napi. Because the

Re: [PATCH] drivers: gpio: add virtio-gpio guest driver

2021-06-16 Thread Linus Walleij
Hi Enrico, On Tue, Jun 15, 2021 at 7:49 PM Enrico Weigelt, metux IT consult wrote: > Introduce new GPIO driver for virtual GPIO devices via virtio. > > The driver implements the virtio-gpio protocol (ID 41), which can be > used by either VM guests (e.g. bridging virtual gpios from the guest >

Re: [PATCH net-next v5 08/15] virtio-net: split the receive_mergeable function

2021-06-16 Thread Xuan Zhuo
On Wed, 16 Jun 2021 15:33:05 +0800, Jason Wang wrote: > > 在 2021/6/10 下午4:22, Xuan Zhuo 写道: > > receive_mergeable() is too complicated, so this function is split here. > > One is to make the function more readable. On the other hand, the two > > independent functions will be called separately in

Re: [PATCH 0/3] virtio_blk: blk-mq io_poll support

2021-06-16 Thread Christoph Hellwig
On Thu, Jun 03, 2021 at 04:30:25PM +0100, Stefan Hajnoczi wrote: > Christoph and Jens: Any more thoughts on this irq toggling approach? I think it would eventually come back and byte us and would much prefer explicit poll queues. ___ Virtualization

Re: [PATCH net-next v5 11/15] virtio-net: move to virtio_net.h

2021-06-16 Thread Jason Wang
在 2021/6/10 下午4:22, Xuan Zhuo 写道: Move some structure definitions and inline functions into the virtio_net.h file. Signed-off-by: Xuan Zhuo Acked-by: Jason Wang --- drivers/net/virtio/virtio_net.c | 225 +-- drivers/net/virtio/virtio_net.h | 230

Re: [PATCH net-next v5 10/15] virtio-net: independent directory

2021-06-16 Thread Jason Wang
在 2021/6/10 下午4:22, Xuan Zhuo 写道: Create a separate directory for virtio-net. AF_XDP support will be added later, and a separate xsk.c file will be added. Signed-off-by: Xuan Zhuo Acked-by: Jason Wang --- MAINTAINERS | 2 +- drivers/net/Kconfig

Re: [PATCH net-next v5 08/15] virtio-net: split the receive_mergeable function

2021-06-16 Thread Jason Wang
在 2021/6/10 下午4:22, Xuan Zhuo 写道: receive_mergeable() is too complicated, so this function is split here. One is to make the function more readable. On the other hand, the two independent functions will be called separately in subsequent patches. Signed-off-by: Xuan Zhuo ---

Re: [PATCH v4 0/6] Add support for ACPI VIOT

2021-06-16 Thread Jean-Philippe Brucker
Hi Rafael, On Thu, Jun 10, 2021 at 09:51:27AM +0200, Jean-Philippe Brucker wrote: > Add a driver for the ACPI VIOT table, which provides topology > information for para-virtual IOMMUs. Enable virtio-iommu on > non-devicetree platforms, including x86. > > Since v3 [1] I fixed a build bug for