How to run:
go build udp.go; sudo bash -c "ulimit -n 100000; ./udpserver"
go build udpclient.go && ./udpclient
sudo netstat -l4np --udp|grep :1234|tr -s " "|egrep -v "p 0"
Sample output
127.0.87.133:1234 0.347 ms
all: | |
clang -g -O2 -Wall -Wextra net.c send.c -o send | |
clang -g -O2 -Wall -Wextra net.c receive.c -o receive | |
clang -g -O2 -Wall -Wextra net.c proxy-naive.c -o proxy-naive | |
clang -g -O2 -Wall -Wextra net.c proxy-splice.c -o proxy-splice |
package main | |
import ( | |
"flag" | |
"fmt" | |
"net" | |
"os" | |
"strings" | |
"sync/atomic" | |
"time" |
How to run:
go build udp.go; sudo bash -c "ulimit -n 100000; ./udpserver"
go build udpclient.go && ./udpclient
sudo netstat -l4np --udp|grep :1234|tr -s " "|egrep -v "p 0"
Sample output
127.0.87.133:1234 0.347 ms
package main | |
import ( | |
"fmt" | |
"os" | |
"strings" | |
"math/rand" | |
"github.com/gdamore/mangos" |
#!/bin/bash | |
cat << EOF > /tmp/xxx | |
4.1.1 2015-06-17 100100 weekly downloads | |
4.0.3 2015-04-15 9494 weekly downloads | |
3.23.2.1 2015-02-23 1919 weekly downloads | |
3.23.2 2014-12-22 1515 weekly downloads | |
3.22.3 2014-08-15 99 weekly downloads | |
3.21.2 2014-03-28 88 weekly downloads | |
3.19.1 2013-12-20 1515 weekly downloads |
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 | |
/* |
/* | |
* gcc flood_mmap.c -l pcap -O3 -o flood_mmap | |
*/ | |
#include <arpa/inet.h> | |
#include <ctype.h> | |
#include <getopt.h> | |
#include <linux/if_packet.h> | |
#include <net/ethernet.h> | |
#include <net/if.h> | |
#include <pcap/pcap.h> |
#!/bin/bash | |
(mkdir git && cd git && git init) | |
for NAME in `ls open*tgz|cut -d "." -f 1|sort`; do | |
FILE=$NAME.tgz | |
MD5=`md5sum $FILE` | |
tar xzf $FILE | |
(cd git && git rm -r *) | |
mv $NAME/* git |
#!/usr/bin/env python | |
import collections | |
import itertools | |
import sys | |
import string | |
import array | |
def load_memory(filename): | |
regs = {} |
data = [ | |
[ | |
"16030100e2010000de030151d1743150b15934aa386f69a593d0f59ddfae80394da9ad164c06814b9cb81d000048c00ac0140088008700390038c00fc00500840035c007c009c011c0130045004400330032c00cc00ec002c0040096004100040005002fc008c01200160013c00dc003feff000a00ff0100006d00000024002200001f7777772e79786567336e6274733668736a743573696b64676d73642e636f6d000b000403000102000a00340032000e000d0019000b000c00180009000a00160017000800060007001400150004000500120013000100020003000f00100011000f000101", | |
"160301003602000032030151d1746379ee699a97ce167b1f9db4a5da0044e915cdedb85a87baab9aef21a100003900000aff01000100000f00010116030101c10b0001bd0001ba0001b7308201b33082011ca003020102020900858be40d1cc59ccf300d06092a864886f70d0101050500301b31193017060355040313107777772e72756f7561726d362e636f6d301e170d3133303730313131353631325a170d3134303730313131353631325a301c311a3018060355040313117777772e3567346332616b63652e6e657430819f300d06092a864886f70d010101050003818d0030818902818100f7ea49eff87e4fa728b3fd459266bc49b8c7949d25c3a376b0d12b90f790 |