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
diagram: | |
fill: "white" | |
columns: 20 | |
rows: 20 | |
gridLines: true | |
title: | |
author: bebebe | |
company: nict | |
color: black | |
text: rd.enobed 172.19.0.0/16 |
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
// +avx, +popcnt, +bmi2 | |
unsafe fn mm256_compressstroeu_ps(array: *mut f32, mask: u8, src: __m256) | |
{ | |
let convert = _pext_u64(0x0706050403020100, _pdep_u64(mask as u64, 0x0101010101010101)*0xFF); | |
let permute = _mm256_cvtepu8_epi32(_mm_cvtsi64_si128(convert as i64)); | |
let compress = _mm256_permutevar8x32_ps(src, permute); | |
let imm8 = _popcnt64(mask as i64); | |
let ret = match imm8 { | |
0 => { _mm256_blend_ps(_mm256_loadu_ps(array), compress, 0x00) }, |
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 <sys/types.h> | |
#include <sys/ioctl.h> | |
#include <sys/stat.h> | |
#include <net/if.h> | |
/* | |
unsigned int if_nametoindex(const char *ifname); | |
char *if_indextoname(unsigned int ifindex, char *ifname); | |
*/ |
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 <stdio.h> | |
#include <errno.h> | |
#include <unistd.h> | |
#include <stdlib.h> | |
#include <signal.h> | |
#include <string.h> | |
#include <pthread.h> | |
#include <sys/epoll.h> | |
#include <sys/signalfd.h> |
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 <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#include <sys/types.h> | |
#include <sys/wait.h> | |
int child() | |
{ | |
int count = 10; |
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
sudo apt-get update | |
sudo apt-get upgrade | |
sudo apt-get dist-upgrade | |
sudo apt-get install htop | |
sudo apt-get install build-essential | |
sudo apt-get install libncurses-dev | |
sudo apt-get install libssl-dev | |
sudo apt-get install bc | |
sudo apt-get install linux-source | |
sudo -s |
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 <sys/cdefs.h> | |
#include <sys/types.h> | |
#include <sys/param.h> | |
#include <sys/systm.h> | |
#include <sys/proc.h> | |
#include <sys/lock.h> | |
#include <sys/mutex.h> | |
#include <sys/kernel.h> | |
#include <sys/kthread.h> |
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 | |
#modprobe pktgen | |
ETH="eth0" | |
CLONE_SKB="clone_skb 10" | |
PKT_SIZE="64" | |
DELAY="0" | |
SRC_MAC="00:26:2d:08:8b:25" | |
DST_MAC="00:26:2d:08:99:fb" |
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 | |
#fetch freebsd-live.iso | |
mkdir hoge | |
bsdtar -C hoge -pxvf freebsd-live.iso | |
cd hoge | |
# -------- | |
# 書き換え | |
# -------- | |
mkisofs -v -b boot/cdboot -no-emul-boot -r -J -V "FREEBSD_INSTALL" -o ../freebsd_customize.iso ./ |
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
#!/usr/bin/env sh | |
cd /tmp | |
apt-get update | |
apt-get -y install git build-essential | |
apt-get -y install linux-source linux-headers-generic | |
tar xvf /usr/src/linux-source-`uname -r | awk 'BEGIN { FS="-" } { print $1 }'`.tar.bz2 -C /usr/src | |
git clone https://github.com/luigirizzo/netmap.git | |
cd netmap/LINUX | |
SRC_VAR=/usr/src/linux-source-`uname -r | awk 'BEGIN { FS="-" } { print $1 }'` | |
./configure --kernel-sources=${SRC_VAR} |
NewerOlder