[ovs-dev] Adding a new field to ovs-ofctl

Anu Mercian anumercian at live.com
Thu Nov 7 01:32:23 UTC 2013






Hi Jarno,
Thank you very much for the reply. 
1. I want to recognize a new routing scheme over Ethertype, so keeping dl_type as ethertype, I want to add a new field that recognizes the new routing protocol. In this case, which files of ovs-ofctl do I have to modify?
2. Another way of seeing this is, as of now (as per man pages of ovs-ofctl), nw_proto recognizes ip (0x0800), ipv6 (0x86dd), arp (0x0806) and rarp (0x8035), what if I want to recognize another protocol (say 0x0802), do I have to modify the ovs-ofctl.c file?
Please note that 1 and 2 are independent of each other. 
Thank you,Anu

Subject: Re: [ovs-dev] Adding a new field to ovs-ofctl
From: jrajahalme at nicira.com
Date: Wed, 6 Nov 2013 12:21:42 -0800
CC: discuss at openvswitch.org; dev at openvswitch.org
To: anumercian at live.com


On Nov 6, 2013, at 11:01 AM, Anu Mercian <anumercian at live.com> wrote:Dear Developers,
I am looking to add a new field to ovs-ofctl agent to set a particular flow. For example, we have the command to set a new flow according to set of rules.
ovs-ofctl add-flow br0"in_port=LOCAL, table=0, idle_timeout=60,ip,hard_timeout=69,vlan_tci=0x0000, dl_src=78:2b:cb:4b:db:c5, dl_dst=00:09:8a:80:c0, nw_proto=1, nw_dst=192.168.1.100, nw_src=192.168.7.189, actions=drop"
Similarly, I would like to add one more rule to the above command, like for example:
ovs-ofctl add-flow br0"in_port=LOCAL, table=0, idle_timeout=60,ip,hard_timeout=69,vlan_tci=0x0000, dl_src=78:2b:cb:4b:db:c5, dl_dst=00:09:8a:80:c0, nw_proto=1, nw_dst=192.168.1.100, nw_src=192.168.7.189, tp_type=1,actions=drop"
Where tp_type (or I can name it tp_proto with a hexadecimal type 0x0802 etc) is another L4 protocol that I would like to introduce. 

L4 protocols are multiplexed by the nw_proto field you already have in the flow entry, so there is no need for a new field. Also, this field is 8 bits, while the example you gave looks more like the ethertype (or “dl_type”), which is used to multiplex L3 protocols.
  Jarno
 		 	   		   		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openvswitch.org/pipermail/ovs-dev/attachments/20131106/0f6701a7/attachment-0003.html>


More information about the dev mailing list