From: Yuanhan Liu <yuanhan.liu@linux.intel.com>
To: "Dey, Souvik" <sodey@sonusnet.com>
Cc: "Kavanagh, Mark B" <mark.b.kavanagh@intel.com>,
"dev@dpdk.org" <dev@dpdk.org>,
"stephen@networkplumber.org" <stephen@networkplumber.org>
Subject: Re: [dpdk-dev] [PATCH v4]net/virtio: add mtu set in virtio
Date: Fri, 9 Sep 2016 23:42:29 +0800 [thread overview]
Message-ID: <20160909154229.GT23158@yliu-dev.sh.intel.com> (raw)
In-Reply-To: <CY1PR03MB1503EBBC768F105F702086B2DAFA0@CY1PR03MB1503.namprd03.prod.outlook.com>
On Fri, Sep 09, 2016 at 03:33:32PM +0000, Dey, Souvik wrote:
> Hi Mark,
>
> Yes I thought I did that change. Sorry once again.. making too many mistakes. Changed it . Thanks.
> The MTU here is L3 MTU. Setting this will help in reducing the fragmented/multi-segmented packets and also in case we want to reduce the MTU below 1500, to support VXLAN or GRE tunnel for the packets in openstack and cloud environments.
>
> ---
> drivers/net/virtio/virtio_ethdev.c | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
> index 07d6449..da16ad4 100644
> --- a/drivers/net/virtio/virtio_ethdev.c
> +++ b/drivers/net/virtio/virtio_ethdev.c
>
> static int virtio_dev_queue_stats_mapping_set(
> __rte_unused struct rte_eth_dev *eth_dev,
> @@ -652,6 +653,16 @@ virtio_dev_allmulticast_disable(struct rte_eth_dev *dev)
> PMD_INIT_LOG(ERR, "Failed to disable allmulticast");
> }
>
> +static int
> +virtio_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
> +{
> + struct virtio_hw *hw = dev->data->dev_private;
> + if (mtu < VIRTIO_MIN_RX_BUFSIZE || mtu > VIRTIO_MAX_RX_PKTLEN) {
> + PMD_INIT_LOG(ERR, "Mtu should be between VIRTIO_MIN_RX_BUFSIZE and VIRTIO_MAX_RX_PKTLEN \n");
Unfortunately, that is still broken, in two ways:
- we should avoid long lines over 80 chars
- the range will not be correctly showed in the message, because ... (well,
you know it).
--yliu
next prev parent reply other threads:[~2016-09-09 15:41 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-07 4:18 souvikdey33
2016-09-07 4:21 ` Dey, Souvik
2016-09-09 7:00 ` Yuanhan Liu
2016-09-09 14:19 ` Dey, Souvik
2016-09-09 15:05 ` Kavanagh, Mark B
2016-09-09 15:33 ` Dey, Souvik
2016-09-09 15:42 ` Yuanhan Liu [this message]
2016-09-09 15:43 ` Kavanagh, Mark B
2016-09-09 18:16 ` Dey, Souvik
2016-09-12 14:25 ` Dey, Souvik
2016-09-12 14:47 ` Kavanagh, Mark B
2016-09-12 15:11 ` Dey, Souvik
2016-09-14 0:25 ` Dey, Souvik
2016-09-14 4:32 ` Yuanhan Liu
2016-09-14 12:15 ` Kavanagh, Mark B
2016-09-14 21:12 ` Dey, Souvik
2016-09-20 7:11 ` Yuanhan Liu
2016-09-20 18:42 ` Dey, Souvik
2016-09-21 2:21 ` 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=20160909154229.GT23158@yliu-dev.sh.intel.com \
--to=yuanhan.liu@linux.intel.com \
--cc=dev@dpdk.org \
--cc=mark.b.kavanagh@intel.com \
--cc=sodey@sonusnet.com \
--cc=stephen@networkplumber.org \
/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).