From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id BC6D5A04F9; Fri, 10 Jan 2020 06:35:07 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8178E1E886; Fri, 10 Jan 2020 06:35:07 +0100 (CET) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 26DD91E883 for ; Fri, 10 Jan 2020 06:35:05 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Jan 2020 21:35:04 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,415,1571727600"; d="scan'208";a="236838306" Received: from dpdk-lihong-ub1604.sh.intel.com ([10.67.118.203]) by orsmga002.jf.intel.com with ESMTP; 09 Jan 2020 21:35:02 -0800 From: lihong To: dts@dpdk.org Cc: lihong Date: Fri, 10 Jan 2020 06:07:58 +0800 Message-Id: <1578607678-18918-1-git-send-email-lihongx.ma@intel.com> X-Mailer: git-send-email 2.7.4 Subject: [dts] [PATCH V1] dep/vxlan: use the latest vxlan version instead old X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org Sender: "dts" Signed-off-by: lihong --- dep/vxlan.py | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/dep/vxlan.py b/dep/vxlan.py index f60f2a1..0683b42 100644 --- a/dep/vxlan.py +++ b/dep/vxlan.py @@ -12,7 +12,6 @@ from scapy.layers.l2 import Ether vxlanmagic = "0x8" -VXLAN_PORT=4789 _GP_FLAGS = ["R", "R", "R", "A", "R", "R", "D", "R"] class VXLAN(Packet): @@ -67,13 +66,26 @@ class VXLAN(Packet): else: return Packet.guess_payload_class(self, payload) -split_layers(UDP, DNS, sport=53) -bind_layers(UDP, VXLAN, dport=4789) # RFC standard port +bind_layers(UDP, VXLAN, dport=4789) # RFC standard vxlan port +bind_layers(UDP, VXLAN, dport=4790) # RFC standard vxlan-gpe port bind_layers(UDP, VXLAN, dport=6633) # New IANA assigned port for use with NSH bind_layers(UDP, VXLAN, dport=8472) # Linux implementation port -bind_layers(VXLAN, Ether, {'flags': 0x8}) -bind_layers(VXLAN, Ether, {'flags': 0x88}) -bind_layers(VXLAN, Ether, {'flags': 0xC, 'NextProtocol': 0}, NextProtocol=0) -bind_layers(VXLAN, IP, {'flags': 0xC, 'NextProtocol': 1}, NextProtocol=1) -bind_layers(VXLAN, IPv6, {'flags': 0xC, 'NextProtocol': 2}, NextProtocol=2) -bind_layers(VXLAN, Ether, {'flags': 0xC, 'NextProtocol': 3}, NextProtocol=3) +bind_layers(UDP, VXLAN, dport=48879) # Cisco ACI +bind_layers(UDP, VXLAN, sport=4789) +bind_layers(UDP, VXLAN, sport=4790) +bind_layers(UDP, VXLAN, sport=6633) +bind_layers(UDP, VXLAN, sport=8472) +# By default, set both ports to the RFC standard +bind_layers(UDP, VXLAN, sport=4789, dport=4789) + +# Dissection +bind_bottom_up(VXLAN, Ether, NextProtocol=0) +bind_bottom_up(VXLAN, IP, NextProtocol=1) +bind_bottom_up(VXLAN, IPv6, NextProtocol=2) +bind_bottom_up(VXLAN, Ether, NextProtocol=3) +bind_bottom_up(VXLAN, Ether, NextProtocol=None) +# Build +bind_top_down(VXLAN, Ether, flags=12, NextProtocol=0) +bind_top_down(VXLAN, IP, flags=12, NextProtocol=1) +bind_top_down(VXLAN, IPv6, flags=12, NextProtocol=2) +bind_top_down(VXLAN, Ether, flags=12, NextProtocol=3) -- 2.7.4