test suite reviews and discussions
 help / color / mirror / Atom feed
From: Ke Xu <ke1.xu@intel.com>
To: dts@dpdk.org
Cc: ke1.xu@intel.com, lijuan.tu@intel.com, zhiminx.huang@intel.com
Subject: [V1][DTS 1/2] framework/packet: Add GTPU and GENEVE support for packet module.
Date: Tue,  4 Jul 2023 06:47:25 +0000	[thread overview]
Message-ID: <20230704064726.455361-2-ke1.xu@intel.com> (raw)
In-Reply-To: <20230704064726.455361-1-ke1.xu@intel.com>

Implemented GTPU and GENEVE layer in packet module.

Packet module only supports limited tunneling layers like VxLAN,
 GRE. New packet types are required in recent DPDK releases and
 GTPU and GENEVE are required to be added.

Signed-off-by: Ke Xu <ke1.xu@intel.com>
---
 framework/packet.py | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/framework/packet.py b/framework/packet.py
index 2c16e7cb..c44c955f 100644
--- a/framework/packet.py
+++ b/framework/packet.py
@@ -17,6 +17,8 @@ import time
 from importlib import import_module
 from socket import AF_INET6
 
+from scapy.contrib.geneve import GENEVE
+from scapy.contrib.gtp import GTP_U_Header, GTPPDUSessionContainer
 from scapy.contrib.lldp import LLDPDU, LLDPDUManagementAddress
 from scapy.contrib.mpls import MPLS
 from scapy.contrib.nsh import NSH
@@ -51,6 +53,7 @@ scapy_modules_required = {
         "GTPEchoRequest",
         "GTPEchoResponse",
     ],
+    "scapy.contrib.geneve": ["GENEVE"],
     "scapy.contrib.lldp": ["LLDPDU", "LLDPDUManagementAddress"],
     "scapy.contrib.pfcp": ["PFCP"],
     "scapy.contrib.nsh": ["NSH"],
@@ -90,7 +93,7 @@ LayersTypes = {
     # <'ether type'=0x0800 'version'=4, 'protocol'=17 'destination port'=4789>
     # or
     # <'ether type'=0x86DD 'version'=6, 'next header'=17 'destination port'=4789>
-    "TUNNEL": ["ip", "gre", "vxlan", "nvgre", "geneve", "grenat"],
+    "TUNNEL": ["ip", "gre", "vxlan", "nvgre", "gtpu", "geneve", "grenat"],
     "INNER L2": ["inner_mac", "inner_vlan"],
     # inner_ipv4_unknown, inner_ipv6_unknown
     "INNER L3": ["inner_ipv4", "inner_ipv4_ext", "inner_ipv6", "inner_ipv6_ext"],
@@ -167,7 +170,8 @@ class scapy(object):
         "ipv6_in_ip": IP() / IPv6(src="::1"),
         "ipv6_frag_in_ip": IP() / IPv6(src="::1", nh=44) / IPv6ExtHdrFragment(),
         "nvgre": GRE(key_present=1, proto=0x6558, key=0x00000100),
-        "geneve": "Not Implement",
+        "gtpu": GTP_U_Header(gtp_type=255, teid=0x123456),
+        "geneve": GENEVE(),
     }
 
     def __init__(self):
-- 
2.34.1


  reply	other threads:[~2023-07-04  6:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-04  6:47 [DTS][PATCH V1 0/2] Updating packet module for new util functions and packet types Ke Xu
2023-07-04  6:47 ` Ke Xu [this message]
2023-07-04  6:47 ` [V1][DTS 2/2] framework/packet: Update packet module for new methods Ke Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230704064726.455361-2-ke1.xu@intel.com \
    --to=ke1.xu@intel.com \
    --cc=dts@dpdk.org \
    --cc=lijuan.tu@intel.com \
    --cc=zhiminx.huang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).