[ovs-dev] [PATCH v2 7/7] datapath-windows: Post Conntrack delete and new events

Yin Lin yinlin10 at gmail.com
Tue Jul 26 03:06:31 UTC 2016


Acked-By: Yin Lin <linyi at vmware.com>

On Mon, Jul 25, 2016 at 5:04 PM, Sairam Venugopal <vsairam at vmware.com>
wrote:

> Post Conntrack delete and create events when entries are deleted or
> created.
>
> v2: Added Acked-By
>
> Signed-off-by: Sairam Venugopal <vsairam at vmware.com>
> Acked-by: Paul Boca <pboca at cloudbasesolutions.com>
> Acked-by: Alin Gabriel Serdean <aserdean at cloudbasesolutions.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 at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev
>



More information about the dev mailing list