[dpdk-dev] [PATCH] net/virtio: report maximum MTU in device info
Xia, Chenbo
chenbo.xia at intel.com
Wed Jul 28 08:49:55 CEST 2021
> -----Original Message-----
> From: Andrew Rybchenko <andrew.rybchenko at oktetlabs.ru>
> Sent: Wednesday, July 21, 2021 5:22 PM
> To: Maxime Coquelin <maxime.coquelin at redhat.com>; Xia, Chenbo
> <chenbo.xia at intel.com>; Stephen Hemminger <stephen at networkplumber.org>; Stokes,
> Ian <ian.stokes at intel.com>; Andrew Rybchenko <arybchenko at solarflare.com>;
> Yigit, Ferruh <ferruh.yigit at intel.com>
> Cc: dev at dpdk.org; Ivan Ilchenko <ivan.ilchenko at oktetlabs.ru>; stable at dpdk.org
> Subject: [PATCH] net/virtio: report maximum MTU in device info
>
> From: Ivan Ilchenko <ivan.ilchenko at oktetlabs.ru>
>
> Fix the driver to report maximum MTU obtained from config if
> VIRTIO_NET_F_MTU is supported or calculated based on maximum
> Rx packet length.
>
> Fixes: ad97ceece12c ("ethdev: add min/max MTU to device info")
> Cc: stable at dpdk.org
>
> Signed-off-by: Ivan Ilchenko <ivan.ilchenko at oktetlabs.ru>
> Signed-off-by: Andrew Rybchenko <andrew.rybchenko at oktetlabs.ru>
> ---
> drivers/net/virtio/virtio_ethdev.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/virtio/virtio_ethdev.c
> b/drivers/net/virtio/virtio_ethdev.c
> index 6d6e105960..af6305e9d8 100644
> --- a/drivers/net/virtio/virtio_ethdev.c
> +++ b/drivers/net/virtio/virtio_ethdev.c
> @@ -2502,6 +2502,7 @@ virtio_dev_info_get(struct rte_eth_dev *dev, struct
> rte_eth_dev_info *dev_info)
> dev_info->min_rx_bufsize = VIRTIO_MIN_RX_BUFSIZE;
> dev_info->max_rx_pktlen = VIRTIO_MAX_RX_PKTLEN;
> dev_info->max_mac_addrs = VIRTIO_MAX_MAC_ADDRS;
> + dev_info->max_mtu = hw->max_mtu;
>
> host_features = VIRTIO_OPS(hw)->get_features(hw);
> dev_info->rx_offload_capa = DEV_RX_OFFLOAD_VLAN_STRIP;
> --
> 2.30.2
Applied to next-virtio/main. Thanks!
More information about the dev
mailing list