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
virt-install \ | |
--name win10 \ | |
--cpu host-passthrough \ | |
--ram 32768 \ | |
--vcpus 12 \ | |
--boot cdrom \ | |
--cdrom /mnt/data/vm-images/Windows.iso \ | |
--disk /mnt/data/vm-images/virtio-win.iso,device=cdrom,bus=sata \ | |
--disk /mnt/data/vm-images/win10.qcow2,bus=virtio,size=400 \ | |
--os-type windows \ |
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
IT IS PAINFUL. | |
./configure --disable-sanity-checks CFLAGS="-O2 -U_FORTIFY_SOURCE -fno-stack-protector -march=native" --disable-profile --enable-kernel=2.6.25 |
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
pthread mutex lock comes with different types: | |
1. private: process only | |
2. shared: cross the process boundary | |
Private: | |
Spins in the userspace for a while, after a timeout, goes to futex. In this way it saves some system calls. | |
Shared: | |
Goes to futex directly. |
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
opkg install kernel-dev | |
opkg install wireless-tools | |
CONFIG_POWER_SAVING=n |
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
<M> Hierarchical Token Bucket (HTB) | |
<M> Hierarchical Fair Service Curve (HFSC) | |
<M> Multi Band Priority Queueing (PRIO) (NEW) | |
<M> Stochastic Fairness Queueing (SFQ) | |
<M> Token Bucket Filter (TBF) (NEW) | |
<M> Elementary classification (BASIC) | |
<M> Traffic-Control Index (TCINDEX) | |
<M> Routing decision (ROUTE) | |
<M> Netfilter mark (FW) | |
<M> Universal 32bit comparisons w/ hashing (U32) |
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 <unistd.h> | |
#include <sys/types.h> | |
#include <sys/socket.h> | |
#include <memory.h> | |
#include <linux/types.h> | |
#include <linux/netlink.h> | |
#include <linux/rtnetlink.h> | |
struct nl_req_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
1、Netfilter核心基于在IP层插入的5个HOOK | |
PREROUTING: NF_IP_PRE_ROUTING | |
LOCAL_INPUT: NF_IP_LOCAL_IN | |
FORWARD: NF_IP_FORWARD | |
LOCAL_OUTPUT: NF_IP_LOCAL_OUT | |
POSTROUTING: NF_IP_POST_ROUTING | |
2、Netfilter在PRE_ROUTING和LOCAL_OUT处进行分片重组,也就是进入Netfilter的模块确保全部都是不分片的(?) | |
nf_defrag_ipv4.c | |
重组从外面进来的包,和本地主机生成的数据包 |