Giter Site home page Giter Site logo

ntap / warpcore Goto Github PK

View Code? Open in Web Editor NEW
94.0 19.0 9.0 2.67 MB

User-space UDP/IP stack on top of netmap

License: BSD 2-Clause "Simplified" License

R 1.11% C 79.82% CMake 4.37% C++ 12.60% Dockerfile 0.07% Shell 2.02%
ietf quic bsd-license netmap freebsd linux udp ipv4 stack socket-api netapp-public

warpcore's Introduction

Warpcore

Build Status Total alerts Coverity Badge Language grade: C/C++ Codacy Badge

About

Warpcore is a minimal userspace UDP/IP/Ethernet stack for the netmap packet I/O framework. Due to its dependency on netmap, warpcore supports Linux (with a netmap-patched kernel) and FreeBSD (which has netmap support since release 11).

Warpcore also has a backend implementation using the Socket API that should compile on generic POSIX platforms, such as Linux, Darwin and others. The POSIX backend has experimental support for the Particle IoT stack, allowing applications built on warpcore (such as quant) to support embedded devices. Warpcore also has an experimental support for RIOT, another IoT stack.

Warpcore prioritizes performance over features, and over full standards compliance. It supports zero-copy transmit and receive with netmap, and uses neither threads, timers nor signals. It exposes the underlying file descriptors to an application, for easy integration with different event loops (e.g., libev).

The warpcore repository is on GitHub.

NOTE: Warpcore is a research effort and not meant for production use.

Building

Warpcore uses cmake as a build system. To do an out-of-source build of warpcore (best practice with cmake), do the following to build with make as a generator:

git submodule update --init --recursive
mkdir Debug
cd Debug
cmake ..
make

(cmake supports other generators, such as ninja (which I highly recommend over make). See the cmake documentation.)

On platforms where netmap is available, the steps above will build a debug version of libsockcore.a against netmap as a backend, and place it into the Debug/lib. Examples (sockping and sockinetd) will be built in Debug/bin.

On platforms where netmap is available, the steps above will also build a debug version of libwarpcore.a against netmap as a backend, and place it into the Debug/lib. Examples (warpping and warpinetd) will also be built in Debug/bin.

The example server application implements the echo, discard, time and daytime services.

The default build (per above) is without optimizations and with extensive debug logging enabled. In order to build an optimized build, do this:

git submodule update --init --recursive
mkdir Release
cd Release
cmake -DCMAKE_BUILD_TYPE=Release ..
make

Documentation

Warpcore comes with documentation. This documentation can be built (if doxygen is installed) by doing

make doc

in any build directory. The starting page of the documentation is then doc/html/index.html.

Copyright

Copyright (c) 2014-2022, NetApp, Inc. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Acknowledgment

This software has received funding from the European Union's Horizon 2020 research and innovation program 2014-2018 under grant agreement 644866 ("SSICLOPS"). The European Commission is not responsible for any use that may be made of this software.

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.