Re: [PATCH v8 1/2] drm/gem: Properly annotate WW context on drm_gem_lock_reservations() error

2022-08-09 Thread Christian König via Virtualization
Am 09.08.22 um 18:44 schrieb Daniel Vetter: On Tue, Jul 05, 2022 at 01:33:51PM +0200, Christian König wrote: Am 01.07.22 um 11:02 schrieb Dmitry Osipenko: Use ww_acquire_fini() in the error code paths. Otherwise lockdep thinks that lock is held when lock's memory is freed after the drm_gem_lock

Re: [virtio-dev] [PATCH] virtio-net: use mtu size as buffer length for big packets

2022-08-09 Thread Michael S. Tsirkin
On Wed, Aug 10, 2022 at 02:14:07AM -0400, Michael S. Tsirkin wrote: > On Tue, Aug 09, 2022 at 04:24:23PM -0700, Si-Wei Liu wrote: > > > > > > On 8/9/2022 3:49 PM, Parav Pandit wrote: > > > > From: Michael S. Tsirkin > > > > Sent: Tuesday, August 9, 2022 6:26 PM > > > > To: Parav Pandit > > > >

Re: [virtio-dev] [PATCH] virtio-net: use mtu size as buffer length for big packets

2022-08-09 Thread Michael S. Tsirkin
On Tue, Aug 09, 2022 at 04:24:23PM -0700, Si-Wei Liu wrote: > > > On 8/9/2022 3:49 PM, Parav Pandit wrote: > > > From: Michael S. Tsirkin > > > Sent: Tuesday, August 9, 2022 6:26 PM > > > To: Parav Pandit > > > Cc: Si-Wei Liu ; Jason Wang > > > ; Gavin Li ; Hemminger, > > > Stephen ; davem > >

Re: [virtio-dev] [PATCH] virtio-net: use mtu size as buffer length for big packets

2022-08-09 Thread Jason Wang
在 2022/8/10 06:54, Si-Wei Liu 写道: On 8/9/2022 3:37 PM, Michael S. Tsirkin wrote: On Tue, Aug 09, 2022 at 03:32:26PM -0700, Si-Wei Liu wrote: On 8/9/2022 2:37 PM, Michael S. Tsirkin wrote: On Tue, Aug 09, 2022 at 07:18:30PM +, Parav Pandit wrote: From: Si-Wei Liu Sent: Tuesday, August

Re: [virtio-dev] [PATCH] virtio-net: use mtu size as buffer length for big packets

2022-08-09 Thread Jason Wang
在 2022/8/10 02:38, Si-Wei Liu 写道: On 8/9/2022 12:44 AM, Jason Wang wrote: On Tue, Aug 9, 2022 at 3:07 PM Gavin Li wrote: On 8/9/2022 7:56 AM, Si-Wei Liu wrote: External email: Use caution opening links or attachments On 8/8/2022 12:31 AM, Gavin Li wrote: On 8/6/2022 6:11 AM, Si-Wei Li

Re: [PATCH V4 5/6] vDPA: answer num of queue pairs = 1 to userspace when VIRTIO_NET_F_MQ == 0

2022-08-09 Thread Jason Wang
On Wed, Aug 10, 2022 at 8:54 AM Si-Wei Liu wrote: > > > > On 8/9/2022 12:36 PM, Michael S. Tsirkin wrote: > > On Fri, Jul 22, 2022 at 01:14:42PM +, Parav Pandit wrote: > >> > >>> From: Zhu Lingshan > >>> Sent: Friday, July 22, 2022 7:53 AM > >>> > >>> If VIRTIO_NET_F_MQ == 0, the virtio devic

Re: [PATCH V4 5/6] vDPA: answer num of queue pairs = 1 to userspace when VIRTIO_NET_F_MQ == 0

2022-08-09 Thread Si-Wei Liu
On 8/9/2022 12:36 PM, Michael S. Tsirkin wrote: On Fri, Jul 22, 2022 at 01:14:42PM +, Parav Pandit wrote: From: Zhu Lingshan Sent: Friday, July 22, 2022 7:53 AM If VIRTIO_NET_F_MQ == 0, the virtio device should have one queue pair, so when userspace querying queue pair numbers, it sho

Re: [virtio-dev] [PATCH] virtio-net: use mtu size as buffer length for big packets

2022-08-09 Thread Si-Wei Liu
On 8/9/2022 3:49 PM, Parav Pandit wrote: From: Michael S. Tsirkin Sent: Tuesday, August 9, 2022 6:26 PM To: Parav Pandit Cc: Si-Wei Liu ; Jason Wang ; Gavin Li ; Hemminger, Stephen ; davem ; virtualization ; Virtio-Dev ; jesse.brandeb...@intel.com; alexander.h.du...@intel.com; kubak...@wp.pl

Re: [virtio-dev] [PATCH] virtio-net: use mtu size as buffer length for big packets

2022-08-09 Thread Michael S. Tsirkin
On Tue, Aug 09, 2022 at 10:49:48PM +, Parav Pandit wrote: > > > When user prefers to override the device RO field, device is in the dark > > > and > > things work on best effort basis. > > > > Dropping packets is best effort. Getting stuck forever isn't, that's a > > quality of > > implement

Re: [virtio-dev] [PATCH] virtio-net: use mtu size as buffer length for big packets

2022-08-09 Thread Michael S. Tsirkin
On Tue, Aug 09, 2022 at 03:54:57PM -0700, Si-Wei Liu wrote: > > > On 8/9/2022 3:37 PM, Michael S. Tsirkin wrote: > > On Tue, Aug 09, 2022 at 03:32:26PM -0700, Si-Wei Liu wrote: > > > > > > On 8/9/2022 2:37 PM, Michael S. Tsirkin wrote: > > > > On Tue, Aug 09, 2022 at 07:18:30PM +, Parav Pand

Re: [virtio-dev] [PATCH] virtio-net: use mtu size as buffer length for big packets

2022-08-09 Thread Michael S. Tsirkin
On Tue, Aug 09, 2022 at 10:49:48PM +, Parav Pandit wrote: > > From: Michael S. Tsirkin > > Sent: Tuesday, August 9, 2022 6:26 PM > > To: Parav Pandit > > Cc: Si-Wei Liu ; Jason Wang > > ; Gavin Li ; Hemminger, > > Stephen ; davem > > ; virtualization > foundation.org>; Virtio-Dev ; > > jesse

Re: [virtio-dev] [PATCH] virtio-net: use mtu size as buffer length for big packets

2022-08-09 Thread Si-Wei Liu
On 8/9/2022 3:37 PM, Michael S. Tsirkin wrote: On Tue, Aug 09, 2022 at 03:32:26PM -0700, Si-Wei Liu wrote: On 8/9/2022 2:37 PM, Michael S. Tsirkin wrote: On Tue, Aug 09, 2022 at 07:18:30PM +, Parav Pandit wrote: From: Si-Wei Liu Sent: Tuesday, August 9, 2022 3:09 PM From: Si-Wei Liu

RE: [virtio-dev] [PATCH] virtio-net: use mtu size as buffer length for big packets

2022-08-09 Thread Parav Pandit via Virtualization
> From: Michael S. Tsirkin > Sent: Tuesday, August 9, 2022 6:26 PM > To: Parav Pandit > Cc: Si-Wei Liu ; Jason Wang > ; Gavin Li ; Hemminger, > Stephen ; davem > ; virtualization foundation.org>; Virtio-Dev ; > jesse.brandeb...@intel.com; alexander.h.du...@intel.com; > kubak...@wp.pl; sridhar.sa

Re: [virtio-dev] [PATCH] virtio-net: use mtu size as buffer length for big packets

2022-08-09 Thread Michael S. Tsirkin
On Tue, Aug 09, 2022 at 03:32:26PM -0700, Si-Wei Liu wrote: > > > On 8/9/2022 2:37 PM, Michael S. Tsirkin wrote: > > On Tue, Aug 09, 2022 at 07:18:30PM +, Parav Pandit wrote: > > > > From: Si-Wei Liu > > > > Sent: Tuesday, August 9, 2022 3:09 PM > > > > > > From: Si-Wei Liu > > > > > > Sent

Re: [virtio-dev] [PATCH] virtio-net: use mtu size as buffer length for big packets

2022-08-09 Thread Si-Wei Liu
On 8/9/2022 2:37 PM, Michael S. Tsirkin wrote: On Tue, Aug 09, 2022 at 07:18:30PM +, Parav Pandit wrote: From: Si-Wei Liu Sent: Tuesday, August 9, 2022 3:09 PM From: Si-Wei Liu Sent: Tuesday, August 9, 2022 2:39 PM Currently it is not. Not a single patch nor this patch, but the context

Re: [virtio-dev] [PATCH] virtio-net: use mtu size as buffer length for big packets

2022-08-09 Thread Michael S. Tsirkin
On Tue, Aug 09, 2022 at 02:39:49PM -0700, Si-Wei Liu wrote: > > > On 8/9/2022 2:34 PM, Michael S. Tsirkin wrote: > > On Tue, Aug 09, 2022 at 11:38:52AM -0700, Si-Wei Liu wrote: > > > > > > On 8/9/2022 12:44 AM, Jason Wang wrote: > > > > On Tue, Aug 9, 2022 at 3:07 PM Gavin Li wrote: > > > > > O

Re: [virtio-dev] [PATCH] virtio-net: use mtu size as buffer length for big packets

2022-08-09 Thread Michael S. Tsirkin
On Tue, Aug 09, 2022 at 09:49:03PM +, Parav Pandit wrote: > > From: Michael S. Tsirkin > > Sent: Tuesday, August 9, 2022 5:38 PM > > [..] > > > > I think virtio-net driver doesn't differentiate MTU and MRU, in > > > > which case the receive buffer will be reduced to fit the 1500B > > > > payl

RE: [virtio-dev] [PATCH] virtio-net: use mtu size as buffer length for big packets

2022-08-09 Thread Parav Pandit via Virtualization
> From: Michael S. Tsirkin > Sent: Tuesday, August 9, 2022 5:38 PM [..] > > > I think virtio-net driver doesn't differentiate MTU and MRU, in > > > which case the receive buffer will be reduced to fit the 1500B > > > payload size when mtu is lowered down to 1500 from 9000. > > How? Driver reduced

Re: [virtio-dev] [PATCH] virtio-net: use mtu size as buffer length for big packets

2022-08-09 Thread Si-Wei Liu
On 8/9/2022 2:34 PM, Michael S. Tsirkin wrote: On Tue, Aug 09, 2022 at 11:38:52AM -0700, Si-Wei Liu wrote: On 8/9/2022 12:44 AM, Jason Wang wrote: On Tue, Aug 9, 2022 at 3:07 PM Gavin Li wrote: On 8/9/2022 7:56 AM, Si-Wei Liu wrote: External email: Use caution opening links or attachment

Re: [virtio-dev] [PATCH] virtio-net: use mtu size as buffer length for big packets

2022-08-09 Thread Michael S. Tsirkin
On Tue, Aug 09, 2022 at 07:18:30PM +, Parav Pandit wrote: > > From: Si-Wei Liu > > Sent: Tuesday, August 9, 2022 3:09 PM > > > >> From: Si-Wei Liu > > >> Sent: Tuesday, August 9, 2022 2:39 PM Currently it is not. Not a > > >> single patch nor this patch, but the context for the eventual goal

Re: [virtio-dev] [PATCH] virtio-net: use mtu size as buffer length for big packets

2022-08-09 Thread Michael S. Tsirkin
On Tue, Aug 09, 2022 at 11:38:52AM -0700, Si-Wei Liu wrote: > > > On 8/9/2022 12:44 AM, Jason Wang wrote: > > On Tue, Aug 9, 2022 at 3:07 PM Gavin Li wrote: > > > > > > On 8/9/2022 7:56 AM, Si-Wei Liu wrote: > > > > > > External email: Use caution opening links or attachments > > > > > > > >

Re: [virtio-dev] [PATCH] virtio-net: use mtu size as buffer length for big packets

2022-08-09 Thread Michael S. Tsirkin
On Tue, Aug 09, 2022 at 09:13:42PM +, Parav Pandit wrote: > > From: Si-Wei Liu > > Sent: Tuesday, August 9, 2022 4:33 PM > > > > On 8/9/2022 12:18 PM, Parav Pandit wrote: > > >> From: Si-Wei Liu > > >> Sent: Tuesday, August 9, 2022 3:09 PM > > From: Si-Wei Liu > > Sent: Tuesday, A

[PATCH] Bluetooth: virtio_bt: fix device removal

2022-08-09 Thread Igor Skalkin
Tested-by: Igor Skalkin Please mind our privacy notice pursuant to Art. 13 GDPR. // Unsere Hinweise zum Datenschutz gem. Art. 13 DSGVO

RE: [virtio-dev] [PATCH] virtio-net: use mtu size as buffer length for big packets

2022-08-09 Thread Parav Pandit via Virtualization
> From: Si-Wei Liu > Sent: Tuesday, August 9, 2022 4:33 PM > > On 8/9/2022 12:18 PM, Parav Pandit wrote: > >> From: Si-Wei Liu > >> Sent: Tuesday, August 9, 2022 3:09 PM > From: Si-Wei Liu > Sent: Tuesday, August 9, 2022 2:39 PM Currently it is not. Not a > single patch nor this

Re: [virtio-dev] [PATCH] virtio-net: use mtu size as buffer length for big packets

2022-08-09 Thread Si-Wei Liu
On 8/9/2022 12:18 PM, Parav Pandit wrote: From: Si-Wei Liu Sent: Tuesday, August 9, 2022 3:09 PM From: Si-Wei Liu Sent: Tuesday, August 9, 2022 2:39 PM Currently it is not. Not a single patch nor this patch, but the context for the eventual goal is to allow XDP on a MTU=9000 link when guest

Re: [PATCH v2 4/4] hwrng: virtio - always add a pending request

2022-08-09 Thread Michael S. Tsirkin
On Wed, Aug 03, 2022 at 02:12:25PM +0100, Vladimir Murzin wrote: > On 8/3/22 13:55, Michael S. Tsirkin wrote: > > On Wed, Aug 03, 2022 at 01:25:15PM +0100, Vladimir Murzin wrote: > >> On 8/3/22 12:39, Michael S. Tsirkin wrote: > >>> On Wed, Aug 03, 2022 at 09:57:35AM +0100, Vladimir Murzin wrote: >

RE: [PATCH V4 5/6] vDPA: answer num of queue pairs = 1 to userspace when VIRTIO_NET_F_MQ == 0

2022-08-09 Thread Parav Pandit via Virtualization
> From: Michael S. Tsirkin > Sent: Tuesday, August 9, 2022 3:36 PM > > > After applying this commit, when MQ = 0, iproute2 output: > > > $vdpa dev config show vdpa0 > > > vdpa0: mac 00:e8:ca:11:be:05 link up link_announce false > > > max_vq_pairs 1 mtu 1500 > > > > > No. We do not want to diverge

Re: [PATCH V4 5/6] vDPA: answer num of queue pairs = 1 to userspace when VIRTIO_NET_F_MQ == 0

2022-08-09 Thread Michael S. Tsirkin
On Fri, Jul 22, 2022 at 01:14:42PM +, Parav Pandit wrote: > > > > From: Zhu Lingshan > > Sent: Friday, July 22, 2022 7:53 AM > > > > If VIRTIO_NET_F_MQ == 0, the virtio device should have one queue pair, so > > when userspace querying queue pair numbers, it should return mq=1 than > > zero.

RE: [PATCH V4 3/6] vDPA: allow userspace to query features of a vDPA device

2022-08-09 Thread Parav Pandit via Virtualization
> From: Michael S. Tsirkin > Sent: Tuesday, August 9, 2022 3:24 PM > > On Fri, Jul 22, 2022 at 07:53:06PM +0800, Zhu Lingshan wrote: > > This commit adds a new vDPA netlink attribution > > VDPA_ATTR_VDPA_DEV_SUPPORTED_FEATURES. Userspace can query > features of > > vDPA devices through this new a

RE: [PATCH V4 3/6] vDPA: allow userspace to query features of a vDPA device

2022-08-09 Thread Parav Pandit via Virtualization
> From: Zhu, Lingshan > Sent: Wednesday, July 27, 2022 2:02 AM > > > On 7/26/2022 7:06 PM, Parav Pandit wrote: > >> From: Zhu, Lingshan > >> Sent: Tuesday, July 26, 2022 7:03 AM > >> > >> On 7/24/2022 11:21 PM, Parav Pandit wrote: > From: Zhu, Lingshan > Sent: Saturday, July 23, 2022

Re: [PATCH V4 3/6] vDPA: allow userspace to query features of a vDPA device

2022-08-09 Thread Michael S. Tsirkin
On Fri, Jul 22, 2022 at 07:53:06PM +0800, Zhu Lingshan wrote: > This commit adds a new vDPA netlink attribution > VDPA_ATTR_VDPA_DEV_SUPPORTED_FEATURES. Userspace can query > features of vDPA devices through this new attr. > > Signed-off-by: Zhu Lingshan I think at least some discussion and doc

RE: [virtio-dev] [PATCH] virtio-net: use mtu size as buffer length for big packets

2022-08-09 Thread Parav Pandit via Virtualization
> From: Si-Wei Liu > Sent: Tuesday, August 9, 2022 3:09 PM > >> From: Si-Wei Liu > >> Sent: Tuesday, August 9, 2022 2:39 PM Currently it is not. Not a > >> single patch nor this patch, but the context for the eventual goal is > >> to allow XDP on a MTU=9000 link when guest users intentionally lo

Re: [virtio-dev] [PATCH] virtio-net: use mtu size as buffer length for big packets

2022-08-09 Thread Si-Wei Liu
On 8/9/2022 11:42 AM, Parav Pandit wrote: From: Si-Wei Liu Sent: Tuesday, August 9, 2022 2:39 PM Currently it is not. Not a single patch nor this patch, but the context for the eventual goal is to allow XDP on a MTU=9000 link when guest users intentionally lower down MTU to 1500. Which appli

RE: [virtio-dev] [PATCH] virtio-net: use mtu size as buffer length for big packets

2022-08-09 Thread Parav Pandit via Virtualization
> From: Si-Wei Liu > Sent: Tuesday, August 9, 2022 2:39 PM > Currently it is not. Not a single patch nor this patch, but the context for > the > eventual goal is to allow XDP on a MTU=9000 link when guest users > intentionally lower down MTU to 1500. Which application benefit by having asymmetr

Re: [virtio-dev] [PATCH] virtio-net: use mtu size as buffer length for big packets

2022-08-09 Thread Si-Wei Liu
On 8/9/2022 12:44 AM, Jason Wang wrote: On Tue, Aug 9, 2022 at 3:07 PM Gavin Li wrote: On 8/9/2022 7:56 AM, Si-Wei Liu wrote: External email: Use caution opening links or attachments On 8/8/2022 12:31 AM, Gavin Li wrote: On 8/6/2022 6:11 AM, Si-Wei Liu wrote: External email: Use cauti

Re: [virtio-dev] [PATCH] virtio-net: use mtu size as buffer length for big packets

2022-08-09 Thread Si-Wei Liu
On 8/9/2022 12:06 AM, Gavin Li wrote: On 8/9/2022 7:56 AM, Si-Wei Liu wrote: External email: Use caution opening links or attachments On 8/8/2022 12:31 AM, Gavin Li wrote: On 8/6/2022 6:11 AM, Si-Wei Liu wrote: External email: Use caution opening links or attachments On 8/1/2022 9:45

Re: [PATCH v1 2/2] Drivers: virtio: balloon: Report inflated memory

2022-08-09 Thread Nadav Amit via Virtualization
On Aug 9, 2022, at 2:53 AM, Alexander Atanasov wrote: > Update the value in page_alloc on balloon fill/leak. Some general comments if this patch goes forward. Please cc pv-driv...@vmware.com in the future. > > Cc: David Hildenbrand > Cc: Wei Liu > Cc: Nadav Amit > > Signed-off-by: Alex

Re: [PATCH v8 1/2] drm/gem: Properly annotate WW context on drm_gem_lock_reservations() error

2022-08-09 Thread Daniel Vetter
On Tue, Jul 05, 2022 at 01:33:51PM +0200, Christian König wrote: > Am 01.07.22 um 11:02 schrieb Dmitry Osipenko: > > Use ww_acquire_fini() in the error code paths. Otherwise lockdep > > thinks that lock is held when lock's memory is freed after the > > drm_gem_lock_reservations() error. The ww_acqu

Re: [PATCH v7 1/2] drm/gem: Properly annotate WW context on drm_gem_lock_reservations() error

2022-08-09 Thread Daniel Vetter
On Thu, Jun 30, 2022 at 11:04:04PM +0300, Dmitry Osipenko wrote: > Use ww_acquire_fini() in the error code paths. Otherwise lockdep > thinks that lock is held when lock's memory is freed after the > drm_gem_lock_reservations() error. The ww_acquire_context needs to be > annotated as "released", whi

Re: [PATCH v2 2/2] docs: driver-api: virtio: virtio on Linux

2022-08-09 Thread Cornelia Huck
On Tue, Aug 09 2022, Ricardo Cañuelo wrote: > How about this as an introduction? > > Virtio is an open standard that defines a protocol to communicate > drivers and devices of different types, see Chapter 5 ("Device "...that defines a protocol for communication between drivers and device

Re: [PATCH v2 2/2] docs: driver-api: virtio: virtio on Linux

2022-08-09 Thread Ricardo Cañuelo
Hi Cornelia, Thanks for the insightful comments and ideas. Answers below: On lun, ago 08 2022 at 15:47:06, Cornelia Huck wrote: > Hm... so I'm not quite happy with those two paragraphs, but I'm not sure > how to make it better. > > - While the origins of virtio are hypervisor implementations, th

Re: [Linaro-mm-sig] [PATCH v2 2/5] drm/gem: Take reservation lock for vmap/vunmap operations

2022-08-09 Thread Christian König
Am 25.07.22 um 17:18 schrieb Dmitry Osipenko: The new common dma-buf locking convention will require buffer importers to hold the reservation lock around mapping operations. Make DRM GEM core to take the lock around the vmapping operations and update QXL and i915 drivers to use the locked functio

Re: [Linaro-mm-sig] [PATCH v2 1/5] dma-buf: Add _unlocked postfix to function names

2022-08-09 Thread Christian König
Am 25.07.22 um 17:18 schrieb Dmitry Osipenko: Add _unlocked postfix to the dma-buf API function names in a preparation to move all non-dynamic dma-buf users over to the dynamic locking specification. This patch only renames API functions, preparing drivers to the common locking convention. Later

Re: [PATCH v6 1/2] Create debugfs file with virtio balloon usage information

2022-08-09 Thread Michael S. Tsirkin
On Tue, Jul 26, 2022 at 02:08:27PM +, Alexander Atanasov wrote: > Allow the guest to know how much it is ballooned by the host > and how that memory is accounted. > > It is useful when debugging out of memory conditions, > as well for userspace processes that monitor the memory pressure > and

Re: [PATCH v6 2/2] Unify how inflated memory is accounted in virtio balloon driver

2022-08-09 Thread Michael S. Tsirkin
On Tue, Jul 26, 2022 at 02:10:47PM +, Alexander Atanasov wrote: > Always account inflated memory as used for both cases - with and > without deflate on oom. Do not change total ram which can confuse > userspace and users. > > Signed-off-by: Alexander Atanasov I only noticed this patch accide

Re: [PATCH v4 1/1] Create debugfs file with virtio balloon usage information

2022-08-09 Thread Michael S. Tsirkin
On Tue, Jul 05, 2022 at 12:01:58PM +0300, Alexander Atanasov wrote: > > > diff --git a/include/uapi/linux/virtio_balloon.h > > > b/include/uapi/linux/virtio_balloon.h > > > index ddaa45e723c4..f3ff7c4e5884 100644 > > > --- a/include/uapi/linux/virtio_balloon.h > > > +++ b/include/uapi/linux/virtio

Re: [RFC PATCH v3 1/9] vsock: SO_RCVLOWAT transport set callback

2022-08-09 Thread Stefano Garzarella
On Tue, Aug 09, 2022 at 09:45:47AM +, Arseniy Krasnov wrote: On 09.08.2022 12:37, Arseniy Krasnov wrote: On 08.08.2022 13:30, Stefano Garzarella wrote: On Mon, Aug 8, 2022 at 12:23 PM Stefano Garzarella wrote: On Wed, Aug 03, 2022 at 01:51:05PM +, Arseniy Krasnov wrote: This adds tr

Re: [RFC] how the ballooned memory should be accounted by the drivers inside the guests? (was:[PATCH v6 1/2] Create debugfs file with virtio balloon usage information)

2022-08-09 Thread David Hildenbrand
On 09.08.22 11:36, Alexander Atanasov wrote: > Hello, > > On 2.08.22 16:48, David Hildenbrand wrote: In case of Hyper-V I remember a customer BUG report that requested that exact behavior, however, I'm not able to locate the BZ quickly. [1] https://lists.linuxfoundation.o

Re: [virtio-dev] [PATCH] virtio-net: use mtu size as buffer length for big packets

2022-08-09 Thread Jason Wang
On Tue, Aug 9, 2022 at 5:25 PM Michael S. Tsirkin wrote: > > On Tue, Aug 09, 2022 at 03:44:22PM +0800, Jason Wang wrote: > > > + unsigned int mtu = vi->dev->mtu; > > BTW should this not be max_mtu? Yes. > Otherwise if user configures mtu that > is too small we'll add buffers that are

Re: [virtio-dev] [PATCH] virtio-net: use mtu size as buffer length for big packets

2022-08-09 Thread Jason Wang
On Tue, Aug 9, 2022 at 5:22 PM Michael S. Tsirkin wrote: > > On Tue, Aug 09, 2022 at 03:44:22PM +0800, Jason Wang wrote: > > > @@ -3571,8 +3581,10 @@ static int virtnet_probe(struct virtio_device > > > *vdev) > > > if (virtio_has_feature(vdev, VIRTIO_NET_F_GUEST_TSO4) || > > > virt

Re: [virtio-dev] [PATCH] virtio-net: use mtu size as buffer length for big packets

2022-08-09 Thread Michael S. Tsirkin
On Tue, Aug 09, 2022 at 03:44:22PM +0800, Jason Wang wrote: > > + unsigned int mtu = vi->dev->mtu; BTW should this not be max_mtu? Otherwise if user configures mtu that is too small we'll add buffers that are too small. some backends simply lock up if this happens (I think vhost does

Re: [virtio-dev] [PATCH] virtio-net: use mtu size as buffer length for big packets

2022-08-09 Thread Michael S. Tsirkin
On Tue, Aug 09, 2022 at 03:44:22PM +0800, Jason Wang wrote: > > @@ -3571,8 +3581,10 @@ static int virtnet_probe(struct virtio_device > > *vdev) > > if (virtio_has_feature(vdev, VIRTIO_NET_F_GUEST_TSO4) || > > virtio_has_feature(vdev, VIRTIO_NET_F_GUEST_TSO6) || > > virtio_

Re: [virtio-dev] [PATCH] virtio-net: use mtu size as buffer length for big packets

2022-08-09 Thread Jason Wang
On Tue, Aug 9, 2022 at 3:07 PM Gavin Li wrote: > > > On 8/9/2022 7:56 AM, Si-Wei Liu wrote: > > External email: Use caution opening links or attachments > > > On 8/8/2022 12:31 AM, Gavin Li wrote: > > > On 8/6/2022 6:11 AM, Si-Wei Liu wrote: > > External email: Use caution opening links or attachm

Re: [PATCH v1 1/1] iommu/virtio: Do not dereference fwnode in struct device

2022-08-09 Thread Jean-Philippe Brucker
On Mon, Aug 01, 2022 at 07:51:42PM +0300, Andy Shevchenko wrote: > In order to make the underneath API easier to change in the future, > prevent users from dereferencing fwnode from struct device. > Instead, use the specific device_match_fwnode() API for that. > > Signed-off-by: Andy Shevchenko