All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [ovs-dev] [PATCH] netdev-dpdk: defer MTU set after interface start
       [not found]     ` <CD7C01071941AC429549C17338DB8A528918C648@IRSMSX101.ger.corp.intel.com>
@ 2017-12-13 11:55       ` Jan Scheurich
       [not found]         ` <VI1PR0702MB3839FEA6ACA7F3BF2948EAB39A350-unnVr81DUEHDmNLL5uXHVDMcllmSiLMWnBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Jan Scheurich @ 2017-12-13 11:55 UTC (permalink / raw)
  To: Stokes, Ian, Matteo Croce; +Cc: dev, 'dev@dpdk.org'

> > The issue only arises with the qede PMD and 67fe6d635193
> > ("netdev-dpdk: use rte_eth_dev_set_mtu.")
>
> I had some more time to look at this today but this patch will break OVS DPDK for existing supported DPDK ports during testing.
>
> I tested with an XL710 and the MTU will fail to apply, the device must be stopped before configuration changes can be applied such as
> MTU. See log message below
>
> 2017-11-28T17:13:50Z|00086|dpdk|ERR|i40e_dev_mtu_set(): port 0 must be stopped before configuration
> 2017-11-28T17:13:50Z|00087|netdev_dpdk|ERR|Interface dpdk0 MTU (1500) setup error: Device or resource busy
>
> Did you come across it in your testing? I guess you didn’t see this for QEDE pmd. In my case the DPDK devices will simply fail to add to the
> bridge.
>
> As is, the patch would not be acceptable as its breaking existing functionality. It would have to be reworked to configure for device that
> cannot reconfigure when busy.
>
> Thanks
> Ian

I fully support the original decision to switch to using rte_dev_set_mtu() in OVS. The prior approach setting max_rx_pkt_len in rte_eth_dev_configure() was non-portable as that field has no well-defined semantics and its relation to the MTU size is different for almost every PMD.

I had a look at the qede PMD implementation of rte_dev_set_mtu() in DPDK 17.05 and 17.11. It assumes that the device must be started because qede_set_mtu() unconditionally stops the device before and restarts it after changing the MTU value. Given that other PMDs like i40e don’t accept it after start, there is no possible way OVS can use rte_dev_set_mtu() that will work with all drivers.

I think it is a weakness of the rte_ethdev API that it does not specify clearly when API functions like rte_dev_set_mtu() may be called. From the documentation of error -EBUSY one can guess that the intention was to optionally support it when the device is started. Implicitly one could conclude that it MUST be supported when the device stopped. That is logical and also what most PMDs do.

I would say the qede PMD should be fixed. It should accept the rte_dev_set_mtu() at any time between rte_eth_dev_configure() and rte_eth_dev_start() (and optionally also after start).

BR, Jan



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] netdev-dpdk: defer MTU set after interface start
       [not found]         ` <VI1PR0702MB3839FEA6ACA7F3BF2948EAB39A350-unnVr81DUEHDmNLL5uXHVDMcllmSiLMWnBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
@ 2017-12-13 12:08           ` Stokes, Ian
  2017-12-13 16:06             ` [ovs-dev] " Aaron Conole
  0 siblings, 1 reply; 3+ messages in thread
From: Stokes, Ian @ 2017-12-13 12:08 UTC (permalink / raw)
  To: Jan Scheurich, Matteo Croce
  Cc: dev-yBygre7rU0TnMu66kgdUjQ, 'dev-VfR2kkLFssw@public.gmane.org'


> > The issue only arises with the qede PMD and 67fe6d635193
> > ("netdev-dpdk: use rte_eth_dev_set_mtu.")
>
> I had some more time to look at this today but this patch will break OVS DPDK for existing supported DPDK ports during testing.
>
> I tested with an XL710 and the MTU will fail to apply, the device must be stopped before configuration changes can be applied such as
> MTU. See log message below
>
> 2017-11-28T17:13:50Z|00086|dpdk|ERR|i40e_dev_mtu_set(): port 0 must be stopped before configuration
> 2017-11-28T17:13:50Z|00087|netdev_dpdk|ERR|Interface dpdk0 MTU (1500) setup error: Device or resource busy
>
> Did you come across it in your testing? I guess you didn’t see this for QEDE pmd. In my case the DPDK devices will simply fail to add to the
> bridge.
>
> As is, the patch would not be acceptable as its breaking existing functionality. It would have to be reworked to configure for device that
> cannot reconfigure when busy.
>
> Thanks
> Ian

I fully support the original decision to switch to using rte_dev_set_mtu() in OVS. The prior approach setting max_rx_pkt_len in rte_eth_dev_configure() was non-portable as that field has no well-defined semantics and its relation to the MTU size is different for almost every PMD.

I had a look at the qede PMD implementation of rte_dev_set_mtu() in DPDK 17.05 and 17.11. It assumes that the device must be started because qede_set_mtu() unconditionally stops the device before and restarts it after changing the MTU value. Given that other PMDs like i40e don’t accept it after start, there is no possible way OVS can use rte_dev_set_mtu() that will work with all drivers.

I think it is a weakness of the rte_ethdev API that it does not specify clearly when API functions like rte_dev_set_mtu() may be called. From the documentation of error -EBUSY one can guess that the intention was to optionally support it when the device is started. Implicitly one could conclude that it MUST be supported when the device stopped. That is logical and also what most PMDs do.

I would say the qede PMD should be fixed. It should accept the rte_dev_set_mtu() at any time between rte_eth_dev_configure() and rte_eth_dev_start() (and optionally also after start).

BR, Jan

[IS] Thanks for doing this follow up Jan, it’s really valuable in my opinion.

It’s definitely something that should be raised to the DPDK community as conceivably if there is no set process to follow we could see varying behavior from PMD device to device. I’m happy to take this and raise it to the DPDK community.

Thanks
Ian

_______________________________________________
dev mailing list
dev@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [ovs-dev] [PATCH] netdev-dpdk: defer MTU set after interface start
  2017-12-13 12:08           ` Stokes, Ian
@ 2017-12-13 16:06             ` Aaron Conole
  0 siblings, 0 replies; 3+ messages in thread
From: Aaron Conole @ 2017-12-13 16:06 UTC (permalink / raw)
  To: Stokes, Ian
  Cc: Jan Scheurich, Matteo Croce, dev, 'dev@dpdk.org', Patil, Harish

"Stokes, Ian" <ian.stokes@intel.com> writes:

>> > The issue only arises with the qede PMD and 67fe6d635193
>> > ("netdev-dpdk: use rte_eth_dev_set_mtu.")
>>
>> I had some more time to look at this today but this patch will break
>> OVS DPDK for existing supported DPDK ports during testing.
>>
>> I tested with an XL710 and the MTU will fail to apply, the device
>> must be stopped before configuration changes can be applied such as
>> MTU. See log message below
>>
>> 2017-11-28T17:13:50Z|00086|dpdk|ERR|i40e_dev_mtu_set(): port 0 must
>> be stopped before configuration
>> 2017-11-28T17:13:50Z|00087|netdev_dpdk|ERR|Interface dpdk0 MTU
>> (1500) setup error: Device or resource busy
>>
>> Did you come across it in your testing? I guess you didn’t see this
>> for QEDE pmd. In my case the DPDK devices will simply fail to add to
>> the
>> bridge.
>>
>> As is, the patch would not be acceptable as its breaking existing
>> functionality. It would have to be reworked to configure for device
>> that
>> cannot reconfigure when busy.
>>
>> Thanks
>> Ian
>
> I fully support the original decision to switch to using
> rte_dev_set_mtu() in OVS. The prior approach setting max_rx_pkt_len in
> rte_eth_dev_configure() was non-portable as that field has no
> well-defined semantics and its relation to the MTU size is different
> for almost every PMD.
>
> I had a look at the qede PMD implementation of rte_dev_set_mtu() in
> DPDK 17.05 and 17.11. It assumes that the device must be started
> because qede_set_mtu() unconditionally stops the device before and
> restarts it after changing the MTU value. Given that other PMDs like
> i40e don’t accept it after start, there is no possible way OVS can use
> rte_dev_set_mtu() that will work with all drivers.
>
> I think it is a weakness of the rte_ethdev API that it does not
> specify clearly when API functions like rte_dev_set_mtu() may be
> called. From the documentation of error -EBUSY one can guess that the
> intention was to optionally support it when the device is
> started. Implicitly one could conclude that it MUST be supported when
> the device stopped. That is logical and also what most PMDs do.
>
> I would say the qede PMD should be fixed. It should accept the
> rte_dev_set_mtu() at any time between rte_eth_dev_configure() and
> rte_eth_dev_start() (and optionally also after start).
>
> BR, Jan
>
> [IS] Thanks for doing this follow up Jan, it’s really valuable in my opinion.
>
> It’s definitely something that should be raised to the DPDK community
> as conceivably if there is no set process to follow we could see
> varying behavior from PMD device to device. I’m happy to take this and
> raise it to the DPDK community.

Agreed that the understanding of when/how this setter can be called is
confusing.  I contacted Harish Patil (who works on that driver for the
DPDK side) about this, and think that there's a followup to this thread
coming.

> Thanks
> Ian
>
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-12-13 16:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20171116172326.22070-1-mcroce@redhat.com>
     [not found] ` <CD7C01071941AC429549C17338DB8A528918B1F9@IRSMSX101.ger.corp.intel.com>
     [not found]   ` <CAGnkfhwi-VyFk0kH3Tave-hrZnDk5yLbqVsQ7otgQZS8_VCymw@mail.gmail.com>
     [not found]     ` <CD7C01071941AC429549C17338DB8A528918C648@IRSMSX101.ger.corp.intel.com>
2017-12-13 11:55       ` [ovs-dev] [PATCH] netdev-dpdk: defer MTU set after interface start Jan Scheurich
     [not found]         ` <VI1PR0702MB3839FEA6ACA7F3BF2948EAB39A350-unnVr81DUEHDmNLL5uXHVDMcllmSiLMWnBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
2017-12-13 12:08           ` Stokes, Ian
2017-12-13 16:06             ` [ovs-dev] " Aaron Conole

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.