[pox-dev] Resubmit inside 'learn'
Jayanth Silesh
jayanthsileshs.forums at gmail.com
Sun Dec 8 19:01:32 PST 2013
Hi Murphy,
when I insert this statement,
learn.spec.append(fms( field=nx.NXM_NX_REG5, load=7 ))
The following error occurs. Is the Syntax ‘load’, I tried,match and output too.
ERROR:core:Exception while handling OpenFlowNexus!ConnectionUp...
Traceback (most recent call last):
File "/home/mininet/pox2/pox/lib/revent/revent.py", line 231, in raiseEventNoErrors
return self.raiseEvent(event, *args, **kw)
File "/home/mininet/pox2/pox/lib/revent/revent.py", line 278, in raiseEvent
rv = event._invoke(handler, *args, **kw)
File "/home/mininet/pox2/pox/lib/revent/revent.py", line 156, in _invoke
return handler(self, *args, **kw)
File "/home/mininet/pox2/pox/misc/cust2.py", line 59, in _handle_ConnectionUp
learn.spec.append(fms( field=nx.NXM_NX_REG5, load=7 ))
File "/home/mininet/pox2/pox/openflow/nicira.py", line 1462, in new
if dst is not None: dst_inst = dst(*dstarg,**dstkw)
File "/home/mininet/pox2/pox/openflow/nicira.py", line 1306, in __init__
data = field().pack(omittable = False, header_only = True)
TypeError: 'int' object is not callable
Thanks,
Jayanth
Graduate Student
USC
On December 8, 2013 at 6:47:22 PM, Murphy McCauley (murphy.mccauley at gmail.com) wrote:
On Dec 8, 2013, at 6:18 PM, Jayanth Silesh <jayanthsileshs.forums at gmail.com> wrote:
> Hi Murphy,
>
> Question1:
>
> The problem is that I need the resubmit command in the flow_entry.
> Say that there is already an entry in table 2 as
> in_port=7,….,action= resubmit(,3).
>
> Is there a way that from table3, I can use the LEARN msg to ‘append’ an action in the table 2 so that it becomes,
> in_port=7,…..,action=( load(reg_5=7) ,resubmit(,3))
>
> Will the learn action, add an entry or can it modify the existing entry in the table?
No. However, consider making the entry in table 2:
in_port==7 : resubmit(table=11), resubmit(table=3)
By default, have table 11 (a table chosen at random for the example) empty. You can use a learn action to learn an entry into it like...
in_port==7 : load(field=reg5, value=7)
.. and the result should be what you wanted.
In the above case, the new table entry uses in_port to match against, but you could use a metafield instead if your match conditions are complicated. Picking the values 14 and 42 at random, in table 2 you'd have:
in_port==7 : load(field=reg14, value=42), resubmit(table=11), resubmit(table=3)
In table 11:
reg14==42 : load(field=reg5, value=7)
> Question2:
> Is there a resubmit action on the Nicira extensions for NOX?
No. There couldn't be. The problem isn't that POX doesn't support this. Open vSwitch itself doesn't support this. It's not part of the learn action by definition.
(On top of that, no noxrepo version of NOX supports the learn action at all.)
> Question3:
>
> How do load the register with some value, it’s throwing errors on this. Is the naming convention for reg wrong?
>
> learn.spec.append(fms( field=nx.re51, load=7 ))
As suggested in the last entry of the FAQ, you should post error messages.
The registers are named like NXM_NX_REGx, and should also be accessible as NXM_NX_REG[x]. I think "x" is between 0 and 15 on most or all switches.
-- Murphy
> Thanks,
> Jayanth
> Graduate Student
> USC
>
>
>
> On December 8, 2013 at 3:48:51 PM, Murphy McCauley (murphy.mccauley at gmail.com) wrote:
>
>> meta_register_1
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.noxrepo.org/pipermail/pox-dev-noxrepo.org/attachments/20131208/9aa9427b/attachment-0002.htm>
More information about the pox-dev
mailing list