All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH v4 1/2] vdpa/mlx5: Make VIRTIO_NET_F_MRG_RXBUF off by default
       [not found] ` <20230321112809.221432-2-elic@nvidia.com>
@ 2023-03-21 23:33   ` Si-Wei Liu
  2023-03-22  3:32   ` Michael S. Tsirkin
  1 sibling, 0 replies; 3+ messages in thread
From: Si-Wei Liu @ 2023-03-21 23:33 UTC (permalink / raw)
  To: Eli Cohen, mst, jasowang, eperezma, virtualization; +Cc: parav




On 3/21/2023 4:28 AM, Eli Cohen wrote:
> Following patch adds driver support for VIRTIO_NET_F_MRG_RXBUF.
>
> Current firmware versions show degradation in packet rate when using
> MRG_RXBUF. Users who favor memory saving over packet rate could enable
> this feature but we want to keep it off by default.
>
> One can still enable it when creating the vdpa device using vdpa tool by
> providing features that include it.
>
> For example:
> $ vdpa dev add name vdpa0 mgmtdev pci/0000:86:00.2 device_features 0x300cb982b
>
>
> Acked-by: Jason Wang <jasowang@redhat.com>
> Signed-off-by: Eli Cohen <elic@nvidia.com>
Looks good to me.

Reviewed-by: Si-Wei Liu <si-wei.liu@oracle.com>
> ---
>   drivers/vdpa/mlx5/net/mlx5_vnet.c | 2 ++
>   1 file changed, 2 insertions(+)
>
> diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c b/drivers/vdpa/mlx5/net/mlx5_vnet.c
> index 520646ae7fa0..502c482a93ce 100644
> --- a/drivers/vdpa/mlx5/net/mlx5_vnet.c
> +++ b/drivers/vdpa/mlx5/net/mlx5_vnet.c
> @@ -3122,6 +3122,8 @@ static int mlx5_vdpa_dev_add(struct vdpa_mgmt_dev *v_mdev, const char *name,
>   			return -EINVAL;
>   		}
>   		device_features &= add_config->device_features;
> +	} else {
> +		device_features &= ~BIT_ULL(VIRTIO_NET_F_MRG_RXBUF);
>   	}
>   	if (!(device_features & BIT_ULL(VIRTIO_F_VERSION_1) &&
>   	      device_features & BIT_ULL(VIRTIO_F_ACCESS_PLATFORM))) {

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v4 1/2] vdpa/mlx5: Make VIRTIO_NET_F_MRG_RXBUF off by default
       [not found] ` <20230321112809.221432-2-elic@nvidia.com>
  2023-03-21 23:33   ` [PATCH v4 1/2] vdpa/mlx5: Make VIRTIO_NET_F_MRG_RXBUF off by default Si-Wei Liu
@ 2023-03-22  3:32   ` Michael S. Tsirkin
  2023-03-22  3:35     ` Michael S. Tsirkin
  1 sibling, 1 reply; 3+ messages in thread
From: Michael S. Tsirkin @ 2023-03-22  3:32 UTC (permalink / raw)
  To: Eli Cohen; +Cc: eperezma, parav, virtualization

On Tue, Mar 21, 2023 at 01:28:08PM +0200, Eli Cohen wrote:
> Following patch adds driver support for VIRTIO_NET_F_MRG_RXBUF.
> 
> Current firmware versions show degradation in packet rate when using
> MRG_RXBUF. Users who favor memory saving over packet rate could enable
> this feature but we want to keep it off by default.
> 
> One can still enable it when creating the vdpa device using vdpa tool by
> providing features that include it.
> 
> For example:
> $ vdpa dev add name vdpa0 mgmtdev pci/0000:86:00.2 device_features 0x300cb982b
> 
> 
> Acked-by: Jason Wang <jasowang@redhat.com>
> Signed-off-by: Eli Cohen <elic@nvidia.com>


I have a question. Could you guys try with the recent XDP mergeable
buffer rework? Does this address the performance issue you are
observing?

Specifically:

Message-Id: <20230322025701.2955-1-xuanzhuo@linux.alibaba.com>
Message-Id: <20230322030308.16046-1-xuanzhuo@linux.alibaba.com>

I would very much appreciate if you posted perf numbers
in response to that thread - both to help evaluate that
patchset and this one.
Thanks!

> ---
>  drivers/vdpa/mlx5/net/mlx5_vnet.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c b/drivers/vdpa/mlx5/net/mlx5_vnet.c
> index 520646ae7fa0..502c482a93ce 100644
> --- a/drivers/vdpa/mlx5/net/mlx5_vnet.c
> +++ b/drivers/vdpa/mlx5/net/mlx5_vnet.c
> @@ -3122,6 +3122,8 @@ static int mlx5_vdpa_dev_add(struct vdpa_mgmt_dev *v_mdev, const char *name,
>  			return -EINVAL;
>  		}
>  		device_features &= add_config->device_features;
> +	} else {
> +		device_features &= ~BIT_ULL(VIRTIO_NET_F_MRG_RXBUF);
>  	}
>  	if (!(device_features & BIT_ULL(VIRTIO_F_VERSION_1) &&
>  	      device_features & BIT_ULL(VIRTIO_F_ACCESS_PLATFORM))) {
> -- 
> 2.38.1

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v4 1/2] vdpa/mlx5: Make VIRTIO_NET_F_MRG_RXBUF off by default
  2023-03-22  3:32   ` Michael S. Tsirkin
@ 2023-03-22  3:35     ` Michael S. Tsirkin
  0 siblings, 0 replies; 3+ messages in thread
From: Michael S. Tsirkin @ 2023-03-22  3:35 UTC (permalink / raw)
  To: Eli Cohen; +Cc: eperezma, parav, virtualization

On Tue, Mar 21, 2023 at 11:32:36PM -0400, Michael S. Tsirkin wrote:
> On Tue, Mar 21, 2023 at 01:28:08PM +0200, Eli Cohen wrote:
> > Following patch adds driver support for VIRTIO_NET_F_MRG_RXBUF.
> > 
> > Current firmware versions show degradation in packet rate when using
> > MRG_RXBUF. Users who favor memory saving over packet rate could enable
> > this feature but we want to keep it off by default.
> > 
> > One can still enable it when creating the vdpa device using vdpa tool by
> > providing features that include it.
> > 
> > For example:
> > $ vdpa dev add name vdpa0 mgmtdev pci/0000:86:00.2 device_features 0x300cb982b
> > 
> > 
> > Acked-by: Jason Wang <jasowang@redhat.com>
> > Signed-off-by: Eli Cohen <elic@nvidia.com>
> 
> 
> I have a question. Could you guys try with the recent XDP mergeable
> buffer rework? Does this address the performance issue you are
> observing?
> 
> Specifically:
> 
> Message-Id: <20230322025701.2955-1-xuanzhuo@linux.alibaba.com>
> Message-Id: <20230322030308.16046-1-xuanzhuo@linux.alibaba.com>
> 
> I would very much appreciate if you posted perf numbers
> in response to that thread - both to help evaluate that
> patchset and this one.
> Thanks!

Oh sorry, I got confused. That is still preparatory work not real
zero copy.  The patchset to try is this:

Message-Id: <20230202110058.130695-1-xuanzhuo@linux.alibaba.com>




> > ---
> >  drivers/vdpa/mlx5/net/mlx5_vnet.c | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c b/drivers/vdpa/mlx5/net/mlx5_vnet.c
> > index 520646ae7fa0..502c482a93ce 100644
> > --- a/drivers/vdpa/mlx5/net/mlx5_vnet.c
> > +++ b/drivers/vdpa/mlx5/net/mlx5_vnet.c
> > @@ -3122,6 +3122,8 @@ static int mlx5_vdpa_dev_add(struct vdpa_mgmt_dev *v_mdev, const char *name,
> >  			return -EINVAL;
> >  		}
> >  		device_features &= add_config->device_features;
> > +	} else {
> > +		device_features &= ~BIT_ULL(VIRTIO_NET_F_MRG_RXBUF);
> >  	}
> >  	if (!(device_features & BIT_ULL(VIRTIO_F_VERSION_1) &&
> >  	      device_features & BIT_ULL(VIRTIO_F_ACCESS_PLATFORM))) {
> > -- 
> > 2.38.1

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-03-22  3:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20230321112809.221432-1-elic@nvidia.com>
     [not found] ` <20230321112809.221432-2-elic@nvidia.com>
2023-03-21 23:33   ` [PATCH v4 1/2] vdpa/mlx5: Make VIRTIO_NET_F_MRG_RXBUF off by default Si-Wei Liu
2023-03-22  3:32   ` Michael S. Tsirkin
2023-03-22  3:35     ` Michael S. Tsirkin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.