kohler / click

The Click modular router: fast modular packet processing and analysis
Other
740 stars 321 forks source link

dmesg flood with fail 'cur < head || cur > kring->nr_hwtail' while running click with netmap #388

Closed mwaldiya closed 6 years ago

mwaldiya commented 6 years ago

Hi All,

I am running userlevel click with netmap(with igb patched driver).
I am able to get the packets but in dmesg i am continuously getting the following messages:

[15306.056809] 595.463893 [1662] nm_rxsync_prologue eth7 RX0: fail 'cur < head || cur > kring->nr_hwtail' h 0 c 255 t 0 rh 0 rc 255 rt 0 hc 254 ht 0 [15306.121517] 595.528551 [1655] nm_rxsync_prologue eth7 RX0: fail 'cur < head || cur > kring->nr_hwtail' h 71 c 70 t 71 rh 71 rc 70 rt 71 hc 68 ht 71 [15306.121601] 595.528637 [1698] netmap_ring_reinit called for eth7 RX0 [15306.129491] 595.536519 [1655] nm_rxsync_prologue eth7 RX0: fail 'cur < head || cur > kring->nr_hwtail' h 217 c 216 t 217 rh 217 rc 216 rt 217 hc 215 ht 217 [15306.129597] 595.536627 [1698] netmap_ring_reinit called for eth7 RX0 [15306.131698] 595.538724 [1655] nm_rxsync_prologue eth7 RX0: fail 'cur < head || cur > kring->nr_hwtail' h 38 c 37 t 38 rh 38 rc 37 rt 38 hc 35 ht 38 [15306.131790] 595.538818 [1698] netmap_ring_reinit called for eth7 RX0 [15306.183361] 595.590346 [1655] nm_rxsync_prologue eth7 RX0: fail 'cur < head || cur > kring->nr_hwtail' h 249 c 248 t 249 rh 249 rc 248 rt 249 hc 247 ht 249 [15306.183467] 595.590455 [1698] netmap_ring_reinit called for eth7 RX0 [15306.188469] 595.595451 [1655] nm_rxsync_prologue eth7 RX0: fail 'cur < head || cur > kring->nr_hwtail' h 243 c 242 t 243 rh 243 rc 242 rt 243 hc 241 ht 243 [15306.188576] 595.595559 [1698] netmap_ring_reinit called for eth7 RX0 [15306.190770] 595.597752 [1698] netmap_ring_reinit called for eth7 RX0 [15306.276476] 595.683390 [1698] netmap_ring_reinit called for eth7 RX0 [15306.291895] 595.698798 [1698] netmap_ring_reinit called for eth7 RX0 [15306.380849] 595.787681 [1698] netmap_ring_reinit called for eth7 RX0 [15306.544454] 595.951158 [1698] netmap_ring_reinit called for eth7 RX0

Is this normal or am i doing something wrong while running the netmap with click.

following is my click script element that i am using for from device and to device using netmap:

from_eth :: FromDevice(netmap:eth6*, BURST 16,SNIFFER false, METHOD NETMAP); intf1 ::ToDevice(netmap:eth7, BURST 16, METHOD NETMAP);

Thanks

tbarbette commented 6 years ago

Hi, It is normal that Netmap is verbose. However, the current implementation is not efficient at all and was tested only with an old version of Netmap. There is a pending pull request (#225 ) that makes it a little better (zero copy support at least), or you can use FastClick's one. DPDK support is much more up-to-date, if you're not particularly stuck with Netmap.

Tom

mwaldiya commented 6 years ago

Thanks tom for clarifying on this. As i have got an "rcu_sched self-detected stall on CPU" while running FromDevice in 2 simultaneous threads using netmap devices.

I am currently not looking for the DPDK option.

tbarbette commented 6 years ago

Ouch, that basically means Netmap blocked one CPU core... That happens when you misbehave with the Netmap API. Can you try the pull-request version?

mwaldiya commented 6 years ago

Will run with the patch and share the result.

Thanks

mwaldiya commented 6 years ago

Hi, The patch work well for me, from last 3 days click with the patch running fine, and it also suppresses the above mentioned logs.

Thanks @tbarbette .