Coder Social home page Coder Social logo

edpdk's Introduction

edpdk

A set of Erlang port commands for using Intel DPDK PMDs (Poll-Mode Drivers). Edpdk initially provides the following commands to allow an Erlang node to receive or transmit packets through DPDK PMDs.

1. Run edpdk port

Create an Erlang port with the following command:

    "edpdk -c <coremask> -n 4 -- --tx=<core:port1:portN...> --rx=<core:port1:portN...>..."
    e.g. To run edpdk with 2 cores and 2 ports,
    
        "edpdk -c 0x3 -n 4 -- --tx=0:0:1 --rx=0:0:1"
        
        -c = coremask (e.g. core 1 and 2 is 0x3)
        --tx = core-port assignment
            - e.g. core 0 will transmit to port 0 & 1
        --rx = similar to --tx but receives            
        
After successfully creating the edpdk port, one can then send the port commands specified below.

2. Receive a packet

To receive a packet the following tuple must be sent:

{recv, <<>>, PortNo}     
Where,

    Command: recv
    Packet: <<>>
        - this is always empty since we are receiving
    Port: PortNo, the source port of the ingress packet
    
Possible output:

    {ok, << packet>>} 
        - packet is received
        
    {fail, empty}
        - ingress port does not have any queued packets

2. Transmit a packet

To transmit a packet the following tuple must be sent:

{xmit, << packet>>, PortNo}
Where,

    Command: xmit
    Packet: << packet>>, the packet to be sent
    Port: PortNo, the destination port of the egress packet
    
Possible output:

    {ok, queued}
        - packet is queued for transmit
    
    {fail, full_or_busy}
        - packet can't be sent right now

The primary goal of this specific Intel DPDK application is to achieve a "fast path" for an Erlang-based packet forwarder (e.g. LINC). Based on an oversimplified experiment, a dumb packet forwarder (fwdr.erl) showed better packet forwarding performance over LINC when forwarding a packet with a very basic rule. However, this experiment only tells very little about the possibility of enhancing LINC with DPDK and it should be noted. Nevertheless, these could be a good motivation to start using DPDK PMDs when processing packets in LINC. One quite interesting idea but still an area to explore is to level up the edpdk implementation to use Erlang NIFs or linked in drivers to eliminate overhead introduced by the port communication. On the other hand, again this is still an area to explore ans as well test, because DPDK yet needs to be evauluated for these approaches due to the fact that it doesn't directly provide system integration facilities - if there is, it isn't a first class feature.

For more information on Intel DPDK please see the following links:

edpdk's People

Contributors

pepecueto avatar shivarammysore 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.