* [dpdk-dev] [PATCH v2] add mtu set in virtio
@ 2016-08-29 23:02 souvikdey33
2016-08-30 7:57 ` Maxime Coquelin
0 siblings, 1 reply; 12+ messages in thread
From: souvikdey33 @ 2016-08-29 23:02 UTC (permalink / raw)
To: stephen, huawei.xie, yuanhan.liu; +Cc: dev, souvikdey33
Signed-off-by: Souvik Dey <sodey@sonusnet.com>
Fixes: 1fb8e8896ca8 ("Signed-off-by: Souvik Dey <sodey@sonusnet.com>")
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
Virtio interfaces should also support setting of mtu, as in case of cloud
it is expected to have the consistent mtu across the infrastructure that
the dhcp server sends and not hardcoded to 1500(default).
---
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
@@ -92,6 +92,7 @@ static void virtio_mac_addr_add(struct rte_eth_dev *dev,
static void virtio_mac_addr_remove(struct rte_eth_dev *dev, uint32_t index);
static void virtio_mac_addr_set(struct rte_eth_dev *dev,
struct ether_addr *mac_addr);
+static int virtio_mtu_set(struct rte_eth_dev *dev, uint16_t mtu);
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 64 and 9728."
+ return -EINVAL;
+ }
+ return 0;
+}
+
/*
* dev_ops for virtio, bare necessities for basic operation
*/
@@ -664,6 +675,7 @@ static const struct eth_dev_ops virtio_eth_dev_ops = {
.promiscuous_disable = virtio_dev_promiscuous_disable,
.allmulticast_enable = virtio_dev_allmulticast_enable,
.allmulticast_disable = virtio_dev_allmulticast_disable,
+ .mtu_set = virtio_mtu_set,
.dev_infos_get = virtio_dev_info_get,
.stats_get = virtio_dev_stats_get,
--
2.9.3.windows.1
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [dpdk-dev] [PATCH v2] add mtu set in virtio
2016-08-29 23:02 [dpdk-dev] [PATCH v2] add mtu set in virtio souvikdey33
@ 2016-08-30 7:57 ` Maxime Coquelin
2016-09-01 22:20 ` Dey, Souvik
2016-09-07 3:25 ` Yuanhan Liu
0 siblings, 2 replies; 12+ messages in thread
From: Maxime Coquelin @ 2016-08-30 7:57 UTC (permalink / raw)
To: souvikdey33, stephen, huawei.xie, yuanhan.liu; +Cc: dev
Hi Souvik,
On 08/30/2016 01:02 AM, souvikdey33 wrote:
> Signed-off-by: Souvik Dey <sodey@sonusnet.com>
>
> Fixes: 1fb8e8896ca8 ("Signed-off-by: Souvik Dey <sodey@sonusnet.com>")
> Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
>
> Virtio interfaces should also support setting of mtu, as in case of cloud
> it is expected to have the consistent mtu across the infrastructure that
> the dhcp server sends and not hardcoded to 1500(default).
> ---
> drivers/net/virtio/virtio_ethdev.c | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
FYI, there are some on-going changes in the VIRTIO specification
so that the VHOST interface exposes its MTU to its VIRTIO peer.
It may also be used as an alternative of what you patch achieves.
I am working on its implementation in Qemu/DPDK, our goal being to
reduce performance drops for small packets with Rx mergeable buffers
feature enabled.
Regards,
Maxime
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [dpdk-dev] [PATCH v2] add mtu set in virtio
2016-08-30 7:57 ` Maxime Coquelin
@ 2016-09-01 22:20 ` Dey, Souvik
2016-09-02 7:05 ` Maxime Coquelin
2016-09-07 3:25 ` Yuanhan Liu
1 sibling, 1 reply; 12+ messages in thread
From: Dey, Souvik @ 2016-09-01 22:20 UTC (permalink / raw)
To: Maxime Coquelin, stephen; +Cc: dev
Hi Maxime,
When is patches or new implementation going to come in the release ? if it is not 16.11 then, can we keep this change till the new virtio changes come in the release. And if it is already planned for 16.11, then can I get a little more information on that.
--
Regards,
Souvik
-----Original Message-----
From: Maxime Coquelin [mailto:maxime.coquelin@redhat.com]
Sent: Tuesday, August 30, 2016 3:58 AM
To: Dey, Souvik <sodey@sonusnet.com>; stephen@networkplumber.org; huawei.xie@intel.com; yuanhan.liu@linux.intel.com
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v2] add mtu set in virtio
Hi Souvik,
On 08/30/2016 01:02 AM, souvikdey33 wrote:
> Signed-off-by: Souvik Dey <sodey@sonusnet.com>
>
> Fixes: 1fb8e8896ca8 ("Signed-off-by: Souvik Dey <sodey@sonusnet.com>")
> Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
>
> Virtio interfaces should also support setting of mtu, as in case of
> cloud it is expected to have the consistent mtu across the
> infrastructure that the dhcp server sends and not hardcoded to 1500(default).
> ---
> drivers/net/virtio/virtio_ethdev.c | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
FYI, there are some on-going changes in the VIRTIO specification so that the VHOST interface exposes its MTU to its VIRTIO peer.
It may also be used as an alternative of what you patch achieves.
I am working on its implementation in Qemu/DPDK, our goal being to reduce performance drops for small packets with Rx mergeable buffers feature enabled.
Regards,
Maxime
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [dpdk-dev] [PATCH v2] add mtu set in virtio
2016-09-01 22:20 ` Dey, Souvik
@ 2016-09-02 7:05 ` Maxime Coquelin
2016-09-07 2:11 ` Dey, Souvik
0 siblings, 1 reply; 12+ messages in thread
From: Maxime Coquelin @ 2016-09-02 7:05 UTC (permalink / raw)
To: Dey, Souvik, stephen; +Cc: dev
Hi Souvik,
On 09/02/2016 12:20 AM, Dey, Souvik wrote:
> Hi Maxime,
> When is patches or new implementation going to come in the release ? if it is not 16.11 then, can we keep this change till the new virtio changes come in the release. And if it is already planned for 16.11, then can I get a little more information on that.
>
I'm currently working on qemu part implementation, first RFC should be
sent next week.
Goal is to have it in 16.11, but I cannot commit, as the spec update
has not been acked yet.
For more information, you can start by having a look at the spec review:
https://lists.oasis-open.org/archives/virtio-dev/201608/msg00056.html
Regards,
Maxime
> --
> Regards,
> Souvik
>
> -----Original Message-----
> From: Maxime Coquelin [mailto:maxime.coquelin@redhat.com]
> Sent: Tuesday, August 30, 2016 3:58 AM
> To: Dey, Souvik <sodey@sonusnet.com>; stephen@networkplumber.org; huawei.xie@intel.com; yuanhan.liu@linux.intel.com
> Cc: dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v2] add mtu set in virtio
>
> Hi Souvik,
>
> On 08/30/2016 01:02 AM, souvikdey33 wrote:
>> Signed-off-by: Souvik Dey <sodey@sonusnet.com>
>>
>> Fixes: 1fb8e8896ca8 ("Signed-off-by: Souvik Dey <sodey@sonusnet.com>")
>> Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
>>
>> Virtio interfaces should also support setting of mtu, as in case of
>> cloud it is expected to have the consistent mtu across the
>> infrastructure that the dhcp server sends and not hardcoded to 1500(default).
>> ---
>> drivers/net/virtio/virtio_ethdev.c | 12 ++++++++++++
>> 1 file changed, 12 insertions(+)
>
> FYI, there are some on-going changes in the VIRTIO specification so that the VHOST interface exposes its MTU to its VIRTIO peer.
> It may also be used as an alternative of what you patch achieves.
>
> I am working on its implementation in Qemu/DPDK, our goal being to reduce performance drops for small packets with Rx mergeable buffers feature enabled.
>
> Regards,
> Maxime
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [dpdk-dev] [PATCH v2] add mtu set in virtio
2016-09-02 7:05 ` Maxime Coquelin
@ 2016-09-07 2:11 ` Dey, Souvik
2016-09-07 8:28 ` Maxime Coquelin
0 siblings, 1 reply; 12+ messages in thread
From: Dey, Souvik @ 2016-09-07 2:11 UTC (permalink / raw)
To: Maxime Coquelin, stephen; +Cc: dev
Hi Maxime,
In that case let this fix be there till the time the new implementation comes in. We can re-visit the changes again in the new implementation and then decide to keep this or remove it. Hope this serves all the purposes.
--
Regards,
Souvik
-----Original Message-----
From: Maxime Coquelin [mailto:maxime.coquelin@redhat.com]
Sent: Friday, September 2, 2016 3:06 AM
To: Dey, Souvik <sodey@sonusnet.com>; stephen@networkplumber.org
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v2] add mtu set in virtio
Hi Souvik,
On 09/02/2016 12:20 AM, Dey, Souvik wrote:
> Hi Maxime,
> When is patches or new implementation going to come in the release ? if it is not 16.11 then, can we keep this change till the new virtio changes come in the release. And if it is already planned for 16.11, then can I get a little more information on that.
>
I'm currently working on qemu part implementation, first RFC should be sent next week.
Goal is to have it in 16.11, but I cannot commit, as the spec update has not been acked yet.
For more information, you can start by having a look at the spec review:
https://lists.oasis-open.org/archives/virtio-dev/201608/msg00056.html
Regards,
Maxime
> --
> Regards,
> Souvik
>
> -----Original Message-----
> From: Maxime Coquelin [mailto:maxime.coquelin@redhat.com]
> Sent: Tuesday, August 30, 2016 3:58 AM
> To: Dey, Souvik <sodey@sonusnet.com>; stephen@networkplumber.org;
> huawei.xie@intel.com; yuanhan.liu@linux.intel.com
> Cc: dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v2] add mtu set in virtio
>
> Hi Souvik,
>
> On 08/30/2016 01:02 AM, souvikdey33 wrote:
>> Signed-off-by: Souvik Dey <sodey@sonusnet.com>
>>
>> Fixes: 1fb8e8896ca8 ("Signed-off-by: Souvik Dey
>> <sodey@sonusnet.com>")
>> Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
>>
>> Virtio interfaces should also support setting of mtu, as in case of
>> cloud it is expected to have the consistent mtu across the
>> infrastructure that the dhcp server sends and not hardcoded to 1500(default).
>> ---
>> drivers/net/virtio/virtio_ethdev.c | 12 ++++++++++++
>> 1 file changed, 12 insertions(+)
>
> FYI, there are some on-going changes in the VIRTIO specification so that the VHOST interface exposes its MTU to its VIRTIO peer.
> It may also be used as an alternative of what you patch achieves.
>
> I am working on its implementation in Qemu/DPDK, our goal being to reduce performance drops for small packets with Rx mergeable buffers feature enabled.
>
> Regards,
> Maxime
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [dpdk-dev] [PATCH v2] add mtu set in virtio
2016-09-07 2:11 ` Dey, Souvik
@ 2016-09-07 8:28 ` Maxime Coquelin
0 siblings, 0 replies; 12+ messages in thread
From: Maxime Coquelin @ 2016-09-07 8:28 UTC (permalink / raw)
To: Dey, Souvik, stephen; +Cc: dev
On 09/07/2016 04:11 AM, Dey, Souvik wrote:
> Hi Maxime,
> In that case let this fix be there till the time the new implementation comes in. We can re-visit the changes again in the new implementation and then decide to keep this or remove it. Hope this serves all the purposes.
Sure, I'm fine with your proposal.
Thanks,
Maxime
>
> --
> Regards,
> Souvik
>
> -----Original Message-----
> From: Maxime Coquelin [mailto:maxime.coquelin@redhat.com]
> Sent: Friday, September 2, 2016 3:06 AM
> To: Dey, Souvik <sodey@sonusnet.com>; stephen@networkplumber.org
> Cc: dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v2] add mtu set in virtio
>
> Hi Souvik,
>
> On 09/02/2016 12:20 AM, Dey, Souvik wrote:
>> Hi Maxime,
>> When is patches or new implementation going to come in the release ? if it is not 16.11 then, can we keep this change till the new virtio changes come in the release. And if it is already planned for 16.11, then can I get a little more information on that.
>>
> I'm currently working on qemu part implementation, first RFC should be sent next week.
>
> Goal is to have it in 16.11, but I cannot commit, as the spec update has not been acked yet.
>
> For more information, you can start by having a look at the spec review:
> https://lists.oasis-open.org/archives/virtio-dev/201608/msg00056.html
>
> Regards,
> Maxime
>
>> --
>> Regards,
>> Souvik
>>
>> -----Original Message-----
>> From: Maxime Coquelin [mailto:maxime.coquelin@redhat.com]
>> Sent: Tuesday, August 30, 2016 3:58 AM
>> To: Dey, Souvik <sodey@sonusnet.com>; stephen@networkplumber.org;
>> huawei.xie@intel.com; yuanhan.liu@linux.intel.com
>> Cc: dev@dpdk.org
>> Subject: Re: [dpdk-dev] [PATCH v2] add mtu set in virtio
>>
>> Hi Souvik,
>>
>> On 08/30/2016 01:02 AM, souvikdey33 wrote:
>>> Signed-off-by: Souvik Dey <sodey@sonusnet.com>
>>>
>>> Fixes: 1fb8e8896ca8 ("Signed-off-by: Souvik Dey
>>> <sodey@sonusnet.com>")
>>> Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
>>>
>>> Virtio interfaces should also support setting of mtu, as in case of
>>> cloud it is expected to have the consistent mtu across the
>>> infrastructure that the dhcp server sends and not hardcoded to 1500(default).
>>> ---
>>> drivers/net/virtio/virtio_ethdev.c | 12 ++++++++++++
>>> 1 file changed, 12 insertions(+)
>>
>> FYI, there are some on-going changes in the VIRTIO specification so that the VHOST interface exposes its MTU to its VIRTIO peer.
>> It may also be used as an alternative of what you patch achieves.
>>
>> I am working on its implementation in Qemu/DPDK, our goal being to reduce performance drops for small packets with Rx mergeable buffers feature enabled.
>>
>> Regards,
>> Maxime
>>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [dpdk-dev] [PATCH v2] add mtu set in virtio
2016-08-30 7:57 ` Maxime Coquelin
2016-09-01 22:20 ` Dey, Souvik
@ 2016-09-07 3:25 ` Yuanhan Liu
2016-09-07 9:16 ` Maxime Coquelin
1 sibling, 1 reply; 12+ messages in thread
From: Yuanhan Liu @ 2016-09-07 3:25 UTC (permalink / raw)
To: Maxime Coquelin; +Cc: souvikdey33, stephen, huawei.xie, dev
On Tue, Aug 30, 2016 at 09:57:39AM +0200, Maxime Coquelin wrote:
> Hi Souvik,
>
> On 08/30/2016 01:02 AM, souvikdey33 wrote:
> >Signed-off-by: Souvik Dey <sodey@sonusnet.com>
> >
> >Fixes: 1fb8e8896ca8 ("Signed-off-by: Souvik Dey <sodey@sonusnet.com>")
> >Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
> >
> >Virtio interfaces should also support setting of mtu, as in case of cloud
> >it is expected to have the consistent mtu across the infrastructure that
> >the dhcp server sends and not hardcoded to 1500(default).
> >---
> > drivers/net/virtio/virtio_ethdev.c | 12 ++++++++++++
> > 1 file changed, 12 insertions(+)
>
> FYI, there are some on-going changes in the VIRTIO specification
> so that the VHOST interface exposes its MTU to its VIRTIO peer.
> It may also be used as an alternative of what you patch achieves.
>
> I am working on its implementation in Qemu/DPDK, our goal being to
> reduce performance drops for small packets with Rx mergeable buffers
> feature enabled.
Mind to educate me a bit on how that works?
--yliu
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [dpdk-dev] [PATCH v2] add mtu set in virtio
2016-09-07 3:25 ` Yuanhan Liu
@ 2016-09-07 9:16 ` Maxime Coquelin
2016-09-08 7:30 ` Yuanhan Liu
0 siblings, 1 reply; 12+ messages in thread
From: Maxime Coquelin @ 2016-09-07 9:16 UTC (permalink / raw)
To: Yuanhan Liu; +Cc: souvikdey33, stephen, huawei.xie, dev
On 09/07/2016 05:25 AM, Yuanhan Liu wrote:
> On Tue, Aug 30, 2016 at 09:57:39AM +0200, Maxime Coquelin wrote:
>> Hi Souvik,
>>
>> On 08/30/2016 01:02 AM, souvikdey33 wrote:
>>> Signed-off-by: Souvik Dey <sodey@sonusnet.com>
>>>
>>> Fixes: 1fb8e8896ca8 ("Signed-off-by: Souvik Dey <sodey@sonusnet.com>")
>>> Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
>>>
>>> Virtio interfaces should also support setting of mtu, as in case of cloud
>>> it is expected to have the consistent mtu across the infrastructure that
>>> the dhcp server sends and not hardcoded to 1500(default).
>>> ---
>>> drivers/net/virtio/virtio_ethdev.c | 12 ++++++++++++
>>> 1 file changed, 12 insertions(+)
>>
>> FYI, there are some on-going changes in the VIRTIO specification
>> so that the VHOST interface exposes its MTU to its VIRTIO peer.
>> It may also be used as an alternative of what you patch achieves.
>>
>> I am working on its implementation in Qemu/DPDK, our goal being to
>> reduce performance drops for small packets with Rx mergeable buffers
>> feature enabled.
>
> Mind to educate me a bit on how that works?
Of course.
Basically, this is a way to advise the MTU we want in the guest.
In the guest, if GRO is not enabled:
- In case of Kernel virtio-net, it could be used to
size the SKBs at the expected MTU. If possible, we could disable Rx
mergeable buffers.
- In case of virtio PMD, if the MTU advised by host is lower than the
pre-allocated mbuf size for the receive queue, then we should not need
mergeable buffers.
Does that sound reasonnable?
Do I miss something?
Thanks,
Maxime
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [dpdk-dev] [PATCH v2] add mtu set in virtio
2016-09-07 9:16 ` Maxime Coquelin
@ 2016-09-08 7:30 ` Yuanhan Liu
2016-09-08 7:50 ` Maxime Coquelin
0 siblings, 1 reply; 12+ messages in thread
From: Yuanhan Liu @ 2016-09-08 7:30 UTC (permalink / raw)
To: Maxime Coquelin; +Cc: souvikdey33, stephen, huawei.xie, dev
On Wed, Sep 07, 2016 at 11:16:47AM +0200, Maxime Coquelin wrote:
>
>
> On 09/07/2016 05:25 AM, Yuanhan Liu wrote:
> >On Tue, Aug 30, 2016 at 09:57:39AM +0200, Maxime Coquelin wrote:
> >>Hi Souvik,
> >>
> >>On 08/30/2016 01:02 AM, souvikdey33 wrote:
> >>>Signed-off-by: Souvik Dey <sodey@sonusnet.com>
> >>>
> >>>Fixes: 1fb8e8896ca8 ("Signed-off-by: Souvik Dey <sodey@sonusnet.com>")
> >>>Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
> >>>
> >>>Virtio interfaces should also support setting of mtu, as in case of cloud
> >>>it is expected to have the consistent mtu across the infrastructure that
> >>>the dhcp server sends and not hardcoded to 1500(default).
> >>>---
> >>>drivers/net/virtio/virtio_ethdev.c | 12 ++++++++++++
> >>>1 file changed, 12 insertions(+)
> >>
> >>FYI, there are some on-going changes in the VIRTIO specification
> >>so that the VHOST interface exposes its MTU to its VIRTIO peer.
> >>It may also be used as an alternative of what you patch achieves.
> >>
> >>I am working on its implementation in Qemu/DPDK, our goal being to
> >>reduce performance drops for small packets with Rx mergeable buffers
> >>feature enabled.
> >
> >Mind to educate me a bit on how that works?
>
> Of course.
>
> Basically, this is a way to advise the MTU we want in the guest.
> In the guest, if GRO is not enabled:
> - In case of Kernel virtio-net, it could be used to
> size the SKBs at the expected MTU. If possible, we could disable Rx
> mergeable buffers.
> - In case of virtio PMD, if the MTU advised by host is lower than the
> pre-allocated mbuf size for the receive queue, then we should not need
> mergeable buffers.
Thanks for the explanation!
I see. So, the point is to avoid using mergeable buffers while it is
enabled.
> Does that sound reasonnable?
Yeah, maybe. Just don't know how well it may work in real life. Have
you got any rought data so far?
--yliu
> Do I miss something?
>
> Thanks,
> Maxime
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [dpdk-dev] [PATCH v2] add mtu set in virtio
2016-09-08 7:30 ` Yuanhan Liu
@ 2016-09-08 7:50 ` Maxime Coquelin
2016-09-08 7:57 ` Yuanhan Liu
0 siblings, 1 reply; 12+ messages in thread
From: Maxime Coquelin @ 2016-09-08 7:50 UTC (permalink / raw)
To: Yuanhan Liu; +Cc: souvikdey33, stephen, huawei.xie, dev
On 09/08/2016 09:30 AM, Yuanhan Liu wrote:
> On Wed, Sep 07, 2016 at 11:16:47AM +0200, Maxime Coquelin wrote:
>>
>>
>> On 09/07/2016 05:25 AM, Yuanhan Liu wrote:
>>> On Tue, Aug 30, 2016 at 09:57:39AM +0200, Maxime Coquelin wrote:
>>>> Hi Souvik,
>>>>
>>>> On 08/30/2016 01:02 AM, souvikdey33 wrote:
>>>>> Signed-off-by: Souvik Dey <sodey@sonusnet.com>
>>>>>
>>>>> Fixes: 1fb8e8896ca8 ("Signed-off-by: Souvik Dey <sodey@sonusnet.com>")
>>>>> Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
>>>>>
>>>>> Virtio interfaces should also support setting of mtu, as in case of cloud
>>>>> it is expected to have the consistent mtu across the infrastructure that
>>>>> the dhcp server sends and not hardcoded to 1500(default).
>>>>> ---
>>>>> drivers/net/virtio/virtio_ethdev.c | 12 ++++++++++++
>>>>> 1 file changed, 12 insertions(+)
>>>>
>>>> FYI, there are some on-going changes in the VIRTIO specification
>>>> so that the VHOST interface exposes its MTU to its VIRTIO peer.
>>>> It may also be used as an alternative of what you patch achieves.
>>>>
>>>> I am working on its implementation in Qemu/DPDK, our goal being to
>>>> reduce performance drops for small packets with Rx mergeable buffers
>>>> feature enabled.
>>>
>>> Mind to educate me a bit on how that works?
>>
>> Of course.
>>
>> Basically, this is a way to advise the MTU we want in the guest.
>> In the guest, if GRO is not enabled:
>> - In case of Kernel virtio-net, it could be used to
>> size the SKBs at the expected MTU. If possible, we could disable Rx
>> mergeable buffers.
>> - In case of virtio PMD, if the MTU advised by host is lower than the
>> pre-allocated mbuf size for the receive queue, then we should not need
>> mergeable buffers.
>
> Thanks for the explanation!
>
> I see. So, the point is to avoid using mergeable buffers while it is
> enabled.
>
>> Does that sound reasonnable?
>
> Yeah, maybe. Just don't know how well it may work in real life. Have
> you got any rought data so far?
The PoC is not done yet, only Qemu part is implemented.
But what we noticed is that for small packets, we have a 50%
degradation when rx mergeable buffers are on when running PVP
use-case.
Main part of the degradation is due an additional cache-miss in
virtio-pmd receive path, because we fetch the header to get the number
of buffer.
When sending only small packets and removing this access, we recover
25% of the degradation.
The 25% remaining part may be reduced significantly with Zhihong series.
Hope it answer your questions.
Thanks,
Maxime
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [dpdk-dev] [PATCH v2] add mtu set in virtio
2016-09-08 7:50 ` Maxime Coquelin
@ 2016-09-08 7:57 ` Yuanhan Liu
2016-09-09 3:44 ` Dey, Souvik
0 siblings, 1 reply; 12+ messages in thread
From: Yuanhan Liu @ 2016-09-08 7:57 UTC (permalink / raw)
To: Maxime Coquelin; +Cc: souvikdey33, stephen, huawei.xie, dev
On Thu, Sep 08, 2016 at 09:50:34AM +0200, Maxime Coquelin wrote:
>
>
> On 09/08/2016 09:30 AM, Yuanhan Liu wrote:
> >On Wed, Sep 07, 2016 at 11:16:47AM +0200, Maxime Coquelin wrote:
> >>
> >>
> >>On 09/07/2016 05:25 AM, Yuanhan Liu wrote:
> >>>On Tue, Aug 30, 2016 at 09:57:39AM +0200, Maxime Coquelin wrote:
> >>>>Hi Souvik,
> >>>>
> >>>>On 08/30/2016 01:02 AM, souvikdey33 wrote:
> >>>>>Signed-off-by: Souvik Dey <sodey@sonusnet.com>
> >>>>>
> >>>>>Fixes: 1fb8e8896ca8 ("Signed-off-by: Souvik Dey <sodey@sonusnet.com>")
> >>>>>Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
> >>>>>
> >>>>>Virtio interfaces should also support setting of mtu, as in case of cloud
> >>>>>it is expected to have the consistent mtu across the infrastructure that
> >>>>>the dhcp server sends and not hardcoded to 1500(default).
> >>>>>---
> >>>>>drivers/net/virtio/virtio_ethdev.c | 12 ++++++++++++
> >>>>>1 file changed, 12 insertions(+)
> >>>>
> >>>>FYI, there are some on-going changes in the VIRTIO specification
> >>>>so that the VHOST interface exposes its MTU to its VIRTIO peer.
> >>>>It may also be used as an alternative of what you patch achieves.
> >>>>
> >>>>I am working on its implementation in Qemu/DPDK, our goal being to
> >>>>reduce performance drops for small packets with Rx mergeable buffers
> >>>>feature enabled.
> >>>
> >>>Mind to educate me a bit on how that works?
> >>
> >>Of course.
> >>
> >>Basically, this is a way to advise the MTU we want in the guest.
> >>In the guest, if GRO is not enabled:
> >> - In case of Kernel virtio-net, it could be used to
> >>size the SKBs at the expected MTU. If possible, we could disable Rx
> >>mergeable buffers.
> >> - In case of virtio PMD, if the MTU advised by host is lower than the
> >>pre-allocated mbuf size for the receive queue, then we should not need
> >>mergeable buffers.
> >
> >Thanks for the explanation!
> >
> >I see. So, the point is to avoid using mergeable buffers while it is
> >enabled.
> >
> >>Does that sound reasonnable?
> >
> >Yeah, maybe. Just don't know how well it may work in real life. Have
> >you got any rought data so far?
>
> The PoC is not done yet, only Qemu part is implemented.
> But what we noticed is that for small packets, we have a 50%
> degradation when rx mergeable buffers are on when running PVP
> use-case.
>
> Main part of the degradation is due an additional cache-miss in
> virtio-pmd receive path, because we fetch the header to get the number
> of buffer.
>
> When sending only small packets and removing this access, we recover
> 25% of the degradation.
>
> The 25% remaining part may be reduced significantly with Zhihong series.
>
> Hope it answer your questions.
Yes, it does and thanks for the info.
--yliu
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [dpdk-dev] [PATCH v2] add mtu set in virtio
2016-09-08 7:57 ` Yuanhan Liu
@ 2016-09-09 3:44 ` Dey, Souvik
0 siblings, 0 replies; 12+ messages in thread
From: Dey, Souvik @ 2016-09-09 3:44 UTC (permalink / raw)
To: Yuanhan Liu, Maxime Coquelin; +Cc: stephen, huawei.xie, dev
Are we good to get this in for 16.11 and then revisit this when the VHOST improvements comes in. This will atleast take care of the gap between 16.11 and VHOST improvements coming in.
--
Regards,
Souvik
-----Original Message-----
From: Yuanhan Liu [mailto:yuanhan.liu@linux.intel.com]
Sent: Thursday, September 8, 2016 3:57 AM
To: Maxime Coquelin <maxime.coquelin@redhat.com>
Cc: Dey, Souvik <sodey@sonusnet.com>; stephen@networkplumber.org; huawei.xie@intel.com; dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v2] add mtu set in virtio
On Thu, Sep 08, 2016 at 09:50:34AM +0200, Maxime Coquelin wrote:
>
>
> On 09/08/2016 09:30 AM, Yuanhan Liu wrote:
> >On Wed, Sep 07, 2016 at 11:16:47AM +0200, Maxime Coquelin wrote:
> >>
> >>
> >>On 09/07/2016 05:25 AM, Yuanhan Liu wrote:
> >>>On Tue, Aug 30, 2016 at 09:57:39AM +0200, Maxime Coquelin wrote:
> >>>>Hi Souvik,
> >>>>
> >>>>On 08/30/2016 01:02 AM, souvikdey33 wrote:
> >>>>>Signed-off-by: Souvik Dey <sodey@sonusnet.com>
> >>>>>
> >>>>>Fixes: 1fb8e8896ca8 ("Signed-off-by: Souvik Dey
> >>>>><sodey@sonusnet.com>")
> >>>>>Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
> >>>>>
> >>>>>Virtio interfaces should also support setting of mtu, as in case
> >>>>>of cloud it is expected to have the consistent mtu across the
> >>>>>infrastructure that the dhcp server sends and not hardcoded to 1500(default).
> >>>>>---
> >>>>>drivers/net/virtio/virtio_ethdev.c | 12 ++++++++++++
> >>>>>1 file changed, 12 insertions(+)
> >>>>
> >>>>FYI, there are some on-going changes in the VIRTIO specification
> >>>>so that the VHOST interface exposes its MTU to its VIRTIO peer.
> >>>>It may also be used as an alternative of what you patch achieves.
> >>>>
> >>>>I am working on its implementation in Qemu/DPDK, our goal being to
> >>>>reduce performance drops for small packets with Rx mergeable
> >>>>buffers feature enabled.
> >>>
> >>>Mind to educate me a bit on how that works?
> >>
> >>Of course.
> >>
> >>Basically, this is a way to advise the MTU we want in the guest.
> >>In the guest, if GRO is not enabled:
> >> - In case of Kernel virtio-net, it could be used to size the SKBs
> >>at the expected MTU. If possible, we could disable Rx mergeable
> >>buffers.
> >> - In case of virtio PMD, if the MTU advised by host is lower than
> >>the pre-allocated mbuf size for the receive queue, then we should
> >>not need mergeable buffers.
> >
> >Thanks for the explanation!
> >
> >I see. So, the point is to avoid using mergeable buffers while it is
> >enabled.
> >
> >>Does that sound reasonnable?
> >
> >Yeah, maybe. Just don't know how well it may work in real life. Have
> >you got any rought data so far?
>
> The PoC is not done yet, only Qemu part is implemented.
> But what we noticed is that for small packets, we have a 50%
> degradation when rx mergeable buffers are on when running PVP
> use-case.
>
> Main part of the degradation is due an additional cache-miss in
> virtio-pmd receive path, because we fetch the header to get the number
> of buffer.
>
> When sending only small packets and removing this access, we recover
> 25% of the degradation.
>
> The 25% remaining part may be reduced significantly with Zhihong series.
>
> Hope it answer your questions.
Yes, it does and thanks for the info.
--yliu
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2016-09-09 3:44 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-29 23:02 [dpdk-dev] [PATCH v2] add mtu set in virtio souvikdey33
2016-08-30 7:57 ` Maxime Coquelin
2016-09-01 22:20 ` Dey, Souvik
2016-09-02 7:05 ` Maxime Coquelin
2016-09-07 2:11 ` Dey, Souvik
2016-09-07 8:28 ` Maxime Coquelin
2016-09-07 3:25 ` Yuanhan Liu
2016-09-07 9:16 ` Maxime Coquelin
2016-09-08 7:30 ` Yuanhan Liu
2016-09-08 7:50 ` Maxime Coquelin
2016-09-08 7:57 ` Yuanhan Liu
2016-09-09 3:44 ` Dey, Souvik
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).