All of lore.kernel.org
 help / color / mirror / Atom feed
* Segfault seen in netmap_compat app on Power8
@ 2017-04-06  9:04 Rahul Lakkireddy
  2017-04-06  9:36 ` gowrishankar muthukrishnan
  0 siblings, 1 reply; 3+ messages in thread
From: Rahul Lakkireddy @ 2017-04-06  9:04 UTC (permalink / raw)
  To: dev; +Cc: Kumar Sanghvi, Nirranjan Kirubaharan

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Segfault seen in netmap_compat app on Power8
  2017-04-06  9:04 Segfault seen in netmap_compat app on Power8 Rahul Lakkireddy
@ 2017-04-06  9:36 ` gowrishankar muthukrishnan
  2017-04-12  6:51   ` Rahul Lakkireddy
  0 siblings, 1 reply; 3+ messages in thread
From: gowrishankar muthukrishnan @ 2017-04-06  9:36 UTC (permalink / raw)
  To: Rahul Lakkireddy, dev; +Cc: Kumar Sanghvi, Nirranjan Kirubaharan

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
On Thursday 06 April 2017 02:34 PM, Rahul Lakkireddy wrote:
> 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
>
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Segfault seen in netmap_compat app on Power8
  2017-04-06  9:36 ` gowrishankar muthukrishnan
@ 2017-04-12  6:51   ` Rahul Lakkireddy
  0 siblings, 0 replies; 3+ messages in thread
From: Rahul Lakkireddy @ 2017-04-12  6:51 UTC (permalink / raw)
  To: gowrishankar muthukrishnan; +Cc: dev, Kumar A S, Nirranjan Kirubaharan

On Thursday, April 04/06/17, 2017 at 15:06:03 +0530, gowrishankar muthukrishnan wrote:
>    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

>    Regards,
>    Gowrishankar
>    On Thursday 06 April 2017 02:34 PM, Rahul Lakkireddy wrote:
>    > 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
>    >
>    >

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-04-12  6:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-06  9:04 Segfault seen in netmap_compat app on Power8 Rahul Lakkireddy
2017-04-06  9:36 ` gowrishankar muthukrishnan
2017-04-12  6:51   ` Rahul Lakkireddy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.