On Tue, Apr 18, 2017 at 5:47 PM, Eric Dumazet <eric.duma...@gmail.com> wrote: > > For the last time, do not top post on netdev.
Sorry about that. > > On Tue, 2017-04-18 at 17:15 -0700, Code Soldier1 wrote: >> I am not suggesting that we do not do cache alignment. That is >> required for performance. I have gone through this exercise because I >> need to add a field to sk_buff and I want to do that without causing >> any adverse effects. >> >> Now that we have discovered that there are 40 bytes that can be used >> without any adverse effect, may I increase skb->cb by 8 bytes ? >> > > skb->cb is already 48 bytes, not 40. That is not what I am referring to above. What I am pointing out is that since skb is not a multiple of cache line size it accesses the whole cache line but uses only part of the cache line, leaving 40 bytes unused. I would like to use 8 out of those 40 bytes to extend the size of skb->cb. > >> If not then may I increase skb_shared_info -- However that would have >> to be by 64bytes. > > > You will have a very hard time to convince us that this 8 byte field is > needed on all skbs, regardless of current sk_buff size. > Protocols use as much space as needed and leave the rest for future use. Since there is no overhead, I don't understand the concern. Can you please elaborate. -- CS1