会员
周边
新闻
博问
闪存
赞助商
YouClaw
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
坐看云起时
乘风好去,长空万里,直下看山河!!! 研究过httpserver、nginx、内核tcpip协议栈源码,内存管理 、摄像头-iic-spi等驱动!! 目前搞搞准入 看看内核 看看身份逻辑 看看管控 写写go
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
49
50
51
52
53
54
55
56
57
···
70
下一页
2020年8月11日
处理request信息的ngx_http_process_request
摘要: 在处理完http的头部信息后 然后在 处理request-body信息ngx_http_process_request ngx_http_process_request_headers(ngx_http_process_request_header)头部行解析完毕后调用函数ngx_http_proc
阅读全文
posted @ 2020-08-11 23:03 codestacklinuxer
阅读(401)
评论(0)
推荐(0)
2020年8月10日
http 结构初始化
摘要: 简要而说:accept 到连接后 根据fd 构建一个connection 由于是 http ; 重新封装为http-connection;同时设置fd的读回调; 回调函数根据是否是https/http 进行区别 ngx_http_init_connection(ngx_connection_t *c
阅读全文
posted @ 2020-08-10 21:27 codestacklinuxer
阅读(233)
评论(0)
推荐(0)
ngx instance
摘要: 首先看下 连接池的获取以及释放 ngx_connection_t * ngx_get_connection(ngx_socket_t s, ngx_log_t *log) //从连接池中获取一个ngx_connection_t { ngx_uint_t instance; ngx_event_t *
阅读全文
posted @ 2020-08-10 00:23 codestacklinuxer
阅读(142)
评论(0)
推荐(0)
2020年8月9日
ngx accept_mutex
摘要: 尝试获取锁,如果获取了锁,那么还要将当前监听端口全部注册到当前worker进程的epoll当中去 获取失败就需要确保此时ls-fd 没有被 epoll 监听 ngx_int_t ngx_trylock_accept_mutex(ngx_cycle_t *cycle) { if (ngx_shmtx_
阅读全文
posted @ 2020-08-09 23:41 codestacklinuxer
阅读(241)
评论(0)
推荐(0)
ngx ------ngx_cache_manager_process_cycle
摘要: static void ngx_cache_manager_process_cycle(ngx_cycle_t *cycle, void *data) { /* * Set correct process type since closing listening Unix domain socket
阅读全文
posted @ 2020-08-09 18:41 codestacklinuxer
阅读(286)
评论(0)
推荐(0)
2020年8月7日
GSO和TSO
摘要: 网络设备一次能够传输的最大数据量就是MTU,即IP传递给网络设备的每一个数据包不能超过MTU个字节,IP层的分段和重组功能就是为了适配网络设备的MTU而存在的。从理论上来讲,TCP可以不关心MTU的限定,只需要按照自己的意愿随意的将数据包丢给IP,是否需要分段可以由IP透明的处理,但是由于TCP是可
阅读全文
posted @ 2020-08-07 21:06 codestacklinuxer
阅读(1397)
评论(0)
推荐(1)
RPS/RFS/ GRO
摘要: http://www.cnhalo.net/2016/09/13/linux-gro/ GRO(Generic receive offload): 在napi poll里把小包封装成大包再递交给协议栈 LRO: GRO的硬件实现(通过网卡的RSC功能) http://lwn.net/Articles
阅读全文
posted @ 2020-08-07 21:05 codestacklinuxer
阅读(602)
评论(0)
推荐(0)
2020年8月5日
HTTP 抓包 ---复习一下
摘要: 1、connection 字段 2、accept 字段 3、user-agent 字段 4、host字段 等字段需要注意: HTTP事务的延时主要有以下:1).解析时延 DNS解析与DNS缓存 客户端首先需要根据URL确定Web服务器的IP地址和端口号,如果最近没有对URL中的主机名进行访问,通过D
阅读全文
posted @ 2020-08-05 23:04 codestacklinuxer
阅读(194)
评论(0)
推荐(0)
ip_rcv 中使用skb_share_check
摘要: /* * Main IP Receive routine. */ int ip_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, struct net_device *orig_dev) { const
阅读全文
posted @ 2020-08-05 20:01 codestacklinuxer
阅读(516)
评论(0)
推荐(0)
2020年7月30日
hash
摘要: 今天看代码的时候注意了一下 hash 以及看了下读书时候的笔记, 主要就是说: hash桶大小以及hash 算法 1、目前hash桶的大小都是素数(和2倍相近的一个素数) 设有一个哈希函数H( c ) = c % N;当N取一个合数时,最简单的例子是取2^n,比如说取2^3=8,这时候H( 1110
阅读全文
posted @ 2020-07-30 23:52 codestacklinuxer
阅读(261)
评论(0)
推荐(0)
上一页
1
···
49
50
51
52
53
54
55
56
57
···
70
下一页