Search in sources :

Example 6 with Builder

use of org.projectfloodlight.openflow.protocol.OFFlowMod.Builder in project open-kilda by telstra.

the class IngressFlowModFactory method makeDefaultPortServer42IngressFlowMessage.

/**
 * Make server 42 ingress rule to match all RTT packets traffic and route it into ISL/egress end.
 */
public OFFlowMod makeDefaultPortServer42IngressFlowMessage(int server42UpdPortOffset) {
    Match match = makeServer42IngressFlowMatch(of.buildMatch(), server42UpdPortOffset);
    OFFlowMod.Builder builder = flowModBuilderFactory.makeBuilder(of, TableId.of(SwitchManager.INGRESS_TABLE_ID), SERVER_42_INGRESS_DEFAULT_FLOW_PRIORITY_OFFSET).setMatch(match);
    return makeServer42IngressFlowMessage(builder, Collections.emptyList());
}
Also used : Builder(org.projectfloodlight.openflow.protocol.OFFlowMod.Builder) OFFlowMod(org.projectfloodlight.openflow.protocol.OFFlowMod) Match(org.projectfloodlight.openflow.protocol.match.Match) OFVlanVidMatch(org.projectfloodlight.openflow.types.OFVlanVidMatch)

Example 7 with Builder

use of org.projectfloodlight.openflow.protocol.OFFlowMod.Builder in project open-kilda by telstra.

the class IngressFlowModFactory method makeSingleVlanForwardMessage.

/**
 * Make rule to forward traffic matched by outer VLAN tag and forward in in ISL (or out port in case one-switch
 * flow).
 */
public OFFlowMod makeSingleVlanForwardMessage(EffectiveIds effectiveIds) {
    FlowEndpoint endpoint = command.getEndpoint();
    RoutingMetadata metadata = RoutingMetadata.builder().outerVlanId(endpoint.getOuterVlanId()).build(switchFeatures);
    OFFlowMod.Builder builder = flowModBuilderFactory.makeBuilder(of, TableId.of(SwitchManager.INGRESS_TABLE_ID)).setMatch(of.buildMatch().setExact(MatchField.IN_PORT, OFPort.of(endpoint.getPortNumber())).setMasked(MatchField.METADATA, OFMetadata.of(metadata.getValue()), OFMetadata.of(metadata.getMask())).build());
    // list as current vlanStack
    return makeForwardMessage(builder, effectiveIds, Collections.emptyList());
}
Also used : FlowEndpoint(org.openkilda.model.FlowEndpoint) RoutingMetadata(org.openkilda.floodlight.utils.metadata.RoutingMetadata) Builder(org.projectfloodlight.openflow.protocol.OFFlowMod.Builder) OFFlowMod(org.projectfloodlight.openflow.protocol.OFFlowMod)

Aggregations

OFFlowMod (org.projectfloodlight.openflow.protocol.OFFlowMod)7 Builder (org.projectfloodlight.openflow.protocol.OFFlowMod.Builder)7 RoutingMetadata (org.openkilda.floodlight.utils.metadata.RoutingMetadata)4 FlowEndpoint (org.openkilda.model.FlowEndpoint)4 Match (org.projectfloodlight.openflow.protocol.match.Match)2 OFVlanVidMatch (org.projectfloodlight.openflow.types.OFVlanVidMatch)2