Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755247Ab3EURDU (ORCPT ); Tue, 21 May 2013 13:03:20 -0400 Received: from git.silcnet.org ([81.89.56.81]:52069 "EHLO git.silcnet.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752898Ab3EURDS (ORCPT ); Tue, 21 May 2013 13:03:18 -0400 Date: Tue, 21 May 2013 19:02:19 +0200 (CEST) From: Pekka Riikonen X-X-Sender: priikone@git.silcnet.org To: Eric Dumazet cc: Eliezer Tamir , Dave Miller , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Jesse Brandeburg , Don Skidmore , e1000-devel@lists.sourceforge.net, Willem de Bruijn , Andi Kleen , HPA , Eliezer Tamir Subject: Re: [PATCH v3 net-next 1/4] net: implement support for low latency socket polling In-Reply-To: <1369142926.3301.213.camel@edumazet-glaptop> Message-ID: References: <20130520101552.14133.45953.stgit@ladj378.jer.intel.com> <20130520101601.14133.874.stgit@ladj378.jer.intel.com> <1369063764.3301.182.camel@edumazet-glaptop> <519B2237.20204@linux.intel.com> <1369142926.3301.213.camel@edumazet-glaptop> User-Agent: Alpine 2.00 (GSO 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1113 Lines: 30 On Tue, 21 May 2013, Eric Dumazet wrote: : > > Alternatively, use a napi_id instead of a pointer. : > : > I'm not sure I understand what you propose. : : Oh well. : : To get a pointer to a struct net_device, we can use ifindex, and do a : rcu lookup into a hash table to get the net_device. We do not need : {pointer,ifindex} but {ifindex} is enough : : My suggestion is to not have skb->skb_ref but skb->napi_index : Its safe : to copy its value from skb->napi_index to sk->napi_index without : refcounting. : : All NAPI need to get a unique napi_index, and be inserted in a hash : table for immediate/fast lookup. : Maybe even that's not needed. Couldn't skb->queue_mapping give the correct NAPI instance in multiqueue nics? The NAPI instance could be made easily available from skb->dev. In any case an index is much better than a new pointer. Pekka -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/