On 3/3/21 1:41 PM, Gaëtan Rivet wrote: > On Wed, Mar 3, 2021, at 12:02, Maxime Coquelin wrote: >> Hi Gaetan, >> >> On 2/10/21 3:57 PM, Gaetan Rivet wrote: >>> Add a new operation for flow API providers to >>> deinitializes when the API is disassociated from a netdev. >>> >>> Signed-off-by: Gaetan Rivet <[email protected]> >>> Reviewed-by: Eli Britstein <[email protected]> >>> --- >>> lib/netdev-offload-provider.h | 3 +++ >>> lib/netdev-offload.c | 4 ++++ >>> 2 files changed, 7 insertions(+) >>> >>> diff --git a/lib/netdev-offload-provider.h b/lib/netdev-offload-provider.h >>> index cf859d1b4..4815a1bd2 100644 >>> --- a/lib/netdev-offload-provider.h >>> +++ b/lib/netdev-offload-provider.h >>> @@ -90,6 +90,9 @@ struct netdev_flow_api { >>> /* Initializies the netdev flow api. >>> * Return 0 if successful, otherwise returns a positive errno value. */ >>> int (*init_flow_api)(struct netdev *); >>> + >>> + /* Deinitializes the netdev flow api. */ >>> + void (*deinit_flow_api)(struct netdev *); >>> }; >>> >>> int netdev_register_flow_api_provider(const struct netdev_flow_api *); >>> diff --git a/lib/netdev-offload.c b/lib/netdev-offload.c >>> index 6237667c3..3092f8d55 100644 >>> --- a/lib/netdev-offload.c >>> +++ b/lib/netdev-offload.c >>> @@ -320,6 +320,10 @@ netdev_uninit_flow_api(struct netdev *netdev) >>> return; >>> } >>> >>> + if (flow_api->deinit_flow_api) { >>> + flow_api->deinit_flow_api(netdev); >> >> For consistency, couldn't it be changed to .uninit_flow_api()? >> > > Hey Maxime, > > Actually yes, it should probably be uninit instead. > I don't remember where I got deinit from, I thought it was used elsewhere. > Grepping the code I don't see it. I will update this patch, thanks.
Ok, thanks. I'm going through your series this week, so no hurry in posting v2 :) Maxime >>> + } >>> + >>> ovsrcu_set(&netdev->flow_api, NULL); >>> rfa = netdev_lookup_flow_api(flow_api->type); >>> ovs_refcount_unref(&rfa->refcnt); >>> >> >> Maxime >> >> > _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
