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
/* | |
* 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> |
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 | |
/* |
#!/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 |
package main | |
import ( | |
"fmt" | |
"os" | |
"strings" | |
"math/rand" | |
"github.com/gdamore/mangos" |
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 ( | |
"flag" | |
"fmt" | |
"net" | |
"os" | |
"strings" | |
"sync/atomic" | |
"time" |
i = 10 | |
for x in [0...i] | |
alert(x) | |
var d, i, _i, _results; | |
i = 10; | |
d = (function() { | |
_results = []; | |
for (var _i = 0; | |
0 <= i ? _i < i : _i > i; | |
0 <= i ? _i++ : _i--) { _results.push(_i); } | |
return _results; | |
}).apply(this); |
console.log(a + b + c); | |
console.log(a(+b + c)); |
var i, x; | |
i = 10; | |
for (x = 0; 0 <= i ? x < i : x > i; 0 <= i ? x++ : x--) { | |
alert(x); | |
} |