On Mon, Dec 02, 2019 at 02:19:29PM -0800, William Tu wrote:
> GTP, GPRS Tunneling Protocol, is a group of IP-based communications
> protocols used to carry general packet radio service (GPRS) within
> GSM, UMTS and LTE networks. GTP protocol has two parts: Signalling
> (GTP-Control, GTP-C) and User data (GTP-User, GTP-U). GTP-C is used
> for setting up GTP-U protocol, which is an IP-in-UDP tunneling
> protocol. Usually GTP is used in connecting between base station for
> radio, Serving Gateway (S-GW), and PDN Gateway (P-GW).
>
> This patch implements GTP-U protocol for userspace datapath,
> supporting only required header fields and G-PDU message type.
> See spec in:
> https://tools.ietf.org/html/draft-hmm-dmm-5g-uplane-analysis-00
>
> Signed-off-by: Yi Yang <[email protected]>
> Co-authored-by: Yi Yang <[email protected]>
> Signed-off-by: William Tu <[email protected]>
Seems reasonable.
Is there a larger goal here or are you just interested in the protocol?
Here are some suggestions for the documentation.
-8<--------------------------cut here-------------------------->8--
diff --git a/lib/meta-flow.xml b/lib/meta-flow.xml
index 160547937730..ef62bf443679 100644
--- a/lib/meta-flow.xml
+++ b/lib/meta-flow.xml
@@ -1801,67 +1801,71 @@ ovs-ofctl add-flow br-int
'in_port=3,tun_src=192.168.1.1,tun_id=5001 actions=1'
<h2>GTP-U Metadata Fields</h2>
<p>
- These fields provide access to set-up GPRS Tunnelling Protocol for
- User Plane (GTPv1-U), based on 3GPP TS 29.281.
+ These fields provide access to set-up GPRS Tunnelling Protocol
+ for User Plane (GTPv1-U), based on 3GPP TS 29.281. A GTP-U
+ header has the following format:
</p>
<diagram>
- <header name="GTP-U Tunnel Flags">
- <bits name="V" above="3" width="0.15"/>
- <bits name="PT" above="1" width="0.15"/>
- <bits name="(*)" above="1" width="0.15"/>
- <bits name="E" above="1" width="0.15"/>
- <bits name="S" above="1" width="0.15"/>
- <bits name="PN" above="1" width="0.15"/>
- </header>
- <nospace/>
<header>
- <bits name="Message Type" above="8" width="0.15"/>
- <bits name="Length" above="16" width="0.15"/>
- <bits name="TEID" above="32" width="0.15"/>
- <bits name="..." above="" width="0.15"/>
+ <bits name="flags" above="8" width="0.6"/>
+ <bits name="msg type" above="8" width="0.6"/>
+ <bits name="length" above="16" width="0.9"/>
+ <bits name="TEID" above="32" width="1.3"/>
</header>
+ <dots/>
</diagram>
<p>
- where
+ The flags and message type have the Open vSwitch GTP-U specific fields
+ described below. Open vSwitch makes the TEID (Tunnel Endpoint
+ Identifier), which identifies a tunnel endpoint in the receiving GTP-U
+ protocol entity, available via <ref field="tun_id"/>.
</p>
- <ul>
- <li><code>V</code>:
- Version, used to determine the version of the
- GTP-U protocol, which should be set to '1'.
- </li>
- <li><code>PT</code>:
- Protocol Type, used as a protocol discriminator
- between GTP (when PT is '1') and GTP' (when PT is '0').
- </li>
- <li><code>E</code>:
- Extension Header, indicating the presence of a
- meaningful value of the Next Extension Header field.
- </li>
- <li><code>S</code>:
- Sequence number, indicating the presence of a
- meaningful value of the Sequence Number field.
- </li>
- <li><code>PN</code>:
- N-PDU Number, indicating the presence of a
- meaningful value of the N-PDU Number field.
- </li>
- <li><code>Message Type</code>:
- indicating the type of GTP-U message.
- </li>
- <li><code>Length</code>:
- indicating the length in octets of the payload.
- </li>
- <li><code>TEID</code>:
- Tunnel Endpoint Identifier, unambiguously identifying
- a tunnel endpoint in the receiving GTP-U protocol entity.
- Open vSwitch makes TEID availabe via <ref field="tun_id"/>.
- </li>
- </ul>
<field id="MFF_TUN_GTPU_FLAGS" title="GTP-U Flags">
- This field is a 8-bit flags representing GTP-U V, PT, E, S, and PN.
+ <p>
+ This field holds the 8-bit GTP-U flags, encoded as:
+ </p>
+
+ <diagram>
+ <header name="GTP-U Tunnel Flags">
+ <bits name="version" above="3" below="1" width="0.5"/>
+ <bits name="PT" above="1" width="0.3"/>
+ <bits name="rsv" above="1" below="0" width="0.3"/>
+ <bits name="E" above="1" width="0.3"/>
+ <bits name="S" above="1" width="0.3"/>
+ <bits name="PN" above="1" width="0.3"/>
+ </header>
+ </diagram>
+
+ <p>
+ The flags are:
+ </p>
+ <dl>
+ <dt>version</dt>
+ <dd>Used to determine the version of the GTP-U protocol, which should
+ be set to 1.</dd>
+
+ <dt>PT</dt>
+ <dd>Protocol type, used as a protocol discriminator
+ between GTP (1) and GTP' (0).</dd>
+
+ <dt>rsv</dt>
+ <dd>Reserved. Must be zero.</dd>
+
+ <dt>E</dt>
+ <dd>If 1, indicates the presence of a meaningful value of the Next
+ Extension Header field.</dd>
+
+ <dt>S</dt>
+ <dd>If 1, indicates the presence of a meaningful value of the Sequence
+ Number field.</dd>
+
+ <dt>PN</dt>
+ <dd>If 1, indicates the presence of a meaningful value of the N-PDU
+ Number field.</dd>
+ </dl>
</field>
<field id="MFF_TUN_GTPU_MSGTYPE" title="GTP-U Message Type">
diff --git a/vswitchd/vswitch.xml b/vswitchd/vswitch.xml
index 6f36923f6c0c..c08f3e9c16a5 100644
--- a/vswitchd/vswitch.xml
+++ b/vswitchd/vswitch.xml
@@ -2618,19 +2618,25 @@
<dt><code>gtpu</code></dt>
<dd>
+ <p>
GPRS Tunneling Protocol (GTP) is a group of IP-based communications
protocols used to carry general packet radio service (GPRS) within
GSM, UMTS and LTE networks. GTP-U is used for carrying user data
within the GPRS core network and between the radio access network
and the core network. The user data transported can be packets in
any of IPv4, IPv6, or PPP formats.
+ </p>
+ <p>
The protocol is documented at
http://www.3gpp.org/DynaReport/29281.htm
+ </p>
+ <p>
Open vSwitch uses UDP destination port 2152. The source port used
for GTP traffic varies on a per-flow basis and is in the ephemeral
port range.
+ </p>
</dd>
</dl>
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev