diff options
author | Jan Scheurich <jan.scheurich@ericsson.com> | 2017-08-05 13:41:08 +0800 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2017-08-07 11:26:09 -0700 |
commit | 3d2fbd70bda514f7327970b859663f34f994290c (patch) | |
tree | 5a5fb77fbc30f598c56c5af1d666a70bf815a796 /build-aux/extract-odp-netlink-h | |
parent | 05f282c2e16126577de7704b16f9dd591b927904 (diff) | |
download | openvswitch-3d2fbd70bda514f7327970b859663f34f994290c.tar.gz |
userspace: Add support for NSH MD1 match fields
This patch adds support for NSH packet header fields to the OVS
control plane and the userspace datapath. Initially we support the
fields of the NSH base header as defined in
https://www.ietf.org/id/draft-ietf-sfc-nsh-13.txt
and the fixed context headers specified for metadata format MD1.
The variable length MD2 format is parsed but the TLV context headers
are not yet available for matching.
The NSH fields are modelled as experimenter fields with the dedicated
experimenter class 0x005ad650 proposed for NSH in ONF. The following
fields are defined:
NXOXM code ofctl name Size Comment
=====================================================================
NXOXM_NSH_FLAGS nsh_flags 8 Bits 2-9 of 1st NSH word
(0x005ad650,1)
NXOXM_NSH_MDTYPE nsh_mdtype 8 Bits 16-23
(0x005ad650,2)
NXOXM_NSH_NEXTPROTO nsh_np 8 Bits 24-31
(0x005ad650,3)
NXOXM_NSH_SPI nsh_spi 24 Bits 0-23 of 2nd NSH word
(0x005ad650,4)
NXOXM_NSH_SI nsh_si 8 Bits 24-31
(0x005ad650,5)
NXOXM_NSH_C1 nsh_c1 32 Maskable, nsh_mdtype==1
(0x005ad650,6)
NXOXM_NSH_C2 nsh_c2 32 Maskable, nsh_mdtype==1
(0x005ad650,7)
NXOXM_NSH_C3 nsh_c3 32 Maskable, nsh_mdtype==1
(0x005ad650,8)
NXOXM_NSH_C4 nsh_c4 32 Maskable, nsh_mdtype==1
(0x005ad650,9)
Co-authored-by: Johnson Li <johnson.li@intel.com>
Signed-off-by: Yi Yang <yi.y.yang@intel.com>
Signed-off-by: Jan Scheurich <jan.scheurich@ericsson.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'build-aux/extract-odp-netlink-h')
-rwxr-xr-x | build-aux/extract-odp-netlink-h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/build-aux/extract-odp-netlink-h b/build-aux/extract-odp-netlink-h index a509adb88..bc1cc35a7 100755 --- a/build-aux/extract-odp-netlink-h +++ b/build-aux/extract-odp-netlink-h @@ -45,7 +45,11 @@ s,#.*<linux/if_ether\.h>,, s/__u8[[:space:]]*\([a-zA-Z0-9_]*\)[[:space:]]*\[[[:space:]]*ETH_ALEN[[:space:]]*\]/struct eth_addr \1/ # Transform IPv6 addresses from an array to struct in6_addr -s/__be32[[:space:]]*\([a-zA-Z0-9_]*\)[[:space:]]*\[[[:space:]]*4[[:space:]]*\]/struct in6_addr \1/ +# +# As a very special case, only transform member names with more than +# one character because struct ovs_key_nsh has a member "__be32 c[4];" +# that is not an IPv6 address. +s/__be32[[:space:]]*\([a-zA-Z0-9_]\{2,\}\)[[:space:]]*\[[[:space:]]*4[[:space:]]*\]/struct in6_addr \1/ # Transform most Linux-specific __u<N> types into C99 uint<N>_t types, # and most Linux-specific __be<N> into Open vSwitch ovs_be<N>, |