Subject: Re: netif_rx packet dumping

From: Ben Greear <[email-masked]>
Date: Tue, 08 Mar 2005 10:27:17 -0800

David S. Miller wrote:
> On Tue, 08 Mar 2005 18:00:49 +0100
> Andi Kleen <[email-masked]> wrote:
> 
> 
>>Baruch Even <[email-masked]> writes:
>>
>>>I can squeeze the tcp_skb_cb to one pointer at the expense of extra
>>>work to remove a packet from the list (the other pointer is the prev
>>>pointer).
>>
>>You could also use a xor list in theory. But I'm not sure it's worth it.
>>Increasing cb by 4 bytes shouldn't be a very big issue.
> 
> 
> Going from "40" to "44" takes 64-bit platforms onto another cache line
> for struct sk_buff, as I stated in another email.

Seems like we might could squish the sk_buff a bit:

Do we really need 32-bits for the mac-len:

	unsigned int		len,
				data_len,
				mac_len,
				csum;

Some of these flags could be collapsed into a single field and we
could do bit-shift operations for the single flags we care about.
This would also make it easier to add new flags as desired w/out
growing the structure.

	unsigned char		local_df,
				cloned,
				pkt_type,
				ip_summed;

The priority could probably be 16 bits as well, do we really need more
than 65k different priorities:

	__u32			priority;

Of course...this might be things for 2.7 since lots of modules will probably
be accessing these fields.  Maybe to get started we could add macros to grab
the flags and such so that when we finally do collapse things into a single
flags field the external code doesn't have to know or care?

Thanks,
Ben

-- 
Ben Greear <[email-masked]>
Candela Technologies Inc  http://www.candelatech.com