Skip to contentSkip to conversation

Segfault seen in netmap_compat app on Power8

DISCUSSION Rahul Lakkireddy 2 participants 3 messages Apr 6, 2017 – Apr 12, 2017

lore
Share & tools
lore
#0 lore raw

Hi,

For netmap_compat bridge application on Power8, in netmap_regif function, the assignment to nmif->ring_ofs[i] is not getting reflected immediately.

As a result, the subsequent call to netmap_ring_setup ends up writing data at wrong offset. This causes segfault in the app.

If we print the nmif->ring_ofs[i] after assignment, then, we see the correct offset and application starts fine.

So, probably, some kind of barrier or mechanism to flush write is required on Power8?

BTW, this was tried with ToT dpdk git tree on RHEL 7.3 having below gcc version:

gcc version 4.8.5 20150623 (Red Hat 4.8.5-11) (GCC)

Thanks,
Rahul

#1 lore raw

With gcc 6.3.0, I find this app functioning w/o crash.

Did disabling gcc optimization help ? (set EXTRA_CFLAGS='-O0' before compile).

Regards,
Gowrishankar

Quoted 24 lines · Rahul Lakkireddy

Hi,

For netmap_compat bridge application on Power8, in netmap_regif function, the assignment to nmif->ring_ofs[i] is not getting reflected immediately.

As a result, the subsequent call to netmap_ring_setup ends up writing data at wrong offset. This causes segfault in the app.

If we print the nmif->ring_ofs[i] after assignment, then, we see the correct offset and application starts fine.

So, probably, some kind of barrier or mechanism to flush write is required on Power8?

BTW, this was tried with ToT dpdk git tree on RHEL 7.3 having below gcc version:

gcc version 4.8.5 20150623 (Red Hat 4.8.5-11) (GCC)

Thanks,
Rahul

#2 lore raw
Quoted 5 lines · gowrishankar muthukrishnan

With gcc 6.3.0, I find this app functioning w/o crash.

Did disabling gcc optimization help ? (set EXTRA_CFLAGS='-O0' before compile).

Yes, with optimization disabled, the app is not hitting the segfault.

Thanks,
Rahul

Quoted 27 lines

Regards,
Gowrishankar

Quoted 24 lines · Rahul Lakkireddy

Hi,

For netmap_compat bridge application on Power8, in netmap_regif function, the assignment to nmif->ring_ofs[i] is not getting reflected immediately.

As a result, the subsequent call to netmap_ring_setup ends up writing data at wrong offset. This causes segfault in the app.

If we print the nmif->ring_ofs[i] after assignment, then, we see the correct offset and application starts fine.

So, probably, some kind of barrier or mechanism to flush write is required on Power8?

BTW, this was tried with ToT dpdk git tree on RHEL 7.3 having below gcc version:

gcc version 4.8.5 20150623 (Red Hat 4.8.5-11) (GCC)

Thanks,
Rahul