diff options
author | Sairam Venugopal <vsairam@vmware.com> | 2016-07-25 17:04:43 -0700 |
---|---|---|
committer | Gurucharan Shetty <guru@ovn.org> | 2016-07-29 08:41:32 -0700 |
commit | d7e6f8e6bf0b30a2b3d4047115f65097d212a91b (patch) | |
tree | c0dc889f5bbfe72b38ed8b1f73d9d1d3a46d6505 /datapath-windows | |
parent | 9c16b94108c85bd7f9b5a8e2a985415a802b7ad0 (diff) | |
download | openvswitch-d7e6f8e6bf0b30a2b3d4047115f65097d212a91b.tar.gz |
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 <vsairam@vmware.com>
Acked-by: Paul Boca <pboca@cloudbasesolutions.com>
Acked-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Acked-By: Yin Lin <linyi@vmware.com>
Signed-off-by: Gurucharan Shetty <guru@ovn.org>
Diffstat (limited to 'datapath-windows')
-rw-r--r-- | datapath-windows/ovsext/Conntrack.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/datapath-windows/ovsext/Conntrack.c b/datapath-windows/ovsext/Conntrack.c index 382c13dde..af3d96688 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--; |