Re: [PATCH] virtio_net: set default mtu to 1500 when 'Device maximum MTU' bigger than 1500

2023-05-08 Thread Xuan Zhuo
On Mon, 8 May 2023 02:43:24 -0400, "Michael S. Tsirkin" wrote: > On Mon, May 08, 2023 at 02:18:08PM +0800, Xuan Zhuo wrote: > > On Mon, 8 May 2023 02:15:46 -0400, "Michael S. Tsirkin" > > wrote: > > > On Mon, May 08, 2023 at 10:01:59AM +0800, Xuan Zhuo wrote: > > > > On Sun, 7 May 2023 04:58:58

[PATCH V2 0/5] vDPA/ifcvf: implement immediate initialization mechanism

2023-05-08 Thread Zhu Lingshan
Formerly, ifcvf driver has implemented a lazy-initialization mechanism for the virtqueues and other config space contents, it would store all configurations that passed down from the userspace, then load them to the device config space upon DRIVER_OK. This can not serve live migration, so this ser

[PATCH V2 2/5] vDPA/ifcvf: get_driver_features from virtio registers

2023-05-08 Thread Zhu Lingshan
This commit implements a new function ifcvf_get_driver_feature() which read driver_features from virtio registers. To be less ambiguous, ifcvf_set_features() is renamed to ifcvf_set_driver_features(), and ifcvf_get_features() is renamed to ifcvf_get_dev_features() which returns the provisioned vDP

[PATCH V2 1/5] vDPA/ifcvf: virt queue ops take immediate actions

2023-05-08 Thread Zhu Lingshan
In this commit, virtqueue operations including: set_vq_num(), set_vq_address(), set_vq_ready() and get_vq_ready() access PCI registers directly to take immediate actions. Signed-off-by: Zhu Lingshan --- drivers/vdpa/ifcvf/ifcvf_base.c | 58 - drivers/vdpa/ifcvf/if

[PATCH V2 5/5] vDPA/ifcvf: a vendor driver should not set _CONFIG_S_FAILED

2023-05-08 Thread Zhu Lingshan
VIRTIO_CONFIG_S_FAILED indicates the guest driver has given up the device due to fatal errors. So it is the guest decision, the vendor driver should not set this status to the device. Signed-off-by: Zhu Lingshan Acked-by: Jason Wang --- drivers/vdpa/ifcvf/ifcvf_main.c | 4 +--- 1 file changed,

[PATCH V2 4/5] vDPA/ifcvf: synchronize irqs in the reset routine

2023-05-08 Thread Zhu Lingshan
This commit synchronize irqs of the virtqueues and config space in the reset routine. Thus ifcvf_stop_hw() and reset() are refactored as well. Signed-off-by: Zhu Lingshan --- drivers/vdpa/ifcvf/ifcvf_base.c | 41 + drivers/vdpa/ifcvf/ifcvf_base.h | 1 + drivers/vdpa/

[PATCH V2 3/5] vDPA/ifcvf: retire ifcvf_start_datapath and ifcvf_add_status

2023-05-08 Thread Zhu Lingshan
Rather than former lazy-initialization mechanism, now the virtqueue operations and driver_features related ops access the virtio registers directly to take immediate actions. So ifcvf_start_datapath() should retire. ifcvf_add_status() is retierd because we should not change device status by a vend

Re: [PATCH] virtio_net: set default mtu to 1500 when 'Device maximum MTU' bigger than 1500

2023-05-08 Thread Michael S. Tsirkin
On Mon, May 08, 2023 at 03:41:56PM +0800, Xuan Zhuo wrote: > On Mon, 8 May 2023 02:43:24 -0400, "Michael S. Tsirkin" > wrote: > > On Mon, May 08, 2023 at 02:18:08PM +0800, Xuan Zhuo wrote: > > > On Mon, 8 May 2023 02:15:46 -0400, "Michael S. Tsirkin" > > > wrote: > > > > On Mon, May 08, 2023 at

Re: [PATCH v6 0/3] Add sync object UAPI support to VirtIO-GPU driver

2023-05-08 Thread Rob Clark
On Wed, May 3, 2023 at 10:07 AM Gurchetan Singh wrote: > > > > On Mon, May 1, 2023 at 8:38 AM Dmitry Osipenko > wrote: >> >> On 4/16/23 14:52, Dmitry Osipenko wrote: >> > We have multiple Vulkan context types that are awaiting for the addition >> > of the sync object DRM UAPI support to the Virt

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

2023-05-08 Thread Feng Liu via Virtualization
On 2023-05-07 p.m.9:45, Xuan Zhuo wrote: External email: Use caution opening links or attachments On Sat, 6 May 2023 08:08:02 -0400, Feng Liu wrote: On 2023-05-05 p.m.10:33, Xuan Zhuo wrote: External email: Use caution opening links or attachments On Tue, 2 May 2023 20:35:25 -0400, Fen

Re: [PATCH] virtio_net: set default mtu to 1500 when 'Device maximum MTU' bigger than 1500

2023-05-08 Thread Michael S. Tsirkin
On Mon, May 08, 2023 at 09:25:48AM -0700, Stephen Hemminger wrote: > On Mon, 8 May 2023 06:30:07 -0400 > "Michael S. Tsirkin" wrote: > > > > > > I don't know, in any scenario, when the hardware supports a large > > > > > mtu, but we do > > > > > not want the user to use it by default. > > > >

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

2023-05-08 Thread Feng Liu via Virtualization
When initializing XDP in virtnet_open(), some rq xdp initialization may hit an error causing net device open failed. However, previous rqs have already initialized XDP and enabled NAPI, which is not the expected behavior. Need to roll back the previous rq initialization to avoid leaks in error unwi

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

2023-05-08 Thread Xuan Zhuo
On Mon, 8 May 2023 11:00:10 -0400, Feng Liu wrote: > > > On 2023-05-07 p.m.9:45, Xuan Zhuo wrote: > > External email: Use caution opening links or attachments > > > > > > On Sat, 6 May 2023 08:08:02 -0400, Feng Liu wrote: > >> > >> > >> On 2023-05-05 p.m.10:33, Xuan Zhuo wrote: > >>> External ema

Re: [PATCH] virtio_net: set default mtu to 1500 when 'Device maximum MTU' bigger than 1500

2023-05-08 Thread Xuan Zhuo
On Mon, 8 May 2023 14:10:07 -0400, "Michael S. Tsirkin" wrote: > On Mon, May 08, 2023 at 09:25:48AM -0700, Stephen Hemminger wrote: > > On Mon, 8 May 2023 06:30:07 -0400 > > "Michael S. Tsirkin" wrote: > > > > > > > > I don't know, in any scenario, when the hardware supports a large > > > > > >

Re: [PATCH v4] virtio_net: suppress cpu stall when free_unused_bufs

2023-05-08 Thread Jason Wang
On Mon, May 8, 2023 at 2:47 PM Michael S. Tsirkin wrote: > > On Mon, May 08, 2023 at 02:13:42PM +0800, Jason Wang wrote: > > On Mon, May 8, 2023 at 2:08 PM Michael S. Tsirkin wrote: > > > > > > On Mon, May 08, 2023 at 11:12:03AM +0800, Jason Wang wrote: > > > > > > > > 在 2023/5/7 21:34, Michael S

Re: [PATCH net v4] virtio_net: Fix error unwinding of XDP initialization

2023-05-08 Thread Michael S. Tsirkin
On Mon, May 08, 2023 at 06:27:08PM -0400, Feng Liu wrote: > When initializing XDP in virtnet_open(), some rq xdp initialization > may hit an error causing net device open failed. However, previous > rqs have already initialized XDP and enabled NAPI, which is not the > expected behavior. Need to rol