[ovs-discuss] API to request a flow_id

Ashok Chippa a.n.chippa at gmail.com
Fri Dec 19 21:27:34 UTC 2014


Hi Justin,

Thank you for the reply. Appreciate it.

Is cookie the flow_id? It seems like it. In that case, I am requesting for
a programmatic API to get the cookie given match fields...

Use case: Example Firewall. Let's say a user configures a policy/rule in
the Firewall using its north-bound API. The Firewall needs to save this
policy/rule somewhere in its database. Subsequently, when a packet is
received (that would match this firewall rule) in the OVS datapath, OVS
would punt it to the controller (firewall in my case)... The firewall needs
to lookup the matching rule and tell the OVS datapath what ACTION to take.
Now, the firewall can do its own searching into its database and find the
matching rule. But this would require some CPU cycles. Why not just use the
cookie (flow_id) so that when the packet is punted (along with the
flow_id), the firewall simply looks the matching rule using the flow_id...
Speeds up the performance...

The API would request the OVS datapath so: "If I were to receive a packet
with these matching fields, what would your cookie/flow_id be?"...

I hope it is clear now.

Thanks,
Ashok

On Fri, Dec 19, 2014 at 12:29 PM, Justin Pettit <jpettit at nicira.com> wrote:

> I'm not sure I understand the question.  Do you mean you just want some
> sort of flow ID through OpenFlow?  What about the cookie field?
>
> --Justin
>
>
> > On Dec 19, 2014, at 12:11 PM, Ashok Chippa <a.n.chippa at gmail.com> wrote:
> >
> > Hi,
> >
> > Just in case you missed, I'm resending my question:
> >
> > I am looking for an API to get a flow_id from OVS datapath, given bunch
> of match fields...
> > In CLI this would look something like: "ovs-ofctl get-flowid flow"...
> Needed for simplifying
> > the user app (FW in my case) that can just store the policy-rule using
> the flow-id as an
> > index... Will also simplify the rule lookup when a packet is punted to
> the app by the OVS
> > datapath...
> >
> > If there is no such thing available, is it ok for me to write one? If
> so, could someone point
> > out to me place(s) in the code I should be focusing on... I have not
> looked at the OVS
> > datapath code at all... So this will be the first for me...
> >
> > Appreciate anyone's help. Looking forward to a reply...
> >
> > Thanks,
> > Ashok
> >
> >
> >
> > _______________________________________________
> > discuss mailing list
> > discuss at openvswitch.org
> > http://openvswitch.org/mailman/listinfo/discuss
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://openvswitch.org/pipermail/ovs-discuss/attachments/20141219/f2fa2f28/attachment-0002.html>


More information about the discuss mailing list