From: Yuanhan Liu <yliu@fridaylinux.org>
To: wangzhike <wangzhike@jd.com>
Cc: maxime.coquelin@redhat.com, dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH] net/virtio: init MTU in case no control channel
Date: Tue, 7 Nov 2017 11:44:59 +0800 [thread overview]
Message-ID: <20171107034453.GL12931@yliu-home> (raw)
In-Reply-To: <1508987346-68173-1-git-send-email-wangzhike@jd.com>
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 <wangzhike@jd.com>
Acked-by: Yuanhan Liu <yliu@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
next prev parent reply other threads:[~2017-11-07 3:45 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-26 3:09 wangzhike
2017-11-07 3:44 ` Yuanhan Liu [this message]
2017-11-12 18:45 ` Thomas Monjalon
2018-01-04 15:16 ` Maxime Coquelin
2018-01-05 1:00 ` 王志克
2018-01-05 0:54 zhike wang
2018-01-05 2:11 ` Yang, Zhiyong
2018-01-05 10:25 ` Thomas Monjalon
2018-01-05 10:28 Zhike Wang
2018-01-09 13:15 ` Yuanhan Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171107034453.GL12931@yliu-home \
--to=yliu@fridaylinux.org \
--cc=dev@dpdk.org \
--cc=maxime.coquelin@redhat.com \
--cc=wangzhike@jd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).