[ovs-dev] [PATCH v3 3/4] netdev-offload: Add xdp flow api provider

Toshiaki Makita toshiaki.makita1 at gmail.com
Wed Jul 22 08:21:37 UTC 2020


On 2020/07/22 0:34, William Tu wrote:
> On Tue, Jul 7, 2020 at 2:07 AM Toshiaki Makita
> <toshiaki.makita1 at gmail.com> wrote:
>>
>> On 2020/06/30 0:30, Toshiaki Makita wrote:
>> ...
>>>    int netdev_afxdp_init(void)
>>>    {
>>>        libbpf_set_print(libbpf_print);
>>> -    return 0;
>>> +    return netdev_register_flow_api_provider(&netdev_offload_xdp);
>>
>> This causes duplicate flow api provider error because afxdp and afxdp-nonpmd are using
>> the same init function, and afxdp-nonpmd netdev registration fails.
>> Probably afxdp-nonpmd does not need to call this init function.
> 
> I think we just need to make sure it registers only once.
> you can use
>     ovsthread_once_start(&once)
> see example in netdev_dpdk_class_init(void)

OK, will try this.

Toshiaki Makita


More information about the dev mailing list