[dpdk-dev] Potential deadlock in KNI RX path

Ferruh Yigit ferruh.yigit at intel.com
Thu Apr 7 16:33:41 CEST 2016


On 4/6/2016 9:22 PM, Jay Rolette wrote:
> Over a year ago, Neil pointed out that calling netif_rx() from
> kni_net_rx_normal() was a bug and could cause lockups. Here's the comment:
> 
> http://dpdk.org/ml/archives/dev/2015-March/015783.html
> 
> Looking at the current code base, it is still calling netif_rx() instead of
> netif_rx_ni() as suggested.
> 
> Did that fall through the cracks or is there disagreement about whether it
> was the right thing to do?
> 
> Thanks,
> Jay
> 
Hi Jay,

Using netif_rx_ni() looks like correct thing to do. I will send a patch
for it.

But we poll on this function, this means doing lots of
preempt_disable/enable(); which may have a negative effect on
performance. Although I did very brief test and did not observed any
performance degradation.

It can be great if somebody out already using KNI do some performance
analysis with the patch.

Another observation, for multiple kthread mode, the ksoftirq threads CPU
consumption removed when switched to netif_rx_ni(), I remember in mail
list somebody complained about ksoftirq CPU usage increase for this case.

Regards,
ferruh



More information about the dev mailing list