blob: b0e3d9f436ba292c9266409bad7ad57119c2836b [file] [log] [blame]
Charles Chan40132b32017-01-22 00:19:37 -08001/*
2 * Copyright 2017-present Open Networking Laboratory
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
Yi Tsengef19de12017-04-24 11:33:05 -070017package org.onosproject.driver.pipeline.ofdpa;
Charles Chan40132b32017-01-22 00:19:37 -080018
19import org.onosproject.net.behaviour.PipelinerContext;
Charles Chan0f43e472017-02-14 14:00:16 -080020
Charles Chan40132b32017-01-22 00:19:37 -080021/**
22 * Driver for software switch emulation of the OFDPA pipeline.
23 * The software switch is the OVS OF 1.3 switch. Unfortunately the OVS switch
24 * does not handle vlan tags and mpls labels simultaneously, which requires us
25 * to do some workarounds in the driver. This driver is meant for the use of
26 * the cpqd switch when MPLS is required. As a result this driver works only
27 * on incoming untagged packets.
28 */
29public class OvsOfdpa2Pipeline extends CpqdOfdpa2Pipeline {
Charles Chan0f43e472017-02-14 14:00:16 -080030
Charles Chan40132b32017-01-22 00:19:37 -080031 @Override
32 protected void initDriverId() {
33 driverId = coreService.registerApplication(
34 "org.onosproject.driver.OvsOfdpa2Pipeline");
35 }
36
37 @Override
38 protected void initGroupHander(PipelinerContext context) {
39 groupHandler = new OvsOfdpa2GroupHandler();
40 groupHandler.init(deviceId, context);
41 }
42
43 @Override
44 protected boolean supportCopyTtl() {
45 return false;
46 }
Charles Chan0f43e472017-02-14 14:00:16 -080047
48 @Override
49 protected boolean supportTaggedMpls() {
50 return true;
51 }
52
53 @Override
54 protected boolean supportPuntGroup() {
55 return true;
56 }
Charles Chan40132b32017-01-22 00:19:37 -080057}