From: Ke Xu <ke1.xu@intel.com>
To: dts@dpdk.org
Cc: ke1.xu@intel.com, tarcadia@qq.com
Subject: [DTS][Patch V1 1/4] framework/packet: Add GTPU and GENEVE support for packet module.
Date: Wed, 12 Jul 2023 19:31:23 +0000 [thread overview]
Message-ID: <20230712193126.1994361-2-ke1.xu@intel.com> (raw)
In-Reply-To: <20230712193126.1994361-1-ke1.xu@intel.com>
Partially implemented GTPU and GENEVE layer in packet. Allowing limited usage of GTPU and GENEVE packets.
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
next prev parent reply other threads:[~2023-07-12 19:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-12 19:31 [DTS][Patch V1 0/4] Updating packet module and introducing a new common module Ke Xu
2023-07-12 19:31 ` Ke Xu [this message]
2023-07-12 19:31 ` [DTS][Patch V1 2/4] framework/packet: Update packet module for new methods Ke Xu
2023-07-12 19:31 ` [DTS][Patch V1 3/4] framework/test_case: Add skip_unsupported decorator Ke Xu
2023-07-12 19:31 ` [DTS][Patch V1 4/4] tests/offload_common: Add offload_common module 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=20230712193126.1994361-2-ke1.xu@intel.com \
--to=ke1.xu@intel.com \
--cc=dts@dpdk.org \
--cc=tarcadia@qq.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).