Giter Site home page Giter Site logo

ovs-dpdk-scripts's Introduction

ovs-dpdk-scripts

===================

Note: OVS and DPDK configuration steps are keep changing from release to release. Please use the right script branch based on the OVS and DPDK release.

This is a set of bash scripts and launcher python module to ease of developer's job who is working on OVS, DPDK. This framework can be used for any code development project. The framework helps developers in the many ways,

  1. It can set repo specific environment. Its really useful when working with different projects or different repos of same project.
  2. It can run test cases on the current repo with its specific environment settings.
  3. Its easy to hook any test/build script with the framework and make it running in a specific given environment.
  4. Can be used to run prerequisite tests and compilations before commits.
  5. Readily available with sample OVS+DPDK test cases and build scripts for OVS, DPDK.

Prerequisite

  • Python 2.7 or higher
  • Python termcolor module. This can be installed by "pip install termcolor".
  • User account must be in sudoers list.
  • The sudo password must be remembered by the system when running any function. So that the script doesnt need to prompt password each time to users when executing. The sudo password timeout can be set to indefinite by running "sudo visudo" and add the line "Defaults timestamp_timeout=-1".

How to use it

  • Run the script 'python-scripts/launch.py' from the OVS repo. The script doesnt work when it is called from places other than OVS repo. The launcher stores all the environment variable information in a file '.ovs-dpdk-script-env' in OVS repo directory. Each OVS repo has its own '.ovs-dpdk-script-env' file to hold its environment settings. A sample 'ovs-dpdk-script-env' file is available in the repo for reference.
  • Select the option to "SET-ALL-ENV" to set the environment for the OVS repo. This is a one time activity for the repo to set all the environment variables. Its possible to modify these values in future by using the options "SET-ALL-ENV" or "SET-ONE-ENV".
  • once the environment is set, user can use all the remaining available options to do various compiling and test operations.
  • Its possible to add/delete environment variables to support different use cases. Modify "ENV_DICT" in launch.py on need basis.
  • The bash script functions can also be added/deleted for the user requirement in the framework without much additional overhead. Modify the "BASH_SCRIPT_FNS" in launch.py to accommodate custom operations. Each entry in "BASH_SCRIPT_FNS" has specific functionality. The function can be written either in bash or a python.
  • The 'START-SUBSHELL' option enable users a start a new bash shell for executing the debug commands. The subshell has all the environment variables set to run any commands. It is advised to close the subshell after use.

Bash Scripts

These scripts are self sustained scripts that meant to do some specific task, such as run a test, build a repo and etc. These scripts are called by the python launcher module when a user selects specific option. Users can add their own custom scripts as they wish. Its possible to add multiple operations under one script file. The launcher module can also invoke specific function with in a script file. It is advisable to create self sustained user scripts with no user intervention while executing.

Python Scripts

The script 'launch.py' is a invoker for all the other scripts. Directly running the bash scripts may fail because environment for running the scripts are prepared by launch.py. However To run the provided bash scripts/command directly, The subshell option can be used. The subshell have all the user environment set for executing commands.

pcap-files

pcap files to use traffic generation in IXIA or trex.

Please contact me if you are facing any issues while using the test infrastructure.

ovs-dpdk-scripts's People

Contributors

sugchand avatar billyom avatar

Watchers

James Cloos avatar Boyang Yan avatar

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.