Charles Chan | 40132b3 | 2017-01-22 00:19:37 -0800 | [diff] [blame] | 1 | /* |
| 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 | |
| 17 | package org.onosproject.driver.pipeline; |
| 18 | |
| 19 | import org.onosproject.net.behaviour.PipelinerContext; |
| 20 | /** |
| 21 | * Driver for software switch emulation of the OFDPA pipeline. |
| 22 | * The software switch is the OVS OF 1.3 switch. Unfortunately the OVS switch |
| 23 | * does not handle vlan tags and mpls labels simultaneously, which requires us |
| 24 | * to do some workarounds in the driver. This driver is meant for the use of |
| 25 | * the cpqd switch when MPLS is required. As a result this driver works only |
| 26 | * on incoming untagged packets. |
| 27 | */ |
| 28 | public class OvsOfdpa2Pipeline extends CpqdOfdpa2Pipeline { |
| 29 | @Override |
| 30 | protected void initDriverId() { |
| 31 | driverId = coreService.registerApplication( |
| 32 | "org.onosproject.driver.OvsOfdpa2Pipeline"); |
| 33 | } |
| 34 | |
| 35 | @Override |
| 36 | protected void initGroupHander(PipelinerContext context) { |
| 37 | groupHandler = new OvsOfdpa2GroupHandler(); |
| 38 | groupHandler.init(deviceId, context); |
| 39 | } |
| 40 | |
| 41 | @Override |
| 42 | protected boolean supportCopyTtl() { |
| 43 | return false; |
| 44 | } |
| 45 | } |