[dpdk-dev] [dpdk-stable] [PATCH v2] net/failsafe: fix VLAN stripping configuration

Ferruh Yigit ferruh.yigit at intel.com
Sat Nov 4 00:28:56 CET 2017


On 11/3/2017 4:11 PM, Thomas Monjalon wrote:
> 02/11/2017 18:27, Ophir Munk:
>> failsafe device has vlan stripping configured at startup however once
>> a sub device is found as non-capable of vlan-stripping failsafe
>> updates it configuration and removes vlan stripping from it.
>> This update occurs only once at startup. Following a later plugin
>> attempt and in case of vlan stripping mismatch between failsafe
>> configuration and device capability - failsafe cannot recover and the
>> device remains constantly in plug out state.
>>
>> The sequence of events leading to this situation is described as
>> follows:
>> 1. Start testpmd with failsafe where mlx4 is a sub device (not capable
>> of vlan stripping). Expected printout:
>> PMD: net_failsafe: Disabling VLAN stripping offload
>> 2. Execute:
>> testpmd> port stop all
>> testpmd> port config all max-pkt-len 2048
>> testpmd> port start all
>> 3. Do a plug out (e.g. disable sriov)
>> 4. Do a plug in (e.g. enable sriov)
>> 5. Expected result: failsafe successfully configures and starts its sub
>> devices
>> Actual result: failsafe is continuously failing with these messages:
>> PMD: net_failsafe: VLAN stripping offload requested but not supported by
>> sub_device 0
>> PMD: net_failsafe: device already configured, cannot fix live
>> configuration
>> PMD: net_failsafe: Unable to synchronize sub device state
>>
>> Root cause analysis: at startup failsafe removes vlan stripping from its
>> configuration. After executing "port config all max-pkt-len 2048"
>> testpmd marks failsafe in need for configuration update.
>> After executing "port start all" testpmd overrides failsafe
>> configuration with its own configuration which includes vlan stripping
>>
>> During the plugin attempt failsafe refuses to update its configuration
>> by removing vlan stripping since it has already updated its
>> configuration at startup.
>>
>> The fix is for failsafe to stop validation and disabling non-supported
>> offloads in its sub-devices.
>>
>> Cc: stable at dpdk.org
>> Fixes: bbc6a53dda44 ("net/failsafe: support Rx offload capabilities")
> 
> The Cc:stable line is usually below the Fixes: line.
> 
>> Signed-off-by: Ophir Munk <ophirmu at mellanox.com>
> 
> The fix in this v2 matches what Gaetan requested after v1.
> 
> I agree it is better that failsafe does not interfere in configurations.
> The responsibility of failsafe is to build the capability set.
> The responsibility of the application is to check the capabilities
> before configuring the failsafe device (like any other device).
> 
> Acked-by: Thomas Monjalon <thomas at monjalon.net>

Applied to dpdk-next-net/master, thanks.


More information about the dev mailing list