由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - How to split sk_buf into 2
相关主题
菜鸟请教C问题C++ Q 108: swap
怎样高效管理内存?python question, easy one
请教:vector size in R老魏老姜老霸,我出银子给你们开机器
奇怪的问题:关于一个简单的malloc()小程序 (转载)java里run curl system command的问题
effective C++里的memory pool 一问:为什么用try catch不住exception?
why do we still use dynamic allocation?关于内存泄漏
两个面世题alloc这个函数究竟做些啥活呢?
A question about class sizearray allocation in c
相关话题的讨论汇总
话题: skb话题: split话题: skb1话题: buf话题: sk
进入Programming版参与讨论
1 (共1页)
w*s
发帖数: 7227
1
in linux networking, i want to split 5000 byte data into 2,
4000 bytes and 1000 bytes,
will the following work ? assuming skb is the original skb passed in.
skb1 = netdev_alloc_skb(lp->dev, needed-4000); // create an new skb
skb_split(skb, skb1, 4000/4); // 4000 bytes is 1000 u32
skb_queue_tail(&lp->txq, skb);
skb_queue_tail(&lp->txq, skb1);
1 (共1页)
进入Programming版参与讨论
相关主题
array allocation in ceffective C++里的memory pool 一问:
"brk()" 和 mmap() 有什么区别? (转载)why do we still use dynamic allocation?
C++一个string的小问题两个面世题
question about structure initializationa and referenceA question about class size
菜鸟请教C问题C++ Q 108: swap
怎样高效管理内存?python question, easy one
请教:vector size in R老魏老姜老霸,我出银子给你们开机器
奇怪的问题:关于一个简单的malloc()小程序 (转载)java里run curl system command的问题
相关话题的讨论汇总
话题: skb话题: split话题: skb1话题: buf话题: sk