From mboxrd@z Thu Jan 1 00:00:00 1970 From: Brian Haley Subject: Re: [PATCH net-next-2.6] net: optimize INET input path further Date: Wed, 01 Dec 2010 12:37:55 -0500 Message-ID: <4CF687F3.7030107@hp.com> References: <1291179847.2856.452.camel@edumazet-laptop> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: David Miller , netdev To: Eric Dumazet Return-path: Received: from g6t0187.atlanta.hp.com ([15.193.32.64]:14958 "EHLO g6t0187.atlanta.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751327Ab0LARs4 (ORCPT ); Wed, 1 Dec 2010 12:48:56 -0500 In-Reply-To: <1291179847.2856.452.camel@edumazet-laptop> Sender: netdev-owner@vger.kernel.org List-ID: On 12/01/2010 12:04 AM, Eric Dumazet wrote: > struct sock_common { > - /* > - * first fields are not copied in sock_copy() > + /* skc_daddr and skc_rcv_saddr must be grouped : > + * cf INET_MATCH() and INET_TW_MATCH() > */ > - union { > - struct hlist_node skc_node; > - struct hlist_nulls_node skc_nulls_node; > - }; > - atomic_t skc_refcnt; > - int skc_tx_queue_mapping; > + __be32 skc_daddr; > + __be32 skc_rcv_saddr; > > union { > unsigned int skc_hash; Putting IPv4 addresses in sock_common doesn't make it so common anymore :) Is it possible to make this a union so other address families like IPv6 can benefit from this as well, or will that blow the whole cache line effect you were trying to achieve? -Brian