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 t

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

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

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 ca

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: 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 ___ Virtualization

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 a

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 guest

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 = &virtiovf_acc_vfio_pci_ops; > > + struct virtiovf_pci_cor

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 Gunthorp

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 t

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 def

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 o

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

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

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

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

[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 b/inc

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

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

[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 --- drivers/

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 en

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

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 sho

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

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 c

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 Jason

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 set

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 1/8] vdpa: Introduce and use vdpa device get, set config helpers

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

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

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

2021-10-25 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 expo

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

2021-10-25 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 otherwis

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

2021-10-25 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. Now that user is enabled to set the mac address, remove the module parameter for same. And example of setting mac addr and mtu and view the configuration: $ vdpa mgmtdev show v

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

2021-10-25 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 v5 6/8] vdpa/mlx5: Fix clearing of VIRTIO_NET_F_MAC feature bit

2021-10-25 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 v5 3/8] vdpa: Use kernel coding style for structure comments

2021-10-25 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 Acked-by: Jason Wang --- include/linux/vdpa.h | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/incl

[PATCH linux-next v5 7/8] vdpa/mlx5: Support configuration of MAC

2021-10-25 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 c

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

2021-10-25 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 v5 8/8] vdpa/mlx5: Forward only packets with allowed MAC address

2021-10-25 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 --- drivers/

RE: [PATCH linux-next v5 7/8] vdpa/mlx5: Support configuration of MAC

2021-10-25 Thread Parav Pandit via Virtualization
> From: Parav Pandit > Sent: Monday, October 25, 2021 6:23 PM > > 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: >

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

2021-10-25 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 expo

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

2021-10-25 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 otherwis

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

2021-10-25 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 Acked-by: Jason Wang --- include/linux/vdpa.h | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/incl

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

2021-10-25 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 v6 4/8] vdpa: Enable user to set mac and mtu of vdpa device

2021-10-25 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 v6 5/8] vdpa_sim_net: Enable user to set mac address and mtu

2021-10-25 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. Now that user is enabled to set the mac address, remove the module parameter for same. And example of setting mac addr and mtu and view the configuration: $ vdpa mgmtdev show v

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

2021-10-25 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. These feature bits (including VIRTIO_NET_F_MAC) are initialized during device addition time. Clearing features bit in reset callback cleared the VIRTIO_NET_F_

[PATCH linux-next v6 7/8] vdpa/mlx5: Support configuration of MAC

2021-10-25 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 c

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

2021-10-25 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 --- drivers/

RE: [PATCH linux-next v5 7/8] vdpa/mlx5: Support configuration of MAC

2021-10-25 Thread Parav Pandit via Virtualization
> From: Michael S. Tsirkin > Sent: Tuesday, October 26, 2021 2:45 AM > > On Mon, Oct 25, 2021 at 06:35:35PM +, Parav Pandit wrote: > > > > > From: Parav Pandit > > > Sent: Monday, October 25, 2021 6:23 PM > > > > > > From: Eli Cohen > > > > > > Add code to accept MAC configuration throug

RE: [PATCH linux-next v5 7/8] vdpa/mlx5: Support configuration of MAC

2021-10-25 Thread Parav Pandit via Virtualization
> From: leohou1402 > Sent: Tuesday, October 26, 2021 10:28 AM > Which device does mlX5 refer to ? Connectx-4 or ConnectX-5 ? > I want to test it out. ConnectX-6 dx. ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://li

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

2021-10-26 Thread Parav Pandit via Virtualization
> From: Stefano Garzarella > Sent: Tuesday, October 26, 2021 6:31 PM > > On Tue, Oct 26, 2021 at 07:02:39AM +0300, Parav Pandit via Virtualization > wrote: > >$ vdpa dev add name bar mgmtdev vdpasim_net mac 00:11:22:33:44:55 mtu > >9000 > > > >$ vdpa dev

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

2021-10-26 Thread Parav Pandit via Virtualization
> From: Michael S. Tsirkin > Sent: Tuesday, October 26, 2021 6:38 PM > > On Tue, Oct 26, 2021 at 01:03:41PM +, Parav Pandit wrote: > > > > > > > From: Stefano Garzarella > > > Sent: Tuesday, October 26, 2021 6:31 PM > > > > > >

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

2021-10-26 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 otherwis

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

2021-10-26 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 expo

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

2021-10-26 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 v7 3/8] vdpa: Use kernel coding style for structure comments

2021-10-26 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 Acked-by: Jason Wang Reviewed-by: Stefano Garzarella --- include/linux/vdpa.h | 9 - 1 file changed, 8 insertions(+),

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

2021-10-26 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. Now that user is enabled to set the mac address, remove the module parameter for same. And example of setting mac addr and mtu and view the configuration: $ vdpa mgmtdev show v

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

2021-10-26 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 v7 7/8] vdpa/mlx5: Support configuration of MAC

2021-10-26 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 c

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

2021-10-26 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. These feature bits (including VIRTIO_NET_F_MAC) are initialized during device addition time. Clearing features bit in reset callback cleared the VIRTIO_NET_F_

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

2021-10-26 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 --- drivers/

RE: vDPA bus driver selection

2021-10-27 Thread Parav Pandit via Virtualization
Hi Stefano, > From: Stefano Garzarella > Sent: Wednesday, October 27, 2021 8:04 PM > > Hi folks, > I was trying to understand if we have a way to specify which vDPA bus driver > (e.g. vhost-vdpa, virtio-vdpa) a device should use. > IIUC we don't have it, and the first registered driver is used w

RE: vDPA bus driver selection

2021-10-27 Thread Parav Pandit via Virtualization
Hi Stefano, > From: Stefano Garzarella > Sent: Wednesday, October 27, 2021 9:17 PM > To: Parav Pandit > Cc: Jason Wang ; Michael Tsirkin ; > Linux Virtualization ; Eli Cohen > > Subject: Re: vDPA bus driver selection > > Hi Parav, > > On Wed, Oct 27, 2021 at 03:21:15PM +, Parav Pandit wro

RE: vDPA bus driver selection

2021-10-27 Thread Parav Pandit via Virtualization
> From: Michael S. Tsirkin > Sent: Thursday, October 28, 2021 1:46 AM > > On Wed, Oct 27, 2021 at 03:21:15PM +, Parav Pandit wrote: > > Hi Stefano, > > > > > From: Stefano Garzarella > > > Sent: Wednesday, October 27, 2021 8:04 PM > > > > > > Hi folks, > > > I was trying to understand if w

RE: vDPA bus driver selection

2021-10-28 Thread Parav Pandit via Virtualization
> From: Stefano Garzarella > Sent: Thursday, October 28, 2021 3:08 PM > >> >$ vdpa/vdpa dev add mgmtdev vdpasim_net name vdpa0 mac > >> >00:11:22:33:44:55 $ echo 0 > /sys/bus/vdpa/drivers_autoprobe > >> > > >> >And after vdpa device creation, it manually binds to the desired > >> >driver such

RE: vDPA bus driver selection

2021-10-29 Thread Parav Pandit via Virtualization
Hi Stefano, > From: Stefano Garzarella > Sent: Friday, October 29, 2021 8:11 PM > > Maybe the only missing point is a way to specify the default bus driver to use > for a device. Of course the workaround is to unbind it and bind to the desired > one. > Unbind bind can be done but it is slower f

RE: [PATCH 1/2] vdpa: Add support for querying statistics

2021-11-18 Thread Parav Pandit via Virtualization
> From: Jason Wang > Sent: Friday, November 19, 2021 8:12 AM > > On Thu, Nov 18, 2021 at 1:58 PM Eli Cohen wrote: > > > > Add support for querying virtqueue statistics. Supported statistics are: > > > > Received_desc - number of descriptors received for the virtqueue > > completed_desc - numb

RE: [PATCH 1/2] vdpa: Add support for querying statistics

2021-11-22 Thread Parav Pandit via Virtualization
> From: Jason Wang > Sent: Monday, November 22, 2021 8:00 AM > > On Fri, Nov 19, 2021 at 11:09 AM Parav Pandit wrote: > > > > > > > > > From: Jason Wang > > > Sent: Friday, November 19, 2021 8:12 AM > > > > > > On Thu, Nov 18, 2021 at 1:58 PM Eli Cohen wrote: > > > > > > > > Add support for

RE: [PATCH 1/2] vdpa: Add support for querying statistics

2021-11-22 Thread Parav Pandit via Virtualization
> From: Jason Wang > Sent: Monday, November 22, 2021 3:02 PM > > > If we go with vendor stats, how can we communicate the information to > > userspace? Currenlty we use netlink attributes defined to pass this > > information. > > It can be done exactly as what have been done in the patch, we

RE: [PATCH 1/2] vdpa: Add support for querying statistics

2021-11-22 Thread Parav Pandit via Virtualization
> From: Eli Cohen > Sent: Monday, November 22, 2021 8:37 PM > > On Mon, Nov 22, 2021 at 12:15:36PM +0200, Parav Pandit wrote: > > > > > > > From: Jason Wang > > > Sent: Monday, November 22, 2021 3:02 PM > > > > > > > If we go with vendor stats, how can we communicate the information > > > > t

RE: [PATCH] vdpa_sim: avoid putting an uninitialized iova_domain

2021-11-22 Thread Parav Pandit via Virtualization
> From: Longpeng(Mike) > Sent: Monday, November 22, 2021 5:52 PM > > From: Longpeng > > The system will crash if we put an uninitialized iova_domain, this could > happen when an error occurs before initializing the iova_domain in > vdpasim_create(). > > BUG: kernel NULL pointer dereference,

RE: [PATCH] net/mlx5_vdpa: Offer VIRTIO_NET_F_MTU when setting MTU

2021-11-24 Thread Parav Pandit via Virtualization
> From: Eli Cohen > Sent: Wednesday, November 24, 2021 10:40 PM > > Make sure to offer VIRTIO_NET_F_MTU since we configure the MTU based on > what was queried from the device. > > This allows the virtio driver to allocate large enough buffers based on the > reported MTU. > > Signed-off-by: E

RE: [PATH v1 1/2] vdpa: Add support for querying vendor statistics

2021-11-24 Thread Parav Pandit via Virtualization
> From: Eli Cohen > Sent: Wednesday, November 24, 2021 10:26 PM > > Add support for querying virtqueue statistics. Supported statistics are: > > received_desc - number of descriptors received for the virtqueue > completed_desc - number of descriptors completed for the virtqueue > > A descrip

RE: [PATH v1 2/2] vdpa/mlx5: Add support for reading descriptor statistics

2021-11-24 Thread Parav Pandit via Virtualization
> From: Eli Cohen > Sent: Wednesday, November 24, 2021 10:26 PM > Implement the get_vq_stats calback of vdpa_config_ops to return the statistics > for a virtqueue. > > Signed-off-by: Eli Cohen > --- > V0 -> V1: > Use mutex to sync stats query with change of number of queues > > drivers/vdpa/

[PATCH] vdpa: Consider device id larger than 31

2021-11-25 Thread Parav Pandit via Virtualization
virtio device id value can be more than 31. Hence, use BIT_ULL in assignment. Fixes: 33b347503f01 ("vdpa: Define vdpa mgmt device, ops and a netlink interface") Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Parav Pandit --- drivers/vdpa/vdpa.c | 2 +- 1 file changed

RE: [PATCH] net/mlx5_vdpa: Offer VIRTIO_NET_F_MTU when setting MTU

2021-11-25 Thread Parav Pandit via Virtualization
> From: Eli Cohen > Sent: Thursday, November 25, 2021 1:32 PM > > On Thu, Nov 25, 2021 at 07:29:18AM +0200, Parav Pandit wrote: > > > > > > > From: Eli Cohen > > > Sent: Wednesday, November 24, 2021 10:40 PM > > > > > > Make sure to offer VIRTIO_NET_F_MTU since we configure the MTU based > >

RE: [PATH v1 1/2] vdpa: Add support for querying vendor statistics

2021-11-25 Thread Parav Pandit via Virtualization
> From: Eli Cohen > Sent: Thursday, November 25, 2021 1:37 PM > > On Thu, Nov 25, 2021 at 07:34:21AM +0200, Parav Pandit wrote: > > > > > > > From: Eli Cohen > > > Sent: Wednesday, November 24, 2021 10:26 PM > > > > > > Add support for querying virtqueue statistics. Supported statistics are:

RE: [PATCH] vdpa: Consider device id larger than 31

2021-11-28 Thread Parav Pandit via Virtualization
> From: Dan Carpenter > Sent: Monday, November 29, 2021 12:29 PM > > On Sun, Nov 28, 2021 at 09:14:35AM +0200, Eli Cohen wrote: > > On Fri, Nov 26, 2021 at 10:48:12AM +0800, Jason Wang wrote: > > > On Fri, Nov 26, 2021 at 2:09 AM Parav Pandit wrote: > > > > > > > > virtio device id value can

RE: [PATH v1 1/2] vdpa: Add support for querying vendor statistics

2021-11-29 Thread Parav Pandit via Virtualization
> From: Jason Wang > Sent: Thursday, November 25, 2021 10:21 AM > > On Thu, Nov 25, 2021 at 12:56 AM Eli Cohen wrote: > > > > Add support for querying virtqueue statistics. Supported statistics are: > > > > received_desc - number of descriptors received for the virtqueue > > completed_desc - n

[PATCH v1] vdpa: Consider device id larger than 31

2021-11-29 Thread Parav Pandit via Virtualization
virtio device id value can be more than 31. Hence, use BIT_ULL in assignment. Fixes: 33b347503f01 ("vdpa: Define vdpa mgmt device, ops and a netlink interface") Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Parav Pandit Acked-by: Jason Wang --- changelog: v0->v1: -

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

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

  1   2   3   >