原创 Link list usage

Link list usage 1. define the list head with global variable static LIST_HEAD(sample_dev_list); 2. define a sample stru

原创 steps to reproduce a TC rule error

1. /workspace/cloud_tools/configure_asap_devtest_env.sh 2. export CONFIG=/workspace/dev_reg_conf.sh 3. ifconfig enp0s8f

原创 install dpdk, pktgen-dpdk in centos76

1. in centos 7.6 yum makecache; yum install -y gcc gcc-c++  kernel-devel kernel-headers kernel.x86_64 net-tools yum ins

原创 Steps to verify "replace pop/push with rewrite"

Steps to verify "replace pop/push with rewrite" echo 2 > /sys/class/net/enp0s8f0/device/sriov_numvfs sleep 3 ip link se

原创 change the color of comments in VIM

Add the following " highlight Comment ctermfg=LightBlue " into ~/.vimrc

原创 rdma commad: rping install and example

rping: yum install librdmacm-utils -y rping -s -a 192.168.200.131 -v -C 10 rping-c -a 192.168.210.131 -v -C 10

原创 container_of的實現

面試的過程中,container_of的實現很重要: #define container_of(ptr, type, member) ({              \         const typeof( ((type *)0)-

原创 2 qemu hosts connect to each other in CentOS

1. Boot 2 qemu hosts with the following commands: " qemu-system-x86_64 -smp 4 -hda ubuntu1604-svr-1.img -m 4G -device v

原创 rdma-core on centos 7.2

rdma-core on centos 7.2 1. git clone http://l-gerrit.mtl.labs.mlnx:8080/mlnx_ofed/rdma-core 2. Use fprintf add logs; th

原创 面試C語言題目

L1, L2 - 2 signle linked list , Null terminate. p1, p2 are pointer to L1 ,L2 describe an effieicnt way to retrive the f

原创 mlnx-ofed comile and install

mlnx-ofed comile and install 1. git clone http://l-gerrit.mtl.labs.mlnx:8080/mlnx_ofed/mlnx-ofa_kernel-4.0.git 2.   ln

原创 面試題目

  1. 遞歸方法輸出字符 void revert_string(char *str) {     if (str[0] == \0) {         printf("%c", str[0]);     } else {       

原创 simple rdma example

#include <stdio.h> #include <infiniband/verbs.h> struct reg_mr {     uint32_t command;     uint16_t in_words;     uint1

原创 call trace in userspace

A function to print the stack like the kernel in userspace. void call_trace() {     void* callstack[128];     int i, fr

原创 6.4. Controlling a Process with GDB

6.4. Controlling a Process with GDB GDB is designed to take control of a live process or to load a process image (a “co