2 * Copyright (c) 2008, 2009, 2010, 2011 Nicira Networks.
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 #define DEFINE_FIELD_M(HEADER, WILDCARD, DL_TYPE, NW_PROTO, WRITABLE) \
18 DEFINE_FIELD(HEADER, WILDCARD, DL_TYPE, NW_PROTO, WRITABLE) \
19 DEFINE_FIELD(HEADER##_W, WILDCARD, DL_TYPE, NW_PROTO, false)
21 /* NXM_ suffix FWW_* bit dl_type nw_proto rw? */
22 /* ------------ ------------ ----------- ------------- --- */
23 DEFINE_FIELD (OF_IN_PORT, FWW_IN_PORT, 0, 0, false)
24 DEFINE_FIELD_M(OF_ETH_DST, 0, 0, 0, false)
25 DEFINE_FIELD (OF_ETH_SRC, FWW_DL_SRC, 0, 0, false)
26 DEFINE_FIELD (OF_ETH_TYPE, FWW_DL_TYPE, 0, 0, false)
27 DEFINE_FIELD_M(OF_VLAN_TCI, 0, 0, 0, true)
28 DEFINE_FIELD (OF_IP_TOS, FWW_NW_TOS, ETH_TYPE_IP, 0, false)
29 DEFINE_FIELD (OF_IP_PROTO, FWW_NW_PROTO, ETH_TYPE_IP, 0, false)
30 DEFINE_FIELD_M(OF_IP_SRC, 0, ETH_TYPE_IP, 0, false)
31 DEFINE_FIELD_M(OF_IP_DST, 0, ETH_TYPE_IP, 0, false)
32 DEFINE_FIELD (OF_TCP_SRC, FWW_TP_SRC, ETH_TYPE_IP, IP_TYPE_TCP, false)
33 DEFINE_FIELD (OF_TCP_DST, FWW_TP_DST, ETH_TYPE_IP, IP_TYPE_TCP, false)
34 DEFINE_FIELD (OF_UDP_SRC, FWW_TP_SRC, ETH_TYPE_IP, IP_TYPE_UDP, false)
35 DEFINE_FIELD (OF_UDP_DST, FWW_TP_DST, ETH_TYPE_IP, IP_TYPE_UDP, false)
36 DEFINE_FIELD (OF_ICMP_TYPE, FWW_TP_SRC, ETH_TYPE_IP, IP_TYPE_ICMP, false)
37 DEFINE_FIELD (OF_ICMP_CODE, FWW_TP_DST, ETH_TYPE_IP, IP_TYPE_ICMP, false)
38 DEFINE_FIELD (OF_ARP_OP, FWW_NW_PROTO, ETH_TYPE_ARP, 0, false)
39 DEFINE_FIELD_M(OF_ARP_SPA, 0, ETH_TYPE_ARP, 0, false)
40 DEFINE_FIELD_M(OF_ARP_TPA, 0, ETH_TYPE_ARP, 0, false)
41 DEFINE_FIELD_M(NX_TUN_ID, 0, 0, 0, true)
43 DEFINE_FIELD_M(NX_REG0, 0, 0, 0, true)
45 DEFINE_FIELD_M(NX_REG1, 0, 0, 0, true)
48 DEFINE_FIELD_M(NX_REG2, 0, 0, 0, true)
51 DEFINE_FIELD_M(NX_REG3, 0, 0, 0, true)