RE: [PATCH V2 vfio 2/9] virtio-pci: Introduce admin virtqueue

2023-10-30 Thread Parav Pandit via Virtualization
> From: Michael S. Tsirkin > Sent: Tuesday, October 31, 2023 5:02 AM > > On Mon, Oct 30, 2023 at 06:10:06PM +, Parav Pandit wrote: > > > > > > > From: Michael S. Tsirkin > > > Sent: Monday, October 30, 2023 9:29 PM On Mon, Oct 30, 2023 at > > > 03:51:40PM +, Parav Pandit wrote: > > >

RE: [PATCH V2 vfio 2/9] virtio-pci: Introduce admin virtqueue

2023-10-31 Thread Parav Pandit via Virtualization
> From: Michael S. Tsirkin > Sent: Tuesday, October 31, 2023 1:29 PM > > On Tue, Oct 31, 2023 at 03:11:57AM +, Parav Pandit wrote: > > > > > > > From: Michael S. Tsirkin > > > Sent: Tuesday, October 31, 2023 5:02 AM > > > > > > On Mon, Oct 30, 2023 at 06:10:06PM +, Parav Pandit wrote:

RE: [PATCH V1 vfio 9/9] vfio/virtio: Introduce a vfio driver over virtio devices

2023-10-26 Thread Parav Pandit via Virtualization
> From: Michael S. Tsirkin > Sent: Thursday, October 26, 2023 6:45 PM > > Followed by an open coded driver check for 0x1000 to 0x103f range. > > Do you mean windows driver expects specific subsystem vendor id of 0x1af4? > > Look it up, it's open source. Those are not OS inbox drivers anyway.

RE: [PATCH V1 vfio 9/9] vfio/virtio: Introduce a vfio driver over virtio devices

2023-10-26 Thread Parav Pandit via Virtualization
> From: Michael S. Tsirkin > Sent: Thursday, October 26, 2023 5:42 PM > > On Thu, Oct 26, 2023 at 03:08:12PM +0300, Yishai Hadas wrote: > > > > Makes sense ? > > > So do I understand correctly that virtio dictates the subsystem > > > device ID for all subsystem vendor IDs that implement a legacy

RE: [PATCH V1 vfio 9/9] vfio/virtio: Introduce a vfio driver over virtio devices

2023-10-26 Thread Parav Pandit via Virtualization
> From: Michael S. Tsirkin > Sent: Thursday, October 26, 2023 8:36 PM > > On Thu, Oct 26, 2023 at 01:28:18PM +, Parav Pandit wrote: > > > > > From: Michael S. Tsirkin > > > Sent: Thursday, October 26, 2023 6:45 PM > > > > > > Followed by an open coded driver check for 0x1000 to 0x103f

RE: [PATCH V1 vfio 9/9] vfio/virtio: Introduce a vfio driver over virtio devices

2023-10-26 Thread Parav Pandit via Virtualization
> From: Michael S. Tsirkin > Sent: Thursday, October 26, 2023 9:16 PM > On Thu, Oct 26, 2023 at 03:09:13PM +, Parav Pandit wrote: > > > > > From: Michael S. Tsirkin > > > Sent: Thursday, October 26, 2023 8:36 PM > > > > > > On Thu, Oct 26, 2023 at 01:28:18PM +, Parav Pandit wrote: > >

RE: [PATCH V2 vfio 2/9] virtio-pci: Introduce admin virtqueue

2023-10-30 Thread Parav Pandit via Virtualization
> From: Michael S. Tsirkin > Sent: Monday, October 30, 2023 1:53 AM > > On Sun, Oct 29, 2023 at 05:59:45PM +0200, Yishai Hadas wrote: > > From: Feng Liu > > > > Introduce support for the admin virtqueue. By negotiating > > VIRTIO_F_ADMIN_VQ feature, driver detects capability and creates one

RE: [PATCH V2 vfio 2/9] virtio-pci: Introduce admin virtqueue

2023-10-30 Thread Parav Pandit via Virtualization
> From: Michael S. Tsirkin > Sent: Monday, October 30, 2023 9:29 PM > On Mon, Oct 30, 2023 at 03:51:40PM +, Parav Pandit wrote: > > > > > > > From: Michael S. Tsirkin > > > Sent: Monday, October 30, 2023 1:53 AM > > > > > > On Sun, Oct 29, 2023 at 05:59:45PM +0200, Yishai Hadas wrote: > >

RE: [PATCH vfio 11/11] vfio/virtio: Introduce a vfio driver over virtio devices

2023-09-22 Thread Parav Pandit via Virtualization
> From: Jason Gunthorpe > Sent: Friday, September 22, 2023 5:53 PM > > And what's more, using MMIO BAR0 then it can work for legacy. > > Oh? How? Our team didn't think so. It does not. It was already discussed. The device reset in legacy is not synchronous. The drivers do not wait for reset

RE: [PATCH vfio 11/11] vfio/virtio: Introduce a vfio driver over virtio devices

2023-09-21 Thread Parav Pandit via Virtualization
> From: Michael S. Tsirkin > Sent: Thursday, September 21, 2023 10:31 PM > Another question I'm interested in is whether there's actually a performance > benefit to using this as compared to just software vhost. I note there's a VM > exit > on each IO access, so ... perhaps? > Would be nice

RE: [PATCH vfio 11/11] vfio/virtio: Introduce a vfio driver over virtio devices

2023-10-01 Thread Parav Pandit via Virtualization
> From: Michael S. Tsirkin > Sent: Tuesday, September 26, 2023 10:30 PM > For example, a transitional device > must not in theory be safely passed through to guest userspace, because guest > then might try to use it through the legacy BAR without acknowledging > ACCESS_PLATFORM. > Do any

RE: [PATCH vfio 11/11] vfio/virtio: Introduce a vfio driver over virtio devices

2023-10-02 Thread Parav Pandit via Virtualization
> From: Michael S. Tsirkin > Sent: Friday, September 22, 2023 9:23 PM > > +static int virtiovf_pci_probe(struct pci_dev *pdev, > > + const struct pci_device_id *id) { > > + const struct vfio_device_ops *ops = _acc_vfio_pci_ops; > > + struct virtiovf_pci_core_device

RE: [PATCH vfio 11/11] vfio/virtio: Introduce a vfio driver over virtio devices

2023-09-25 Thread Parav Pandit via Virtualization
> From: Jason Wang > Sent: Tuesday, September 26, 2023 10:08 AM > Right, so if we'd consider migration from virtio to vDPA, it needs to be > designed > in a way that allows more involvement from hypervisor other than coupling it > with a specific interface (like admin virtqueues). It is not

RE: [PATCH vfio 11/11] vfio/virtio: Introduce a vfio driver over virtio devices

2023-09-25 Thread Parav Pandit via Virtualization
> From: Jason Wang > Sent: Tuesday, September 26, 2023 8:03 AM > > It's the implementation details in legacy. The device needs to make sure > (reset) > the driver can work (is done before get_status return). It is part of the 0.9.5 and 1.x specification as I quoted those text above.

RE: [PATCH vfio 11/11] vfio/virtio: Introduce a vfio driver over virtio devices

2023-09-25 Thread Parav Pandit via Virtualization
> From: Michael S. Tsirkin > Sent: Tuesday, September 26, 2023 12:06 AM > One can thinkably do that wait in hardware, though. Just defer completion > until > read is done. > Once OASIS does such new interface and if some hw vendor _actually_ wants to do such complex hw, may be vfio driver

RE: [PATCH vfio 11/11] vfio/virtio: Introduce a vfio driver over virtio devices

2023-09-25 Thread Parav Pandit via Virtualization
> From: Jason Wang > Sent: Tuesday, September 26, 2023 10:07 AM > > If you can't find a way to make legacy drivers work, use modern. > Understood. This vfio series make the legacy drivers work. Thanks. > That's it. > > Thanks ___

RE: [PATCH vfio 11/11] vfio/virtio: Introduce a vfio driver over virtio devices

2023-09-25 Thread Parav Pandit via Virtualization
> From: Jason Wang > Sent: Monday, September 25, 2023 8:00 AM > > On Fri, Sep 22, 2023 at 8:25 PM Parav Pandit wrote: > > > > > > > From: Jason Gunthorpe > > > Sent: Friday, September 22, 2023 5:53 PM > > > > > > > > And what's more, using MMIO BAR0 then it can work for legacy. > > > > > >

RE: [PATCH vfio 11/11] vfio/virtio: Introduce a vfio driver over virtio devices

2023-09-22 Thread Parav Pandit via Virtualization
> From: Jason Gunthorpe > Sent: Friday, September 22, 2023 6:07 PM > > On Thu, Sep 21, 2023 at 01:58:32PM -0600, Alex Williamson wrote: > > > If the heart of this driver is simply pretending to have an I/O BAR > > where I/O accesses into that BAR are translated to accesses in the > > MMIO

RE: [PATCH vfio 11/11] vfio/virtio: Introduce a vfio driver over virtio devices

2023-10-12 Thread Parav Pandit via Virtualization
> From: Michael S. Tsirkin > Sent: Thursday, October 12, 2023 4:23 PM > > On Tue, Sep 26, 2023 at 03:45:36AM +, Parav Pandit wrote: > > > > > > > From: Michael S. Tsirkin > > > Sent: Tuesday, September 26, 2023 12:06 AM > > > > > One can thinkably do that wait in hardware, though. Just

RE: [PATCH vfio 11/11] vfio/virtio: Introduce a vfio driver over virtio devices

2023-10-12 Thread Parav Pandit via Virtualization
> From: Michael S. Tsirkin > Sent: Thursday, October 12, 2023 5:00 PM > I am instead talking about devices that work with existing legacy linux > drivers > with no traps. > Yep, I understood. > > I am not expecting OASIS to do anything extra for legacy registers. > > > > [1] The device MUST

RE: [PATCH V1 vfio 9/9] vfio/virtio: Introduce a vfio driver over virtio devices

2023-10-18 Thread Parav Pandit via Virtualization
> From: Alex Williamson > Sent: Wednesday, October 18, 2023 6:22 PM > Are we realistically extending this beyond virtio-net? Maybe all the > descriptions > should be limited to what is actually supported as proposed rather than > aspirational goals. Thanks, Virtio blk would the second user

RE: [PATCH vfio 10/11] vfio/virtio: Expose admin commands over virtio device

2023-10-10 Thread Parav Pandit via Virtualization
> From: Yishai Hadas > Sent: Tuesday, October 10, 2023 9:14 PM > > On 10/10/2023 18:14, Michael S. Tsirkin wrote: > > On Tue, Oct 10, 2023 at 06:09:44PM +0300, Yishai Hadas wrote: > >> On 10/10/2023 17:54, Michael S. Tsirkin wrote: > >>> On Tue, Oct 10, 2023 at 11:08:49AM -0300, Jason

RE: [PATCH vfio 10/11] vfio/virtio: Expose admin commands over virtio device

2023-10-10 Thread Parav Pandit via Virtualization
> From: Jason Gunthorpe > Sent: Tuesday, October 10, 2023 9:37 PM > > On Tue, Oct 10, 2023 at 12:03:29PM -0400, Michael S. Tsirkin wrote: > > On Tue, Oct 10, 2023 at 12:59:37PM -0300, Jason Gunthorpe wrote: > > > On Tue, Oct 10, 2023 at 11:14:56AM -0400, Michael S. Tsirkin wrote: > > > > > > >

RE: [PATCH vfio 10/11] vfio/virtio: Expose admin commands over virtio device

2023-10-11 Thread Parav Pandit via Virtualization
Hi Christoph, > From: Christoph Hellwig > Sent: Wednesday, October 11, 2023 12:29 PM > > On Wed, Oct 11, 2023 at 02:43:37AM -0400, Michael S. Tsirkin wrote: > > > Btw, what is that intel thing everyone is talking about? And why > > > would the virtio core support vendor specific behavior like

RE: [PATCH net-next 1/2] virtio_net: Fix short frame length check

2023-01-13 Thread Parav Pandit via Virtualization
> From: Alexander H Duyck > Sent: Friday, January 13, 2023 6:24 PM > > On Sat, 2023-01-14 at 00:36 +0200, Parav Pandit wrote: > > A smallest Ethernet frame defined by IEEE 802.3 is 60 bytes without > > any preemble and CRC. > > > > Current code only checks for minimal 14 bytes of Ethernet

[PATCH net-next 2/2] virtio_net: Reuse buffer free function

2023-01-13 Thread Parav Pandit via Virtualization
virtnet_rq_free_unused_buf() helper function to free the buffer already exists. Avoid code duplication by reusing existing function. Signed-off-by: Parav Pandit --- drivers/net/virtio_net.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/net/virtio_net.c

[PATCH net-next 1/2] virtio_net: Fix short frame length check

2023-01-13 Thread Parav Pandit via Virtualization
A smallest Ethernet frame defined by IEEE 802.3 is 60 bytes without any preemble and CRC. Current code only checks for minimal 14 bytes of Ethernet header length. Correct it to consider the minimum Ethernet frame length. Fixes: 296f96fcfc16 ("Net driver using virtio") Signed-off-by: Parav Pandit

[PATCH net-next 0/2] Small packet processing handling changes

2023-01-13 Thread Parav Pandit via Virtualization
Hi, These two changes improve the small packet handling. Patch summary: patch-1 fixes the length check by considering Ethernet 60B frame size patch-2 avoids code duplication by reuses existing buffer free helper Please review. Parav Pandit (2): virtio_net: Fix short frame length check

[PATCH net-next v2] virtio_net: Reuse buffer free function

2023-01-16 Thread Parav Pandit via Virtualization
virtnet_rq_free_unused_buf() helper function to free the buffer already exists. Avoid code duplication by reusing existing function. Reviewed-by: Alexander Duyck Reviewed-by: Xuan Zhuo Signed-off-by: Parav Pandit --- drivers/net/virtio_net.c | 8 +--- 1 file changed, 1 insertion(+), 7

RE: [PATCH net-next v2] virtio_net: Reuse buffer free function

2023-01-16 Thread Parav Pandit via Virtualization
> From: Michael S. Tsirkin > Sent: Monday, January 16, 2023 5:13 PM > > On Mon, Jan 16, 2023 at 10:27:08PM +0200, Parav Pandit wrote: > > virtnet_rq_free_unused_buf() helper function to free the buffer > > already exists. Avoid code duplication by reusing existing function. > > > >

RE: [PATCH net-next 1/2] virtio_net: Fix short frame length check

2023-01-14 Thread Parav Pandit via Virtualization
> From: Alexander Duyck > Sent: Friday, January 13, 2023 7:24 PM > > On Fri, Jan 13, 2023 at 3:37 PM Parav Pandit wrote: > > > > > > > From: Alexander H Duyck > > > Sent: Friday, January 13, 2023 6:24 PM > > > > > > On Sat, 2023-01-14 at 00:36 +0200, Parav Pandit wrote: > > > > A smallest

RE: [PATCH net-next 0/2] Small packet processing handling changes

2023-01-14 Thread Parav Pandit via Virtualization
Hi Jakub, Dave, > From: Parav Pandit > Sent: Friday, January 13, 2023 5:36 PM > > Hi, > > These two changes improve the small packet handling. > > Patch summary: > patch-1 fixes the length check by considering Ethernet 60B frame size > patch-2 avoids code duplication by reuses existing buffer

[PATCH net-next] virtio-net: Reduce debug name field size to 16 bytes

2023-01-22 Thread Parav Pandit via Virtualization
virtio queue index can be maximum of 65535. 16 bytes are enough to store the vq name with the existing string prefix. With this change, send queue struct saves 24 bytes and receive queue saves whole cache line worth 64 bytes per structure due to saving in alignment bytes. Pahole results before:

RE: [PATCH v2 1/7] vdpa: fix improper error message when adding vdpa dev

2023-02-01 Thread Parav Pandit via Virtualization
> From: Si-Wei Liu > Sent: Tuesday, January 31, 2023 6:22 PM > > In below example, before the fix, mtu attribute is supported by the parent > mgmtdev, but the error message showing "All provided are not supported" is > just misleading. > > $ vdpa mgmtdev show > vdpasim_net: >

[PATCH 0/2] virtio-net: close() to follow mirror of open()

2023-02-01 Thread Parav Pandit via Virtualization
Hi, This two small patches improves ndo_close() callback to follow the mirror sequence of ndo_open() callback. This improves the code auditing and also ensure that xdp rxq info is not unregistered while NAPI on RXQ is ongoing. Please review. Patch summary: patch-1 ensures that xdp rq info is

[PATCH 1/2] virtio-net: Keep stop() to follow mirror sequence of open()

2023-02-01 Thread Parav Pandit via Virtualization
Cited commit in fixes tag frees rxq xdp info while RQ NAPI is still enabled and packet processing may be ongoing. Follow the mirror sequence of open() in the stop() callback. This ensures that when rxq info is unregistered, no rx packet processing is ongoing. Fixes: 754b8a21a96d ("virtio_net:

RE: [PATCH v2 2/7] vdpa: conditionally read STATUS in config space

2023-02-01 Thread Parav Pandit via Virtualization
> From: Si-Wei Liu > Sent: Tuesday, January 31, 2023 6:22 PM > > The spec says: > status only exists if VIRTIO_NET_F_STATUS is set > > Similar to MAC and MTU, vdpa_dev_net_config_fill() should read STATUS > conditionally depending on the feature bits. > > Signed-off-by: Si-Wei Liu >

RE: [PATCH v2 3/7] vdpa: validate provisioned device features against specified attribute

2023-02-01 Thread Parav Pandit via Virtualization
> From: Si-Wei Liu > Sent: Tuesday, January 31, 2023 6:22 PM > > With device feature provisioning, there's a chance for misconfiguration that > the > vdpa feature attribute supplied in 'vdpa dev add' command doesn't get > selected on the device_features to be provisioned. For instance, when

RE: [PATCH v2 1/3] virtio_pci_modern: Allow non power of 2 sizes for virtqueues

2023-03-10 Thread Parav Pandit via Virtualization
> From: Feng Liu > Sent: Friday, March 10, 2023 12:34 AM > > - if (!is_power_of_2(num)) { > - dev_warn(_dev->pci_dev->dev, "bad queue size %u", > num); > - return ERR_PTR(-EINVAL); > - } > - The check is still valid for split q. Maybe the right place for such

RE: [patch net-next v2] net: virtio_net: implement exact header length guest feature

2023-02-21 Thread Parav Pandit via Virtualization
> From: Jiri Pirko > Sent: Tuesday, February 21, 2023 9:48 AM > > From: Jiri Pirko > > Virtio spec introduced a feature VIRTIO_NET_F_GUEST_HDRLEN which when > set implicates that the driver provides the exact size of the header. > > Quoting the original virtio spec: > "hdr_len is a hint to

Re: [PATCH 0/1] posted interrtups support for mlx5

2023-04-03 Thread Parav Pandit via Virtualization
On 4/3/2023 12:20 PM, Eli Cohen wrote: Hi, the single patch in this series adds support for posted interrupts in mlx5. It depends on the patch series already accpted can be seen here: https://patchwork.kernel.org/project/netdevbpf/patch/20230324231341.29808-1-sa...@kernel.org/ git pull

Re: [PATCH 1/1] vdpa/mlx5: Support interrupt bypassing

2023-04-03 Thread Parav Pandit via Virtualization
On 4/3/2023 12:20 PM, Eli Cohen wrote: Add support for generation of interrupts from the device directly to the VM to the VCPU thus avoiding the overhead on the host CPU. When supported, the driver will attempt to allocate vectors for each data virtqueue. If a vector for a virtqueue cannot

[PATCH net-next] virtio-net: Maintain reverse cleanup order

2023-02-03 Thread Parav Pandit via Virtualization
To easily audit the code, better to keep the device stop() sequence to be mirror of the device open() sequence. Acked-by: Michael S. Tsirkin Reviewed-by: Jiri Pirko Signed-off-by: Parav Pandit --- drivers/net/virtio_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

RE: [PATCH 2/2] virtio-net: Maintain reverse cleanup order

2023-02-02 Thread Parav Pandit via Virtualization
> From: Jiri Pirko > Sent: Thursday, February 2, 2023 10:47 AM > > Thu, Feb 02, 2023 at 04:10:56PM CET, pa...@nvidia.com wrote: > > > >> From: Jiri Pirko > >> Sent: Thursday, February 2, 2023 7:26 AM > >> > >> Thu, Feb 02, 2023 at 06:00:38AM CET, pa...@nvidia.com wrote: > >> >To easily audit

RE: [PATCH 2/2] virtio-net: Maintain reverse cleanup order

2023-02-02 Thread Parav Pandit via Virtualization
> From: Jiri Pirko > Sent: Thursday, February 2, 2023 7:26 AM > > Thu, Feb 02, 2023 at 06:00:38AM CET, pa...@nvidia.com wrote: > >To easily audit the code, better to keep the device stop() sequence to > >be mirror of the device open() sequence. > > > >Signed-off-by: Parav Pandit > >

[PATCH net] virtio-net: Keep stop() to follow mirror sequence of open()

2023-02-02 Thread Parav Pandit via Virtualization
Cited commit in fixes tag frees rxq xdp info while RQ NAPI is still enabled and packet processing may be ongoing. Follow the mirror sequence of open() in the stop() callback. This ensures that when rxq info is unregistered, no rx packet processing is ongoing. Fixes: 754b8a21a96d ("virtio_net:

RE: [PATCH v2 3/7] vdpa: validate provisioned device features against specified attribute

2023-02-02 Thread Parav Pandit via Virtualization
> From: Si-Wei Liu > Sent: Thursday, February 2, 2023 4:59 PM > > On 2/1/2023 9:05 PM, Parav Pandit wrote: > > > >> From: Si-Wei Liu > >> Sent: Tuesday, January 31, 2023 6:22 PM > >> > >> With device feature provisioning, there's a chance for > >> misconfiguration that the vdpa feature

RE: [PATCH net v3] virtio_net: Fix error unwinding of XDP initialization

2023-05-02 Thread Parav Pandit via Virtualization
> From: Feng Liu > Sent: Tuesday, May 2, 2023 8:35 PM > Issue: 3383038 Remove this internal garbage. > Fixes: 754b8a21a96d ("virtio_net: setup xdp_rxq_info") > Signed-off-by: Feng Liu > Reviewed-by: William Tu > Reviewed-by: Parav Pandit > Reviewed-by: Simon Horman > Acked-by: Michael S.

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

2021-08-18 Thread Parav Pandit via Virtualization
> From: Jason Wang > Sent: Thursday, August 19, 2021 9:52 AM > > 在 2021/8/19 上午1:33, Michael S. Tsirkin 写道: > > On Wed, Aug 18, 2021 at 12:31:39PM +0800, Jason Wang wrote: > >> On Wed, Aug 18, 2021 at 11:15 AM Parav Pandit > wrote: > >>> > >>> > From: Michael S. Tsirkin > Sent:

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

2021-08-17 Thread Parav Pandit via Virtualization
> From: Michael S. Tsirkin > Sent: Tuesday, August 17, 2021 2:24 AM > > On Mon, Aug 09, 2021 at 09:51:49AM +, Parav Pandit wrote: > > > From: Michael S. Tsirkin > > > Sent: Monday, August 9, 2021 3:10 PM > > > > > > On Fri, Aug 06, 2021 at 08:55:56AM +, Parav Pandit wrote: > > > > >

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

2021-08-17 Thread Parav Pandit via Virtualization
> From: Jason Wang > Sent: Wednesday, August 18, 2021 10:02 AM > On Wed, Aug 18, 2021 at 11:15 AM Parav Pandit wrote: [..] > > > I'm inclined to say vxlan is closer to a model to follow. > > Ok. thanks for the feedback. We are using the model close to vxlan. > > Lets resolve should we have it

RE: [Patch v1 3/3] vdpa/mlx5: Add multiqueue support

2021-08-16 Thread Parav Pandit via Virtualization
> From: Eli Cohen > Sent: Monday, August 16, 2021 10:27 PM > > It works fine when I am working with your version of qemu with support for > multi queue. > > The problem is that it is broken on qemu v6.0.0. If I register my vdpa device > with more than 2 data virtqueues, qemu won't even create a

RE: [Patch v1 3/3] vdpa/mlx5: Add multiqueue support

2021-08-16 Thread Parav Pandit via Virtualization
> From: Jason Wang > Sent: Tuesday, August 17, 2021 9:26 AM > > On Tue, Aug 17, 2021 at 3:37 AM Michael S. Tsirkin > wrote: > > > > On Mon, Aug 16, 2021 at 07:56:59PM +0300, Eli Cohen wrote: > > > On Mon, Aug 16, 2021 at 01:58:06PM +0800, Jason Wang wrote: > > > > > > > > 在 2021/8/16 下午1:47,

RE: [PATCH v3 0/4] virtio short improvements

2021-08-02 Thread Parav Pandit via Virtualization
Hi Michael, > From: Parav Pandit > Sent: Thursday, July 29, 2021 10:09 AM > > Hi Michael, > > > From: Parav Pandit > > Sent: Wednesday, July 21, 2021 7:57 PM > > To: m...@redhat.com; virtualization@lists.linux-foundation.org > > Cc: Parav Pandit > > Subject: [PATCH v3 0/4] virtio short

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

2021-08-09 Thread Parav Pandit via Virtualization
> From: Eli Cohen > Sent: Monday, August 9, 2021 11:38 AM > > On Mon, Aug 09, 2021 at 09:01:48AM +0300, Parav Pandit wrote: > > > > > > > From: Eli Cohen > > > Sent: Monday, August 9, 2021 11:28 AM > > > > > > On Mon, Aug 09, 2021 at 08:42:58AM +0300, Parav Pandit wrote: > > > > > > > > > > >

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

2021-08-08 Thread Parav Pandit via Virtualization
> From: Eli Cohen > Sent: Monday, August 9, 2021 10:51 AM > > On Mon, Aug 09, 2021 at 11:07:50AM +0800, Jason Wang wrote: > > > > 在 2021/8/6 下午4:55, Parav Pandit 写道: > > > > > > > From: Michael S. Tsirkin > > > > Sent: Friday, August 6, 2021 2:12 PM > > > > > > > > enum vdpa_attr { > > > >

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

2021-08-08 Thread Parav Pandit via Virtualization
Hi Jason, > From: Jason Wang > Sent: Monday, August 9, 2021 8:38 AM > > For example creator (hypervisor) of the vdpa devices knows that a > > guest VM is given 4 vcpus, So hypervisor creates a vdpa devices with > > config space layout as, max_virtqueue_pairs = 4. > > And the MAC address chosen

RE: [PATCH v3 0/4] virtio short improvements

2021-08-09 Thread Parav Pandit via Virtualization
Hi Michael, > From: Virtualization On > Behalf Of Parav Pandit via Virtualization > Hi Michael, > > > From: Parav Pandit > > Sent: Thursday, July 29, 2021 10:09 AM > > > > Hi Michael, > > > > > From: Parav Pandit > > > Sent

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

2021-08-09 Thread Parav Pandit via Virtualization
> From: Eli Cohen > Sent: Monday, August 9, 2021 11:28 AM > > On Mon, Aug 09, 2021 at 08:42:58AM +0300, Parav Pandit wrote: > > > > > > > From: Eli Cohen > > > Sent: Monday, August 9, 2021 10:51 AM > > > > > > On Mon, Aug 09, 2021 at 11:07:50AM +0800, Jason Wang wrote: > > > > > > > > 在

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

2021-08-09 Thread Parav Pandit via Virtualization
> From: Michael S. Tsirkin > Sent: Monday, August 9, 2021 3:10 PM > > On Fri, Aug 06, 2021 at 08:55:56AM +, Parav Pandit wrote: > > > > > > > > > > The point is to try and not reinvent a dedicated vpda interface > > > where a generic one exits. > > > E.g. for phy things such as mac speed

[PATCH RESEND net-next 09/10] net/mlx5: Support enable_rdma devlink dev param

2021-08-10 Thread Parav Pandit via Virtualization
Enable user to disable RDMA auxiliary device so that when it is not required, user can disable it. For example, $ devlink dev param set pci/:06:00.0 \ name enable_rdma value false cmode driverinit $ devlink dev reload pci/:06:00.0 At this point devlink instance do not

[PATCH RESEND net-next 08/10] net/mlx5: Support enable_eth devlink dev param

2021-08-10 Thread Parav Pandit via Virtualization
Enable user to disable Ethernet auxiliary device so that when it is not required, user can disable it. For example, $ devlink dev param set pci/:06:00.0 \ name enable_eth value false cmode driverinit $ devlink dev reload pci/:06:00.0 At this point devlink instance do not

[PATCH RESEND net-next 07/10] net/mlx5: Fix unpublish devlink parameters

2021-08-10 Thread Parav Pandit via Virtualization
Cleanup routine missed to unpublish the parameters. Add it. Fixes: e890acd5ff18 ("net/mlx5: Add devlink flow_steering_mode parameter") Signed-off-by: Parav Pandit Reviewed-by: Jiri Pirko Reviewed-by: Leon Romanovsky --- drivers/net/ethernet/mellanox/mlx5/core/devlink.c | 1 + 1 file changed,

[PATCH RESEND net-next 06/10] devlink: Add APIs to publish, unpublish individual parameter

2021-08-10 Thread Parav Pandit via Virtualization
Enable drivers to publish/unpublish individual parameter. Signed-off-by: Parav Pandit Reviewed-by: Jiri Pirko Reviewed-by: Leon Romanovsky --- include/net/devlink.h | 4 net/core/devlink.c| 48 +++ 2 files changed, 52 insertions(+) diff --git

[PATCH RESEND net-next 10/10] net/mlx5: Support enable_vnet devlink dev param

2021-08-10 Thread Parav Pandit via Virtualization
Enable user to disable VDPA net auxiliary device so that when it is not required, user can disable it. For example, $ devlink dev param set pci/:06:00.0 \ name enable_vnet value false cmode driverinit $ devlink dev reload pci/:06:00.0 At this point devlink instance do not

[PATCH RESEND net-next 01/10] devlink: Add new "enable_eth" generic device param

2021-08-10 Thread Parav Pandit via Virtualization
Add new device generic parameter to enable/disable creation of Ethernet auxiliary device and associated device functionality in the devlink instance. User who prefers to disable such functionality can disable it using below example. $ devlink dev param set pci/:06:00.0 \ name

[PATCH RESEND net-next 03/10] devlink: Add new "enable_vnet" generic device param

2021-08-10 Thread Parav Pandit via Virtualization
Add new device generic parameter to enable/disable creation of VDPA net auxiliary device and associated device functionality in the devlink instance. User who prefers to disable such functionality can disable it using below example. $ devlink dev param set pci/:06:00.0 \ name

[PATCH RESEND net-next 05/10] devlink: Add API to register and unregister single parameter

2021-08-10 Thread Parav Pandit via Virtualization
Currently device configuration parameters can be registered as an array. Due to this a constant array must be registered. A single driver supporting multiple devices each with different device capabilities end up registering all parameters even if it doesn't support it. One possible workaround a

[PATCH RESEND net-next 02/10] devlink: Add new "enable_rdma" generic device param

2021-08-10 Thread Parav Pandit via Virtualization
Add new device generic parameter to enable/disable creation of RDMA auxiliary device and associated device functionality in the devlink instance. User who prefers to disable such functionality can disable it using below example. $ devlink dev param set pci/:06:00.0 \ name

[PATCH RESEND net-next 00/10] devlink: Control auxiliary devices

2021-08-10 Thread Parav Pandit via Virtualization
(Resend to CC RDMA and vdpa mailing lists). Hi Dave, Jakub, Currently, for mlx5 multi-function device, a user is not able to control which functionality to enable/disable. For example, each PCI PF, VF, SF function by default has netdevice, RDMA and vdpa-net devices always enabled. Hence, enable

[PATCH RESEND net-next 04/10] devlink: Create a helper function for one parameter registration

2021-08-10 Thread Parav Pandit via Virtualization
Create and use a helper function for one parameter registration. Subsequent patch also will reuse this for driver facing routine to register a single parameter. Signed-off-by: Parav Pandit Reviewed-by: Jiri Pirko Reviewed-by: Leon Romanovsky --- net/core/devlink.c | 24

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

2021-08-06 Thread Parav Pandit via Virtualization
> From: Michael S. Tsirkin > Sent: Friday, August 6, 2021 2:12 PM > > enum vdpa_attr { > > @@ -33,6 +34,16 @@ enum vdpa_attr { > > VDPA_ATTR_DEV_MAX_VQS, /* u32 */ > > VDPA_ATTR_DEV_MAX_VQ_SIZE, /* u16 */ > > + VDPA_ATTR_DEV_NET_CFG_MACADDR,

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

2021-08-05 Thread Parav Pandit via Virtualization
> From: Michael S. Tsirkin > Sent: Thursday, August 5, 2021 3:28 PM > > On Wed, Jun 16, 2021 at 10:11:49PM +0300, Parav Pandit wrote: > > 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

RE: [PATCH v3 0/4] virtio short improvements

2021-07-28 Thread Parav Pandit via Virtualization
Hi Michael, > From: Parav Pandit > Sent: Wednesday, July 21, 2021 7:57 PM > To: m...@redhat.com; virtualization@lists.linux-foundation.org > Cc: Parav Pandit > Subject: [PATCH v3 0/4] virtio short improvements > > Hi, > > This series contains small improvements for virtio pci driver. > The

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

2021-10-21 Thread Parav Pandit via Virtualization
Currently user cannot view the vdpa device config space. Also 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

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

2021-10-21 Thread Parav Pandit via Virtualization
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

[PATCH linux-next v4 3/8] vdpa: Use kernel coding style for structure comments

2021-10-21 Thread Parav Pandit via Virtualization
As subsequent patch adds new structure field with comment, move the structure comment to follow kernel coding style. Signed-off-by: Parav Pandit Reviewed-by: Eli Cohen --- include/linux/vdpa.h | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/include/linux/vdpa.h

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

2021-10-21 Thread Parav Pandit via Virtualization
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 $ vdpa dev config show -jp { "config": { "bar": {

[PATCH linux-next v4 4/8] vdpa: Enable user to set mac and mtu of vdpa device

2021-10-21 Thread Parav Pandit via Virtualization
$ 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 link_announce false mtu 9000 $ vdpa dev config show -jp { "config": { "bar": { "mac": "00:11:22:33:44:55", "link ": "up",

[PATCH linux-next v4 5/8] vdpa_sim_net: Enable user to set mac address and mtu

2021-10-21 Thread Parav Pandit via Virtualization
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 v4 7/8] vdpa/mlx5: Support configuration of MAC

2021-10-21 Thread Parav Pandit via Virtualization
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 while adding a device: $ vdpa dev add mgmtdev pci/:06:00.2 name vdpa0 mac 00:11:22:33:44:55 2. Show

[PATCH linux-next v4 6/8] vdpa/mlx5: Fix clearing of VIRTIO_NET_F_MAC feature bit

2021-10-21 Thread Parav Pandit via Virtualization
Cited patch in the fixes tag clears the features bit during reset. mlx5 vdpa device feature bits are static decided by device capabilities. Clearing features bit cleared the VIRTIO_NET_F_MAC. Due to this MAC address provided by the device is not honored. Fix it by not clearing the static feature

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

2021-10-21 Thread Parav Pandit via Virtualization
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 ---

RE: [PATCH linux-next v4 0/8] vdpa: enable user to set mac, mtu

2021-10-22 Thread Parav Pandit via Virtualization
Hi Michael, > From: Michael S. Tsirkin > Sent: Friday, October 22, 2021 4:11 PM > > On Thu, Oct 21, 2021 at 07:35:01PM +0300, Parav Pandit wrote: > > Currently user cannot view the vdpa device config space. Also user > > cannot set the mac address and mtu of the vdpa device. > > This patchset

RE: [PATCH linux-next v4 0/8] vdpa: enable user to set mac, mtu

2021-10-24 Thread Parav Pandit via Virtualization
> From: Michael S. Tsirkin > Sent: Sunday, October 24, 2021 2:46 AM [..] > > > [1.243559] Call Trace: > > > [1.243559] virtio_queue_rq+0x1e4/0x5f0 > > > [1.243559] __blk_mq_try_issue_directly+0x138/0x1e0 > > > [1.243559] blk_mq_try_issue_directly+0x47/0xa0 > > > [

RE: [PATCH linux-next v4 4/8] vdpa: Enable user to set mac and mtu of vdpa device

2021-10-25 Thread Parav Pandit via Virtualization
> From: Jason Wang > Sent: Monday, October 25, 2021 12:31 PM > > 在 2021/10/22 上午12:35, Parav Pandit 写道: > > $ 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 link_announce false mtu 9000 > > > >

RE: [PATCH linux-next v4 5/8] vdpa_sim_net: Enable user to set mac address and mtu

2021-10-25 Thread Parav Pandit via Virtualization
> From: Jason Wang > Sent: Monday, October 25, 2021 12:32 PM > > > 在 2021/10/22 上午12:35, 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

RE: [PATCH linux-next v4 2/8] vdpa: Introduce query of device config layout

2021-10-25 Thread Parav Pandit via Virtualization
> From: Jason Wang > Sent: Monday, October 25, 2021 11:36 AM > > > 在 2021/10/22 上午12:35, 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

RE: [PATCH linux-next v4 5/8] vdpa_sim_net: Enable user to set mac address and mtu

2021-10-25 Thread Parav Pandit via Virtualization
> From: Michael S. Tsirkin > Sent: Monday, October 25, 2021 1:39 PM > > On Mon, Oct 25, 2021 at 07:11:23AM +, Parav Pandit wrote: > > > > > > > From: Jason Wang > > > Sent: Monday, October 25, 2021 12:32 PM > > > > > > > > > 在 2021/10/22 上午12:35, Parav Pandit 写道: > > > > Enable user to

RE: [PATCH linux-next v4 6/8] vdpa/mlx5: Fix clearing of VIRTIO_NET_F_MAC feature bit

2021-10-25 Thread Parav Pandit via Virtualization
> From: Jason Wang > Sent: Monday, October 25, 2021 12:35 PM > > 在 2021/10/22 上午12:35, Parav Pandit 写道: > > Cited patch in the fixes tag clears the features bit during reset. > > mlx5 vdpa device feature bits are static decided by device capabilities. > > > This is not what I read at least

RE: [PATCH linux-next v4 4/8] vdpa: Enable user to set mac and mtu of vdpa device

2021-10-25 Thread Parav Pandit via Virtualization
> From: Michael S. Tsirkin > Sent: Monday, October 25, 2021 1:38 PM > > It depends on what will the user be able to do then. > Inject packets? Affect RX routing? Use up networking resources? > NET_ADMIN is a safe choice but we didn't check any capability in the past so > it > seems reasonable

RE: [PATCH linux-next v4 0/8] vdpa: enable user to set mac, mtu

2021-10-25 Thread Parav Pandit via Virtualization
Hi Michael, > From: Parav Pandit > Sent: Monday, October 25, 2021 9:14 AM > > > Thanks for the report. Parav, could you help bisect this please? > > > I also pushed out a new head with some patches dropped. > > > Could you test that maybe? > > > > > > Thanks! > > > > OK I think it's due to

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 > > > --- > > >

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

2021-12-17 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

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

2021-12-17 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 v2 3/4] vdpa: Enable user to set mac address of vdpa device

2021-12-17 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 v2 2/4] vdpa: Enable user to query vdpa device config layout

2021-12-17 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 v2 4/4] vdpa: Enable user to set mtu of the vdpa device

2021-12-17 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

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

2021-12-19 Thread Parav Pandit via Virtualization
> From: Michael S. Tsirkin > Sent: Sunday, December 19, 2021 3:37 AM > > On Sat, Dec 18, 2021 at 01:53:01PM -0700, David Ahern wrote: > > On 12/17/21 1:08 AM, Parav Pandit wrote: > > > @@ -204,6 +217,8 @@ static void vdpa_opts_put(struct nlmsghdr *nlh, > struct vdpa *vdpa) > > > if

RE: [PATCH] vdpa/mlx5: Fix wrong configuration of virtio_version_1_0

2021-12-30 Thread Parav Pandit via Virtualization
> From: Eli Cohen > Sent: Thursday, December 30, 2021 7:50 PM > > Remove overriding of virtio_version_1_0 which forced the virtqueue object to > version 1. > > Fixes: 1a86b377aa21 ("vdpa/mlx5: Add VDPA driver for supported mlx5 > devices") > Signed-off-by: Eli Cohen > --- >

  1   2   3   >