Comment 35 for bug 1479295

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/23691
Committed: http://github.org/Juniper/contrail-vrouter/commit/4e7721fbfc21061b21a76f402cb3202b00b51e78
Submitter: Zuul
Branch: master

commit 4e7721fbfc21061b21a76f402cb3202b00b51e78
Author: Divakar <email address hidden>
Date: Mon Aug 29 14:31:36 2016 +0530

Flow optimisations

1) Currently the flow request structure which sets the flow in Vrouter
contains IP address as array of bytes. This is to accomodate both V4 and
V6 IP addresses. It is observed that performance of Sandesh is lower for
array of bytes when compared to standard variable types. To avoid this,
array of bytes is replaced with 2 64 bit values. For IPV6 address both
the 64 bit values are used and for IPV4 addresses only 32 bits of lower 64
bit value is used. Bot source IP and destination IP are changed to use
the addresses like this.

2) When Vrouter traps the Forward flow to Agent, Agent first adds the
reverse flow and waits for the Ack from Vrouter to add the forward flow
again. This is to wait for the reverse flow index that is created by
Vrouter. This decreases the flow setup rate. Rather waiting for the
reverse flow index to be created by Vrouter, Agent writes the reverse
flow followed by forward flow with reverse flow key. Vrouter performs
a flow lookup using reverse flow key to retrieve reverse flow index.
This increases the flow setup rate as Agent is not waiting any more for the
reverse flow index to be generated by Vrouter. To accomodate this, flow
request structure is modified to contain reverse flow key in addition to
rever flow index. This key also uses IP address as 2 64 bit values.

3) The flow request structure is used right now to perform all the flow
operstaions in addition to flow setup. Like mapping the flow memory
initially by Agent, sending the flow response to Agent from Vrouter. Due
to this flow request structure contains lot many more fields than
required for setting the flow. So the flow request structure is trimmed
down to contain only the required fields for setting the flow. For flow
response from Vrouter to Agent another sandesh structure is created. And
flow_table_data is created to contain initial setup information. This
ensures both request and response structures contains the right fields.

4) Flow utility is modified to add large number of flows and to use
above new sandesh structures.

partial-bug: #1479295

Change-Id: I216ad9aa60bd0a9286ebb4c0173b323a4b7db97d