[ovs-dev] [PATCH v2 0/7] Windows: Add support for sending Conntrack events

Sairam Venugopal vsairam at vmware.com
Tue Jul 26 00:04:36 UTC 2016


Add support for sending out Conntrack events on Windows (if subscribed). This meant adding support for handling multiple event queues.

v2: Address review comments and squashed the 9 series patch to 7.

The following gives an overview of the design:
1. Currently we only support subscribing/unsubscribing to Vport related events.
2. Event.c maintains a single queue of Event entries that are then read by user space.
3. In order to add support for multiple events, I modified the event queue into an array (size 2). The size of the event queue array is driven by value of enum (we explicitly add new event types here).
4. I decided to make Event Queue an array to avoid creating new ones for every event type. This also meant smaller code changes and not having multiple if-else in the code.
5. Each event queue can be uniquely identified based on the mcast EventType and hence the requirement for multiple locks based on the event type.
6. Though we may not have multiple event queues subscribed for 1 socket, I still wanted to ensure that we have support for it if it were ever requested.
7. In future, as we add support for new events, we can add it to the enum OVS_MCAST_EVENT_TYPES and subtypes can be represent by means of masks (eg: vport up/down, ct delete/add/update etc.,)



Sairam Venugopal (7):
  datapath-windows: Explicitly name vport related event to vportEvent
  datapath-windows: Fix bugs in Event.c around subscribe and lock
  datapath-windows: Define new multicast conntrack events and netlink
    protocol
  datapath-windows: Modify OvsCreateNlMsgFromCtEntry to make it reusable
  datapath-windows: Add support for multiple event queue in Event.c
  datapath-windows: Update OvsReadEventCmdHandler in Datapath.c to
    support different events
  datapath-windows: Post Conntrack delete and new events

 datapath-windows/ovsext/Conntrack.c            |  44 +++-
 datapath-windows/ovsext/Conntrack.h            |   9 +
 datapath-windows/ovsext/Datapath.c             |  95 +++++++--
 datapath-windows/ovsext/Datapath.h             |   3 +-
 datapath-windows/ovsext/DpInternal.h           |  26 ++-
 datapath-windows/ovsext/Event.c                | 279 ++++++++++++++++++++-----
 datapath-windows/ovsext/Event.h                |  22 +-
 datapath-windows/ovsext/Netlink/NetlinkProto.h |   3 +
 datapath-windows/ovsext/Vport.c                |  12 +-
 9 files changed, 395 insertions(+), 98 deletions(-)

-- 
2.9.0.windows.1




More information about the dev mailing list