From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 8083F2BF5 for ; Fri, 11 Mar 2016 08:43:26 +0100 (CET) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga101.jf.intel.com with ESMTP; 10 Mar 2016 23:43:25 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,319,1455004800"; d="scan'208";a="934514380" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by fmsmga002.fm.intel.com with ESMTP; 10 Mar 2016 23:43:24 -0800 Received: from shecgisg003.sh.intel.com (shecgisg003.sh.intel.com [10.239.29.90]) by shvmail01.sh.intel.com with ESMTP id u2B7hNtf028511; Fri, 11 Mar 2016 15:43:23 +0800 Received: from shecgisg003.sh.intel.com (localhost [127.0.0.1]) by shecgisg003.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id u2B7hK2c010894; Fri, 11 Mar 2016 15:43:22 +0800 Received: (from yliu84x@localhost) by shecgisg003.sh.intel.com (8.13.6/8.13.6/Submit) id u2B7hKOd010890; Fri, 11 Mar 2016 15:43:20 +0800 From: Yong Liu To: dts@dpdk.org Date: Fri, 11 Mar 2016 15:43:15 +0800 Message-Id: <1457682196-10851-2-git-send-email-yong.liu@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1457682196-10851-1-git-send-email-yong.liu@intel.com> References: <1457682196-10851-1-git-send-email-yong.liu@intel.com> Subject: [dts] [PATCH v1 2/3] dep nvgre: fix nvgre protocal can't analyze 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: , X-List-Received-Date: Fri, 11 Mar 2016 07:43:26 -0000 NVGRE protocal conficted with GRE, so need to split GRE first. Signed-off-by: Marvin Liu diff --git a/dep/nvgre.py b/dep/nvgre.py index d844bd1..5dd9955 100644 --- a/dep/nvgre.py +++ b/dep/nvgre.py @@ -9,7 +9,9 @@ NVGRE (Network Virtual GRE). from scapy.packet import * from scapy.fields import * from scapy.layers.inet import UDP,IP +from scapy.layers.inet6 import IPv6 from scapy.layers.l2 import Ether +from scapy.layers.l2 import GRE IPPROTO_NVGRE=47 @@ -24,10 +26,13 @@ class NVGRE(Packet): XShortField("protocoltype", 0x6558), X3BytesField("TNI", 1), ByteField("reserved1", 0)] + def mysummary(self): return self.sprintf("NVGRE (tni=%NVGRE.tni%)") -bind_layers(IP, NVGRE, proto=IPPROTO_NVGRE) -bind_layers(NVGRE, Ether) +bind_layers(NVGRE, Ether, protocoltype=0x6558) +# fix conflict of GRE and NVGRE +split_layers(IP, GRE, frag=0, proto=IPPROTO_NVGRE) +bind_layers(IP, NVGRE, frag=0, proto=IPPROTO_NVGRE) -- 1.9.3