[dpdk-stable] [PATCH 17.11] net/virtio: init MTU in case no control channel
Luca Boccassi
bluca at debian.org
Thu Oct 24 10:48:49 CEST 2019
On Fri, 2019-10-11 at 14:35 +0800, patrick.fu at intel.com wrote:
> From: Patrick Fu <
> patrick.fu at intel.com
> >
>
> [backport from commit id: 240da8b2143b7be372cf6388f028b26b15f16776]
>
> The max_mtu is kept as zero in case no CRTL channel, which leads
> to failure when calling virtio_mtu_set().
>
> Signed-off-by: Patrick Fu <
> patrick.fu at intel.com
> >
> ---
> drivers/net/virtio/virtio_ethdev.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/net/virtio/virtio_ethdev.c
> b/drivers/net/virtio/virtio_ethdev.c
> index e0328f6..c9076ea 100644
> --- a/drivers/net/virtio/virtio_ethdev.c
> +++ b/drivers/net/virtio/virtio_ethdev.c
> @@ -1508,6 +1508,8 @@ static int virtio_dev_xstats_get_names(struct
> rte_eth_dev *dev,
> } else {
> PMD_INIT_LOG(DEBUG, "config->max_virtqueue_pairs=1");
> hw->max_queue_pairs = 1;
> + hw->max_mtu = VIRTIO_MAX_RX_PKTLEN - ETHER_HDR_LEN -
> + VLAN_TAG_LEN - hw->vtnet_hdr_size;
> }
>
> ret = virtio_alloc_queues(eth_dev);
>
Acked-by: Luca Boccassi <bluca at debian.org>
Thanks, applied
--
Kind regards,
Luca Boccassi
More information about the stable
mailing list