Acked-by: Alin Gabriel Serdean <aserd...@cloudbasesolutions.com>

> -----Mesaj original-----
> De la: dev [mailto:dev-boun...@openvswitch.org] În numele Sairam
> Venugopal
> Trimis: Thursday, July 14, 2016 2:39 AM
> Către: dev@openvswitch.org
> Subiect: [ovs-dev] [PATCH 9/9] datapath-windows: Post Conntrack delete
> and new events
> 
> Post Conntrack delete and create events when entries are deleted or
> created.
> 
> Signed-off-by: Sairam Venugopal <vsai...@vmware.com>
> ---
>  datapath-windows/ovsext/Conntrack.c | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/datapath-windows/ovsext/Conntrack.c b/datapath-
> windows/ovsext/Conntrack.c
> index 382c13d..af3d966 100644
> --- a/datapath-windows/ovsext/Conntrack.c
> +++ b/datapath-windows/ovsext/Conntrack.c
> @@ -23,6 +23,7 @@
>  #include "Jhash.h"
>  #include "PacketParser.h"
>  #include "Debug.h"
> +#include "Event.h"
> 
>  #define WINDOWS_TICK 10000000
>  #define SEC_TO_UNIX_EPOCH 11644473600LL @@ -154,6 +155,15 @@
> OvsCtUpdateFlowKey(struct OvsFlowKey *key,  }
> 
>  static __inline VOID
> +OvsPostCtEventEntry(POVS_CT_ENTRY entry, UINT8 type) {
> +    OVS_CT_EVENT_ENTRY ctEventEntry = {0};
> +    NdisMoveMemory(&ctEventEntry.entry, entry, sizeof(OVS_CT_ENTRY));
> +    ctEventEntry.type = type;
> +    OvsPostCtEvent(&ctEventEntry);
> +}
> +
> +static __inline VOID
>  OvsCtAddEntry(POVS_CT_ENTRY entry, OvsConntrackKeyLookupCtx *ctx,
> UINT64 now)  {
>      NdisMoveMemory(&entry->key, &ctx->key, sizeof (OVS_CT_KEY)); @@ -
> 162,6 +172,7 @@ OvsCtAddEntry(POVS_CT_ENTRY entry,
> OvsConntrackKeyLookupCtx *ctx, UINT64 now)
>      entry->timestampStart = now;
>      InsertHeadList(&ovsConntrackTable[ctx->hash &
> CT_HASH_TABLE_MASK],
>                     &entry->link);
> +    OvsPostCtEventEntry(entry, OVS_EVENT_CT_NEW);
>      ctTotalEntries++;
>  }
> 
> @@ -253,6 +264,7 @@ OvsCtUpdateEntry(OVS_CT_ENTRY* entry,  static
> __inline VOID  OvsCtEntryDelete(POVS_CT_ENTRY entry)  {
> +    OvsPostCtEventEntry(entry, OVS_EVENT_CT_DELETE);
>      RemoveEntryList(&entry->link);
>      OvsFreeMemoryWithTag(entry, OVS_CT_POOL_TAG);
>      ctTotalEntries--;
> --
> 2.9.0.windows.1
> 
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to