Re: [RFC PATCH 2/9] vringh: remove vringh_iov and unite to vringh_kiov

2022-12-26 Thread Shunsuke Mie
2022年12月27日(火) 16:56 Michael S. Tsirkin : > > On Tue, Dec 27, 2022 at 04:13:49PM +0900, Shunsuke Mie wrote: > > 2022年12月27日(火) 16:05 Michael S. Tsirkin : > > > > > > On Tue, Dec 27, 2022 at 02:04:03PM +0800, Jason Wang wrote: > > > > On Tue, Dec 27, 2022 at 10:25 AM Shunsuke Mie wrote: > > > > >

Re: [RFC PATCH 2/9] vringh: remove vringh_iov and unite to vringh_kiov

2022-12-26 Thread Michael S. Tsirkin
On Tue, Dec 27, 2022 at 04:13:49PM +0900, Shunsuke Mie wrote: > 2022年12月27日(火) 16:05 Michael S. Tsirkin : > > > > On Tue, Dec 27, 2022 at 02:04:03PM +0800, Jason Wang wrote: > > > On Tue, Dec 27, 2022 at 10:25 AM Shunsuke Mie wrote: > > > > > > > > struct vringh_iov is defined to hold userland

Re: [RFC PATCH 4/9] vringh: unify the APIs for all accessors

2022-12-26 Thread Shunsuke Mie
2022年12月27日(火) 16:04 Michael S. Tsirkin : > > On Tue, Dec 27, 2022 at 11:25:26AM +0900, Shunsuke Mie wrote: > > Each vringh memory accessors that are for user, kern and iotlb has own > > interfaces that calls common code. But some codes are duplicated and that > > becomes loss extendability. > > >

Re: [PATCH 1/4] virtio-net: convert rx mode setting to use workqueue

2022-12-26 Thread Michael S. Tsirkin
On Mon, Dec 26, 2022 at 03:49:05PM +0800, Jason Wang wrote: > @@ -2227,9 +2267,21 @@ static void virtnet_set_rx_mode(struct net_device *dev) > VIRTIO_NET_CTRL_MAC_TABLE_SET, sg)) > dev_warn(>dev, "Failed to set MAC filter table.\n"); > > +

Re: [PATCH 3/4] virtio_ring: introduce a per virtqueue waitqueue

2022-12-26 Thread Michael S. Tsirkin
On Tue, Dec 27, 2022 at 12:30:35PM +0800, Jason Wang wrote: > > But device is still going and will later use the buffers. > > > > Same for timeout really. > > Avoiding infinite wait/poll is one of the goals, another is to sleep. > If we think the timeout is hard, we can start from the wait. > >

Re: [PATCH] MAINTAINERS: Update maintainer list for virtio i2c

2022-12-26 Thread Michael S. Tsirkin
On Tue, Dec 27, 2022 at 12:05:09PM +0800, Chen, Jian Jun wrote: > > On 12/14/2022 20:00, Michael S. Tsirkin wrote: > > On Wed, Dec 14, 2022 at 11:20:34AM +0100, Wolfram Sang wrote: > > > Hi Viresh, > > > > > > > I understand that it is okay to pass the maintainership, within the > > > > company,

Re: [PATCH 2/4] virtio_ring: switch to use BAD_RING()

2022-12-26 Thread Michael S. Tsirkin
On Tue, Dec 27, 2022 at 11:51:02AM +0800, Jason Wang wrote: > On Tue, Dec 27, 2022 at 7:36 AM Michael S. Tsirkin wrote: > > > > On Mon, Dec 26, 2022 at 03:49:06PM +0800, Jason Wang wrote: > > > Switch to reuse BAD_RING() to allow common logic to be implemented in > > > BAD_RING(). > > > > > >

Re: [PATCH 3/4] virtio_ring: introduce a per virtqueue waitqueue

2022-12-26 Thread Michael S. Tsirkin
On Tue, Dec 27, 2022 at 11:47:34AM +0800, Jason Wang wrote: > On Tue, Dec 27, 2022 at 7:34 AM Michael S. Tsirkin wrote: > > > > On Mon, Dec 26, 2022 at 03:49:07PM +0800, Jason Wang wrote: > > > This patch introduces a per virtqueue waitqueue to allow driver to > > > sleep and wait for more used.

Re: [RFC PATCH 2/9] vringh: remove vringh_iov and unite to vringh_kiov

2022-12-26 Thread Shunsuke Mie
2022年12月27日(火) 16:05 Michael S. Tsirkin : > > On Tue, Dec 27, 2022 at 02:04:03PM +0800, Jason Wang wrote: > > On Tue, Dec 27, 2022 at 10:25 AM Shunsuke Mie wrote: > > > > > > struct vringh_iov is defined to hold userland addresses. However, to use > > > common function, __vring_iov, finally the

Re: [PATCH] MAINTAINERS: Update maintainer list for virtio i2c

2022-12-26 Thread Michael S. Tsirkin
On Tue, Dec 27, 2022 at 12:04:10PM +0800, Chen, Jian Jun wrote: > > On 12/14/2022 19:37, Michael S. Tsirkin wrote: > > On Wed, Dec 14, 2022 at 01:36:31PM +0800, Conghui wrote: > > > This updates the maintainer for virtio i2c drvier > > I got that, but what is going on here exactly? > > I

Re: [RFC PATCH 2/9] vringh: remove vringh_iov and unite to vringh_kiov

2022-12-26 Thread Shunsuke Mie
2022年12月27日(火) 15:04 Jason Wang : > > On Tue, Dec 27, 2022 at 10:25 AM Shunsuke Mie wrote: > > > > struct vringh_iov is defined to hold userland addresses. However, to use > > common function, __vring_iov, finally the vringh_iov converts to the > > vringh_kiov with simple cast. It includes

Re: [RFC PATCH 2/9] vringh: remove vringh_iov and unite to vringh_kiov

2022-12-26 Thread Michael S. Tsirkin
On Tue, Dec 27, 2022 at 02:04:03PM +0800, Jason Wang wrote: > On Tue, Dec 27, 2022 at 10:25 AM Shunsuke Mie wrote: > > > > struct vringh_iov is defined to hold userland addresses. However, to use > > common function, __vring_iov, finally the vringh_iov converts to the > > vringh_kiov with simple

Re: [RFC PATCH 4/9] vringh: unify the APIs for all accessors

2022-12-26 Thread Michael S. Tsirkin
On Tue, Dec 27, 2022 at 11:25:26AM +0900, Shunsuke Mie wrote: > Each vringh memory accessors that are for user, kern and iotlb has own > interfaces that calls common code. But some codes are duplicated and that > becomes loss extendability. > > Introduce a struct vringh_ops and provide a common

Re: [PATCH 4/4] virtio-net: sleep instead of busy waiting for cvq command

2022-12-26 Thread Michael S. Tsirkin
On Tue, Dec 27, 2022 at 12:33:53PM +0800, Jason Wang wrote: > On Tue, Dec 27, 2022 at 10:25 AM Xuan Zhuo wrote: > > > > On Mon, 26 Dec 2022 15:49:08 +0800, Jason Wang wrote: > > > We used to busy waiting on the cvq command this tends to be > > > problematic since: > > > > > > 1) CPU could wait

Re: [RFC PATCH 2/9] vringh: remove vringh_iov and unite to vringh_kiov

2022-12-26 Thread Jason Wang
On Tue, Dec 27, 2022 at 10:25 AM Shunsuke Mie wrote: > > struct vringh_iov is defined to hold userland addresses. However, to use > common function, __vring_iov, finally the vringh_iov converts to the > vringh_kiov with simple cast. It includes compile time check code to make > sure it can be

Re: [PATCH 4/4] virtio-net: sleep instead of busy waiting for cvq command

2022-12-26 Thread Jason Wang
On Tue, Dec 27, 2022 at 10:25 AM Xuan Zhuo wrote: > > On Mon, 26 Dec 2022 15:49:08 +0800, Jason Wang wrote: > > We used to busy waiting on the cvq command this tends to be > > problematic since: > > > > 1) CPU could wait for ever on a buggy/malicous device > > 2) There's no wait to terminate the

Re: [PATCH 3/4] virtio_ring: introduce a per virtqueue waitqueue

2022-12-26 Thread Jason Wang
On Tue, Dec 27, 2022 at 7:38 AM Michael S. Tsirkin wrote: > > On Mon, Dec 26, 2022 at 03:49:07PM +0800, Jason Wang wrote: > > This patch introduces a per virtqueue waitqueue to allow driver to > > sleep and wait for more used. Two new helpers are introduced to allow > > driver to sleep and wake

Re: [PATCH] MAINTAINERS: Update maintainer list for virtio i2c

2022-12-26 Thread Chen, Jian Jun
On 12/14/2022 20:00, Michael S. Tsirkin wrote: On Wed, Dec 14, 2022 at 11:20:34AM +0100, Wolfram Sang wrote: Hi Viresh, I understand that it is okay to pass the maintainership, within the company, for platform specific parts from one person to another, since they have the best knowledge of

Re: [PATCH] MAINTAINERS: Update maintainer list for virtio i2c

2022-12-26 Thread Chen, Jian Jun
On 12/14/2022 19:37, Michael S. Tsirkin wrote: On Wed, Dec 14, 2022 at 01:36:31PM +0800, Conghui wrote: This updates the maintainer for virtio i2c drvier I got that, but what is going on here exactly? I generally expect a new maintainer to be active in the project for a while first. I don't

Re: [PATCH 2/4] virtio_ring: switch to use BAD_RING()

2022-12-26 Thread Jason Wang
On Tue, Dec 27, 2022 at 7:36 AM Michael S. Tsirkin wrote: > > On Mon, Dec 26, 2022 at 03:49:06PM +0800, Jason Wang wrote: > > Switch to reuse BAD_RING() to allow common logic to be implemented in > > BAD_RING(). > > > > Signed-off-by: Jason Wang > > --- > > Changes since V1: > > - switch to use

Re: [PATCH 3/4] virtio_ring: introduce a per virtqueue waitqueue

2022-12-26 Thread Jason Wang
On Tue, Dec 27, 2022 at 7:34 AM Michael S. Tsirkin wrote: > > On Mon, Dec 26, 2022 at 03:49:07PM +0800, Jason Wang wrote: > > This patch introduces a per virtqueue waitqueue to allow driver to > > sleep and wait for more used. Two new helpers are introduced to allow > > driver to sleep and wake

[RFC PATCH 5/9] tools/virtio: convert to use new unified vringh APIs

2022-12-26 Thread Shunsuke Mie
vringh_*_user APIs is being removed without vringh_init_user(). so change to use new APIs. Signed-off-by: Shunsuke Mie --- tools/virtio/vringh_test.c | 89 +++--- 1 file changed, 44 insertions(+), 45 deletions(-) diff --git a/tools/virtio/vringh_test.c

[RFC PATCH 6/9] caif_virtio: convert to new unified vringh APIs

2022-12-26 Thread Shunsuke Mie
vringh_*_kern APIs are being removed without vringh_init_kern(), so change to use new APIs. Signed-off-by: Shunsuke Mie --- drivers/net/caif/caif_virtio.c | 26 ++ 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/drivers/net/caif/caif_virtio.c

[RFC PATCH 3/9] tools/virtio: convert to new vringh user APIs

2022-12-26 Thread Shunsuke Mie
struct vringh_iov is being remove, so convert vringh_test to use the vringh user APIs. This has it change to use struct vringh_kiov instead of the struct vringh_iov. Signed-off-by: Shunsuke Mie --- tools/virtio/vringh_test.c | 34 +- 1 file changed, 17

[RFC PATCH 4/9] vringh: unify the APIs for all accessors

2022-12-26 Thread Shunsuke Mie
Each vringh memory accessors that are for user, kern and iotlb has own interfaces that calls common code. But some codes are duplicated and that becomes loss extendability. Introduce a struct vringh_ops and provide a common APIs for all accessors. It can bee easily extended vringh code for new

[RFC PATCH 2/9] vringh: remove vringh_iov and unite to vringh_kiov

2022-12-26 Thread Shunsuke Mie
struct vringh_iov is defined to hold userland addresses. However, to use common function, __vring_iov, finally the vringh_iov converts to the vringh_kiov with simple cast. It includes compile time check code to make sure it can be cast correctly. To simplify the code, this patch removes the

[RFC PATCH 1/9] vringh: fix a typo in comments for vringh_kiov

2022-12-26 Thread Shunsuke Mie
Probably it is a simple copy error from struct vring_iov. Fixes: f87d0fbb5798 ("vringh: host-side implementation of virtio rings.") Signed-off-by: Shunsuke Mie --- include/linux/vringh.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/vringh.h

[RFC PATCH 0/6] Introduce a vringh accessor for IO memory

2022-12-26 Thread Shunsuke Mie
Vringh is a host-side implementation of virtio rings, and supports the vring located on three kinds of memories, userspace, kernel space and a space translated iotlb. The goal of this patchset is to refactor vringh and introduce a new vringh accessor for the vring located on the io memory region.

Re: [PATCH 4/4] virtio-net: sleep instead of busy waiting for cvq command

2022-12-26 Thread Xuan Zhuo
On Mon, 26 Dec 2022 15:49:08 +0800, Jason Wang wrote: > We used to busy waiting on the cvq command this tends to be > problematic since: > > 1) CPU could wait for ever on a buggy/malicous device > 2) There's no wait to terminate the process that triggers the cvq >command > > So this patch

Re: [PATCH 3/4] virtio_ring: introduce a per virtqueue waitqueue

2022-12-26 Thread Michael S. Tsirkin
On Mon, Dec 26, 2022 at 03:49:07PM +0800, Jason Wang wrote: > This patch introduces a per virtqueue waitqueue to allow driver to > sleep and wait for more used. Two new helpers are introduced to allow > driver to sleep and wake up. > > Signed-off-by: Jason Wang > --- > Changes since V1: > -

Re: [PATCH 2/4] virtio_ring: switch to use BAD_RING()

2022-12-26 Thread Michael S. Tsirkin
On Mon, Dec 26, 2022 at 03:49:06PM +0800, Jason Wang wrote: > Switch to reuse BAD_RING() to allow common logic to be implemented in > BAD_RING(). > > Signed-off-by: Jason Wang > --- > Changes since V1: > - switch to use BAD_RING in virtio_break_device() > --- > drivers/virtio/virtio_ring.c | 8

Re: [PATCH 3/4] virtio_ring: introduce a per virtqueue waitqueue

2022-12-26 Thread Michael S. Tsirkin
On Mon, Dec 26, 2022 at 03:49:07PM +0800, Jason Wang wrote: > This patch introduces a per virtqueue waitqueue to allow driver to > sleep and wait for more used. Two new helpers are introduced to allow > driver to sleep and wake up. > > Signed-off-by: Jason Wang > --- > Changes since V1: > -

[linux-next:master] BUILD REGRESSION c76083fac3bae1a87ae3d005b5cb1cbc761e31d5

2022-12-26 Thread kernel test robot
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master branch HEAD: c76083fac3bae1a87ae3d005b5cb1cbc761e31d5 Add linux-next specific files for 20221226 Error/Warning reports: https://lore.kernel.org/oe-kbuild-all/202212020520.0okmino3-...@intel.com https