Hi!
> 
> *My first question is that when a packet_in_event is received by the 
> controller, the 'inport' parameter designs the port of controller that 
> received the packet from the switch or the port of the switch that received 
> the packet.
> 

The inport parameter designates the port on which the packet arrived on the 
switch. 

> why do we compare the prt[0] to the inport and why do we do a 
> inst.send_openflow(dpid, bufid, buf, openflow.OFPP_FLOOD, inport) when they 
> are equal but we do  inst.install_datapath_flow(dpid, flow, CACHE_TIMEOUT, 
> actions, bufid, openflow.OFP_DEFAULT_PRIORITY, inport, buf) when they are 
> different.

Because prt[0] is the first element of the tuple stored in 
inst.st[dpid][dstaddr], namely the output port for that destination address. 
So, if the previously learned output port is the same as the inport then either 
we have a or are creating loop on the network or something has changed that the 
switch did not notice (which would be very odd) and therefore we flood the 
packet onto all ports except the inport in an attempt to have it delivered. If 
the previously learned port and the destination port are different then we are 
in good shape and we should forward the packet to that destination port. This 
is done by the install_datapath_flow method.

> 
> Thanks a lot and sorry for bothering with those basic questions.

There are no stupid questions, feel free to ask questions when you have some ;)

Cheers,

Ali

> Regards,
> Karim
> _______________________________________________
> nox-dev mailing list
> [email protected]
> http://noxrepo.org/mailman/listinfo/nox-dev

Ali Al-Shabibi
Doctoral Student
PH-ATD
CERN - European Organization for Nuclear Research
Office: 513 R-018
[email protected]
Tel :   +41 22 767 86 46

_______________________________________________
nox-dev mailing list
[email protected]
http://noxrepo.org/mailman/listinfo/nox-dev

Reply via email to