Search in sources :

Example 1 with NxMatchCtMark

use of org.opendaylight.genius.mdsalutil.nxmatches.NxMatchCtMark in project netvirt by opendaylight.

the class AclNodeDefaultFlowsTxBuilder method programConntrackForwardRule.

/**
 * Adds the rule to forward the known packets.
 *
 * @param priority the priority of the flow
 * @param flowId the flowId
 * @param conntrackState the conntrack state of the packets thats should be
 *        send
 * @param conntrackMask the conntrack mask
 * @param dispatcherTableId the dispatcher table id
 * @param tableId the table id
 */
private void programConntrackForwardRule(Integer priority, String flowId, int conntrackState, int conntrackMask, short dispatcherTableId, short tableId) {
    List<MatchInfoBase> matches = new ArrayList<>();
    matches.add(new NxMatchCtState(conntrackState, conntrackMask));
    matches.add(new NxMatchCtMark(AclConstants.CT_MARK_EST_STATE, AclConstants.CT_MARK_EST_STATE_MASK));
    List<InstructionInfo> instructions = AclServiceOFFlowBuilder.getResubmitInstructionInfo(dispatcherTableId);
    flowId = "Fixed_Conntrk_Trk_" + dpId + "_" + flowId + dispatcherTableId;
    addFlowToTx(tableId, flowId, priority, matches, instructions);
}
Also used : NxMatchCtMark(org.opendaylight.genius.mdsalutil.nxmatches.NxMatchCtMark) InstructionInfo(org.opendaylight.genius.mdsalutil.InstructionInfo) ArrayList(java.util.ArrayList) NxMatchCtState(org.opendaylight.genius.mdsalutil.nxmatches.NxMatchCtState) MatchInfoBase(org.opendaylight.genius.mdsalutil.MatchInfoBase)

Aggregations

ArrayList (java.util.ArrayList)1 InstructionInfo (org.opendaylight.genius.mdsalutil.InstructionInfo)1 MatchInfoBase (org.opendaylight.genius.mdsalutil.MatchInfoBase)1 NxMatchCtMark (org.opendaylight.genius.mdsalutil.nxmatches.NxMatchCtMark)1 NxMatchCtState (org.opendaylight.genius.mdsalutil.nxmatches.NxMatchCtState)1