原创 Change default rpm build root directory

Change default rpm build root. # cat ~/.rpmmacros %_topdir /images/yanjunz/rpmbuild/

原创 make qemu work with cx5 passthrough in centos

make qemu work with cx5 passthrough in centos 1. In BIOS, enable IOMMU. Security->Virtualization->VT-d 2. In kernel opt

原创 send 32768 different MAC addresses to the server

The client sends 32768 different MAC addresses to the server. Then the server creates 32768 rules, then offloads these

原创 configure switchdev mode to run hardware offload test

1. set 2 VFs echo 2 > /sys/class/net/eth2/device/sriov_numvfs ip link show "  ... 17: eth2: <BROADCAST,MULTICAST,UP,LOW

原创 Backport egdev mechanism to redhat kernel 3.10.0-1127

In the latest linux kernel, egdev mechanism is removed. But in some functions, this egdev mechanism is still used. So t

原创 2 Simple conntrack rules

  1. OVS_BR=ovs-sriov ovs-ofctl del-flows $OVS_BR #set arp to behave normally, ip will mark trk and then proceed to tab

原创 Configure local port mirroring + conntrack

  1. #enable sriov echo 2 > /sys/class/net/eth3/device/sriov_numvfs lspci | grep -i mellanox 2. #unbind VFs echo 0000:0

原创 softroce 測試帶寬和延遲

Bandwidth test Server: ib_send_bw -n 10000 -d rxe0 -i 1 -F --report_gbits Clinet: ib_send_bw -n 10000 -d rxe0 -i 1 -F -

原创 Configure remote port mirroring with ASAP^2

  0. #udev rules SUBSYSTEM=="net", ACTION=="add", ATTR{phys_switch_id}!="", ATTR{phys_port_name}!="", \         IMPORT{

原创 redhat kernel 3.10.0-xxx and OFED debug general methods

The ofed bug steps: 1. kernel 3.10.0-1127 build and add logs 1) rpm -hiv http://ftp.lip6.fr/pub/linux/distributions/sci

原创 在ububtu 18.04製作deb文件

clone 如下兩個 git 倉庫:     git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git     https://salsa.debi

原创 find the function name according to function pointer

To find the function name that a function pointer is pointing to, you can use the followings In the Linux kernel, you c

原创 ECMP + CT offload in MLX5 NIC

1. git clone https://github.com/zhuyj/kernel-5.4.30-qingcloud.git --branch=origin/remotes/origin/miniflow_ct_offload_Ub

原创 Configure local mirror with ASAP^2

Configure local mirror with ASAP^2 0. #udev rules SUBSYSTEM=="net", ACTION=="add", ATTR{phys_switch_id}!="", ATTR{phys_

原创 mac address convert to ipv6 link local address

#include <stdio.h> #include <string.h> int toogle_kth_bit(unsigned int n, int k) {         return (n ^ (1 << (k-1))); }