Re: [nox-dev] Setting up a Flowmod in several Openflow switches at once.

2011-10-05 Thread Aimal Khan
Hi,

You do not need buffer_id but what you really need is the Datapath ID ( or
pi.datapath_id as you will see it the switch example ) of each switch to
correctly identify all the switches currently connected to the Controller.
You should look into Datapath join event (the event caused by a switch
joining the controller) to get the datapath ids required.

Regards,
Khan

2011/10/5 Sergio Jiménez Feijóo 

> Hi,
>
> I'm developping an Openflow app which calculates the optimal path between
> two Openflow switches. Once my app knows the path to use it needs to set up
> a flowmod in all the switches involved in the path. The code of my app is
> triggered everytime a Packet_in_event happens.
>
> I've been taking a look at the learning switch example code in coreapps and
> seems that in order to create a fowmod you need acces to the buffer of the
> switch which triggered the event.
>
> If you are setting a flowmod in the switch which triggered the event that's
> not a problem because you can get the buffer from the Packet_in_event.
>
> const Packet_in_event& pi = assert_cast(e);
> uint32_t buffer_id = pi.buffer_id;
>
> ofm->buffer_id = htonl(buffer_id);
>
> But my problem is that I also need to set flowmods in the other switches
> which haven't received a Packet_in_event (therefore I can't acces their
> buffers).
>
> The acces to the buffer is really necesary to set up a flowmod in a switch?
> Is there any way to do this?
>
> Thank you.
> __**_
> nox-dev mailing list
> nox-dev@noxrepo.org
> http://noxrepo.org/mailman/**listinfo/nox-dev
>
___
nox-dev mailing list
nox-dev@noxrepo.org
http://noxrepo.org/mailman/listinfo/nox-dev


Re: [nox-dev] Setting up a Flowmod in several Openflow switches at once.

2011-10-05 Thread Murphy McCauley
The buffer_id isn't required.  Set it to -1 on the switches that aren't the one 
that it originated from.  This could be clearer in the spec, but it's in there.

Also, you might want to take a look at the routing components in NOX (e.g., 
sprouting), since installing flows along an optimal path is what they do (where 
optimal in this case means a minimal hop count).

-- Murphy

On Oct 5, 2011, at 1:34 AM, Sergio Jiménez Feijóo wrote:

> Hi,
> 
> I'm developping an Openflow app which calculates the optimal path between two 
> Openflow switches. Once my app knows the path to use it needs to set up a 
> flowmod in all the switches involved in the path. The code of my app is 
> triggered everytime a Packet_in_event happens.
> 
> I've been taking a look at the learning switch example code in coreapps and 
> seems that in order to create a fowmod you need acces to the buffer of the 
> switch which triggered the event.
> 
> If you are setting a flowmod in the switch which triggered the event that's 
> not a problem because you can get the buffer from the Packet_in_event.
> 
> const Packet_in_event& pi = assert_cast(e);
> uint32_t buffer_id = pi.buffer_id;
> 
> ofm->buffer_id = htonl(buffer_id);
> 
> But my problem is that I also need to set flowmods in the other switches 
> which haven't received a Packet_in_event (therefore I can't acces their 
> buffers).
> 
> The acces to the buffer is really necesary to set up a flowmod in a switch? 
> Is there any way to do this?
> 
> Thank you.
> ___
> nox-dev mailing list
> nox-dev@noxrepo.org
> http://noxrepo.org/mailman/listinfo/nox-dev

___
nox-dev mailing list
nox-dev@noxrepo.org
http://noxrepo.org/mailman/listinfo/nox-dev


[nox-dev] Setting up a Flowmod in several Openflow switches at once.

2011-10-05 Thread Sergio Jiménez Feijóo

Hi,

I'm developping an Openflow app which calculates the optimal path 
between two Openflow switches. Once my app knows the path to use it 
needs to set up a flowmod in all the switches involved in the path. The 
code of my app is triggered everytime a Packet_in_event happens.


I've been taking a look at the learning switch example code in coreapps 
and seems that in order to create a fowmod you need acces to the buffer 
of the switch which triggered the event.


If you are setting a flowmod in the switch which triggered the event 
that's not a problem because you can get the buffer from the 
Packet_in_event.


const Packet_in_event& pi = assert_cast(e);
uint32_t buffer_id = pi.buffer_id;

ofm->buffer_id = htonl(buffer_id);

But my problem is that I also need to set flowmods in the other switches 
which haven't received a Packet_in_event (therefore I can't acces their 
buffers).


The acces to the buffer is really necesary to set up a flowmod in a 
switch? Is there any way to do this?


Thank you.
___
nox-dev mailing list
nox-dev@noxrepo.org
http://noxrepo.org/mailman/listinfo/nox-dev