[dpdk-dev] [PATCH] net/i40e: force promiscuous state after VF reset

Eelco Chaudron echaudro at redhat.com
Mon Nov 11 14:59:39 CET 2019



On 1 Nov 2019, at 9:12, Eelco Chaudron wrote:

<SNIP>

>>>>>>>>
>>>>>>>> +	/*
>>>>>>>> +	 * Even though the device reset is successful disabling
>>>>>>>> promiscuous
>>>>>>>> +	 * mode might not always succeed, causing enabling it after
>>>>>>>> reset
>>>>>>>> to
>>>>>>
>>>>>> I think we need to root cause why fail to disable promiscuous 
>>>>>> mode
>>>>>> and
>>>>>> try to fix it first.
>>>>>
>>>>> I’ve copied in Xiao who helped me identify the issue in your
>>>>> driver.
>>>>>
>>>>> The issue is because the change from kernel pf was not synced to 
>>>>> DPDK
>>>>> vf during
>>>>> the closing period of reset, so we get this failure. Xiao can you 
>>>>> add
>>>>> more details?
>>>>>
>>>>
>>>> The root cause is when kernel pf generate DPDK vf reset event, the
>>>> flag
>>>> vf->promisc_unicast_enabled will not be cleared but promiscuous 
>>>> mode
>>>> is
>>>> disabled. When trying to enable promiscuous mode next time by 
>>>> calling
>>>> i40evf_dev_promiscuous_enable won't work because it will check the
>>>> vf->promisc_unicast_enabled flag first.
>>>>
>>>> static int
>>>> i40evf_dev_promiscuous_enable(struct rte_eth_dev *dev)
>>>> {
>>>> ...
>>>>     /* If enabled, just return */
>>>>     if (vf->promisc_unicast_enabled)
>>>>         return 0;
>>>> ...
>>>> }
>>>>
>>>> Hi Eelco,
>>>>
>>>> I think you may need add more detailed message in the commit log or
>>>> comments.
>>>
>>> My interpretation of the request was that Beilei wanted to know why
>>> disabling promiscuous mode in HW was failing. Beilei can you 
>>> comment, is
>>> the additional description from Xiao enough?
>>
>> Yes, promisc_unicast_enabled flag is not cleared during vf reset 
>> because fail to disable promiscuous mode,
>> So I think we need to root cause why fail to  disable promiscuous 
>> mode first.
>> This patch looks like a workaround but not a fix.
>>
>
> This was debugged together with Xiao and from what I understand is 
> that DPDK fails to reset promiscuous mode in hardware as PF and VF 
> operations are not synced between kernel and DPDK.
>
> Xiao told me this could not be fixed in another way, Xiao can you 
> comment?
>

Xiao any update you can add to this so it’s more clear for Beilei?

Thanks,

Eelco



More information about the dev mailing list