On Sun, Mar 12, 2023 at 11:10:25AM +0200, Eli Cohen wrote:
> 
> On 12/03/2023 10:58, Michael S. Tsirkin wrote:
> > On Sun, Mar 12, 2023 at 10:39:19AM +0200, Eli Cohen wrote:
> > > 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
> > > 
> > > Signed-off-by: Eli Cohen <[email protected]>
> > What's the reason to turn it off by default? It's generally a
> > performance win isn't it?
> It has negative impact on packet rate so we want to keep it off by default.

Interesting.  I feel this would benefit from a bit more analysis.
Packet rate with dpdk? With linux? Is there a chance this will regress
some workloads?
VIRTIO_NET_F_MRG_RXBUF was designed to save memory, which is good
for small tcp buffers.

> > 
> > > ---
> > >   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 4abc3a4ee515..3858ba1e8975 100644
> > > --- a/drivers/vdpa/mlx5/net/mlx5_vnet.c
> > > +++ b/drivers/vdpa/mlx5/net/mlx5_vnet.c
> > > @@ -3154,6 +3154,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
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Reply via email to