2 * Copyright (c) 2014 Netronome.
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:
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 #ifndef OPENFLOW_NETRONOME_EXT_H
18 #define OPENFLOW_NETRONOME_EXT_H 1
20 #include "openflow/openflow.h"
21 #include "openvswitch/types.h"
23 /* The following vendor extension, proposed by Netronome, is not yet
24 * standardized, so they are not included in openflow.h. It may
25 * be suitable for standardization */
28 /* Netronome enhanced select group */
30 enum ntr_group_mod_subtype
{
31 NTRT_SELECTION_METHOD
= 1,
34 #define NTR_MAX_SELECTION_METHOD_LEN 16
36 struct ntr_group_prop_selection_method
{
37 ovs_be16 type
; /* OFPGPT15_EXPERIMENTER. */
38 ovs_be16 length
; /* Length in bytes of this property
39 * excluding trailing padding. */
40 ovs_be32 experimenter
; /* NTR_VENDOR_ID. */
41 ovs_be32 exp_type
; /* NTRT_SELECTION_METHOD. */
43 char selection_method
[NTR_MAX_SELECTION_METHOD_LEN
];
45 ovs_be64 selection_method_param
; /* Non-Field parameter for
46 * bucket selection. */
49 * - Exactly (length - 40) (possibly 0) bytes containing OXM TLVs, then
50 * - Exactly ((length + 7)/8*8 - length) (between 0 and 7) bytes of
52 * In summary, ntr_group_prop_selection_method is padded as needed,
53 * to make its overall size a multiple of 8, to preserve alignment
54 * in structures using it.
56 /* uint8_t field_array[0]; */ /* Zero or more fields encoded as
57 * OXM TLVs where the has_mask bit must
58 * be zero and the value it specifies is
59 * a mask to apply to packet fields and
60 * then input them to the selection
61 * method of a select group. */
62 /* uint8_t pad2[0]; */
64 OFP_ASSERT(sizeof(struct ntr_group_prop_selection_method
) == 40);
66 #endif /* openflow/netronome-ext.h */