<div dir="ltr">Hi,<br><br>I have recently finished implementing database command ranges according to the suggestion in this thread.<br><br>If you could kindly take a look and give me some input.<br>The summary of the patch is: ovsdb-data: Add support for integer ranges in database commands<div><a href="https://patchwork.ozlabs.org/patch/702873/">patch</a><br><div><br></div><div>I&#39;ll try to find myself something else to work on. If you have any suggestions, then please let me know. </div><div><br></div><div>Best regards,</div><div>Lukasz Rzasik</div></div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-10-06 22:07 GMT+02:00 Ben Pfaff <span dir="ltr">&lt;<a href="mailto:blp@ovn.org" target="_blank">blp@ovn.org</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Sounds good.<br>
<br>
You should read CONTRIBUTING.md and CodingStyle.md.<br>
<div class="HOEnZb"><div class="h5"><br>
On Thu, Oct 06, 2016 at 09:48:06PM +0200, Łukasz Rząsik wrote:<br>
&gt; Hi,<br>
&gt;<br>
&gt; I wanted to start contributing to the project.<br>
&gt; If no one else is already working on that, I will try to implement it and<br>
&gt; submit a patch as a start.<br>
&gt;<br>
&gt; BR,<br>
&gt; Lucas<br>
&gt;<br>
&gt; 2016-10-04 3:19 GMT+02:00 Ben Pfaff &lt;<a href="mailto:blp@ovn.org">blp@ovn.org</a>&gt;:<br>
&gt;<br>
&gt; &gt; This can occupy a lot of space.<br>
&gt; &gt;<br>
&gt; &gt; If you want to support ranges, you can submit a patch.<br>
&gt; &gt;<br>
&gt; &gt; On Mon, Oct 03, 2016 at 10:29:53PM +0000, <a href="mailto:my_ovs_discuss@yahoo.com">my_ovs_discuss@yahoo.com</a> wrote:<br>
&gt; &gt; &gt; Thanks Ben for the response.<br>
&gt; &gt; &gt; I see that whenever an ovs-vsctl command is issued it seems to go into<br>
&gt; &gt; conf.db in JSON format as follows.<br>
&gt; &gt; &gt; ------------------------------<wbr>------------------------------<br>
&gt; &gt; ------------------------------<wbr>------------------------------<br>
&gt; &gt; ------------------------------<wbr>------------------------------<wbr>-------<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; OVSDB JSON 350 adea54d6f5617de72668fbac82f4ba<wbr>47f5aa9459<br>
&gt; &gt; &gt; {&quot;_date&quot;:1475533349806,&quot;Port&quot;:<wbr>{&quot;a2a185d4-c018-481c-9c41-<br>
&gt; &gt; a96998df77b7&quot;:{&quot;trunks&quot;:[&quot;set&quot;<wbr>,[2,3,4,5,6,7,8,9,10,11,12,13,<br>
&gt; &gt; 14,15,16,17,18,19,20,21,22,23,<wbr>24,25,26,27,28,29,30,31,32,33,<br>
&gt; &gt; 34,35,36,37,38,39,4094]]}},&quot;_<wbr>comment&quot;:&quot;ovs-vsctl<br>
&gt; &gt; &gt; : /bin/ovs-vsctl add port 123456789012345 trunks<br>
&gt; &gt; 39&quot;,&quot;Open_vSwitch&quot;:{&quot;a0d40d36-<wbr>fae6-4862-90cf-586bded25ae3&quot;:{<br>
&gt; &gt; &quot;next_cfg&quot;:63}}}<br>
&gt; &gt; &gt; OVSDB JSON 95 c2c2528b873474056ff64640cf5186<wbr>a9ba1dbadb<br>
&gt; &gt; &gt; {&quot;_date&quot;:1475533349814,&quot;Open_<wbr>vSwitch&quot;:{&quot;a0d40d36-fae6-4862-<br>
&gt; &gt; 90cf-586bded25ae3&quot;:{&quot;cur_cfg&quot;:<wbr>63}}}<br>
&gt; &gt; &gt; OVSDB JSON 353 ccbb33817b428a65406d93070f3dc3<wbr>c85f5181b5<br>
&gt; &gt; &gt; {&quot;_date&quot;:1475533349837,&quot;Port&quot;:<wbr>{&quot;a2a185d4-c018-481c-9c41-<br>
&gt; &gt; a96998df77b7&quot;:{&quot;trunks&quot;:[&quot;set&quot;<wbr>,[2,3,4,5,6,7,8,9,10,11,12,13,<br>
&gt; &gt; 14,15,16,17,18,19,20,21,22,23,<wbr>24,25,26,27,28,29,30,31,32,33,<br>
&gt; &gt; 34,35,36,37,38,39,40,4094]]}},<wbr>&quot;_comment&quot;:&quot;ovs-vs<br>
&gt; &gt; &gt; ctl: /bin/ovs-vsctl add port 123456789012345 trunks<br>
&gt; &gt; 40&quot;,&quot;Open_vSwitch&quot;:{&quot;a0d40d36-<wbr>fae6-4862-90cf-586bded25ae3&quot;:{<br>
&gt; &gt; &quot;next_cfg&quot;:64}}}<br>
&gt; &gt; &gt; OVSDB JSON 95 642d4c5ea430d66ca1ce4bd18747cb<wbr>06d2f9227b<br>
&gt; &gt; &gt; {&quot;_date&quot;:1475533349845,&quot;Open_<wbr>vSwitch&quot;:{&quot;a0d40d36-fae6-4862-<br>
&gt; &gt; 90cf-586bded25ae3&quot;:{&quot;cur_cfg&quot;:<wbr>64}}}<br>
&gt; &gt; &gt; OVSDB JSON 356 72c1435d0ce4e8393aa0a95da6238c<wbr>a81b78142c<br>
&gt; &gt; &gt; {&quot;_date&quot;:1475533349889,&quot;Port&quot;:<wbr>{&quot;a2a185d4-c018-481c-9c41-<br>
&gt; &gt; a96998df77b7&quot;:{&quot;trunks&quot;:[&quot;set&quot;<wbr>,[2,3,4,5,6,7,8,9,10,11,12,13,<br>
&gt; &gt; 14,15,16,17,18,19,20,21,22,23,<wbr>24,25,26,27,28,29,30,31,32,33,<br>
&gt; &gt; 34,35,36,37,38,39,40,41,4094]]<wbr>}},&quot;_comment&quot;:&quot;ovs<br>
&gt; &gt; &gt; -vsctl: /bin/ovs-vsctl add port 123456789012345 trunks<br>
&gt; &gt; 41&quot;,&quot;Open_vSwitch&quot;:{&quot;a0d40d36-<wbr>fae6-4862-90cf-586bded25ae3&quot;:{<br>
&gt; &gt; &quot;next_cfg&quot;:65}}}<br>
&gt; &gt; &gt; OVSDB JSON 95 618d1e741f0fbf7e373afb6245b7f2<wbr>a882123d56<br>
&gt; &gt; &gt; {&quot;_date&quot;:1475533349897,&quot;Open_<wbr>vSwitch&quot;:{&quot;a0d40d36-fae6-4862-<br>
&gt; &gt; 90cf-586bded25ae3&quot;:{&quot;cur_cfg&quot;:<wbr>65}}}<br>
&gt; &gt; &gt; OVSDB JSON 359 c05800747de4d9e5a9559ac2230e94<wbr>826106f27f<br>
&gt; &gt; &gt; {&quot;_date&quot;:1475533349924,&quot;Port&quot;:<wbr>{&quot;a2a185d4-c018-481c-9c41-<br>
&gt; &gt; a96998df77b7&quot;:{&quot;trunks&quot;:[&quot;set&quot;<wbr>,[2,3,4,5,6,7,8,9,10,11,12,13,<br>
&gt; &gt; 14,15,16,17,18,19,20,21,22,23,<wbr>24,25,26,27,28,29,30,31,32,33,<br>
&gt; &gt; 34,35,36,37,38,39,40,41,42,<wbr>4094]]}},&quot;_comment&quot;:&quot;<br>
&gt; &gt; &gt; ovs-vsctl: /bin/ovs-vsctl add port 123456789012345 trunks<br>
&gt; &gt; 42&quot;,&quot;Open_vSwitch&quot;:{&quot;a0d40d36-<wbr>fae6-4862-90cf-586bded25ae3&quot;:{<br>
&gt; &gt; &quot;next_cfg&quot;:66}}}<br>
&gt; &gt; &gt; OVSDB JSON 95 e501f33c436fdc44cbb73c5bf40d85<wbr>27473b7895<br>
&gt; &gt; &gt; {&quot;_date&quot;:1475533349945,&quot;Open_<wbr>vSwitch&quot;:{&quot;a0d40d36-fae6-4862-<br>
&gt; &gt; 90cf-586bded25ae3&quot;:{&quot;cur_cfg&quot;:<wbr>66}}}<br>
&gt; &gt; &gt; ------------------------------<wbr>------------------------------<br>
&gt; &gt; ------------------------------<wbr>------------------------------<br>
&gt; &gt; ------------------------------<wbr>-------<br>
&gt; &gt; &gt; For each trunk we add, this whole text is getting appended into conf.db<br>
&gt; &gt; and this is per port. This seems to occupy lot of space onfile system.<br>
&gt; &gt; &gt; Is there a way to avoid this and keep only one instance of the config?<br>
&gt; &gt; &gt; -Thanks<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Sent from Yahoo Mail. Get the app<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;       From: Ben Pfaff &lt;<a href="mailto:blp@ovn.org">blp@ovn.org</a>&gt;<br>
&gt; &gt; &gt;  To: <a href="mailto:my_ovs_discuss@yahoo.com">my_ovs_discuss@yahoo.com</a><br>
&gt; &gt; &gt; Cc: &quot;<a href="mailto:discuss@openvswitch.org">discuss@openvswitch.org</a>&quot; &lt;<a href="mailto:discuss@openvswitch.org">discuss@openvswitch.org</a>&gt;<br>
&gt; &gt; &gt;  Sent: Monday, October 3, 2016 2:29 PM<br>
&gt; &gt; &gt;  Subject: Re: [ovs-discuss] Specifying range for bridge port trunks<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; On Mon, Oct 03, 2016 at 09:23:59PM +0000, <a href="mailto:my_ovs_discuss@yahoo.com">my_ovs_discuss@yahoo.com</a><br>
&gt; &gt; wrote:<br>
&gt; &gt; &gt; &gt; Hi, We are using openvswitch-2.5.0<br>
&gt; &gt; &gt; &gt; Is there a way to specify a range for trunks under bridge port, like<br>
&gt; &gt; &gt; &gt; vsctl add port port1 trunks 100-250<br>
&gt; &gt; &gt; &gt; It could be for add/set.<br>
&gt; &gt; &gt; &gt; In the conf.db, these trunks seem to be getting stored as individual<br>
&gt; &gt; strings like 100,101,102, ... 250 and it seems to expect the command also<br>
&gt; &gt; likevsctl add port port1 trunks 100,101,102,103...150<br>
&gt; &gt; &gt; &gt; If I have to specify such ranges for multiple ports, the conf.db seems<br>
&gt; &gt; to occupy a lot of space and this format also seems little difficult to<br>
&gt; &gt; specify 100s of integers.<br>
&gt; &gt; &gt; &gt; As I am not that familiar with OVS yet, am I missing something? Is<br>
&gt; &gt; there a way to specify ranges and also minimize the conf.db space by<br>
&gt; &gt; storing the ranges?<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; OVS doesn&#39;t support ranges here.  You can submit a patch to add a new<br>
&gt; &gt; &gt; feature, if you like.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; ______________________________<wbr>_________________<br>
&gt; &gt; discuss mailing list<br>
&gt; &gt; <a href="mailto:discuss@openvswitch.org">discuss@openvswitch.org</a><br>
&gt; &gt; <a href="http://openvswitch.org/mailman/listinfo/discuss" rel="noreferrer" target="_blank">http://openvswitch.org/<wbr>mailman/listinfo/discuss</a><br>
&gt; &gt;<br>
</div></div></blockquote></div><br></div>