Dear all,
I am writing this post, because I saw a discussion from the beginning
of 2016 about the implementation of an additional matching field of
UDP in OVS. Maybe you can help with a similar implementation.
The discussion is here,
https://mail.openvswitch.org/pipermail/ovs-discuss/2016-April/040894.html
and I found another similar patch implementing some IGMP functionality here.
https://patchwork.ozlabs.org/patch/555337/
I went through the FAQ, discussion, and the aforementioned patch, and
implemented a new custom user-space matching rule.
However, when I add my field to flow rules, i.e.,
ovs-ofctl --verbose -O OpenFlow15 add-flow ovs-br
in_port=4,ip,udp,my_field=0x6,action=normal
2017-02-08T20:42:13Z|00001|hmap|DBG|lib/shash.c:112: 7 nodes in bucket
(64 nodes, 32 buckets)
2017-02-08T20:42:13Z|00002|hmap|DBG|lib/shash.c:112: 6 nodes in bucket
(128 nodes, 64 buckets)
2017-02-08T20:42:13Z|00003|hmap|DBG|lib/shash.c:112: 7 nodes in bucket
(128 nodes, 64 buckets)
2017-02-08T20:42:13Z|00004|hmap|DBG|lib/shash.c:112: 7 nodes in bucket
(128 nodes, 64 buckets)
2017-02-08T20:42:13Z|00005|stream_unix|DBG|/var/run/openvswitch/ovs-br:
connection failed (No such file or directory)
2017-02-08T20:42:13Z|00006|ofctl|DBG|connecting to
unix:/var/run/openvswitch/ovs-br.mgmt
2017-02-08T20:42:13Z|00007|hmap|DBG|lib/ofp-msgs.c:1143: 6 nodes in
bucket (128 nodes, 64 buckets)
2017-02-08T20:42:13Z|00008|hmap|DBG|lib/ofp-msgs.c:1143: 6 nodes in
bucket (256 nodes, 128 buckets)
2017-02-08T20:42:13Z|00009|hmap|DBG|lib/ofp-msgs.c:1143: 7 nodes in
bucket (512 nodes, 256 buckets)
2017-02-08T20:42:13Z|00010|hmap|DBG|lib/ofp-msgs.c:1143: 8 nodes in
bucket (512 nodes, 256 buckets)
2017-02-08T20:42:13Z|00011|hmap|DBG|lib/ofp-msgs.c:1143: 6 nodes in
bucket (512 nodes, 256 buckets)
2017-02-08T20:42:13Z|00012|hmap|DBG|lib/ofp-msgs.c:1143: 7 nodes in
bucket (512 nodes, 256 buckets)
2017-02-08T20:42:13Z|00013|vconn|DBG|unix:/var/run/openvswitch/ovs-br.mgmt:
sent (Success): OFPT_HELLO (OF1.5) (xid=0x1):
version bitmap: 0x06
2017-02-08T20:42:13Z|00014|vconn|DBG|unix:/var/run/openvswitch/ovs-br.mgmt:
received: OFPT_HELLO (OF1.5) (xid=0x39):
version bitmap: 0x01, 0x02, 0x03, 0x04, 0x05, 0x06
2017-02-08T20:42:13Z|00015|vconn|DBG|unix:/var/run/openvswitch/ovs-br.mgmt:
negotiated OpenFlow version 0x06 (we support version 0x06, peer
supports version 0x06 and earlier)
2017-02-08T20:42:13Z|00016|vconn|DBG|unix:/var/run/openvswitch/ovs-br.mgmt:
sent (Success): OFPT_FLOW_MOD (OF1.5) (xid=0x2): ADD *udp,in_port=4*
actions=NORMAL
2017-02-08T20:42:13Z|00017|vconn|DBG|unix:/var/run/openvswitch/ovs-br.mgmt:
sent (Success): OFPT_BARRIER_REQUEST (OF1.5) (xid=0x3):
2017-02-08T20:42:13Z|00018|poll_loop|DBG|wakeup due to 0-ms timeout
2017-02-08T20:42:13Z|00019|poll_loop|DBG|wakeup due to [POLLIN] on fd
4 (<->/var/run/openvswitch/ovs-br.mgmt) at lib/stream-fd.c:155
2017-02-08T20:42:13Z|00020|vconn|DBG|unix:/var/run/openvswitch/ovs-br.mgmt:
received: OFPT_BARRIER_REPLY (OF1.5) (xid=0x3):
There is only an ADD for udp,in_port=4; so my_field seems to be
ignored, but surprisingly overall the switch does what I want.
Moreover, dump-flows does not recognize this my_field properly either.
The question is what is the proper way to include custom my_field in
OF messages so that I can use it with ovs-ofctl add-flow and ovs-ofctl
dump-flows? Is there any additional answer to that in FAQ?
Or maybe the inclusion of my_field in mf_field_id of
include/openvswitch/meta-flow.h should already do the job, and I have
a mistake in my code? I mostly repeated the exercise from the
aforementioned patch again.
Thx in advance & Best regards,
Eryk Schiller
_______________________________________________
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss