<div dir="ltr"><div><div><div><div>Hi, <br><br></div>I am doing it the following way:<br><br>def _timer_func ():<br><br>  for connection in core.openflow._connections.values():<br>    #log.debug("timer function called")<br>

    msg = of.ofp_flow_mod()<br>    msg.command = of.OFPFC_MODIFY_STRICT<br>    msg.match.dl_src = "00:00:00:00:00:01"<br>    msg.match.dl_src = "00:00:00:00:00:02"<br>    msg.actions.append(of.ofp_action_enqueue(port = 1, queue_id=4))<br>

    connection.send(msg)<br><br>def launch():<br>     from pox.lib.recoco import Timer<br>
     Timer(4, _timer_func, recurring=True)<br><br></div>but it gives me the following error:<br><br>ERROR:openflow.of_01:[00-00-00-00-00-01 1] OpenFlow Error:<br>[00-00-00-00-00-01 1] Error: header:<br>[00-00-00-00-00-01 1] Error:   version: 1<br>

[00-00-00-00-00-01 1] Error:   type:    1 (OFPT_ERROR)<br>[00-00-00-00-00-01 1] Error:   length:  76<br>[00-00-00-00-00-01 1] Error:   xid:     9<br>[00-00-00-00-00-01 1] Error: type: OFPET_BAD_ACTION (2)<br>[00-00-00-00-00-01 1] Error: code: OFPBAC_BAD_LEN (1)<br>

[00-00-00-00-00-01 1] Error: datalen: 64<br>[00-00-00-00-00-01 1] Error: 0000: 01 0e 00 58 00 00 00 09  00 10 00 1b 00 00 30 30   |...X..........00|<br>[00-00-00-00-00-01 1] Error: 0010: 3a 30 30 3a 30 30 3a 30  30 3a 30 30 3a 30 32 00   |:00:00:00:00:02.|<br>

[00-00-00-00-00-01 1] Error: 0020: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   |................|<br>[00-00-00-00-00-01 1] Error: 0030: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   |................|<br>INFO:openflow.of_01:[00-00-00-00-00-01 1] closed<br>

<br></div>A bad action; is there a way to rewrite queue-id in installed flow-entries on switch? <br><br></div><div>Thank you for any hint/help/suggestion. <br><br></div><div>Kind regards;<br></div><div><div><div><br></div>

</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Dec 16, 2013 at 11:57 AM, Sadia Bashir <span dir="ltr"><<a href="mailto:11msccssbashir@seecs.edu.pk" target="_blank">11msccssbashir@seecs.edu.pk</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Thank you Murphy, It gave me a fair idea to precede. <br><div class="gmail_extra"><div><div class="h5">
<br>
<br><div class="gmail_quote">On Mon, Dec 16, 2013 at 11:29 AM, Murphy McCauley <span dir="ltr"><<a href="mailto:murphy.mccauley@gmail.com" target="_blank">murphy.mccauley@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Set your flow-mod's .command attribute to OFPFC_MODIFY (or OFPFC_MODIFY_STRICT).  If you've imported libopenflow as "of" (the POX convention), it's something like:<div>


<br></div><div>fm = of.ofp_flow_mod()</div><div>...</div><div>fm.command = of.OFPFC_MODIFY_STRICT</div><div>...</div><div>connection.send(fm)<span><font color="#888888"><br><div><br></div><div><br></div><div>
-- Murphy</div></font></span><div><div><div><br><div><div>On Dec 15, 2013, at 10:16 PM, Sadia Bashir <<a href="mailto:11msccssbashir@seecs.edu.pk" target="_blank">11msccssbashir@seecs.edu.pk</a>> wrote:</div>
<br><blockquote type="cite"><div dir="ltr"><div><div><div>Thank you Junaid Khalid and Murphy!<br><br></div>I just got this from pox.openflow.libopenflow_o1<br><br>ofp_flow_mod_command_rev_map = {<br>  'OFPFC_ADD'           : 0,<br>


  'OFPFC_MODIFY'        : 1,<br>

  'OFPFC_MODIFY_STRICT' : 2,<br>  'OFPFC_DELETE'        : 3,<br>  'OFPFC_DELETE_STRICT' : 4,<br>}<br><br><br></div>I am not getting clear how do I use it in flow-mods. Please refer me to some example for it. Thank you for your guide and help. Thanks a lot!<br>




<br></div>sadia<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Dec 16, 2013 at 7:20 AM, Murphy McCauley <span dir="ltr"><<a href="mailto:murphy.mccauley@gmail.com" target="_blank">murphy.mccauley@gmail.com</a>></span> wrote:<br>




<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>On Dec 14, 2013, at 1:56 PM, Sadia Bashir <<a href="mailto:11msccssbashir@seecs.edu.pk" target="_blank">11msccssbashir@seecs.edu.pk</a>> wrote:<br>





<br>
> Hi,<br>
><br>
> I want to modify queue_id in installed flows on a switch periodically by sending a flow_mod message from controller(i.e., controller-to-switch message) I tried it using this way on pox-controller:<br>
><br>
> def _timer_func ():<br>
>     for connection in core.openflow._connections.values():<br>
>            connection.send(of.ofp_action_nw_tos(port = 1, queue_id = 2))<br>
<br>
</div>This isn’t a flow-mod.  This is just an action!  Construct flow mods for the flows you want to change and include the new action.<br>
<div><br>
> def launch():<br>
>      from pox.lib.recoco import Timer<br>
>      Timer(4, _timer_func, recurring=True)<br>
><br>
> Please tell me if there is a way to modify a value in already existing flow entries on the switch.<br>
><br>
> Thanks in advance for any hint or help.<br>
> --<br>
> sadia<br>
<br>
</div>Hope that helps.<br>
<span><font color="#888888"><br>
— Murphy</font></span></blockquote></div><br><br clear="all"><br>-- <br><div><font color="#3366ff"><br></font></div><div><font color="#3366ff"></font> </div>
</div>
</blockquote></div><br></div></div></div></div></div></blockquote></div><br><br clear="all"><br></div></div>-- <br><div><font color="#3366ff"><br></font></div><div><font color="#3366ff"></font> </div>
</div></div>
</blockquote></div><br><br clear="all"><br>-- <br><div><font color="#3366ff"><br></font></div><div><font color="#3366ff"></font> </div>
</div></div>