Re: [PATCH v3 net-next 1/4] net: implement support for low latencysocket polling

From: Pekka Riikonen
Date: Tue May 21 2013 - 13:03:25 EST

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.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at