Hello All,
Just needed a confirmation on my understanding about match statement, all
the official resources mention as to matching/creating a match and the best
way to create a match from an existing packet is as below.
my_match = ofp_match.from_packet(packet, in_port)
Now , as I debug , looks like match is actually used to compare and update
the new packet with the details provided in the original packet and not
just compare
is this correct?
DEBUG:l2_switching_v4:ofp_flow_mod
header:
version: 1
type: 14 (OFPT_FLOW_MOD)
length: 72
xid: 12
match:
wildcards:
nw_tos|tp_dst|dl_dst|dl_src|in_port|dl_vlan_pcp|nw_proto|dl_vlan|tp_src|dl_type|nw_src(/0)|nw_dst(/0)
(1110000010000011111111 = 3820ff)
cookie: 0
command: 0
idle_timeout: 0
hard_timeout: 0
priority: 32768
buffer_id: None
out_port: 65535
flags: 0
actions:
*debug after ofp_flow_mod().match = ofp_match.from_packet(packet, in_port)*
DEBUG:l2_switching_v4:ofp_flow_mod
header:
version: 1
type: 14 (OFPT_FLOW_MOD)
length: 80
xid: 12
match:
wildcards: nw_tos|tp_dst|tp_src (1000000000000011000000 = 2000c0)
in_port: 2
dl_src: 00:00:00:00:00:02
dl_dst: 00:00:00:00:00:01
dl_vlan: 65535
dl_vlan_pcp: 0
dl_type: 0x806
nw_proto: 2
nw_src: 10.0.0.2
nw_dst: 10.0.0.1
cookie: 0
command: 0
idle_timeout: 0
hard_timeout: 0
priority: 32768
buffer_id: None
out_port: 65535
flags: 0
actions:
type: 0
len: 8
port: 1
max_len: 65535
Cheers!
Durga