Rich Lane | 70040a9 | 2013-03-13 15:21:36 -0700 | [diff] [blame] | 1 | // Copyright 2013, Big Switch Networks, Inc. |
| 2 | // |
| 3 | // LoxiGen is licensed under the Eclipse Public License, version 1.0 (EPL), with |
| 4 | // the following special exception: |
| 5 | // |
| 6 | // LOXI Exception |
| 7 | // |
| 8 | // As a special exception to the terms of the EPL, you may distribute libraries |
| 9 | // generated by LoxiGen (LoxiGen Libraries) under the terms of your choice, provided |
| 10 | // that copyright and licensing notices generated by LoxiGen are not altered or removed |
| 11 | // from the LoxiGen Libraries and the notice provided below is (i) included in |
| 12 | // the LoxiGen Libraries, if distributed in source code form and (ii) included in any |
| 13 | // documentation for the LoxiGen Libraries, if distributed in binary form. |
| 14 | // |
| 15 | // Notice: "Copyright 2013, Big Switch Networks, Inc. This library was generated by the LoxiGen Compiler." |
| 16 | // |
| 17 | // You may not use this file except in compliance with the EPL or LOXI Exception. You may obtain |
| 18 | // a copy of the EPL at: |
| 19 | // |
| 20 | // http://www.eclipse.org/legal/epl-v10.html |
| 21 | // |
| 22 | // Unless required by applicable law or agreed to in writing, software |
| 23 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 24 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| 25 | // EPL for the specific language governing permissions and limitations |
| 26 | // under the EPL. |
| 27 | |
| 28 | #version any |
| 29 | |
| 30 | // This extension enables the switch to send only one packet-in for a given flow. |
| 31 | // The goal is to reduce the load on the controller, particularly in the case of |
| 32 | // large UDP streams. |
| 33 | // |
Rich Lane | fd2fcd5 | 2013-03-28 09:18:31 -0700 | [diff] [blame] | 34 | // When this extension is enabled (by sending the bsn_set_pktin_suppression message |
Rich Lane | 70040a9 | 2013-03-13 15:21:36 -0700 | [diff] [blame] | 35 | // described below with enabled=1) the switch will install an exact-match drop |
| 36 | // flow for each packet-in. This flow has the idle_timeout, hard_timeout, |
| 37 | // priority, and cookie fields set to the values given in the |
Rich Lane | fd2fcd5 | 2013-03-28 09:18:31 -0700 | [diff] [blame] | 38 | // bsn_set_pktin_suppression message. |
Rich Lane | 70040a9 | 2013-03-13 15:21:36 -0700 | [diff] [blame] | 39 | // |
| 40 | // This extension does not affect packet-ins caused by an output to |
| 41 | // OFPP_CONTROLLER. |
| 42 | // |
| 43 | // When this extension is enabled the switch may still send multiple packet-ins |
| 44 | // for the same flow. |
| 45 | // |
| 46 | // This extension keeps its configuration across controller disconnects. When a |
| 47 | // controller that is aware of this extension connects to a switch it should send |
| 48 | // a DELETE flow-mod with the cookie field set to ensure that it receives |
| 49 | // packet-ins for ongoing flows. |
| 50 | // |
| 51 | // The flows installed by this extension are not automatically deleted when the |
| 52 | // extension is disabled. Similarly other configuration changes (cookie, etc) do |
| 53 | // not affect already-installed flows. |
Rich Lane | 4b2dcd3 | 2013-03-28 09:23:43 -0700 | [diff] [blame] | 54 | // |
| 55 | // The switch should reject the message if both 'hard_timeout' and 'idle_timeout' |
| 56 | // are zero, since the suppression flows would never expire. |
Rich Lane | 70040a9 | 2013-03-13 15:21:36 -0700 | [diff] [blame] | 57 | |
Rich Lane | 68ae4d7 | 2013-05-09 10:55:19 -0700 | [diff] [blame] | 58 | struct of_bsn_set_pktin_suppression { |
Rich Lane | 70040a9 | 2013-03-13 15:21:36 -0700 | [diff] [blame] | 59 | uint8_t version; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 60 | uint8_t type == 4; |
Rich Lane | 70040a9 | 2013-03-13 15:21:36 -0700 | [diff] [blame] | 61 | uint16_t length; |
| 62 | uint32_t xid; |
Rich Lane | 31b8714 | 2013-05-09 22:05:42 -0700 | [diff] [blame] | 63 | uint32_t experimenter == 0x5c16c7; |
| 64 | uint32_t subtype == 11; |
Rich Lane | 70040a9 | 2013-03-13 15:21:36 -0700 | [diff] [blame] | 65 | uint8_t enabled; |
Rich Lane | e2af4ee | 2013-05-09 11:04:06 -0700 | [diff] [blame] | 66 | pad(1); |
Rich Lane | 70040a9 | 2013-03-13 15:21:36 -0700 | [diff] [blame] | 67 | uint16_t idle_timeout; |
| 68 | uint16_t hard_timeout; |
| 69 | uint16_t priority; |
| 70 | uint64_t cookie; |
| 71 | }; |