Re: [dpdk-users] segmention fault while accessing mbuf

2020-06-06 Thread Cliff Burdick
I can't tell from your code, but you assigned nb_rx to the number of
packets received, but then used vec_size, which might be larger. Does this
happen if you use nb_rx in your loops?

On Sat, Jun 6, 2020 at 5:59 AM Alex Kiselev  wrote:

>
>
> > 1 июня 2020 г., в 19:17, Stephen Hemminger 
> написал(а):
> >
> > On Mon, 01 Jun 2020 15:24:25 +0200
> > Alex Kiselev  wrote:
> >
> >> Hello,
> >>
> >> I've got a segmentation fault error in my data plane path.
> >> I am pretty sure the code where the segfault happened is ok,
> >> so my guess is that I somehow received a corrupted mbuf.
> >> How could I troubleshoot this? Is there any way?
> >> Is it possible that other threads of the application
> >> corrupted that mbuf?
> >>
> >> I would really appriciate any advice.
> >> Thanks.
> >>
> >> DPDK 18.11.3
> >> NIC: 82599ES
> >>
> >> Code:
> >>
> >> nb_rx = rte_eth_rx_burst(port_id, queue_id, pkts_burst,
> >>  MAX_PKT_BURST);
> >>
> >> ...
> >>
> >> for (i=0; i < vec_size; i++) {
> >>rte_prefetch0(rte_pktmbuf_mtod(m_v[i], void *));
> >>
> >> for (i=0; i < vec_size; i++) {
> >>m = m_v[i];
> >>eth_hdr = rte_pktmbuf_mtod(m, struct ether_hdr *);
> >>eth_type = rte_be_to_cpu_16(eth_hdr->ether_type);   <---
> >> Segmentation fault
> >>...
> >>
> >> #0  rte_arch_bswap16 (_x= >> at address 0x4d853010>)
> >
> > Build with as many of the debug options turned on in the DPDK config,
> > and build with EXTRA_CFLAGS of -g.
>
> Could using an incorrect (a very big one) value of mbuf pkt_len and
> data_len while transmitting cause mbuf corruption and following
> segmentation fault on rx?
>


Re: [dpdk-users] Trouble Building DPDK with MLNX OFED(4.4) Works with 5.0

2020-06-06 Thread Thomas Monjalon
06/06/2020 22:54, Vineeth Thapeta:
> Hi Thomas,
> 
> We want to use TAS which is built on top of DPDK,

Do you have a link to TAS? I don't know it.

> I installed Mellanox OFED 5.0 and TAS and everything was good,
> until we had to install Moogen.

So your only issue is to install Moongen,
given you already have DPDK working.

> Please find my answer to your questions.
> Thanks for the prompt reply. I appreciate it.
> 
> We are using Ubuntu 18.04. I indeed had success in installing dpdk 19.11
> LTS with MLNX_OFED 5.0. To answer your questions about Moongen either
> requires 1) Complete OFED drivers or 2) libibverbs, libmlx5,
> mlnx-ofed-kernel packages,

No, Moongen requires only DPDK.
If I am wrong, please could you show where you found such info?

> These packages are installed with MLNX_ofed
> drivers if I am not mistaken.

Installing the Ubuntu package rdma-core should be enough.

> So I moved on to build Moongen, When building
> moongen with OFED 5.0 I get the error fatal error: infiniband/mlx5_hw.h: No
> such file or directory #include . I thought this
> might be related to the libmlx5 and I installed libmlx5.deb from the
> packages in the DEBS/ folder. testpmd stops working with this prompt
> ./testpmd: /usr/lib/libmlx5.so.1: no version information available
> (required by ./testpmd). So I tried rolling back the OFED version to 4.4,
> which has caused problems with building dpdk with version 19.11 LTS,18.11
> LTS and 17.11 LTS as I shared in the previous mail.

You are mixing different versions of drivers.
Choose either rdma-core packaged in Ubuntu,
or OFED from mellanox.com.


> I hope this answers your questions.
> 
> Vineeth
> 
> On Sat, Jun 6, 2020 at 3:13 PM Thomas Monjalon  wrote:
> 
> > Hi,
> >
> > 06/06/2020 21:43, Vineeth Thapeta:
> > > Hi guys,
> > >
> > > I had to roll back OFED version from 5.0 to 4.4 because another library
> > > Moongen has trouble building with OFED 5.0.
> >
> > How Moongen is related to OFED?
> > Why using OFED and not upstream packaging of rdma-core?
> > Which distribution are you using?
> >
> > > I rolled back the version and
> > > Moongen builds and when I try to build dpdk 18.11, 19.11,17.11. All the
> > > three builds fail with the following error (
> > https://pastebin.com/fiw7iz1Z
> > > Link of build error). Does anyone know why this happens.
> >
> > Any DPDK version should build with any version of OFED or rdma-core.
> > Note: DPDK 17.11 is not supported anymore.
> >
> > > I am exhausted
> > > with roll backs,if anyone can help me with this I would be grateful. , By
> > > the looks of it, it might mean it had problems with the OFED driver? I
> > > installed the MLNX ofed driver without any flags, i.e ./mlnxofedinstall.
> > If
> > > you want any further information,please let me know. Any suggestion would
> > > be appreciated, even if you don't think it might work. I have been trying
> > > to install these two for the past week, without much success. Are the
> > above
> > > mentioned DPDK version not compatible with said driver(4.4)?
> >
> > Let's focus on your goal and see what is the real issue you hit.
> > Which version of DPDK do you need?
> > Why not start with the latest LTS, which is 19.11?





Re: [dpdk-users] Trouble Building DPDK with MLNX OFED(4.4) Works with 5.0

2020-06-06 Thread Vineeth Thapeta
Hi Thomas,

We want to use TAS which is built on top of DPDK, I installed Mellanox OFED
5.0 and TAS and everything was good, until we had to install Moogen. Please
find my answer to your questions. Thanks for the prompt reply. I appreciate
it.

We are using Ubuntu 18.04. I indeed had success in installing dpdk 19.11
LTS with MLNX_OFED 5.0. To answer your questions about Moongen either
requires 1) Complete OFED drivers or 2) libibverbs, libmlx5,
mlnx-ofed-kernel packages, These packages are installed with MLNX_ofed
drivers if I am not mistaken. So I moved on to build Moongen, When building
moongen with OFED 5.0 I get the error fatal error: infiniband/mlx5_hw.h: No
such file or directory #include . I thought this
might be related to the libmlx5 and I installed libmlx5.deb from the
packages in the DEBS/ folder. testpmd stops working with this prompt
./testpmd: /usr/lib/libmlx5.so.1: no version information available
(required by ./testpmd). So I tried rolling back the OFED version to 4.4,
which has caused problems with building dpdk with version 19.11 LTS,18.11
LTS and 17.11 LTS as I shared in the previous mail.

I hope this answers your questions.

Vineeth

On Sat, Jun 6, 2020 at 3:13 PM Thomas Monjalon  wrote:

> Hi,
>
> 06/06/2020 21:43, Vineeth Thapeta:
> > Hi guys,
> >
> > I had to roll back OFED version from 5.0 to 4.4 because another library
> > Moongen has trouble building with OFED 5.0.
>
> How Moongen is related to OFED?
> Why using OFED and not upstream packaging of rdma-core?
> Which distribution are you using?
>
> > I rolled back the version and
> > Moongen builds and when I try to build dpdk 18.11, 19.11,17.11. All the
> > three builds fail with the following error (
> https://pastebin.com/fiw7iz1Z
> > Link of build error). Does anyone know why this happens.
>
> Any DPDK version should build with any version of OFED or rdma-core.
> Note: DPDK 17.11 is not supported anymore.
>
> > I am exhausted
> > with roll backs,if anyone can help me with this I would be grateful. , By
> > the looks of it, it might mean it had problems with the OFED driver? I
> > installed the MLNX ofed driver without any flags, i.e ./mlnxofedinstall.
> If
> > you want any further information,please let me know. Any suggestion would
> > be appreciated, even if you don't think it might work. I have been trying
> > to install these two for the past week, without much success. Are the
> above
> > mentioned DPDK version not compatible with said driver(4.4)?
>
> Let's focus on your goal and see what is the real issue you hit.
> Which version of DPDK do you need?
> Why not start with the latest LTS, which is 19.11?
>
>
>

-- 
Kind Regards,
Vineeth Sagar
CS Graduate Student


Re: [dpdk-users] Trouble Building DPDK with MLNX OFED(4.4) Works with 5.0

2020-06-06 Thread Thomas Monjalon
Hi,

06/06/2020 21:43, Vineeth Thapeta:
> Hi guys,
> 
> I had to roll back OFED version from 5.0 to 4.4 because another library
> Moongen has trouble building with OFED 5.0.

How Moongen is related to OFED?
Why using OFED and not upstream packaging of rdma-core?
Which distribution are you using?

> I rolled back the version and
> Moongen builds and when I try to build dpdk 18.11, 19.11,17.11. All the
> three builds fail with the following error (https://pastebin.com/fiw7iz1Z
> Link of build error). Does anyone know why this happens.

Any DPDK version should build with any version of OFED or rdma-core.
Note: DPDK 17.11 is not supported anymore.

> I am exhausted
> with roll backs,if anyone can help me with this I would be grateful. , By
> the looks of it, it might mean it had problems with the OFED driver? I
> installed the MLNX ofed driver without any flags, i.e ./mlnxofedinstall. If
> you want any further information,please let me know. Any suggestion would
> be appreciated, even if you don't think it might work. I have been trying
> to install these two for the past week, without much success. Are the above
> mentioned DPDK version not compatible with said driver(4.4)?

Let's focus on your goal and see what is the real issue you hit.
Which version of DPDK do you need?
Why not start with the latest LTS, which is 19.11?




[dpdk-users] Trouble Building DPDK with MLNX OFED(4.4) Works with 5.0

2020-06-06 Thread Vineeth Thapeta
Hi guys,

I had to roll back OFED version from 5.0 to 4.4 because another library
Moongen has trouble building with OFED 5.0. I rolled back the version and
Moongen builds and when I try to build dpdk 18.11, 19.11,17.11. All the
three builds fail with the following error (https://pastebin.com/fiw7iz1Z
Link of build error). Does anyone know why this happens. I am exhausted
with roll backs,if anyone can help me with this I would be grateful. , By
the looks of it, it might mean it had problems with the OFED driver? I
installed the MLNX ofed driver without any flags, i.e ./mlnxofedinstall. If
you want any further information,please let me know. Any suggestion would
be appreciated, even if you don't think it might work. I have been trying
to install these two for the past week, without much success. Are the above
mentioned DPDK version not compatible with said driver(4.4)?

Vineeth


Re: [dpdk-users] segmention fault while accessing mbuf

2020-06-06 Thread Alex Kiselev



> 1 июня 2020 г., в 19:17, Stephen Hemminger  
> написал(а):
> 
> On Mon, 01 Jun 2020 15:24:25 +0200
> Alex Kiselev  wrote:
> 
>> Hello,
>> 
>> I've got a segmentation fault error in my data plane path.
>> I am pretty sure the code where the segfault happened is ok,
>> so my guess is that I somehow received a corrupted mbuf.
>> How could I troubleshoot this? Is there any way?
>> Is it possible that other threads of the application
>> corrupted that mbuf?
>> 
>> I would really appriciate any advice.
>> Thanks.
>> 
>> DPDK 18.11.3
>> NIC: 82599ES
>> 
>> Code:
>> 
>> nb_rx = rte_eth_rx_burst(port_id, queue_id, pkts_burst,
>>  MAX_PKT_BURST);
>> 
>> ...
>> 
>> for (i=0; i < vec_size; i++) {
>>rte_prefetch0(rte_pktmbuf_mtod(m_v[i], void *));
>> 
>> for (i=0; i < vec_size; i++) {
>>m = m_v[i];
>>eth_hdr = rte_pktmbuf_mtod(m, struct ether_hdr *);
>>eth_type = rte_be_to_cpu_16(eth_hdr->ether_type);   <--- 
>> Segmentation fault
>>...
>> 
>> #0  rte_arch_bswap16 (_x=> at address 0x4d853010>)
> 
> Build with as many of the debug options turned on in the DPDK config,
> and build with EXTRA_CFLAGS of -g.

Could using an incorrect (a very big one) value of mbuf pkt_len and data_len 
while transmitting cause mbuf corruption and following segmentation fault on rx?