Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - rory

Pages: [1]
Zodiac FX Firmware / github build problem
« on: December 07, 2016, 01:57:56 AM »
HI Paul,

Great to see v0.69 firmware out, and have successfully connected to an OpenDaylight controller using it.

I did notice when I tried to build v0.69 (on Ubuntu 14.04) with the current github repository source, it failed with an error relating to efc.h. I'd say it's a fairly minor thing, but for comparison I tried backing up to v0.68, which also failed for a different reason - no telnet.[ch] in the src/ directory. This is easily remedied by just bringing forward a copy from an earlier release - after this the build succeeds. So it seems somehow (for v0.68) telnet.[ch] went missing from the repo even though it is still technically required for the build to succeed. I imagine there is an additional similar issue in v0.69.

I think your copy may build successfully because you have all the files required locally, but some of these seem to have been removed or weren't added to the github repo. Would be very grateful if you could maybe do a clean clone in an empty directory from the github repo followed by make to see if you have the same problem, and maybe see what's missing in the repo.


Zodiac FX General / Sending FLOW_REMOVED on flow timeout
« on: September 20, 2016, 06:49:20 AM »
Hi Paul,

Using ryu as SDN controller in OpenFlow 1.0 mode, I get a connection from ZodiacFX as expected. In my handler for SWITCH_FEATURES I call a method to add a flow, using the following code:

Code: [Select]
mod = datapath.ofproto_parser.OFPFlowMod(
    datapath=datapath, cookie=0,
    command=ofproto.OFPFC_ADD, idle_timeout=20, hard_timeout=40,
    priority=0, buffer_id=ofproto.OFP_NO_BUFFER,
    flags=ofproto.OFPFF_SEND_FLOW_REM, match=match, actions=actions)

The main thing to note here is the idle_timeout of 20 seconds and that I've set the flag to send FLOW_REMOVED when the flow expires.

As I don't have any traffic going through the switch at all, I expected that I would receive a FLOW_REMOVED message after 20 seconds but none appeared.

Taking a look at the code, I believe this is handled in of_helper.c: flow_timeouts(). I think the cause of the problem is the flag being compared is taken directly from the FLOW_MOD message (which is bid-endian) and read on a little-endian architecture. So even though the flag is set, the comparison fails.

To check this, I used ntohs():

Code: [Select]
if (flow_match[i].idle_timeout != OFP_FLOW_PERMANENT && flow_counters.lastmatch > 0 && ((totaltime/2) - flow_counters.lastmatch) >= ntohs(flow_match.idle_timeout))                       
    if (ntohs(flow_match.flags) &  OFPFF10_SEND_FLOW_REM) flowrem_notif10(i,OFPRR10_IDLE_TIMEOUT);

Now I receive a FLOW_REMOVED notification.

There is similar code further down in the function to which this could also apply.


Pages: [1]