在旧版本的linux内核(例如2.6.11)中,struct sk_buff包含指向struct sk_buff_head(命名列表)的指针。 “了解Linux网络内部”一书中说,这个指针保持不变,因为sk_buffs需要快速查找skb列表的头部。但是我在最新版本的内核(3.2.1)中找不到这样的成员。任何人都可以解释一下skb列表管理在新内核中的变化吗?
答案 0 :(得分:2)
这很久以前改变了,在2.6.14显然。有问题的内核提交是:
commit 8728b834b226ffcf2c94a58530090e292af2a7bf
Author: David S. Miller <davem@davemloft.net>
Date: Tue Aug 9 19:25:21 2005
[NET]: Kill skb->list
Remove the "list" member of struct sk_buff, as it is entirely
redundant. All SKB list removal callers know which list the
SKB is on, so storing this in sk_buff does nothing other than
taking up some space.
Two tricky bits were SCTP, which I took care of, and two ATM
drivers which Francois Romieu <romieu@fr.zoreil.com> fixed
up.
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>