On 8/17/20 6:38 PM, Ilya Maximets wrote:
>>>>>>>
>>>>>>> diff --git a/lib/netdev-offload-dpdk.c b/lib/netdev-offload-dpdk.c
>>>>>>> index
>>>>>>> de6101e4d..5b632bac4 100644
>>>>>>> --- a/lib/netdev-offload-dpdk.c
>>>>>>> +++ b/lib/netdev-offload-dpdk.c
>>>>>>> @@ -691,9 +691,22 @@ parse_flow_match(struct flow_patterns
>>>> *patterns,
>>>>>>>      consumed_masks->packet_type = 0;
>>>>>>>
>>>>>>>      /* Eth */
>>>>>>> -    if (match->wc.masks.dl_type ||
>>>>>>> -        !eth_addr_is_zero(match->wc.masks.dl_src) ||
>>>>>>> -        !eth_addr_is_zero(match->wc.masks.dl_dst)) {
>>>>>>> +    if (match->wc.masks.dl_type == OVS_BE16_MAX &&
>>>>>>> + is_ip_any(&match-
>>>>>>>> flow)
>>>>>>> +        && eth_addr_is_zero(match->wc.masks.dl_dst)
>>>>>>> +        && eth_addr_is_zero(match->wc.masks.dl_src)) {
>>>>>>> +        /*
>>>>>>> +         * This is a temporary work around to fix ethernet
>>>>>>> + pattern for
>>>> partial
>>>>>>> +         * hardware offload for X710 devices. This fix will be reverted
>>> once
>>>>>>> +         * the issue is fixed within the i40e PMD driver.
>>>>>>> +         */
>>>>>>> +        add_flow_pattern(patterns, RTE_FLOW_ITEM_TYPE_ETH, NULL,
>>>>>>> + NULL);
>>>>>>> +
>>>>>>> +        memset(&consumed_masks->dl_dst, 0, sizeof
>>> consumed_masks-
>>>>>> dl_dst);
>>>>>>> +        memset(&consumed_masks->dl_src, 0, sizeof consumed_masks-
>>>>>> dl_src);
>>>>>>> +        consumed_masks->dl_type = 0;
>>>>>>> +    } else if (match->wc.masks.dl_type ||
>>>>>>> +               !eth_addr_is_zero(match->wc.masks.dl_src) ||
>>>>>>> +               !eth_addr_is_zero(match->wc.masks.dl_dst)) {
>>>>>>>          struct rte_flow_item_eth *spec, *mask;
>>>>>>>
>>>>>>>          spec = xzalloc(sizeof *spec);
>>>>>>> ---
>>>>>>>
>>>>>>> If looks good for everyone, I could use above code for the patch
>>>>>>> on new branches and the version without 'consumed_*' lines for
>>>>>>> older
>>>> ones.
>>>>>>>
>>>>>>> Ian, Eli, what do you think?
>>>>>>
>>>>>> I think this approach sounds ok, Emma is back in office and so can
>>>>>> help validate
>>>>> the patches if there are queries around supporting zeroing on the
>>>>> X710
>>>> Nics.
>>>>>
>>>>> I don't think we should change the logic of a workaround itself at this
>>> point.
>>>>> But it will be good to have above diff validated.  To be sure that I
>>>>> didn't break anything accidentially.
>>>> Either way looks OK to me.
>>>
>>> Yes I can test
>>>
>> Tested and everything looks good.
>>
>> 2020-08-17T14:46:41.179Z|00006|netdev_offload_dpdk(dp_netdev_flow_48)|DBG|dpdk0:
>>  installed flow 0x23fd71ac0 by ufid c3ba1a2f-e7e5-473b-b303-38ecbd28cc03
> 
> Thanks!
> I'll apply this version as soon as travis builds finished.

Applied and backported down to 2.10.

Best regards, Ilya Maximets.
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to