mylinuxer

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2015年12月31日

摘要: 要谈segment fault,必须要谈指针。 指针的本质是什么?只不过是一种带*的数据类型,其特色有: 1、宽度 2、声明 3、赋值 4、++与-- 5、+与- 6、求差值 7、比较 当声明int *ptr = 0x0之后,ptr1就是一个指针变量了, 可以对ptr1做++,--,+,-等各种操作 阅读全文
posted @ 2015-12-31 15:38 mylinuxer 阅读(986) 评论(0) 推荐(0) 编辑

2015年12月29日

摘要: 189 struct hlist_head { 190 struct hlist_node *first; 191 }; 192 193 struct hlist_node { 194 struct hlist_node *next, **pprev; 195 }; hlist_head表示哈希表的 阅读全文
posted @ 2015-12-29 11:13 mylinuxer 阅读(2278) 评论(0) 推荐(0) 编辑

2015年10月9日

摘要: 今天,在运行公司内核的机器上,编译标准内核,结果提示:问题原因:原来安装新内核的时候,会与原内核比较,如果缺少了某些模块,就会提示”ERROR: modinfo: could not find module ********“。而我遇到的就是这种情况。问题解决:先rmmod那两个模块,然后make ... 阅读全文
posted @ 2015-10-09 16:32 mylinuxer 阅读(1014) 评论(0) 推荐(0) 编辑

2015年9月10日

摘要: 接收时使用skb_pull()不断去掉各层协议头部;发送时使用skb_push()不断添加各层协议头部。 先说说接收: 150 * eth_type_trans - determine the packet's protocol ID. 151 * @skb: received socket dat 阅读全文
posted @ 2015-09-10 22:46 mylinuxer 阅读(1452) 评论(0) 推荐(0) 编辑

2015年8月31日

摘要: 这个月,一直在搞ixgbe RSS,希望能使得收包均衡,结果没成功,但是对网卡的收包原理理解得更深入些。1、网卡硬件通过网线或者光纤收包。2、网卡的RSS功能根据网络五元组计算得到32bit的hash值, 根据hash值的低7位(0-127)与网卡queue的映射关系, 把收到的数据包放到某个q... 阅读全文
posted @ 2015-08-31 16:29 mylinuxer 阅读(2709) 评论(0) 推荐(0) 编辑

2015年7月15日

摘要: l3fwd负责三层转发,比l2fwd要复杂点。 1 /*- 2 * BSD LICENSE 3 * 4 * Copyright(c) 2010-2014 Intel Corporation. All rights reserved. 5 * All rights reserved. 6 * 7 * 阅读全文
posted @ 2015-07-15 11:17 mylinuxer 阅读(7830) 评论(0) 推荐(0) 编辑

2015年7月13日

摘要: dpdk的l2fwd主要做二层转发,代码分析如下。 阅读全文
posted @ 2015-07-13 14:45 mylinuxer 阅读(2019) 评论(0) 推荐(0) 编辑

2015年6月10日

摘要: 一、快速注释多行代码1、添加//注释符:10,50s#^#//#g 使用#作为分隔符2、删除//注释符:10,50s#^//##g 使用#作为分隔符3、添加#注释符:10,50s/^/#/g 使用/作为分隔符4、删除#注释符:10,50s/^#//g 使用/作为分隔符二、修改... 阅读全文
posted @ 2015-06-10 14:06 mylinuxer 阅读(1107) 评论(0) 推荐(0) 编辑

2015年4月24日

该文被密码保护。 阅读全文
posted @ 2015-04-24 14:33 mylinuxer 阅读(3) 评论(0) 推荐(0) 编辑

2015年4月2日

摘要: TCP发送方的窗口可以划分成四个部分:1、已经发送并且确认的TCP段;2、已经发送但是没有确认的TCP段;3、未发送但是接收方准备接收的TCP段,4、未发送并且接收方也为准备接受的TCP段。第3部分是可用窗口,长度为snd_una + snd_wnd - snd_nxt。第2部分和第3部分合并起来,... 阅读全文
posted @ 2015-04-02 18:17 mylinuxer 阅读(2878) 评论(0) 推荐(0) 编辑