Si-Wei Liu
2023-Mar-21 23:33 UTC
[PATCH v4 1/2] vdpa/mlx5: Make VIRTIO_NET_F_MRG_RXBUF off by default
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 at redhat.com> > Signed-off-by: Eli Cohen <elic at nvidia.com>Looks good to me. Reviewed-by: Si-Wei Liu <si-wei.liu at 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))) {