摘要:ip netns list 没有显示 5f3d6409-f89b-4870-baf4-f0bc089b63ac 进入router namespace查看:
阅读全文
摘要:一、tcpdump 对于本机中进程的系统行为调用跟踪,strace是一个很好的工具,而在网络问题的调试中,tcpdump应该说是一个必不可少的工具,和大部分linux下优秀工具一样,它的特点就是简单而强大。默认情况下,tcpdump不会抓取本机内部通讯的报文。根据网络协议栈的规定,对于报文,即使是目
阅读全文
摘要:sk_attach_filter()和sk_run_filter():前者将 filter 伪代码由用户空间复制进内核空间;后者则负责在报文到来时执行伪码解析 BPF JIT 的接口还是简单清晰的:各平台的 JIT 编译函数都实现于bpf_jit_compile()之中(3.16 之后,开始逐步改为
阅读全文
摘要:size_t insns_cnt = sizeof(prog) / sizeof(struct bpf_insn); prog_fd = bpf_load_program(BPF_PROG_TYPE_SOCKET_FILTER, prog, insns_cnt, "GPL", 0, bpf_log_buf, BPF_LOG_BUF_SIZE); int b...
阅读全文
摘要:有如下两种方式加载map 1、BPF_LD_MAP_FD加载map /* pseudo BPF_LD_IMM64 insn used to refer to process-local map_fd */#define BPF_LD_MAP_FD(DST, MAP_FD) \BPF_LD_IMM64
阅读全文
摘要:binding_host_id binding_profile binding_vif_type binding_vnic_type mac地址在bind的时候会更新 [root@localhost ~]# neutron port-list neutron CLI is deprecated an
阅读全文
摘要:根据binding:host_id 和device_owner。得知interfaces所在的host,和接口类型是router的interface 查找interface所在的路由器 登陆host,找到interface的network连接的路由器
阅读全文
摘要:gcc temp.c -o annon 打开另外一个终端 输入: 打开另外一个终端
阅读全文
摘要:rcv_msg = smap_read_sock_strparser smap_do_verdict smap_verdict_func (*prog->bpf_func)(skb, prog->insnsi) static int smap_init_sock(struct smap_psock
阅读全文
摘要:ebpf的sockmap调用strp_init来设置回调函数 static int smap_init_sock(struct smap_psock *psock, struct sock *sk){ static const struct strp_callbacks cb = { .rcv_ms
阅读全文
摘要:centos7加载华为固件kmod-hinic-2.4.1.0_4.14.0_115-1.el7.aarch64.rpm之后,使用perf报错: 解决方法:重新编译内核,内核配置参数CONFIG_HISI_PMU打开
阅读全文