On Wed, Oct 25, 2017 at 08:09:06PM -0700, wangzhike wrote:
> The max_mtu is kept as zero in case no CRTL channel, which leads
> to failure when calling virtio_mtu_set().
> 
> Signed-off-by: wangzhike <wangzh...@jd.com>

Acked-by: Yuanhan Liu <y...@fridaylinux.org>

Thanks.

        --yliu
> ---
>  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 bfbd737..823b3fd 100644
> --- a/drivers/net/virtio/virtio_ethdev.c
> +++ b/drivers/net/virtio/virtio_ethdev.c
> @@ -1474,6 +1474,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);
> -- 
> 1.8.3.1

Reply via email to