View start_kni.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/sh | |
#setup path to DPDK | |
export RTE_SDK=/home/dpdk | |
export RTE_TARGET=x86_64-native-linuxapp-gcc | |
#setup 512 huge pages | |
mkdir -p /mnt/huge | |
umount -t hugetlbfs nodev /mnt/huge | |
mount -t hugetlbfs nodev /mnt/huge |
View Vagrantfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.vm.box = "trusty64" | |
config.vm.provision :shell, path: "../bootstrap.sh" |
View Vagrantfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure(2) do |config| | |
config.vm.box = "puppetlabs/ubuntu-16.04-64-nocm" | |
config.vm.box_check_update = false | |
vmcpu=(ENV['VPP_VAGRANT_VMCPU'] || 2) | |
vmram=(ENV['VPP_VAGRANT_VMRAM'] || 4096) |
View startup.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unix { | |
nodaemon | |
log /tmp/vpp.log | |
full-coredump | |
gid vpp | |
interactive | |
cli-listen /run/vpp/cli.sock | |
} | |
api-trace { |
View vpp-veth-setup.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
PATH=$PATH:./build-root/build-vpp-native/vpp/bin/ | |
if [ $USER != "root" ] ; then | |
echo "Restarting script with sudo..." | |
sudo $0 ${*} | |
exit | |
fi |
View Symmetric RSS in DPDK for 82599
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define RSS_HASH_KEY_LENGTH 40 | |
static uint8_t hash_key[RSS_HASH_KEY_LENGTH] = { | |
0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A, | |
0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A, | |
0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A, | |
0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A, | |
0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A, | |
}; | |
struct rte_eth_conf port_conf = { |
View dropper.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <linux/bpf.h> | |
#ifndef __section | |
# define __section(NAME) \ | |
__attribute__((section(NAME), used)) | |
#endif | |
__section("prog") | |
int xdp_drop(struct xdp_md *ctx) | |
{ |
View Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ifeq ($(KERNELRELEASE),) | |
KERNELDIR ?= /lib/modules/$(shell uname -r)/build | |
PWD := $(shell pwd) | |
modules: | |
$(MAKE) -C $(KERNELDIR) M=$(PWD) modules EXTRA_CFLAGS="-g -DDEBUG" | |
modules_install: | |
$(MAKE) -C $(KERNELDIR) M=$(PWD) modules_install |
View vpp-tap-setup.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
./build-root/build-vpp-native/vpp/bin/vppctl tap connect vpp1 | |
./build-root/build-vpp-native/vpp/bin/vppctl tap connect vpp2 | |
./build-root/build-vpp-native/vpp/bin/vppctl set interface state tapcli-0 up | |
./build-root/build-vpp-native/vpp/bin/vppctl set interface state tapcli-1 up | |
ip netns delete vpp1 | |
ip netns delete vpp2 |
View Vagrantfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.vm.box = "trusty64" | |
config.vm.network "private_network", ip: "192.168.50.4" |
OlderNewer