From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v2] kni: use netif_rx instead of netif_receive_skb in which ocurr deallock on userpace contex Date: Thu, 17 Jul 2014 14:02:16 +0200 Message-ID: <2139993.JzhFVyBpua@xps13> References: <1405093044-3264-1-git-send-email-blue119@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit To: dev-VfR2kkLFssw@public.gmane.org Return-path: In-Reply-To: <1405093044-3264-1-git-send-email-blue119-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" Hi, 2014-07-11 23:37, Yao-Po Wang: > Per netif_receive_skb function description, it may only be called from > interrupt contex, but KNI is run on kthread that like as user-space > contex. It may occur deallock, if netif_receive_skb called from kthread, > so it should be repleaced by netif_rx or adding local_bh_disable/enable > around netif_receive_skb. > > Signed-off-by: Yao-Po Wang > --- a/lib/librte_eal/linuxapp/kni/kni_net.c > +++ b/lib/librte_eal/linuxapp/kni/kni_net.c > /* Call netif interface */ > - netif_receive_skb(skb); > + netif_rx(skb); Is there someone confident to approve this change? -- Thomas