Applied on master and branch-2.11. > -----Mesaj original----- > De la: ovs-dev-boun...@openvswitch.org <ovs-dev- > boun...@openvswitch.org> În numele Sairam Venugopal via dev > Trimis: Tuesday, March 12, 2019 8:20 PM > Către: Alin Gabriel Serdean <aserd...@ovn.org>; d...@openvswitch.org > Subiect: Re: [ovs-dev] [PATCH] datapath-windows: Add annotations to find > vport functions > > Acked-by: Sairam Venugopal <vsai...@vmware.com> > > On 2/27/19, 9:34 AM, "ovs-dev-boun...@openvswitch.org on behalf of Alin > Gabriel Serdean" <ovs-dev-boun...@openvswitch.org on behalf of > aserd...@ovn.org> wrote: > > Add annotations to find vport functions to check if the dispatch lock is > held. > > Signed-off-by: Alin Gabriel Serdean <aserd...@ovn.org> > --- > datapath-windows/ovsext/Vport.c | 7 ++++++- > datapath-windows/ovsext/Vport.h | 5 +++++ > 2 files changed, 11 insertions(+), 1 deletion(-) > > diff --git a/datapath-windows/ovsext/Vport.c b/datapath- > windows/ovsext/Vport.c > index e08cb90ce..f79324d28 100644 > --- a/datapath-windows/ovsext/Vport.c > +++ b/datapath-windows/ovsext/Vport.c > @@ -135,7 +135,7 @@ HvCreatePort(POVS_SWITCH_CONTEXT > switchContext, > * Lookup by port name to see if this port with this name had been > added > * (and deleted) previously. > */ > - vport = OvsFindVportByHvNameW(gOvsSwitchContext, > + vport = OvsFindVportByHvNameW(switchContext, > portParam->PortFriendlyName.String, > portParam->PortFriendlyName.Length); > if (vport && vport->isAbsentOnHv == FALSE) { > @@ -693,6 +693,7 @@ done: > /* > * OVS Vport related functionality. > */ > +_Use_decl_annotations_ > POVS_VPORT_ENTRY > OvsFindVportByPortNo(POVS_SWITCH_CONTEXT switchContext, > UINT32 portNo) > @@ -787,6 +788,7 @@ > OvsFindTunnelVportByPortType(POVS_SWITCH_CONTEXT switchContext, > return NULL; > } > > +_Use_decl_annotations_ > POVS_VPORT_ENTRY > OvsFindVportByOvsName(POVS_SWITCH_CONTEXT switchContext, > PSTR name) > @@ -810,6 +812,7 @@ > OvsFindVportByOvsName(POVS_SWITCH_CONTEXT switchContext, > } > > /* OvsFindVportByHvName: "name" is assumed to be null-terminated */ > +_Use_decl_annotations_ > POVS_VPORT_ENTRY > OvsFindVportByHvNameW(POVS_SWITCH_CONTEXT switchContext, > PWSTR wsName, SIZE_T wstrSize) > @@ -862,6 +865,7 @@ Cleanup: > return vport; > } > > +_Use_decl_annotations_ > POVS_VPORT_ENTRY > OvsFindVportByHvNameA(POVS_SWITCH_CONTEXT switchContext, > PSTR name) > @@ -884,6 +888,7 @@ > OvsFindVportByHvNameA(POVS_SWITCH_CONTEXT switchContext, > return vport; > } > > +_Use_decl_annotations_ > POVS_VPORT_ENTRY > OvsFindVportByPortIdAndNicIndex(POVS_SWITCH_CONTEXT > switchContext, > NDIS_SWITCH_PORT_ID portId, > diff --git a/datapath-windows/ovsext/Vport.h b/datapath- > windows/ovsext/Vport.h > index 7d88f86fb..32cbf8bcc 100644 > --- a/datapath-windows/ovsext/Vport.h > +++ b/datapath-windows/ovsext/Vport.h > @@ -122,15 +122,20 @@ typedef struct _OVS_VPORT_ENTRY { > > struct _OVS_SWITCH_CONTEXT; > > +_Requires_lock_held_(switchContext->dispatchLock) > POVS_VPORT_ENTRY OvsFindVportByPortNo(POVS_SWITCH_CONTEXT > switchContext, > UINT32 portNo); > /* "name" is null-terminated */ > +_Requires_lock_held_(switchContext->dispatchLock) > POVS_VPORT_ENTRY OvsFindVportByOvsName(POVS_SWITCH_CONTEXT > switchContext, > PSTR name); > +_Requires_lock_held_(switchContext->dispatchLock) > POVS_VPORT_ENTRY OvsFindVportByHvNameA(POVS_SWITCH_CONTEXT > switchContext, > PSTR name); > +_Requires_lock_held_(switchContext->dispatchLock) > POVS_VPORT_ENTRY > OvsFindVportByHvNameW(POVS_SWITCH_CONTEXT switchContext, > PWSTR wsName, SIZE_T wstrSize); > +_Requires_lock_held_(switchContext->dispatchLock) > POVS_VPORT_ENTRY > OvsFindVportByPortIdAndNicIndex(POVS_SWITCH_CONTEXT > switchContext, > NDIS_SWITCH_PORT_ID > portId, > NDIS_SWITCH_NIC_INDEX > index); > -- > 2.16.1.windows.1 > > _______________________________________________ > dev mailing list > d...@openvswitch.org > > https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmail.o > penvswitch.org%2Fmailman%2Flistinfo%2Fovs- > dev&data=02%7C01%7Cvsairam%40vmware.com%7C5ae778841e0345fb > af6608d69cd9d189%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C0%7C0%7C6 > 36868856729356401&sdata=WxRHDA%2BKmMnZQ4N3J9ydzc4252vguQ > PCNRuXlug48V8%3D&reserved=0 > > > _______________________________________________ > dev mailing list > d...@openvswitch.org > https://mail.openvswitch.org/mailman/listinfo/ovs-dev
_______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev