Coder Social home page Coder Social logo

drv-netif-dpdk's People

Contributors

alexanderguy avatar anttikantee avatar arsatiki avatar galsagie avatar justincormack avatar ywahl 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

drv-netif-dpdk's Issues

Help my please! Don't change src ip after two initialize interfaces

don't change src ip after two initialize interfaces. I am using dpdk 1.6
Example code:

    rump_init();
    if ((e = rump_pub_netconfig_ifcreate("dpdk0")) != 0)
            die(e, "create dpdk0");
    if ((e = rump_pub_netconfig_ipv4_ifaddr("dpdk0",
        "100.100.100.2", "255.255.255.0")) != 0)
            die(e, "failed to create ");
if ((e = rump_pub_netconfig_ifup("dpdk0")) !=0)
            die(e, "failed to rump_pub_netconfig_ifup ");


    s = rump_sys_socket(PF_INET, SOCK_STREAM, 0);
    if (s == -1) {
            die(errno, "socket");
    } else {
            memset(&sin, 0, sizeof(sin));
            sin.sin_family = AF_INET;
          #if 0
            sin.sin_len = sizeof(sin);
          #endif
            sin.sin_port = htons(80);
            inet_aton("100.100.100.1", &sin.sin_addr);

            if (rump_sys_connect(s, (struct sockaddr *)&sin, sizeof(sin)) == -1) {    // this is ok, src ip 100.100.100.2
                    die(errno, "connect");
            }
    }
rump_pub_netconfig_ifdown("dpdk0");

if ((e = rump_pub_netconfig_ipv4_ifaddr("dpdk0",
        "100.100.100.5", "255.255.255.0")) != 0)
            die(e, "failed to create ");
if ((e = rump_pub_netconfig_ifup("dpdk0")) !=0)
            die(e, "failed to rump_pub_netconfig_ifup ");

    s = rump_sys_socket(PF_INET, SOCK_STREAM, 0);
    if (s == -1) {
            die(errno, "socket");
    } else {
            memset(&sin, 0, sizeof(sin));
            sin.sin_family = AF_INET;
          #if 0
            sin.sin_len = sizeof(sin);
          #endif
            sin.sin_port = htons(80);
            inet_aton("100.100.100.1", &sin.sin_addr);

            if (rump_sys_connect(s, (struct sockaddr *)&sin, sizeof(sin)) == -1) {   // this is error src ip 100.100.100.2
                    die(errno, "connect");
            }
    }

Initialize all supported drivers with rte_pmd_init_all

Just a suggestion - may want to try to initialize all supported devices with rte_pmd_init_all instead of defaulting to a selected single driver (rumpcomp_user.c, line 69).

The rte_pmd_init_all function presents in the latest DPDK version, not sure about the older ones.

Cannot build on Ubuntu 16.04 LTS

Cannot build on Ubuntu 16.04 LTS

Output like:
In file included from /usr/lib/gcc/x86_64-linux-gnu/5/include/x86intrin.h:37:0,
from /home/yihu/proj/drv-netif-dpdk/dpdk/build/include/rte_vect.h:67,
from /home/yihu/proj/drv-netif-dpdk/dpdk/build/include/rte_memcpy.h:46,
from /home/yihu/proj/drv-netif-dpdk/dpdk/build/include/rte_ether.h:50,
from dpdkif_user.c:47:
/usr/lib/gcc/x86_64-linux-gnu/5/include/tmmintrin.h:185:1: error: inlining failed in call to always_inline '_mm_alignr_epi8': target specific option mismatch
_mm_alignr_epi8(__m128i __X, __m128i __Y, const int __N)
^
In file included from /home/yihu/proj/drv-netif-dpdk/dpdk/build/include/rte_ether.h:50:0,
from dpdkif_user.c:47:
/home/yihu/proj/drv-netif-dpdk/dpdk/build/include/rte_memcpy.h:634:13: error: called from here
_mm_storeu_si128((__m128i *)((uint8_t *)dst + 1 * 16), _mm_alignr_epi8(xmm2, xmm1, offset));
^
/home/yihu/proj/drv-netif-dpdk/dpdk/build/include/rte_memcpy.h:674:16: note: in expansion of macro 'MOVEUNALIGNED_LEFT47_IMM'
case 0x0F: MOVEUNALIGNED_LEFT47_IMM(dst, src, n, 0x0F); break;
^
/home/yihu/proj/drv-netif-dpdk/dpdk/build/include/rte_memcpy.h:814:2: note: in expansion of macro 'MOVEUNALIGNED_LEFT47'
MOVEUNALIGNED_LEFT47(dst, src, n, srcofs);

Cannot run TCP web browser

I got following error while trying to run TCP example web browser given:
EAL: Setting up memory...
EAL: Ask a virtual area of 0x200000 bytes
EAL: Virtual area found at 0x7f49d2c00000 (size = 0x200000)
EAL: Ask a virtual area of 0x3e000000 bytes
EAL: Virtual area found at 0x7f4994a00000 (size = 0x3e000000)
EAL: Ask a virtual area of 0x400000 bytes
EAL: Virtual area found at 0x7f4994400000 (size = 0x400000)
EAL: Ask a virtual area of 0x200000 bytes
EAL: Virtual area found at 0x7f4994000000 (size = 0x200000)
EAL: Requesting 500 pages of size 2MB from socket 0
EAL: TSC frequency is ~800000 KHz
EAL: Master core 0 is ready (tid=dc11d800)
warning dpdkif0: no ports
VIFHYPER_CREATE failed: 1
webbrowser: create dpdk0: 1
rump kernel halting...
halted
I'm not sure if i changed configure.h properly because I don't know how to find the information asked there and so I kept the default values except for port. Here is my configure.h content:
static const char *ealargs[] = {
"if_dpdk",

if 0

"-b 00:00:03.0",

endif

"-c 1",
"-n 1",

};

/* change PORTID to the one your want to use */

define IF_PORTID 5001

/* change to the init method of your NIC driver */

ifndef PMD_INIT

define PMD_INIT rte_pmd_init_all

endif

/* Receive packets in bursts of 16 per read */

define MAX_PKT_BURST 16

udp_echo_server does not work with a single ixgbe card

I modified 'PMD_INIT' to 'rte_ixgbe_pmd_init' and changed 'ealargs' accordingly, but when I launch udp_echo_server, it has the following error:

warning dpdkif0: no ports warning dpdkif0: configure device

udp_echo_server: failed to create dpdk0

It seems that rte_eth_dev_count() returns 0. Have you tested with a single ixgbe card?

test webbrowser caused rump kernel halted.

test webbrowser caused rump kernel halted.

Output:
EAL: Detected lcore 0 as core 0 on socket 0
EAL: Detected lcore 1 as core 1 on socket 0
EAL: Detected lcore 2 as core 2 on socket 0
EAL: Detected lcore 3 as core 3 on socket 0
EAL: Support maximum 128 logical core(s) by configuration.
EAL: Detected 4 lcore(s)
EAL: Setting up memory...
EAL: Ask a virtual area of 0x200000 bytes
EAL: Virtual area found at 0x7fbf8e800000 (size = 0x200000)
EAL: Ask a virtual area of 0x200000 bytes
EAL: Virtual area found at 0x7fbf8e400000 (size = 0x200000)
EAL: Ask a virtual area of 0x200000 bytes
EAL: Virtual area found at 0x7fbf8e000000 (size = 0x200000)
EAL: Ask a virtual area of 0x5400000 bytes
EAL: Virtual area found at 0x7fbf88a00000 (size = 0x5400000)
EAL: Ask a virtual area of 0x3a400000 bytes
EAL: Virtual area found at 0x7fbf4e400000 (size = 0x3a400000)
EAL: Ask a virtual area of 0x200000 bytes
EAL: Virtual area found at 0x7fbf4e000000 (size = 0x200000)
EAL: Requesting 512 pages of size 2MB from socket 0
EAL: TSC frequency is ~3392361 KHz
EAL: Master core 0 is ready (tid=9d723880)
EAL: PCI device 0000:02:01.0 on NUMA socket -1
EAL: probe driver: 8086:100f rte_em_pmd
EAL: 0000:02:01.0 not managed by VFIO driver, skipping
EAL: 0000:02:01.0 not managed by UIO driver, skipping
EAL: PCI device 0000:02:02.0 on NUMA socket -1
EAL: probe driver: 8086:100f rte_em_pmd
EAL: 0000:02:02.0 not managed by VFIO driver, skipping
EAL: 0000:02:02.0 not managed by UIO driver, skipping
EAL: PCI device 0000:02:06.0 on NUMA socket -1
EAL: probe driver: 8086:100f rte_em_pmd
EAL: 0000:02:06.0 not managed by VFIO driver, skipping
EAL: PCI memory mapped at 0x7fbf8ea00000
EAL: PCI memory mapped at 0x7fbf8ea20000
PMD: eth_em_dev_init(): port_id 0 vendorID=0x8086 deviceID=0x100f
EAL: PCI device 0000:02:07.0 on NUMA socket -1
EAL: probe driver: 8086:100f rte_em_pmd
EAL: 0000:02:07.0 not managed by VFIO driver, skipping
EAL: PCI memory mapped at 0x7fbf8ea30000
EAL: PCI memory mapped at 0x7fbf8ea50000
PMD: eth_em_dev_init(): port_id 1 vendorID=0x8086 deviceID=0x100f
PMD: eth_em_rx_queue_setup(): sw_ring=0x7fbf894f3780 hw_ring=0x7fbf8e82e680 dma_addr=0x42e680
PMD: eth_em_tx_queue_setup(): sw_ring=0x7fbf894f1680 hw_ring=0x7fbf8e83e680 dma_addr=0x43e680
PMD: eth_em_start(): <<
dhcp: dpdk0: adding IP address 192.168.252.131/24
dhcp: dpdk0: adding route to 192.168.252.0/24
lease time: 1800 seconds
webbrowser: connect: 65
rump kernel halting...
halted

Build error on Ubuntu 12.04 LTS

If I follow the following command under ./src/libdpdkif after compiling the rump kernel, I have the following error:

$ ../../rumptools/rumpmake dependall && ../../rumptools/rumpmake install
nbmake: don't know how to make dependall. Stop

nbmake: stopped in /***/dpdk-rumptcpip/src/libdpdkif

Do you have any Makefile for Linux? Thanks.

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.