Ask is moving to Stack Overflow and! Please use the "opendaylight" tag on either of these sites. This site is now in Read-Only mode


Where SAL matches flow?

asked 2015-10-02 00:18:33 -0700

g_trelos gravatar image

Hi community, do you know where in the md-sal happens the matching of incoming md-sal packets to existing flow rules?

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted

answered 2015-10-06 06:20:19 -0700

pbraun gravatar image


The packet-processing.yang file in openflowplugin defines the following notification:

notification packet-received {
    description "Delivery of incoming packet wrapped in openflow structure.";
    leaf connection-cookie {
        type connection-cookie;

    leaf flow-cookie {
        type flow-type:flow-cookie;

    leaf table-id {
        type table-type:table-id;

    leaf packet-in-reason {
        type identityref {
            base packet-in-reason;

    container match {
            uses match-type:match;

    uses raw-packet;

I guess, you can register listener for this notification from your module as a kind of call-back function, which gets called when packet-in event happens.

Regards, peter

edit flag offensive delete publish link more


Thank you very much

g_trelos ( 2015-10-08 23:08:49 -0700 )edit

answered 2015-10-02 07:35:47 -0700

arthurc gravatar image

If I'm understanding your question correctly, that would be done in the underlying device (e.g. Openflow switch). SAL forwards these flows to it and it does the work at the datapath level.

edit flag offensive delete publish link more


are you sure?I think that when a switch doesnt have appropriate flow entry sends the packet-in to controller. So i'm interested in that part.

g_trelos ( 2015-10-04 23:44:17 -0700 )edit

In my experience, a match miss on the datapath has the packet dropped. If you want a packet sent to the controller, you need to add a flow rule to do so.

arthurc ( 2015-10-05 08:29:12 -0700 )edit

in openflow 1.3 the *default* action of a datapath (i.e., switch) is to drop any packets it does not have a match for. early OF versions had a default to send to controller. In OF1.3, the controller would need to push a flow that changes the default from drop.

jamoluhrsen ( 2015-10-05 09:12:57 -0700 )edit

ok then.if I want a packet sent in the controller.when the packet reaches the controller, where happens the matching?

g_trelos ( 2015-10-05 23:27:27 -0700 )edit

I'm not sure what you mean by "matching", but if a packet-in is sent to the controller it's up to the applications that might be registered to listen for packet-in's to act on it.

jamoluhrsen ( 2015-10-06 08:51:47 -0700 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2015-10-02 00:18:33 -0700

Seen: 87 times

Last updated: Oct 06 '15