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

2021-10-25 Thread Leo Hou
Thanks! Parav Pandit 于2021年10月26日周二 下午1:00写道: > > > 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

Re: [PATCH V3 11/11] vhost: allow userspace to create workers

2021-10-25 Thread Jason Wang
在 2021/10/22 下午1:19, Mike Christie 写道: This patch allows userspace to create workers and bind them to vqs. You can have N workers per dev and also share N workers with M vqs. Signed-off-by: Mike Christie A question, who is the best one to determine the binding? Is it the VMM (Qemu etc) or

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

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

2021-10-25 Thread leohou1402
Which device does mlX5 refer to ? Connectx-4 or ConnectX-5 ?I want to test it out.Thanks.On 10/25/2021 20:54,Parav Pandit via Virtualization wrote:>From: Eli Cohen >Add code to accept MAC configuration through vdpa tool. The MAC is>written into the config struct and later can be

Re: [PATCH v6 6/8] virtio_vdpa: setup correct vq size with callbacks get_vq_num_{max, min}

2021-10-25 Thread Jason Wang
On Mon, Oct 25, 2021 at 2:25 PM Wu Zongyong wrote: > > On Mon, Oct 25, 2021 at 12:45:44PM +0800, Jason Wang wrote: > > > > 在 2021/10/25 上午10:44, Wu Zongyong 写道: > > > On Mon, Oct 25, 2021 at 10:22:30AM +0800, Jason Wang wrote: > > > > On Fri, Oct 22, 2021 at 10:45 AM Wu Zongyong > > > > wrote: >

Re: [PATCH] virtio_blk: corrent types for status handling

2021-10-25 Thread Jason Wang
On Mon, Oct 25, 2021 at 3:59 PM Michael S. Tsirkin wrote: > > virtblk_setup_cmd returns blk_status_t in an int, callers then assign it > back to a blk_status_t variable. blk_status_t is either u32 or (more > typically) u8 so it works, but is inelegant and causes sparse warnings. > > Pass the

Re: [RFC PATCH v4 20/20] vdpa: Add custom IOTLB translations to SVQ

2021-10-25 Thread Jason Wang
On Wed, Oct 20, 2021 at 7:57 PM Eugenio Perez Martin wrote: > > On Wed, Oct 20, 2021 at 11:03 AM Jason Wang wrote: > > > > On Wed, Oct 20, 2021 at 2:52 PM Eugenio Perez Martin > > wrote: > > > > > > On Wed, Oct 20, 2021 at 4:07 AM Jason Wang wrote: > > > > > > > > On Wed, Oct 20, 2021 at 10:02

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

2021-10-25 Thread Jason Wang
On Tue, Oct 26, 2021 at 12:03 PM Parav Pandit wrote: > > 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.

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

2021-10-25 Thread Jason Wang
On Tue, Oct 26, 2021 at 12:03 PM Parav Pandit wrote: > > 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. >

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

2021-10-25 Thread Jason Wang
On Tue, Oct 26, 2021 at 12:03 PM Parav Pandit wrote: > > 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

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

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

[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

[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

[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

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

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

[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

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

2021-10-25 Thread Jason Wang
On Mon, Oct 25, 2021 at 8:53 PM Parav Pandit wrote: > > $ 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": { >

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

2021-10-25 Thread Jason Wang
On Mon, Oct 25, 2021 at 8:53 PM Parav Pandit wrote: > > 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 >

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

2021-10-25 Thread Jason Wang
在 2021/10/25 下午2:59, Parav Pandit 写道: 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

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

2021-10-25 Thread Jason Wang
在 2021/10/25 下午3:08, Parav Pandit 写道: 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

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

2021-10-25 Thread Jason Wang
在 2021/10/25 下午3:06, Parav Pandit 写道: 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

Re: [PATCH][next] virtio_blk: Fix spelling mistake: "advertisted" -> "advertised"

2021-10-25 Thread Jason Wang
On Mon, Oct 25, 2021 at 6:22 PM Colin Ian King wrote: > > There is a spelling mistake in a dev_err error message. Fix it. > > Signed-off-by: Colin Ian King > --- Acked-by: Jason Wang > drivers/block/virtio_blk.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git

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

2021-10-25 Thread Michael S. Tsirkin
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 through vdpa tool. The MAC is written > > into the config struct and later can be retrieved

Re: [PATCH] virtio_blk: allow 0 as num_request_queues

2021-10-25 Thread Michael S. Tsirkin
On Mon, Oct 25, 2021 at 01:30:19AM +0300, Max Gurtovoy wrote: > > On 10/24/2021 6:49 PM, Michael S. Tsirkin wrote: > > On Sun, Oct 24, 2021 at 06:29:59PM +0300, Max Gurtovoy wrote: > > > On 10/24/2021 6:11 PM, Michael S. Tsirkin wrote: > > > > On Sun, Oct 24, 2021 at 05:19:33PM +0300, Max

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:

Re: [PATCH 4/4] virtio-blk: Use blk_validate_block_size() to validate block size

2021-10-25 Thread Michael S. Tsirkin
On Mon, Oct 25, 2021 at 09:47:34PM +0800, Yongji Xie wrote: > On Mon, Oct 25, 2021 at 9:20 PM Michael S. Tsirkin wrote: > > > > On Mon, Oct 25, 2021 at 05:43:06PM +0800, Xie Yongji wrote: > > > The block layer can't support the block size larger than > > > page size yet. If an untrusted device

Re: [PATCH V3 11/11] vhost: allow userspace to create workers

2021-10-25 Thread Michael S. Tsirkin
On Mon, Oct 25, 2021 at 11:04:42AM -0500, michael.chris...@oracle.com wrote: > On 10/23/21 3:11 PM, Michael S. Tsirkin wrote: > > On Fri, Oct 22, 2021 at 01:17:26PM -0500, michael.chris...@oracle.com wrote: > >> On 10/22/21 11:12 AM, michael.chris...@oracle.com wrote: > >>> On 10/22/21 5:47 AM,

Re: [PATCH v2 4/4] virtio-blk: Use blk_validate_block_size() to validate block size

2021-10-25 Thread Michael S. Tsirkin
On Mon, Oct 25, 2021 at 10:25:06PM +0800, Xie Yongji wrote: > The block layer can't support the block size larger than the block size -> block sizes, or a block size > page size yet. And to add to that, a block size that's too small or not a power of two won't work either, right? Mention that

Re: [PATCH v2 0/4] Add blk_validate_block_size() helper for drivers to validate block size

2021-10-25 Thread Michael S. Tsirkin
On Mon, Oct 25, 2021 at 10:25:02PM +0800, Xie Yongji wrote: > The block layer can't support the block size larger than > page size yet, so driver needs to validate the block size > before setting it. Now this validation is done in device drivers > with some duplicated codes. This series tries to

Re: [PATCH V3 06/11] vhost-sock: convert to vq helpers

2021-10-25 Thread michael . christie
On 10/25/21 4:08 AM, Stefano Garzarella wrote: > On Fri, Oct 22, 2021 at 12:19:06AM -0500, Mike Christie wrote: >> Convert from vhost dev based helpers to vq ones. >> >> Signed-off-by: Mike Christie >> --- >> drivers/vhost/vsock.c | 8 +--- >> 1 file changed, 5 insertions(+), 3 deletions(-) >>

Re: [PATCH V3 11/11] vhost: allow userspace to create workers

2021-10-25 Thread michael . christie
On 10/23/21 3:11 PM, Michael S. Tsirkin wrote: > On Fri, Oct 22, 2021 at 01:17:26PM -0500, michael.chris...@oracle.com wrote: >> On 10/22/21 11:12 AM, michael.chris...@oracle.com wrote: >>> On 10/22/21 5:47 AM, Michael S. Tsirkin wrote: > diff --git a/include/uapi/linux/vhost.h

Re: [PATCH 4/4] virtio-blk: Use blk_validate_block_size() to validate block size

2021-10-25 Thread Michael S. Tsirkin
On Mon, Oct 25, 2021 at 05:43:06PM +0800, Xie Yongji wrote: > The block layer can't support the block size larger than > page size yet. If an untrusted device presents an invalid > block size in configuration space, it will result in the > kernel crash something like below: > > [ 506.154324]

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

[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

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

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

[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

[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

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 >

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 V3 06/11] vhost-sock: convert to vq helpers

2021-10-25 Thread Stefano Garzarella
On Fri, Oct 22, 2021 at 12:19:06AM -0500, Mike Christie wrote: Convert from vhost dev based helpers to vq ones. Signed-off-by: Mike Christie --- drivers/vhost/vsock.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/vhost/vsock.c b/drivers/vhost/vsock.c index

Re: [PATCH] virtio_blk: corrent types for status handling

2021-10-25 Thread Christoph Hellwig
On Mon, Oct 25, 2021 at 11:24:57AM +0300, Max Gurtovoy wrote: > Maybe we can compare the returned status to BLK_STS_OK. But I see we don't > do it also in NVMe subsystem so I guess we can assume BLK_STS_OK == 0 > forever. Jes, BLK_STS_OK == 0 is an intentional allowed short cut. It is not

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] virtio_blk: corrent types for status handling

2021-10-25 Thread Stefan Hajnoczi
On Mon, Oct 25, 2021 at 03:58:54AM -0400, Michael S. Tsirkin wrote: > virtblk_setup_cmd returns blk_status_t in an int, callers then assign it > back to a blk_status_t variable. blk_status_t is either u32 or (more > typically) u8 so it works, but is inelegant and causes sparse warnings. > > Pass

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

2021-10-25 Thread Michael S. Tsirkin
On Mon, Oct 25, 2021 at 08:10:15AM +, Parav Pandit wrote: > > > > 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

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

2021-10-25 Thread Michael S. Tsirkin
On Mon, Oct 25, 2021 at 06:59:56AM +, Parav Pandit wrote: > > > > 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:

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

2021-10-25 Thread Michael S. Tsirkin
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 the mac address and mtu so that each vdpa device > > > can have its own user specified

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

2021-10-25 Thread Michael S. Tsirkin
On Mon, Oct 25, 2021 at 07:06:42AM +, Parav Pandit wrote: > > > > 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

Re: [mst-vhost:vhost 4/47] drivers/block/virtio_blk.c:238:24: sparse: sparse: incorrect type in return expression (different base types)

2021-10-25 Thread Michael S. Tsirkin
ting big SGL for data > config: i386-randconfig-s001-20211025 (attached as .config) > compiler: gcc-9 (Debian 9.3.0-22) 9.3.0 > reproduce: > # apt-get install sparse > # sparse version: v0.6.4-dirty > # > https://git.kernel.org/pub/scm/linux/ke

[PATCH] virtio_blk: corrent types for status handling

2021-10-25 Thread Michael S. Tsirkin
virtblk_setup_cmd returns blk_status_t in an int, callers then assign it back to a blk_status_t variable. blk_status_t is either u32 or (more typically) u8 so it works, but is inelegant and causes sparse warnings. Pass the status in blk_status_t in a consistent way. Reported-by: kernel test

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

[mst-vhost:vhost 4/47] drivers/block/virtio_blk.c:238:24: sparse: sparse: incorrect type in return expression (different base types)

2021-10-25 Thread kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git vhost head: 2b109044b081148b58974f5696ffd4383c3e9abb commit: b2c5221fd074fbb0e57d6707bed5b7386bf430ed [4/47] virtio-blk: avoid preallocating big SGL for data config: i386-randconfig-s001-20211025 (attached as .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: 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

[mst-vhost:vhost 4/47] drivers/block/virtio_blk.c:175:17: error: implicit declaration of function 'sg_free_table_chained'

2021-10-25 Thread kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git vhost head: 2b109044b081148b58974f5696ffd4383c3e9abb commit: b2c5221fd074fbb0e57d6707bed5b7386bf430ed [4/47] virtio-blk: avoid preallocating big SGL for data config: riscv-nommu_virt_defconfig (attached as .config) compiler:

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

2021-10-25 Thread Jason Wang
在 2021/10/22 上午12:35, 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 while adding a device: $ vdpa dev add mgmtdev pci/:06:00.2

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 Jason Wang
在 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 from mlx5_vdpa_get_features: static u64 mlx5_vdpa_get_features(struct

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

2021-10-25 Thread Jason Wang
在 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 configuration layout fields setting callback routine. Now that user is enabled to

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

2021-10-25 Thread Jason Wang
在 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 $ vdpa dev config show -jp { "config": { "bar": { "mac":

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

2021-10-25 Thread Jason Wang
在 2021/10/22 上午12:35, Parav Pandit 写道: 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

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

2021-10-25 Thread Jason Wang
在 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 bar: mac 00:35:09:19:48:05 link up link_announce false mtu 1500 Nit: it looks to me this

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

2021-10-25 Thread Jason Wang
在 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 and set config callbacks. Features setting also influence the layout of the