From 3d4b2e6eb74ed5bb5b35373aa8a489536938fee6 Mon Sep 17 00:00:00 2001
From: Jan Scheurich
- Some data fields, called root fields, are always present as a - consequence of the basic networking technology in use. The Ethernet header - fields are root fields in current versions of Open vSwitch, though future - versions might support other roots. (Currently, to support LISP tunnels, - which do not encapsulate an Ethernet header, Open vSwitch synthesizes one.) + Data fields that are always present as a consequence of the basic + networking technology in use are called called root fields. + Open vSwitch 2.7 and earlier considered Ethernet fields to be root fields, + and this remains the default mode of operation for Open vSwitch bridges. + In this mode, when a packet is received from a non-Ethernet interfaces, + such as a layer-3 LISP or GRE tunnel, Open vSwitch force-fits it to this + Ethernet-centric point of view by pretending that an Ethernet header is + present whose Ethernet type that indicates the packet's actual type (and + whose source and destination addresses are all-zero).
-- Other data fields are not always present. A packet contains ARP fields, - for example, only when its Ethernet header indicates the Ethertype for ARP, + Open vSwitch 2.8 and later supports the ``packet type-aware pipeline'' + concept introduced in OpenFlow 1.5. A bridge configured to be packet + type-aware can handle packets of multiple networking technologies, such as + Ethernet, IP, ARP, MPLS, or NSH in parallel. Such a bridge does not have + any root fields. +
+ ++ Non-root data fields are not always present. A packet contains ARP + fields, for example, only when its packet type is ARP or when it is an + Ethernet packet whose Ethernet header indicates the Ethertype for ARP, 0x0806. In this documentation, we say that a field is applicable when it is present in a packet, and inapplicable when it is not. (These are not standard terms.) We refer to the conditions that determine whether a field is applicable as prerequisites. Some VLAN-related fields are a special case: - these fields are always applicable, but have a designated value or bit that - indicates whether a VLAN header is present, with the remaining values or - bits indicating the VLAN header's content (if it is present). + these fields are always applicable for Ethernet packets, but have a + designated value or bit that indicates whether a VLAN header is present, + with the remaining values or bits indicating the VLAN header's content + (if it is present).
@@ -51,7 +63,8 @@ example, one may match (see Matching, below) a given field only if the match includes the field's prerequisite, e.g. matching an ARP field is only allowed if one also matches on - Ethertype 0x0806. + Ethertype 0x0806 or the for ARP in a packet + type-aware bridge.
@@ -301,6 +314,8 @@ tcp,tp_src=0x07c0/0xfff0
eth
packet_type=(0,0)
(Open vSwitch 2.8 and later)ip
eth_type=0x0800
ipv6
eth_type=0x86dd
icmp
eth_type=0x0800,ip_proto=1
mplsm
eth_type=0x8848
+ These shorthand notations continue to work in packet type-aware bridges.
+ The absence of a packet_type match implies
+ packet_type=ethernet
, so that shorthands match on Ethernet
+ packets with the implied eth_type. Please note that the shorthand
+ ip
does not match packets of packet_type (1,0x800) for IPv4.
+
@@ -802,20 +826,12 @@ tcp,tp_src=0x07c0/0xfff0
- OpenFlow 1.5 also added OXMs for the following fields not documented here - and not yet implemented by Open vSwitch: -
- -
@@ -2273,6 +2289,102 @@ actions=clone(load:0->NXM_OF_IN_PORT[],output:123)
+ The type of the packet in the format specified in OpenFlow 1.5:
+
+ The upper 16 bits, ns, are a namespace. The meaning of
+ ns_type depends on the namespace. The packet type field is
+ specified and displayed in the format
+
+ Open vSwitch currently supports the following classes of packet types
+ for matching:
+
+ The specified ethertype. Open vSwitch can forward
+ packets with any ethertype, but it can only match on
+ and process data fields for the following supported packet types:
+ (ns,ns_type)
.
+
+
+ (0,0)
(1,ethertype)
+
+ (1,0x800)
(1,0x806)
(1,0x86dd)
(1,0x8847)
(1,0x8848)
(1,0x8035)
(1,0x894f)
+ Consider the distinction between a packet with packet_type=(0,0),
+ dl_type=0x800
and one with packet_type=(1,0x800)
.
+ The former is an Ethernet frame that contains an IPv4 packet, like
+ this:
+
+ The latter is an IPv4 packet not encapsulated inside any outer frame, + like this: +
+ +
+ Matching on is a pre-requisite for matching
+ on any data field, but for backward compatibility, when a match on a
+ data field is present without a match, Open
+ vSwitch acts as though a match on (0,0)
(Ethernet) had
+ been supplied. Similarly, when Open vSwitch sends flow match
+ information to a controller, e.g. in a reply to a request to dump the
+ flow table, Open vSwitch omits a match on packet type (0,0) if it would
+ be implied by a data field match.
+