[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1369146938.3301.225.camel@edumazet-glaptop>
Date: Tue, 21 May 2013 07:35:38 -0700
From: Eric Dumazet <eric.dumazet@...il.com>
To: Eliezer Tamir <eliezer.tamir@...ux.intel.com>
Cc: Dave Miller <davem@...emloft.net>, linux-kernel@...r.kernel.org,
netdev@...r.kernel.org,
Jesse Brandeburg <jesse.brandeburg@...el.com>,
Don Skidmore <donald.c.skidmore@...el.com>,
e1000-devel@...ts.sourceforge.net,
Willem de Bruijn <willemb@...gle.com>,
Andi Kleen <andi@...stfloor.org>, HPA <hpa@...or.com>,
Or Gerlitz <or.gerlitz@...il.com>,
Eilon Greenstien <eilong@...adcom.com>,
Eliezer Tamir <eliezer@...ir.org.il>
Subject: Re: [PATCH v4 net-next 1/4] net: implement support for low latency
socket polling
On Tue, 2013-05-21 at 17:26 +0300, Eliezer Tamir wrote:
> +/* should be called when destroying a napi struct */
> +static inline void inc_ll_gen_id(void)
> +{
> + ll_global_gen_id++;
> +}
> +
> +static inline void skb_mark_ll(struct sk_buff *skb, struct napi_struct *napi)
> +{
> + skb->dev_ref = napi;
> + skb->ll_gen_id = SKB_LL_GEN(ll_global_gen_id);
> +}
> +
> +static inline void sk_mark_ll(struct sock *sk, struct sk_buff *skb)
> +{
> + if (skb->dev_ref && skb->ll_gen_id == SKB_LL_GEN(ll_global_gen_id)) {
> + sk->dev_ref = skb->dev_ref;
> + sk->ll_gen_id = ll_global_gen_id;
> + } else
> + sk->dev_ref = NULL; /* clear expired ref */
> +}
> +
Thats really hacky.
Please dont rush sending a new patch set every day.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists