[ovs-dev] [ovs-dev, ovs-dev, v4] netdev-dpdk: Configurable Link State Change (LSC) detection mode

Eelco Chaudron echaudro at redhat.com
Mon Feb 5 16:29:50 UTC 2018


On 02/02/18 17:17, Ilya Maximets wrote:
> On 02.02.2018 17:05, Róbert Mulik wrote:
>> It is possible to change LSC detection mode to polling or interrupt mode
>> for DPDK interfaces. The default is polling mode. To set interrupt mode,
>> option dpdk-lsc-interrupt has to be set to true.
>>
>> In polling mode more processor time is needed, since the OVS repeatedly reads
>> the link state with a short period. It can lead to packet loss for certain
>> systems.
>>
>> In interrupt mode the hardware itself triggers an interrupt when link state
>> change happens, so less processing time needs for the OVS. It is not possible
>> to enable the interrupt mode on all hardware.
>>
>> For detailed description and usage see the dpdk install documentation.
>>
>> Signed-off-by: Robert Mulik <robert.mulik at ericsson.com>
>> Reviewed-by: Ilya Maximets <i.maximets at samsung.com>
> 8<---- SNIP ---->8
>> diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c
>> index f44f950..87608a5 100644
>> --- a/vswitchd/bridge.c
>> +++ b/vswitchd/bridge.c
>> @@ -68,6 +68,9 @@
>>   #include "lib/vswitch-idl.h"
>>   #include "xenserver.h"
>>   #include "vlan-bitmap.h"
>> +#ifdef DPDK_NETDEV
>> +#include "./lib/netdev-provider.h"
>> +#endif
>>
>>   VLOG_DEFINE_THIS_MODULE(bridge);
>>
>> @@ -601,6 +604,11 @@ bridge_reconfigure(const struct ovsrec_open_vswitch *ovs_cfg)
>>       ofproto_set_vlan_limit(smap_get_int(&ovs_cfg->other_config, "vlan-limit",
>>                                          LEGACY_MAX_VLAN_HEADERS));
>>
>> +#ifdef DPDK_NETDEV
>> +    netdev_dpdk_set_def_lsc_int_mode_enabled(
>> +        smap_get_bool(&ovs_cfg->other_config, "dpdk-lsc-interrupt", false));
>> +#endif
>> +
> I'm still thinking that this is not necessary.
> Eelco, why do you think we need to change the default global value in run-time?
> IMHO, this only complicates the code. (I didn't check, but it looks like current
> implementation will not work anyway.)
>
I do feel like the global option should be applied directly for the 
following reasons:

- There is no way to see what is the running configuration
- If not done this way the LSC mode might change for some devices, for 
example if you decide to change another port related configuration.



More information about the dev mailing list