On 02/10/2018 01:07 AM, Jon Maloy wrote: > + > + /* Scale extracted buffer's truesize down to original size */ > + mcnt = msg_msgcnt(msg); > + (*iskb)->truesize = SKB_TRUESIZE(imsz) + skb->truesize / mcnt;
skb->truesize not only includes the length of original skb real data size, but also it contains the length of original skb buffer's overhead. In our change, SKB_TRUESIZE(imsz) represents the real data length of one bundled message plus the cache alignment size, and "skb->truesize / mcnt" also contains the real data length of one bundled message. Therefore, as per my understanding, it seems we repeatedly counted real data length. In my opinion, (*iskb)->truesize = SKB_TRUESIZE(imsz) is sufficient. Please confirm whether my understanding is right. > if (unlikely(!tipc_msg_validate(iskb))) > goto none; > *pos += align(imsz); ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ tipc-discussion mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/tipc-discussion
