Re: [PATCH v2] vdpa/mlx5: Add and remove debugfs in setup/teardown driver

2023-03-29 Thread Jason Wang
On Tue, Mar 28, 2023 at 3:18 PM Eli Cohen wrote: > > The right place to add the debugfs create is in > setup_driver() and remove it in teardown_driver(). > > Current code adds the debugfs when creating the device but resetting a > device will remove the debugfs subtree and subsequent set_driver

Re: [PATCH v2] vdpa/mlx5: Avoid losing link state updates

2023-03-29 Thread Jason Wang
On Tue, Mar 28, 2023 at 3:18 PM Eli Cohen wrote: > > Current code ignores link state updates if VIRTIO_NET_F_STATUS was not > negotiated. However, link state updates could be received before feature > negotiation was completed , therefore causing link state events to be > lost, possibly leaving

Re: [PATCH] vdpa_sim_net: complete the initialization before register the device

2023-03-29 Thread Jason Wang
On Thu, Mar 30, 2023 at 12:03 AM Stefano Garzarella wrote: > > Initialization must be completed before calling _vdpa_register_device() > since it can connect the device to the vDPA bus, so requests can arrive > after that call. > > So for example vdpasim_net_work(), which uses the net->*_stats

Re: [External] Re: 9p regression (Was: [PATCH v2] virtio_ring: don't update event idx on get_buf)

2023-03-29 Thread Jason Wang
On Wed, Mar 29, 2023 at 1:42 PM Michael S. Tsirkin wrote: > > On Tue, Mar 28, 2023 at 11:39:59AM +0800, Jason Wang wrote: > > On Tue, Mar 28, 2023 at 11:09 AM 黄杰 wrote: > > > > > > Jason Wang 于2023年3月28日周二 10:59写道: > > > > > > > > On Tue, Mar 28, 2023 at 10:13 AM Dominique Martinet > > > >

Re: [PATCH v6] virtio: add VIRTIO_F_NOTIFICATION_DATA feature support

2023-03-29 Thread Xuan Zhuo
On Thu, 30 Mar 2023 01:49:23 +0300, Viktor Prutyanov wrote: > On Fri, Mar 24, 2023 at 10:50 PM Viktor Prutyanov wrote: > > > > According to VirtIO spec v1.2, VIRTIO_F_NOTIFICATION_DATA feature > > indicates that the driver passes extra data along with the queue > > notifications. > > > > In a

Re: [RFC PATCH 0/4] eBPF RSS through QMP support.

2023-03-29 Thread Andrew Melnichenko
Oh yeah, I'll fix that. Thank you! On Wed, Mar 29, 2023 at 2:52 PM Xuan Zhuo wrote: > > Is this a patch-set of QEMU? If yes, why are the email lists all kernel mail > list without QEMU mail list? > > Thanks. > > On Wed, 29 Mar 2023 13:45:41 +0300, Andrew Melnychenko > wrote: > > This series of

Re: [RFC PATCH v1 1/2] vsock: return errors other than -ENOMEM to socket

2023-03-29 Thread Vishnu Dasa via Virtualization
> On Mar 28, 2023, at 4:20 AM, Arseniy Krasnov wrote: > > !! External Email > > On 28.03.2023 14:19, Stefano Garzarella wrote: >> On Tue, Mar 28, 2023 at 01:42:19PM +0300, Arseniy Krasnov wrote: >>> >>> >>> On 28.03.2023 12:42, Stefano Garzarella wrote: I pressed send too early...

Re: [PATCH v4] virtio_ring: interrupt disable flag updated to vq even with event_triggered is set

2023-03-29 Thread Michael S. Tsirkin
On Wed, Mar 29, 2023 at 06:23:00PM +0800, Albert Huang wrote: > From: "huangjie.albert" > > in virtio_net, if we disable the napi_tx, when we triger a tx interrupt, > the vq->event_triggered will be set to true. It will no longer be set to > false. Unless we explicitly call

Re: [PATCH v4] virtio_ring: interrupt disable flag updated to vq even with event_triggered is set

2023-03-29 Thread Michael S. Tsirkin
On Wed, Mar 29, 2023 at 06:23:00PM +0800, Albert Huang wrote: > From: "huangjie.albert" > > in virtio_net, if we disable the napi_tx, when we triger a tx interrupt, > the vq->event_triggered will be set to true. It will no longer be set to > false. Unless we explicitly call

Re: [PATCH v4] virtio_ring: interrupt disable flag updated to vq even with event_triggered is set

2023-03-29 Thread Michael S. Tsirkin
On Wed, Mar 29, 2023 at 07:45:01PM +0800, Xuan Zhuo wrote: > On Wed, 29 Mar 2023 18:23:00 +0800, Albert Huang > wrote: > > From: "huangjie.albert" > > > > in virtio_net, if we disable the napi_tx, when we triger a tx interrupt, > > the vq->event_triggered will be set to true. It will no longer

Re: [PATCH v3] virtio_ring: interrupt disable flag updated to vq even with event_triggered is set

2023-03-29 Thread Michael S. Tsirkin
On Wed, Mar 29, 2023 at 03:27:03PM +0800, Xuan Zhuo wrote: > Maybe one new thread is better. > > Thanks. I don't know but do not post same message twice please without explanation. if you repost put "PATCH repost" in the subject. ___ Virtualization

Re: [PATCH v3] virtio_ring: interrupt disable flag updated to vq even with event_triggered is set

2023-03-29 Thread Michael S. Tsirkin
Ican't parse the subject at all. I think the subject from v2 was fine - we are skipping event index updates on get buf. Or maybe go higher level and describe the effect of the patch: virtio_ring: reduce interrupt rate with event idx enabled On Wed, Mar 29, 2023 at 03:21:35PM +0800, Albert Huang

[PATCH] vdpa_sim_net: complete the initialization before register the device

2023-03-29 Thread Stefano Garzarella
Initialization must be completed before calling _vdpa_register_device() since it can connect the device to the vDPA bus, so requests can arrive after that call. So for example vdpasim_net_work(), which uses the net->*_stats variables, can be scheduled before they are initialized. Let's move

[linux-next:master] BUILD REGRESSION 198925fae644b0099b66fac1d972721e6e563b17

2023-03-29 Thread kernel test robot
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master branch HEAD: 198925fae644b0099b66fac1d972721e6e563b17 Add linux-next specific files for 20230329 Error/Warning reports: https://lore.kernel.org/oe-kbuild-all/202303082135.njdx1bij-...@intel.com https

Re: [RFC PATCH v2 48/48] sock: Remove ->sendpage*() in favour of sendmsg(MSG_SPLICE_PAGES)

2023-03-29 Thread David Howells
Hannes Reinecke wrote: > > [!] Note: This is a work in progress. At the moment, some things won't > > build if this patch is applied. nvme, kcm, smc, tls. Actually, that needs updating. nvme and smc now build. > Weelll ... what happens to consumers of kernel_sendpage()? > (Let's call

Re: [RFC PATCH v2 48/48] sock: Remove ->sendpage*() in favour of sendmsg(MSG_SPLICE_PAGES)

2023-03-29 Thread Hannes Reinecke
On 3/29/23 16:13, David Howells wrote: [!] Note: This is a work in progress. At the moment, some things won't build if this patch is applied. nvme, kcm, smc, tls. Remove ->sendpage() and ->sendpage_locked(). sendmsg() with MSG_SPLICE_PAGES should be used instead. This allows multiple

[RFC PATCH v2 48/48] sock: Remove ->sendpage*() in favour of sendmsg(MSG_SPLICE_PAGES)

2023-03-29 Thread David Howells
[!] Note: This is a work in progress. At the moment, some things won't build if this patch is applied. nvme, kcm, smc, tls. Remove ->sendpage() and ->sendpage_locked(). sendmsg() with MSG_SPLICE_PAGES should be used instead. This allows multiple pages and multipage folios to be passed

Re: [RFC PATCH 0/4] eBPF RSS through QMP support.

2023-03-29 Thread Xuan Zhuo
Is this a patch-set of QEMU? If yes, why are the email lists all kernel mail list without QEMU mail list? Thanks. On Wed, 29 Mar 2023 13:45:41 +0300, Andrew Melnychenko wrote: > This series of patches provides the ability to retrieve eBPF program > through qmp, so management application may

Re: [PATCH v4] virtio_ring: interrupt disable flag updated to vq even with event_triggered is set

2023-03-29 Thread Xuan Zhuo
On Wed, 29 Mar 2023 18:23:00 +0800, Albert Huang wrote: > From: "huangjie.albert" > > in virtio_net, if we disable the napi_tx, when we triger a tx interrupt, > the vq->event_triggered will be set to true. It will no longer be set to > false. Unless we explicitly call

[RFC PATCH 5/5] ebpf: Updated eBPF program and skeleton.

2023-03-29 Thread Andrew Melnychenko
Updated section name, so libbpf should init/gues proper program type without specifications during open/load. Signed-off-by: Andrew Melnychenko --- ebpf/rss.bpf.skeleton.h | 1469 --- tools/ebpf/rss.bpf.c|2 +- 2 files changed, 741 insertions(+), 730

[RFC PATCH 0/4] eBPF RSS through QMP support.

2023-03-29 Thread Andrew Melnychenko
This series of patches provides the ability to retrieve eBPF program through qmp, so management application may load bpf blob with proper capabilities. Now, virtio-net devices can accept eBPF programs and maps through properties as external file descriptors. Access to the eBPF map is direct

[RFC PATCH 4/5] qmp: Added new command to retrieve eBPF blob.

2023-03-29 Thread Andrew Melnychenko
Added command "request-ebpf". This command returns eBPF program encoded base64. The program taken from the skeleton and essentially is an ELF object that can be loaded in the future with libbpf. Signed-off-by: Andrew Melnychenko --- monitor/qmp-cmds.c | 17 + qapi/misc.json

[RFC PATCH 2/5] virtio-net: Added property to load eBPF RSS with fds.

2023-03-29 Thread Andrew Melnychenko
eBPF RSS program and maps may now be passed during initialization. Initially was implemented for libvirt to launch qemu without permissions, and initialized eBPF program through the helper. Signed-off-by: Andrew Melnychenko --- hw/net/virtio-net.c| 77

[RFC PATCH 3/5] ebpf: Added declaration/initialization routines.

2023-03-29 Thread Andrew Melnychenko
Now, the binary objects may be retrieved by id/name. It would require for future qmp commands that may require specific eBPF blob. Signed-off-by: Andrew Melnychenko --- ebpf/ebpf.c | 48 ebpf/ebpf.h | 25 +

[RFC PATCH 1/5] ebpf: Added eBPF initialization by fds and map update.

2023-03-29 Thread Andrew Melnychenko
Changed eBPF map updates through mmaped array. Mmaped arrays provide direct access to map data. It should omit using bpf_map_update_elem() call, which may require capabilities that are not present. Signed-off-by: Andrew Melnychenko --- ebpf/ebpf_rss-stub.c | 6 +++ ebpf/ebpf_rss.c | 120

Re: [External] Re: [PATCH v3] virtio_ring: interrupt disable flag updated to vq even with event_triggered is set

2023-03-29 Thread Xuan Zhuo
On Wed, 29 Mar 2023 17:33:23 +0800, =?utf-8?b?6buE5p2w?= wrote: > Xuan Zhuo 于2023年3月29日周三 17:27写道: > > > > On Wed, 29 Mar 2023 15:28:41 +0800, Albert Huang > > wrote: > > > From: "huangjie.albert" > > > > > > in virtio_net, if we disable the napi_tx, when we triger a tx interrupt, > > > the

Re: [PATCH v3] virtio_ring: interrupt disable flag updated to vq even with event_triggered is set

2023-03-29 Thread Xuan Zhuo
On Wed, 29 Mar 2023 15:28:41 +0800, Albert Huang wrote: > From: "huangjie.albert" > > in virtio_net, if we disable the napi_tx, when we triger a tx interrupt, > the vq->event_triggered will be set to true. It will no longer be set to > false. Unless we explicitly call

Re: [PATCH v3] virtio_ring: interrupt disable flag updated to vq even with event_triggered is set

2023-03-29 Thread Xuan Zhuo
Maybe one new thread is better. Thanks. On Wed, 29 Mar 2023 15:21:35 +0800, Albert Huang wrote: > From: "huangjie.albert" > > in virtio_net, if we disable the napi_tx, when we triger a tx interrupt, > the vq->event_triggered will be set to true. It will no longer be set to > false. Unless we

Re: [PATCH net v2] virtio/vsock: fix leaks due to missing skb owner

2023-03-29 Thread Stefano Garzarella
On Tue, Mar 28, 2023 at 04:29:09PM +, Bobby Eshleman wrote: This patch sets the skb owner in the recv and send path for virtio. For the send path, this solves the leak caused when virtio_transport_purge_skbs() finds skb->sk is always NULL and therefore never matches it with the current