Giter Club home page Giter Club logo

indigo's Introduction

indigo

Core OpenFlow agent and infrastructure modules

Overview

Indigo is an open source project to support OpenFlow on a range of physical and now virtual switch platforms. The original version of Indigo was based on the Stanford reference implementation of an OpenFlow virtual switch. This release represents a complete rearchitecture with a continued focus on native support for hardware switching platforms and better support for a variety of virtual switching environments.

This repository is available at https://github.com/floodlight/indigo.git. It provides:

  • The Indigo-2 architecture header files
  • The implementation of the core modules related to OpenFlow switch state
  • Unit tests for each module

Note that this repository does not currently build a stand alone application other than the unit tests. The code here provides implementations of the platform independent components of an OpenFlow switch.

Getting Started

System Requirements

This code has been tested on Ubuntu 12.10 server with the packages indicated below. In general, the code should build on Linux based servers with gcc, make and Python.

The following packages were installed on Ubuntu 12.10 using apt-get to allow the unit tests to compile and run.

  • git (version 1.7.10.4)
  • make (GNU make version 3.81)
  • gcc (version 4.7)
  • libcap2-bin (for setcap)
  • doxygen (version 1.7.6.1) (optional)

Building Unit Tests

Run make check. This will build and run each module's unit test. In general, you will see a lot of output and occasionally even error messages for tests that exercise error handling.

Use the VERBOSE environment variable to diagnose building problems, and the BUILDER_EXCLUDE_SETCAP and VALGRIND environment variables to find memory leaks. For example: "make VERBOSE=1", or "make BUILDER_EXCLUDE_SETCAP=1 VALGRIND=1".

Generating Documentation

Run make doc. This requires Doxygen. The generated HTML output can be found at doc/html/index.html.

Next Steps

To build a full OpenFlow switch implementation, you will need to create or obtain the Forwarding and Port Manager, platform specific module implementations. See the Indigo developer's email list at [email protected] for further discussion.

Contributions are invited. Please fork the repository and submit pull requests. Note that currently pull requests may be incorporated indirectly. As the volume of contributions increases, we expect to migrate to a more typical shared repository model.

Tracking Issues

Issues are currently tracked in the github repository tracking facility. Please select the Issues tab at the repository web site: https://github.com/floodlight/indigo

Contributions

Pull requests are welcomed and will be evaluated as quickly as possible. Coding guidelines have yet to be documented.

License

Please see LICENSE at the top level of the repository.

Code Overview

The code in this repository is organized into modules under the modules subdirectory. The module's code files are divided between published include headers (usually in the subdirectory module/inc/) and the actual implementation (usually in the subdirectory module/src/).

In general, each module has instructions on how to build a library.
Modules may have dependencies on other modules, though these must be limited to the published header files.

Applications are built by creating a subdirectory under targets. Each target lists the set of modules on which it depends and then provides application code. Currently, only unit test applications are made available in this distribution.

Code from other repositories is consumed using git submodules. All submodules are located under the submodules directory.

The build infrastructure is implemented by a collection of make files and some scripts. These live in the infra submodule, in the builder directory. To support multiple build environments, the builder directory has per-build environment subdirectories. Currently only the unix build environment is supported in this distribution.

Architectural Overview

The Indigo architecture uses Loci, the C output of LoxiGen (available at https://github.com/floodlight/loxigen.git). That library provides a set of interfaces for working with OpenFlow objects. In general, Loci definitions are prefixed with of_. The Loci files are included in the indigo distribution, though they can be updated using LoxiGen directly.

The Indigo architecture (sometimes called the Indigo-2 architecture) on which this code is based is specified in the header files in the indigo module. Note that this can be a bit confusing as the top level distribution and the module defining these interfaces both have the same name.

This architecture is broken into two sets of modules: The platform independent modules and the platform specific modules. This repository provides implementations of platform independent modules. These include:

  • The socket manager: Provides the functionality for managing sockets. It provides a generic socket registration process as well as timer event processing to allow these functions to be integrated in single threaded environments.
  • The OpenFlow connection manager: Provides the functionality for managing OpenFlow connections such as addition and removal of connection instances, tracking the connection state (handshakes, keep alives) and applying rate limiting policy for asynchronous messages.
  • The OpenFlow state manager: Provides the functionality for representing the OpenFlow state of the switch in a platform independent way. This allows the decoupling of database-like queries on the OpenFlow flow table from the manipulation of the forwarding state that is platform specific.
  • Configuration: This module provides platform and implementation specific access to the interfaces provided by the other modules that permit updating the running configuration of the application.

The platform specific modules (not included in this distribution) are:

  • Forwarding: This module exposes interfaces that allow the manipulation of the platform's forwarding engine as represented by OpenFlow protocol updates.
  • Port manager: This module exposes interfaces the allow the interrogation and manipulation of the platforms data plane entries.

indigo's People

Contributors

amospaul-bsn avatar archerhungbsn avatar carlroth avatar dtalayco avatar ducwindow avatar harishraghavendra avatar harshsin avatar ihiroakikawai avatar irfan06 avatar jnealtowns avatar kenchiang avatar kiranmadhe avatar nick-bsn avatar rlane avatar samwhitlock avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

indigo's Issues

Adding a controller before adding any ports causes an assertion in LOCI

I’m having an issue with adding a controller before I’ve added any ports.

When doing this, I get some packets from the controller that eventually cause the next assertion (in the LOCI module):

Of_object.c:95

ASSERT(obj->track_info.magic == OF_OBJECT_TRACKING_MAGIC &&
"of_object double free?");

  1.   Adding a controller with no ports – works well.
    
  2.   Adding a ports, then adding a controller – works well.
    
  3.   Adding the controller, then immediately adding ports – results in a packet with an empty buffer & assertion.
    
  4.   Adding the controller, sleeping for a few more seconds, then adding ports – works well.
    

Backtrace:

Here is the log output:

Dec 11 05:14:52.299 ERROR: port: OF port not in use
Dec 11 05:14:52.299 ERROR: of_port_packet_emit() failed
Dec 11 05:14:52.299 ERROR: fwd: pkt_action_do() failed

ASSERT obj->track_info.magic == OF_OBJECT_TRACKING_MAGIC && "of_object double free?". /.autodirect/mtrsysgwork/shaig/sdk7/indigo/Modules/loci//src//of_object.c:95

Here is the backtrace:

Program terminated with signal 11, Segmentation fault.
#0 0x1022fd88 in of_object_delete (obj=0x10514c00)

at /.autodirect/mtrsysgwork/shaig/sdk7/indigo/Modules/loci//src//of_object.c:94

94 /.autodirect/mtrsysgwork/shaig/sdk7/indigo/Modules/loci//src//of_object.c: No such file or directory.
in /.autodirect/mtrsysgwork/shaig/sdk7/indigo/Modules/loci//src//of_object.c
(gdb) bt
#0 0x1022fd88 in of_object_delete (obj=0x10514c00)

at /.autodirect/mtrsysgwork/shaig/sdk7/indigo/Modules/loci//src//of_object.c:94

#1 0x10061e90 in of_packet_out_delete (obj=0x10514c00)

at /.autodirect/mtrsysgwork/shaig/sdk7/indigo/Modules/loci//inc/loci/loci.h:6286

#2 0x10061e50 in ind_core_packet_out_handler (_obj=0x10514c00, cxn_id=0)

at /.autodirect/mtrsysgwork/shaig/sdk7/indigo/Modules/Indigo/OFStateManager//module/src//handlers.c:170

#3 0x10067e44 in indigo_core_receive_controller_message (cxn=0,

obj=0x10514c00)
at /.autodirect/mtrsysgwork/shaig/sdk7/indigo/Modules/Indigo/OFStateManager//module/src//ofstatemanager.c:200

#4 0x10056860 in of_msg_process (cxn=0x102d1848, obj=0x10514c00)

at /.autodirect/mtrsysgwork/shaig/sdk7/indigo/Modules/Indigo/OFConnectionManager//module/src//cxn_instance.c:706

#5 0x10057540 in process_message (cxn=0x102d1848)

at /.autodirect/mtrsysgwork/shaig/sdk7/indigo/Modules/Indigo/OFConnectionManager//module/src//cxn_instance.c:963

#6 0x10056bd0 in ind_cxn_process_read_buffer (cxn=0x102d1848)

at /.autodirect/mtrsysgwork/shaig/sdk7/indigo/Modules/Indigo/OFConnectionManager//module/src//cxn_instance.c:982

#7 0x10052114 in indigo_cxn_socket_ready_callback (socket_id=9,

---Type to continue, or q to quit---
cookie=0x102d1848, read_ready=1, write_ready=0, error_seen=0)
at /.autodirect/mtrsysgwork/shaig/sdk7/indigo/Modules/Indigo/OFConnectionManager//module/src//ofconnectionmanager.c:267
#8 0x10051a90 in ind_soc_select_and_run (run_for_ms=100)

at /.autodirect/mtrsysgwork/shaig/sdk7/indigo/Modules/Indigo/SocketManager//module/src//socketmanager.c:589

#9 0x10047898 in main (argc=3, argv=0xbfc89da4) at main.c:650

Scale performance of Indio OF Agent

Dear Indigo OF Team,

I am trying to add around 500K flow entries in latest Indigo agent with the help of RYU controller. Flow addition is becoming very slow after some time. Initially it is adding around 180 flow entries in one second but after some time it is adding only 10 or 12 entries in one second. This is show stopper issue for us.

So may I request you to please provide me scale numbers of latest Indigo code. I will really appreciate your help on this. I am also looking for some optimization possible in Indigo Agent.

Please let me know if you need any further information from my side.

Regards,

Rahul Bhardwaj

OF object tracking is not thread safe

In general, loci code is thread safe so long as you use normal mechanisms for controlling references to specific objects. However, the debug object tracking code is not thread safe currently. If you create or destroy of objects in different threads, you are at risk of memory corruption. The easiest work around is to not enable it by ensuring that OF_OBJECT_TRACKING is not defined in your build.

Implementations of dpa api

Hello,

I would implement dpa api, should I download the indigo_submodule_automerge branch? Cause I have noticed that in the master branch some APIs missed, like indigo_fwd_add_flow().
I have a Cisco Catalyst switch that does not support Open Flow, so I would use the Indigo agent and to communicate with the Switch I thought about using Telnet.

how to build the indigo module?

If I have finished main function to initialize modules of indigo, I want to know how I can build all of the project.... Can someone give me some advice ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.