mptcp
mptcp copied to clipboard
Reduce size of skb->cb
When moving to v4.1 we had to increase the size of skb->cb to 56 bytes. This is unacceptable for upstreaming. We need to bring it back down to 48 bytes.
This is interesting. Where can I find skb->cb?
Note: No idea if I can help or not, but I'd love to have a look.
I searched the codebase and found many files referencing combinations of skb and cb. One file needs changing, or many?
@faddat skb->cb is in struct sk_buff. We had to increase it from 48 bytes to 56 bytes, to accomodate for the MPTCP-specific fields in struct tcp_skb_cb
Reducing it back to 48 will probably need some major rework.
@faddat - looking more into it, it can probably easily be done by reordering some fields, as we introduced a hole in the struct tcp_skb_cb. You can check with pahole to see if that works.
@faddat And it's me again :)
Actually, seems like we can just reduce the size down to 48 bytes again in struct sk_buff. If you want, you can submit a patch. Please compile-test with IPv6 and Mobile-IPv6 enabled.
@cpaasch - it's not clear for me why you increased the size of the cb from 44 to 48 bytes (before 4.1) then you increased it to 56 bytes (due to 744d5a3e9fe26). Could you explain a bit?
Before 4.1: The dss option need 24 bytes (u32 dss[6]) and it's inside a double union that's already accommodating 16 bytes (struct inet6_skb_parm h6). The cb size should increase with 8 bytes, shouldn't it?
Thanks!
At least, when I test-compiled it with mobile-IPv6-enabled I don't think I got an error. You can maybe just try out whith allyesmod. If it compiles, then 48 is fine.
May I know why it "is unacceptable for upstreaming"?
Increasing the size of the skb slows down the networking stack because accessing fields of the skb will incur additional cacheline misses. The upstream community is trying to minimize the cache misses as much as possible.