test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH V1] dep/vxlan: use the latest vxlan version instead old
@ 2020-01-09 22:07 lihong
  2020-01-10  7:27 ` Tu, Lijuan
  0 siblings, 1 reply; 2+ messages in thread
From: lihong @ 2020-01-09 22:07 UTC (permalink / raw)
  To: dts; +Cc: lihong

Signed-off-by: lihong <lihongx.ma@intel.com>
---
 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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dts] [PATCH V1] dep/vxlan: use the latest vxlan version instead old
  2020-01-09 22:07 [dts] [PATCH V1] dep/vxlan: use the latest vxlan version instead old lihong
@ 2020-01-10  7:27 ` Tu, Lijuan
  0 siblings, 0 replies; 2+ messages in thread
From: Tu, Lijuan @ 2020-01-10  7:27 UTC (permalink / raw)
  To: Ma, LihongX, dts; +Cc: Ma, LihongX

applied

> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of lihong
> Sent: Friday, January 10, 2020 6:08 AM
> To: dts@dpdk.org
> Cc: Ma, LihongX <lihongx.ma@intel.com>
> Subject: [dts] [PATCH V1] dep/vxlan: use the latest vxlan version instead old
> 
> Signed-off-by: lihong <lihongx.ma@intel.com>
> ---
>  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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-01-10  7:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-09 22:07 [dts] [PATCH V1] dep/vxlan: use the latest vxlan version instead old lihong
2020-01-10  7:27 ` Tu, Lijuan

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).