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

Revision history [back]

click to hide/show revision 1
initial version

Unable to insert rules matching only dl_type

Hello,

I try to insert a rules matching only DLTYPE using IFlowProgrammerService. I can see the rule appearing in the flow table, but there is not matching field DLType. Here is my code:

Match match = new Match();
short ethertype = EtherTypes.IPv4.shortValue();
    match.setField( new MatchField(MatchType.DL_TYPE, ethertype));

    List<Action> actions = new ArrayList<Action>();
    actions.add(new Output(outConnector));

    Flow f = new Flow(match, actions);

    f.setIdleTimeout((short) 0);
    f.setPriority((short) 5);

    // Modify the flow on the network node
    Status status = programmer.addFlow(node, f);
    logger.info("Add Default Rules: {} to {} ", f, node);        

    }

The log I got:

Flow[match = Match [fields={DL_TYPE=DL_TYPE(2048)}, matches=128], actions = [OUTPUT[OF13|4@OF13|1]], priority = 5, id = 0, idleTimeout = 0, hardTimeout = 0] to OF13|1

I tried to insert similar rules using OVS command, it works.

Is there any problem in my code?

Thanks.