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
Element size: 248 bytes | |
Total structure size: 2365 Mbytes | |
std::map: 5.5 mega ops per second | |
std::map big endian keys full scan: 17.2 mega ops per second | |
std::map big endian keys: 1.3 mega ops per second | |
std::map big endian keys full scan: 6.3 mega ops per second |
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
" | |
" First of all, pleae install latest vim for convinience: https://launchpad.net/~jonathonf/+archive/ubuntu/vim | |
" Then install vim go | |
" git clone https://github.com/fatih/vim-go.git ~/.vim/pack/plugins/start/vim-go | |
" | |
" Fix arrow keys that display A B C D on remote shell: | |
" Use Vim settings, rather then Vi settings (much better!). | |
" This must be first, because it changes other options as a side effect. | |
set nocompatible |
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/perl | |
use strict; | |
use warnings; | |
use JSON; | |
use Data::Dumper; | |
my $community = '65000:777'; |
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 <stdlib.h> | |
#include <stdio.h> | |
#include <string.h> | |
#include <iostream> | |
#include <unistd.h> | |
#include <boost/thread.hpp> | |
#include <arpa/inet.h> | |
#include <sys/socket.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 <functional> | |
#include <iomanip> | |
#include <iostream> | |
#include <locale.h> | |
#include <map> | |
#include <stdint.h> | |
#include <sys/time.h> | |
#include <unistd.h> | |
#include "../fastnetmon_types.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 <arpa/inet.h> | |
#include <fstream> | |
#include <iostream> | |
#include <math.h> | |
#include <netinet/in.h> | |
#include <stdint.h> | |
#include <stdio.h> | |
#include <string> | |
#include <sys/socket.h> | |
#include <sys/time.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/bash | |
# from http://habrahabr.ru/post/108240/ | |
ncpus=`grep -ciw ^processor /proc/cpuinfo` | |
test "$ncpus" -gt 1 || exit 1 | |
n=0 | |
for irq in `cat /proc/interrupts | grep eth | awk '{print $1}' | sed s/\://g` | |
do | |
f="/proc/irq/$irq/smp_affinity" |
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 | |
INTERVAL="1" # update interval in seconds | |
if [ -z "$1" ]; then | |
echo | |
echo usage: $0 [network-interface] | |
echo | |
echo e.g. $0 eth0 | |
echo |
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
diff -Nraup ixgbe-linux-netmap/ixgbe-3.23.2.1/src/ixgbe_main.c ixgbe-linux-netmap-single-queue/ixgbe-3.23.2.1/src/ixgbe_main.c | |
--- ixgbe-linux-netmap/ixgbe-3.23.2.1/src/ixgbe_main.c 2015-06-20 14:23:38.457783634 +0100 | |
+++ ixgbe-linux-netmap-single-queue/ixgbe-3.23.2.1/src/ixgbe_main.c 2015-06-20 14:23:31.330496612 +0100 | |
@@ -686,6 +686,7 @@ static bool ixgbe_clean_tx_irq(struct ix | |
if (test_bit(__IXGBE_DOWN, &adapter->state)) | |
return true; | |
+ if (tx_ring->queue_index == 0) { | |
#ifdef DEV_NETMAP | |
/* |
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/perl | |
# Author Pavel Odintsov | |
# pavel.odintsov@gmail.com | |
use strict; | |
use warnings; | |
opendir my $dir, '/proc' or die "Can't open procfs"; |