Linux kernel skb_保留意见澄清

Linux kernel skb_保留意见澄清,linux-kernel,Linux Kernel,据消息人士透露,, 但是,仅增加而不是“减少”尾室,对吗?如果您查看之前的功能: 1185 /** 1186 * skb_tailroom - bytes at buffer end 1187 * @skb: buffer to check 1188 * 1189 * Return the number of bytes of free space at the tail of an sk_buff 1190 */ 1191 static inline

据消息人士透露,,


但是,仅增加而不是“减少”尾室,对吗?

如果您查看之前的功能:

1185 /**
1186  *      skb_tailroom - bytes at buffer end
1187  *      @skb: buffer to check
1188  *
1189  *      Return the number of bytes of free space at the tail of an sk_buff
1190  */
1191 static inline int skb_tailroom(const struct sk_buff *skb)
1192 {
1193         return skb_is_nonlinear(skb) ? 0 : skb->end - skb->tail;
1194 }

很明显,“尾部空间”是
end
tail
之间的区别,因此该函数确实减少了缓冲区中的尾部空间。

Oops!当然,它通过增加指针来缩短长度
1185 /**
1186  *      skb_tailroom - bytes at buffer end
1187  *      @skb: buffer to check
1188  *
1189  *      Return the number of bytes of free space at the tail of an sk_buff
1190  */
1191 static inline int skb_tailroom(const struct sk_buff *skb)
1192 {
1193         return skb_is_nonlinear(skb) ? 0 : skb->end - skb->tail;
1194 }