[iproute2-next 4/4] vdpa: Enable user to set mtu of the vdpa device

2021-12-01 Thread Parav Pandit via Virtualization
Implement mtu setting for vdpa device. $ vdpa mgmtdev show vdpasim_net: supported_classes net Add the device with mac address and mtu: $ vdpa dev add name bar mgmtdev vdpasim_net mac 00:11:22:33:44:55 mtu 9000 In above command only mac address or only mtu can also be set. View the config afte

[iproute2-next 3/4] vdpa: Enable user to set mac address of vdpa device

2021-12-01 Thread Parav Pandit via Virtualization
vdpa: Enable user to set mtu of the vdpa device Implement mtu setting for vdpa device. $ vdpa mgmtdev show vdpasim_net: supported_classes net Add the device with specified mac address: $ vdpa dev add name bar mgmtdev vdpasim_net mac 00:11:22:33:44:55 View the config after setting: $ vdpa dev

[iproute2-next 1/4] vdpa: Update kernel headers

2021-12-01 Thread Parav Pandit via Virtualization
Update kernel headers to commit: ad69dd0bf26b ("vdpa: Introduce query of device config layout") Signed-off-by: Parav Pandit --- include/uapi/linux/virtio_net.h | 81 + vdpa/include/uapi/linux/vdpa.h | 7 +++ 2 files changed, 88 insertions(+) create mode 100644

[iproute2-next 2/4] vdpa: Enable user to query vdpa device config layout

2021-12-01 Thread Parav Pandit via Virtualization
Query the device configuration layout whenever kernel supports it. An example of configuration layout of vdpa device of type network: $ 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 $ vdpa dev config show -jp {

[iproute2-next 0/4] vdpa tool to query and set config layout

2021-12-01 Thread Parav Pandit via Virtualization
This series implements querying and setting of the mac address and mtu device config fields of the vdpa device of type net. An example of query and set as below. $ vdpa dev add name bar mgmtdev vdpasim_net mac 00:11:22:33:44:55 mtu 9000 $ vdpa dev config show bar: mac 00:11:22:33:44:55 link up l

RE: [PATCH 1/7] vdpa: Allow to configure max data virtqueues

2021-12-01 Thread Parav Pandit via Virtualization
> From: Eli Cohen > Sent: Thursday, December 2, 2021 1:27 AM > > Add netlink support to configure the max virtqueue pairs for a device. > At least one pair is required. The maximum is dictated by the device. > Cover letter and this patch is missing the example iproute2 example to do this. Plea

RE: [PATCH 1/2] vdpa: Allow to configure max data virtqueues

2021-12-01 Thread Parav Pandit via Virtualization
> From: Jason Wang > Sent: Thursday, December 2, 2021 9:11 AM > > 在 2021/12/1 下午6:09, Parav Pandit 写道: > > > >> From: Eli Cohen > >> Sent: Wednesday, December 1, 2021 3:33 PM > >> > >> On Tue, Nov 30, 2021 at 05:24:03PM -0800, Si-Wei Liu wrote: > >>> > >>> On 11/30/2021 1:48 AM, Eli Cohen wrot

Re: [PATCH 1/2] vdpa: Allow to configure max data virtqueues

2021-12-01 Thread Jason Wang
在 2021/12/1 下午6:09, Parav Pandit 写道: From: Eli Cohen Sent: Wednesday, December 1, 2021 3:33 PM On Tue, Nov 30, 2021 at 05:24:03PM -0800, Si-Wei Liu wrote: On 11/30/2021 1:48 AM, Eli Cohen wrote: Allow to configure the max virtqueues for a device. Signed-off-by: Eli Cohen --- drivers/

RE: [PATCH 2/7] vdpa/mlx5: Fix config_attr_mask assignment

2021-12-01 Thread Parav Pandit via Virtualization
> From: Eli Cohen > Sent: Thursday, December 2, 2021 1:27 AM > > Fix VDPA_ATTR_DEV_NET_CFG_MACADDR assignment to be explicit 64 bit > assignment. > > No issue was seen since the value is well below 64 bit max value. > Nevertheless it needs to be fixed. > > Fixes: a007d940040c ("vdpa/mlx5: Su

RE: [PATCH 1/7] vdpa: Allow to configure max data virtqueues

2021-12-01 Thread Parav Pandit via Virtualization
> From: Eli Cohen > Sent: Thursday, December 2, 2021 1:27 AM > > Add netlink support to configure the max virtqueue pairs for a device. > At least one pair is required. The maximum is dictated by the device. > > Signed-off-by: Eli Cohen > --- > drivers/vdpa/vdpa.c | 14 +- inclu

Re: [PATCH] virtio_ring: Fix querying of maximum DMA mapping size for virtio device

2021-12-01 Thread Jason Wang
On Wed, Dec 1, 2021 at 7:20 PM Will Deacon wrote: > > virtio_max_dma_size() returns the maximum DMA mapping size of the virtio > device by querying dma_max_mapping_size() for the device when the DMA > API is in use for the vring. Unfortunately, the device passed is > initialised by register_virtio

Re: [PATCH 1/2] vdpa: Allow to configure max data virtqueues

2021-12-01 Thread Si-Wei Liu
On 12/1/2021 2:03 AM, Eli Cohen wrote: + if ((config.max_virtqueues - 1) & config.max_virtqueues) { + NL_SET_ERR_MSG_MOD(info->extack, + "Must provide power of two number of virtqueues"); Why there's such limitation

Re: [PATCH 1/2] vdpa: Allow to configure max data virtqueues

2021-12-01 Thread Si-Wei Liu
On 12/1/2021 2:03 AM, Eli Cohen wrote: On Tue, Nov 30, 2021 at 05:24:03PM -0800, Si-Wei Liu wrote: On 11/30/2021 1:48 AM, Eli Cohen wrote: Allow to configure the max virtqueues for a device. Signed-off-by: Eli Cohen --- drivers/vdpa/vdpa.c | 16 +++- include/linux/vdpa.h

[PATCH v3 5/5] iommu/virtio: Support identity-mapped domains

2021-12-01 Thread Jean-Philippe Brucker
Support identity domains for devices that do not offer the VIRTIO_IOMMU_F_BYPASS_CONFIG feature, by creating 1:1 mappings between the virtual and physical address space. Identity domains created this way still perform noticeably better than DMA domains, because they don't have the overhead of setti

[PATCH v3 3/5] iommu/virtio: Sort reserved regions

2021-12-01 Thread Jean-Philippe Brucker
To ease identity mapping support, keep the list of reserved regions sorted. Reviewed-by: Eric Auger Reviewed-by: Kevin Tian Signed-off-by: Jean-Philippe Brucker --- drivers/iommu/virtio-iommu.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/iommu/virtio-io

[PATCH v3 2/5] iommu/virtio: Support bypass domains

2021-12-01 Thread Jean-Philippe Brucker
The VIRTIO_IOMMU_F_BYPASS_CONFIG feature adds a new flag to the ATTACH request, that creates a bypass domain. Use it to enable identity domains. When VIRTIO_IOMMU_F_BYPASS_CONFIG is not supported by the device, we currently fail attaching to an identity domain. Future patches will instead create i

[PATCH v3 1/5] iommu/virtio: Add definitions for VIRTIO_IOMMU_F_BYPASS_CONFIG

2021-12-01 Thread Jean-Philippe Brucker
Add definitions for the VIRTIO_IOMMU_F_BYPASS_CONFIG, which supersedes VIRTIO_IOMMU_F_BYPASS. Reviewed-by: Kevin Tian Signed-off-by: Jean-Philippe Brucker --- include/uapi/linux/virtio_iommu.h | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/include/uapi/linux/virtio_i

[PATCH v3 4/5] iommu/virtio: Pass end address to viommu_add_mapping()

2021-12-01 Thread Jean-Philippe Brucker
To support identity mappings, the virtio-iommu driver must be able to represent full 64-bit ranges internally. Pass (start, end) instead of (start, size) to viommu_add/del_mapping(). Clean comments. The one about the returned size was never true: when sweeping the whole address space the returned

[PATCH v3 0/5] iommu/virtio: Add identity domains

2021-12-01 Thread Jean-Philippe Brucker
Support identity domains, allowing to only enable IOMMU protection for a subset of endpoints (those assigned to userspace, for example). Users may enable identity domains at compile time (CONFIG_IOMMU_DEFAULT_PASSTHROUGH), boot time (iommu.passthrough=1) or runtime (/sys/kernel/iommu_groups/*/type

Re: [PATCH v2 net-next 00/26] net: introduce and use generic XDP stats

2021-12-01 Thread Jamal Hadi Salim
On 2021-11-30 12:38, David Ahern wrote: Today, stats are sent as a struct so skipping stats whose value is 0 is not an option. When using individual attributes for the counters this becomes an option. Given there is no value in sending '0' why do it? Is your pushback that there should be a uapi

RE: [PATCH 1/2] vdpa: Allow to configure max data virtqueues

2021-12-01 Thread Parav Pandit via Virtualization
> From: Eli Cohen > Sent: Wednesday, December 1, 2021 5:29 PM > > On Wed, Dec 01, 2021 at 12:09:17PM +0200, Parav Pandit wrote: > > > > > > > From: Eli Cohen > > > Sent: Wednesday, December 1, 2021 3:33 PM > > > > > > On Tue, Nov 30, 2021 at 05:24:03PM -0800, Si-Wei Liu wrote: > > > > > > > >

[PATCH] virtio_ring: Fix querying of maximum DMA mapping size for virtio device

2021-12-01 Thread Will Deacon
virtio_max_dma_size() returns the maximum DMA mapping size of the virtio device by querying dma_max_mapping_size() for the device when the DMA API is in use for the vring. Unfortunately, the device passed is initialised by register_virtio_device() and does not inherit the DMA configuration from its

Re: [PATCH v2] fuse: rename some files and clean up Makefile

2021-12-01 Thread Stefan Hajnoczi
On Mon, Nov 29, 2021 at 09:27:17PM +0800, Tiezhu Yang wrote: > On 11/29/2021 06:19 PM, Stefan Hajnoczi wrote: > > On Sat, Nov 27, 2021 at 06:13:22PM +0800, Tiezhu Yang wrote: > > > No need to generate virtio_fs.o first and then link to virtiofs.o, just > > > rename virtio_fs.c to virtiofs.c and rem

RE: [PATCH 1/2] vdpa: Allow to configure max data virtqueues

2021-12-01 Thread Parav Pandit via Virtualization
> From: Eli Cohen > Sent: Wednesday, December 1, 2021 3:33 PM > > On Tue, Nov 30, 2021 at 05:24:03PM -0800, Si-Wei Liu wrote: > > > > > > On 11/30/2021 1:48 AM, Eli Cohen wrote: > > > Allow to configure the max virtqueues for a device. > > > > > > Signed-off-by: Eli Cohen > > > --- > > > dr

Re: [PATCH v1 0/2] virtio-mem: prepare for granularity smaller than MAX_ORDER - 1

2021-12-01 Thread David Hildenbrand
On 01.12.21 00:56, Michael S. Tsirkin wrote: > On Fri, Nov 26, 2021 at 02:42:07PM +0100, David Hildenbrand wrote: >> The virtio-mem driver currently supports logical hot(un)plug in >> MAX_ORDER - 1 granularity (4MiB on x86-64) or bigger. We want to support >> pageblock granularity (2MiB on x86-64),