DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] Crash related to virtio NICs in DPDK 2.0.0 on Freebsd 10.1 VM
@ 2015-04-07 15:41 Raz Amir
  2015-04-08 15:53 ` Raz Amir
  0 siblings, 1 reply; 6+ messages in thread
From: Raz Amir @ 2015-04-07 15:41 UTC (permalink / raw)
  To: dev

I am moving from dpdk 1.7.1 to 2.0.0 and I am experiencing a crash in any
dpdk application, when rte_eal_init initializes the virtio NICs.

I have Ubuntu 14.04.02, running a Freebsd 10.1 VM with 3 virtio NICs over
qemu with kvm.

I run testpmd (for example) inside the Freebsd VM and it crashes (more info
below).

On the same setup, testpmd from dpdk 1.7.1 works without an issue.

Can you tell if you know that a Freebsd VM with virtio NICs is working for
dpdk 2.0.0?

 

Additional information from gdb:

 

user@:/dpdk/dpdk-2.0.0 # gdb testpmd

GNU gdb (GDB) 7.8.1 [GDB v7.8.1 for FreeBSD]

Copyright (C) 2014 Free Software Foundation, Inc.

License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>

This is free software: you are free to change and redistribute it.

There is NO WARRANTY, to the extent permitted by law.  Type "show copying"

and "show warranty" for details.

This GDB was configured as "x86_64-portbld-freebsd10.1".

Type "show configuration" for configuration details.

For bug reporting instructions, please see:

<http://www.gnu.org/software/gdb/bugs/>.

Find the GDB manual and other documentation resources online at:

<http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".

Type "apropos word" to search for commands related to "word"...

Reading symbols from testpmd...done.

 

 

(gdb) r -c 3 -n 2

Starting program: /root/testpmd -c 3 -n 2

EAL: Sysctl reports 2 cpus

EAL: Detected lcore 0

EAL: Detected lcore 1

EAL: Support maximum 128 logical core(s) by configuration.

EAL: Detected 2 lcore(s)

EAL: Contigmem driver has 2 buffers, each of size 64MB

EAL: Setting up physically contiguous memory...

EAL: Mapped memory segment 1 @ 0x802800000: physaddr:0x10000000, len
67108864

EAL: Mapped memory segment 2 @ 0x806800000: physaddr:0x14000000, len
67108864

EAL: TSC is not safe to use in SMP mode

EAL: TSC is not invariant

EAL: TSC frequency is ~2933513 KHz

EAL: PCI scan found 8 devices

EAL: Master lcore 0 is ready (tid=0x802406400;cpuset=[0])

PMD: ENICPMD trace: rte_enic_pmd_init

EAL: lcore 1 is ready (tid=0x802406800;cpuset=[1])

EAL: PCI device 0000:00:03.0 on NUMA socket 0

EAL:   probe driver: 1af4:1000 rte_virtio_pmd

[New Thread 802406400 (LWP 100111)]

 

Program received signal SIGBUS, Bus error.

[Switching to Thread 802406400 (LWP 100111)]

0x0000000000492f2c in outb (port=49170, data=0 '\000') at
/usr/include/machine/cpufunc.h:244

244     /usr/include/machine/cpufunc.h: No such file or directory.

 

 

(gdb) bt

#0  0x0000000000492f2c in outb (port=49170, data=0 '\000')

    at /usr/include/machine/cpufunc.h:244

#1  0x0000000000492f7a in outb_p (data=0 '\000', port=49170)

    at /dpdk/dpdk-2.0.0/lib/librte_pmd_virtio/virtio_pci.h:211

#2  0x000000000049328d in vtpci_set_status (hw=0x80331f380, status=0 '\000')

    at /dpdk/dpdk-2.0.0/lib/librte_pmd_virtio/virtio_pci.c:130

#3  0x00000000004931fe in vtpci_reset (hw=0x80331f380)

    at /dpdk/dpdk-2.0.0/lib/librte_pmd_virtio/virtio_pci.c:108

#4  0x00000000004a175e in eth_virtio_dev_init (eth_dev=0x831b80
<rte_eth_devices>)

    at /dpdk/dpdk-2.0.0/lib/librte_pmd_virtio/virtio_ethdev.c:1150

#5  0x0000000000462c09 in rte_eth_dev_init (pci_drv=0x79d1a0
<rte_virtio_pmd>,

    pci_dev=0x802417560) at
/dpdk/dpdk-2.0.0/lib/librte_ether/rte_ethdev.c:326

#6  0x000000000046f03f in rte_eal_pci_probe_one_driver (dr=0x79d1a0
<rte_virtio_pmd>,

    dev=0x802417560) at
/dpdk/dpdk-2.0.0/lib/librte_eal/bsdapp/eal/eal_pci.c:487

#7  0x0000000000475b06 in pci_probe_all_drivers (dev=0x802417560)

    at /dpdk/dpdk-2.0.0/lib/librte_eal/common/eal_common_pci.c:116

#8  0x0000000000475bb9 in rte_eal_pci_probe ()

    at /dpdk/dpdk-2.0.0/lib/librte_eal/common/eal_common_pci.c:246

#9  0x000000000046cd63 in rte_eal_init (argc=5, argv=0x7fffffffeaf0)

    at /dpdk/dpdk-2.0.0/lib/librte_eal/bsdapp/eal/eal.c:554

#10 0x0000000000404544 in main ()

 

 

(gdb) disassemble inb

Dump of assembler code for function inb:

   0x0000000000492ed6 <+0>:     push   %rbp

   0x0000000000492ed7 <+1>:     mov    %rsp,%rbp

   0x0000000000492eda <+4>:     mov    %edi,-0x14(%rbp)

   0x0000000000492edd <+7>:     mov    -0x14(%rbp),%eax

   0x0000000000492ee0 <+10>:    mov    %eax,%edx

   0x0000000000492ee2 <+12>:    in     (%dx),%al

   0x0000000000492ee3 <+13>:    mov    %al,-0x1(%rbp)

   0x0000000000492ee6 <+16>:    movzbl -0x1(%rbp),%eax

   0x0000000000492eea <+20>:    pop    %rbp

   0x0000000000492eeb <+21>:    retq

End of assembler dump.

 

 

(gdb) p $dx

$1 = -16366

 

 

(gdb) info registers

rax            0x0      0

rbx            0x802800000      34401681408

rcx            0x0      0

rdx            0xc012   49170

rsi            0x0      0

rdi            0xc012   49170

rbp            0x7fffffffe708   0x7fffffffe708

rsp            0x7fffffffe708   0x7fffffffe708

r8             0x80082b63c      34368304700

r9             0x80082b61c      34368304668

r10            0x1      1

r11            0x80331f300      34413343488

r12            0x7fffffffeaf0   140737488349936

r13            0x7fffffffeb20   140737488349984

r14            0x7fffffffeaf0   140737488349936

r15            0x5      5

rip            0x492f2c 0x492f2c <outb+19>

eflags         0x10216  [ PF AF IF RF ]

cs             0x43     67

ss             0x3b     59

ds             <unavailable>

es             <unavailable>

fs             <unavailable>

gs             <unavailable>

(gdb)

 

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

* Re: [dpdk-dev] Crash related to virtio NICs in DPDK 2.0.0 on Freebsd 10.1 VM
  2015-04-07 15:41 [dpdk-dev] Crash related to virtio NICs in DPDK 2.0.0 on Freebsd 10.1 VM Raz Amir
@ 2015-04-08 15:53 ` Raz Amir
  2015-04-13  7:56   ` Raz Amir
  2015-04-13 10:46   ` Thomas Monjalon
  0 siblings, 2 replies; 6+ messages in thread
From: Raz Amir @ 2015-04-08 15:53 UTC (permalink / raw)
  To: dev, 'Thomas Monjalon', david.marchand

I found the source of the problem.

The issues happens also in dpdk 1.8.0, and related to patch
http://dpdk.org/dev/patchwork/patch/239/

Adding Thomas and David to the thread and I will appreciate your input.

 

The patch comes to solve a file descriptor leak in the bsdapp version of
rte_eal_iopl_init after opening the /dev/io device.

Seems like this isn't a file descriptor leak, and it should remain open - as
I wrote below, I am using virtio.

After removing it and testing the crash was resolved.

 

Any objection for removing the close(fd) that was added at dpdk 1.8.0?

Are there scenarios that might be impacted by removing it?

 

From: Raz Amir [mailto:razamir22@gmail.com] 
Sent: 07 April 2015 18:41
To: dev@dpdk.org
Subject: Crash related to virtio NICs in DPDK 2.0.0 on Freebsd 10.1 VM

 

I am moving from dpdk 1.7.1 to 2.0.0 and I am experiencing a crash in any
dpdk application, when rte_eal_init initializes the virtio NICs.

I have Ubuntu 14.04.02, running a Freebsd 10.1 VM with 3 virtio NICs over
qemu with kvm.

I run testpmd (for example) inside the Freebsd VM and it crashes (more info
below).

On the same setup, testpmd from dpdk 1.7.1 works without an issue.

Can you tell if you know that a Freebsd VM with virtio NICs is working for
dpdk 2.0.0?

 

Additional information from gdb:

 

user@:/dpdk/dpdk-2.0.0 <mailto:user@:/dpdk/dpdk-2.0.0>  # gdb testpmd

GNU gdb (GDB) 7.8.1 [GDB v7.8.1 for FreeBSD]

Copyright (C) 2014 Free Software Foundation, Inc.

License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>

This is free software: you are free to change and redistribute it.

There is NO WARRANTY, to the extent permitted by law.  Type "show copying"

and "show warranty" for details.

This GDB was configured as "x86_64-portbld-freebsd10.1".

Type "show configuration" for configuration details.

For bug reporting instructions, please see:

<http://www.gnu.org/software/gdb/bugs/>.

Find the GDB manual and other documentation resources online at:

<http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".

Type "apropos word" to search for commands related to "word"...

Reading symbols from testpmd...done.

 

 

(gdb) r -c 3 -n 2

Starting program: /root/testpmd -c 3 -n 2

EAL: Sysctl reports 2 cpus

EAL: Detected lcore 0

EAL: Detected lcore 1

EAL: Support maximum 128 logical core(s) by configuration.

EAL: Detected 2 lcore(s)

EAL: Contigmem driver has 2 buffers, each of size 64MB

EAL: Setting up physically contiguous memory...

EAL: Mapped memory segment 1 @ 0x802800000: physaddr:0x10000000, len
67108864

EAL: Mapped memory segment 2 @ 0x806800000: physaddr:0x14000000, len
67108864

EAL: TSC is not safe to use in SMP mode

EAL: TSC is not invariant

EAL: TSC frequency is ~2933513 KHz

EAL: PCI scan found 8 devices

EAL: Master lcore 0 is ready (tid=0x802406400;cpuset=[0])

PMD: ENICPMD trace: rte_enic_pmd_init

EAL: lcore 1 is ready (tid=0x802406800;cpuset=[1])

EAL: PCI device 0000:00:03.0 on NUMA socket 0

EAL:   probe driver: 1af4:1000 rte_virtio_pmd

[New Thread 802406400 (LWP 100111)]

 

Program received signal SIGBUS, Bus error.

[Switching to Thread 802406400 (LWP 100111)]

0x0000000000492f2c in outb (port=49170, data=0 '\000') at
/usr/include/machine/cpufunc.h:244

244     /usr/include/machine/cpufunc.h: No such file or directory.

 

 

(gdb) bt

#0  0x0000000000492f2c in outb (port=49170, data=0 '\000')

    at /usr/include/machine/cpufunc.h:244

#1  0x0000000000492f7a in outb_p (data=0 '\000', port=49170)

    at /dpdk/dpdk-2.0.0/lib/librte_pmd_virtio/virtio_pci.h:211

#2  0x000000000049328d in vtpci_set_status (hw=0x80331f380, status=0 '\000')

    at /dpdk/dpdk-2.0.0/lib/librte_pmd_virtio/virtio_pci.c:130

#3  0x00000000004931fe in vtpci_reset (hw=0x80331f380)

    at /dpdk/dpdk-2.0.0/lib/librte_pmd_virtio/virtio_pci.c:108

#4  0x00000000004a175e in eth_virtio_dev_init (eth_dev=0x831b80
<rte_eth_devices>)

    at /dpdk/dpdk-2.0.0/lib/librte_pmd_virtio/virtio_ethdev.c:1150

#5  0x0000000000462c09 in rte_eth_dev_init (pci_drv=0x79d1a0
<rte_virtio_pmd>,

    pci_dev=0x802417560) at
/dpdk/dpdk-2.0.0/lib/librte_ether/rte_ethdev.c:326

#6  0x000000000046f03f in rte_eal_pci_probe_one_driver (dr=0x79d1a0
<rte_virtio_pmd>,

    dev=0x802417560) at
/dpdk/dpdk-2.0.0/lib/librte_eal/bsdapp/eal/eal_pci.c:487

#7  0x0000000000475b06 in pci_probe_all_drivers (dev=0x802417560)

    at /dpdk/dpdk-2.0.0/lib/librte_eal/common/eal_common_pci.c:116

#8  0x0000000000475bb9 in rte_eal_pci_probe ()

    at /dpdk/dpdk-2.0.0/lib/librte_eal/common/eal_common_pci.c:246

#9  0x000000000046cd63 in rte_eal_init (argc=5, argv=0x7fffffffeaf0)

    at /dpdk/dpdk-2.0.0/lib/librte_eal/bsdapp/eal/eal.c:554

#10 0x0000000000404544 in main ()

 

 

(gdb) disassemble inb

Dump of assembler code for function inb:

   0x0000000000492ed6 <+0>:     push   %rbp

   0x0000000000492ed7 <+1>:     mov    %rsp,%rbp

   0x0000000000492eda <+4>:     mov    %edi,-0x14(%rbp)

   0x0000000000492edd <+7>:     mov    -0x14(%rbp),%eax

   0x0000000000492ee0 <+10>:    mov    %eax,%edx

   0x0000000000492ee2 <+12>:    in     (%dx),%al

   0x0000000000492ee3 <+13>:    mov    %al,-0x1(%rbp)

   0x0000000000492ee6 <+16>:    movzbl -0x1(%rbp),%eax

   0x0000000000492eea <+20>:    pop    %rbp

   0x0000000000492eeb <+21>:    retq

End of assembler dump.

 

 

(gdb) p $dx

$1 = -16366

 

 

(gdb) info registers

rax            0x0      0

rbx            0x802800000      34401681408

rcx            0x0      0

rdx            0xc012   49170

rsi            0x0      0

rdi            0xc012   49170

rbp            0x7fffffffe708   0x7fffffffe708

rsp            0x7fffffffe708   0x7fffffffe708

r8             0x80082b63c      34368304700

r9             0x80082b61c      34368304668

r10            0x1      1

r11            0x80331f300      34413343488

r12            0x7fffffffeaf0   140737488349936

r13            0x7fffffffeb20   140737488349984

r14            0x7fffffffeaf0   140737488349936

r15            0x5      5

rip            0x492f2c 0x492f2c <outb+19>

eflags         0x10216  [ PF AF IF RF ]

cs             0x43     67

ss             0x3b     59

ds             <unavailable>

es             <unavailable>

fs             <unavailable>

gs             <unavailable>

(gdb)

 

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

* Re: [dpdk-dev] Crash related to virtio NICs in DPDK 2.0.0 on Freebsd 10.1 VM
  2015-04-08 15:53 ` Raz Amir
@ 2015-04-13  7:56   ` Raz Amir
  2015-04-13 10:46   ` Thomas Monjalon
  1 sibling, 0 replies; 6+ messages in thread
From: Raz Amir @ 2015-04-13  7:56 UTC (permalink / raw)
  To: dev, 'Thomas Monjalon', david.marchand

Any feedback?

 

From: Raz Amir [mailto:razamir22@gmail.com] 
Sent: 08 April 2015 18:53
To: dev@dpdk.org; 'Thomas Monjalon'; david.marchand@6wind.com
Subject: RE: Crash related to virtio NICs in DPDK 2.0.0 on Freebsd 10.1 VM

 

I found the source of the problem.

The issues happens also in dpdk 1.8.0, and related to patch
http://dpdk.org/dev/patchwork/patch/239/

Adding Thomas and David to the thread and I will appreciate your input.

 

The patch comes to solve a file descriptor leak in the bsdapp version of
rte_eal_iopl_init after opening the /dev/io device.

Seems like this isn't a file descriptor leak, and it should remain open - as
I wrote below, I am using virtio.

After removing it and testing the crash was resolved.

 

Any objection for removing the close(fd) that was added at dpdk 1.8.0?

Are there scenarios that might be impacted by removing it?

 

From: Raz Amir [mailto:razamir22@gmail.com] 
Sent: 07 April 2015 18:41
To: dev@dpdk.org <mailto:dev@dpdk.org> 
Subject: Crash related to virtio NICs in DPDK 2.0.0 on Freebsd 10.1 VM

 

I am moving from dpdk 1.7.1 to 2.0.0 and I am experiencing a crash in any
dpdk application, when rte_eal_init initializes the virtio NICs.

I have Ubuntu 14.04.02, running a Freebsd 10.1 VM with 3 virtio NICs over
qemu with kvm.

I run testpmd (for example) inside the Freebsd VM and it crashes (more info
below).

On the same setup, testpmd from dpdk 1.7.1 works without an issue.

Can you tell if you know that a Freebsd VM with virtio NICs is working for
dpdk 2.0.0?

 

Additional information from gdb:

 

user@:/dpdk/dpdk-2.0.0 <mailto:user@:/dpdk/dpdk-2.0.0>  # gdb testpmd

GNU gdb (GDB) 7.8.1 [GDB v7.8.1 for FreeBSD]

Copyright (C) 2014 Free Software Foundation, Inc.

License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>

This is free software: you are free to change and redistribute it.

There is NO WARRANTY, to the extent permitted by law.  Type "show copying"

and "show warranty" for details.

This GDB was configured as "x86_64-portbld-freebsd10.1".

Type "show configuration" for configuration details.

For bug reporting instructions, please see:

<http://www.gnu.org/software/gdb/bugs/>.

Find the GDB manual and other documentation resources online at:

<http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".

Type "apropos word" to search for commands related to "word"...

Reading symbols from testpmd...done.

 

 

(gdb) r -c 3 -n 2

Starting program: /root/testpmd -c 3 -n 2

EAL: Sysctl reports 2 cpus

EAL: Detected lcore 0

EAL: Detected lcore 1

EAL: Support maximum 128 logical core(s) by configuration.

EAL: Detected 2 lcore(s)

EAL: Contigmem driver has 2 buffers, each of size 64MB

EAL: Setting up physically contiguous memory...

EAL: Mapped memory segment 1 @ 0x802800000: physaddr:0x10000000, len
67108864

EAL: Mapped memory segment 2 @ 0x806800000: physaddr:0x14000000, len
67108864

EAL: TSC is not safe to use in SMP mode

EAL: TSC is not invariant

EAL: TSC frequency is ~2933513 KHz

EAL: PCI scan found 8 devices

EAL: Master lcore 0 is ready (tid=0x802406400;cpuset=[0])

PMD: ENICPMD trace: rte_enic_pmd_init

EAL: lcore 1 is ready (tid=0x802406800;cpuset=[1])

EAL: PCI device 0000:00:03.0 on NUMA socket 0

EAL:   probe driver: 1af4:1000 rte_virtio_pmd

[New Thread 802406400 (LWP 100111)]

 

Program received signal SIGBUS, Bus error.

[Switching to Thread 802406400 (LWP 100111)]

0x0000000000492f2c in outb (port=49170, data=0 '\000') at
/usr/include/machine/cpufunc.h:244

244     /usr/include/machine/cpufunc.h: No such file or directory.

 

 

(gdb) bt

#0  0x0000000000492f2c in outb (port=49170, data=0 '\000')

    at /usr/include/machine/cpufunc.h:244

#1  0x0000000000492f7a in outb_p (data=0 '\000', port=49170)

    at /dpdk/dpdk-2.0.0/lib/librte_pmd_virtio/virtio_pci.h:211

#2  0x000000000049328d in vtpci_set_status (hw=0x80331f380, status=0 '\000')

    at /dpdk/dpdk-2.0.0/lib/librte_pmd_virtio/virtio_pci.c:130

#3  0x00000000004931fe in vtpci_reset (hw=0x80331f380)

    at /dpdk/dpdk-2.0.0/lib/librte_pmd_virtio/virtio_pci.c:108

#4  0x00000000004a175e in eth_virtio_dev_init (eth_dev=0x831b80
<rte_eth_devices>)

    at /dpdk/dpdk-2.0.0/lib/librte_pmd_virtio/virtio_ethdev.c:1150

#5  0x0000000000462c09 in rte_eth_dev_init (pci_drv=0x79d1a0
<rte_virtio_pmd>,

    pci_dev=0x802417560) at
/dpdk/dpdk-2.0.0/lib/librte_ether/rte_ethdev.c:326

#6  0x000000000046f03f in rte_eal_pci_probe_one_driver (dr=0x79d1a0
<rte_virtio_pmd>,

    dev=0x802417560) at
/dpdk/dpdk-2.0.0/lib/librte_eal/bsdapp/eal/eal_pci.c:487

#7  0x0000000000475b06 in pci_probe_all_drivers (dev=0x802417560)

    at /dpdk/dpdk-2.0.0/lib/librte_eal/common/eal_common_pci.c:116

#8  0x0000000000475bb9 in rte_eal_pci_probe ()

    at /dpdk/dpdk-2.0.0/lib/librte_eal/common/eal_common_pci.c:246

#9  0x000000000046cd63 in rte_eal_init (argc=5, argv=0x7fffffffeaf0)

    at /dpdk/dpdk-2.0.0/lib/librte_eal/bsdapp/eal/eal.c:554

#10 0x0000000000404544 in main ()

 

 

(gdb) disassemble inb

Dump of assembler code for function inb:

   0x0000000000492ed6 <+0>:     push   %rbp

   0x0000000000492ed7 <+1>:     mov    %rsp,%rbp

   0x0000000000492eda <+4>:     mov    %edi,-0x14(%rbp)

   0x0000000000492edd <+7>:     mov    -0x14(%rbp),%eax

   0x0000000000492ee0 <+10>:    mov    %eax,%edx

   0x0000000000492ee2 <+12>:    in     (%dx),%al

   0x0000000000492ee3 <+13>:    mov    %al,-0x1(%rbp)

   0x0000000000492ee6 <+16>:    movzbl -0x1(%rbp),%eax

   0x0000000000492eea <+20>:    pop    %rbp

   0x0000000000492eeb <+21>:    retq

End of assembler dump.

 

 

(gdb) p $dx

$1 = -16366

 

 

(gdb) info registers

rax            0x0      0

rbx            0x802800000      34401681408

rcx            0x0      0

rdx            0xc012   49170

rsi            0x0      0

rdi            0xc012   49170

rbp            0x7fffffffe708   0x7fffffffe708

rsp            0x7fffffffe708   0x7fffffffe708

r8             0x80082b63c      34368304700

r9             0x80082b61c      34368304668

r10            0x1      1

r11            0x80331f300      34413343488

r12            0x7fffffffeaf0   140737488349936

r13            0x7fffffffeb20   140737488349984

r14            0x7fffffffeaf0   140737488349936

r15            0x5      5

rip            0x492f2c 0x492f2c <outb+19>

eflags         0x10216  [ PF AF IF RF ]

cs             0x43     67

ss             0x3b     59

ds             <unavailable>

es             <unavailable>

fs             <unavailable>

gs             <unavailable>

(gdb)

 

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

* Re: [dpdk-dev] Crash related to virtio NICs in DPDK 2.0.0 on Freebsd 10.1 VM
  2015-04-08 15:53 ` Raz Amir
  2015-04-13  7:56   ` Raz Amir
@ 2015-04-13 10:46   ` Thomas Monjalon
  2015-04-13 11:54     ` Raz Amir
  1 sibling, 1 reply; 6+ messages in thread
From: Thomas Monjalon @ 2015-04-13 10:46 UTC (permalink / raw)
  To: Raz Amir; +Cc: dev

2015-04-08 18:53, Raz Amir:
> The issues happens also in dpdk 1.8.0, and related to patch
> http://dpdk.org/dev/patchwork/patch/239/
> 
> Adding Thomas and David to the thread and I will appreciate your input.
> 
> The patch comes to solve a file descriptor leak in the bsdapp version of
> rte_eal_iopl_init after opening the /dev/io device.
> 
> Seems like this isn't a file descriptor leak, and it should remain open - as
> I wrote below, I am using virtio.

Thanks for the bug report.
It seems there was no validation for FreeBSD with virtio.

> After removing it and testing the crash was resolved.
> 
> Any objection for removing the close(fd) that was added at dpdk 1.8.0?

No, there was a doubt because the man page was not clear.
	http://www.freebsd.org/cgi/man.cgi?query=io&sektion=4

In case you submit a patch, please add this line:
Fixes: 8a312224bcde ("eal/bsd: fix fd leak")

> Are there scenarios that might be impacted by removing it?

I don't think so.

Thanks

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

* Re: [dpdk-dev] Crash related to virtio NICs in DPDK 2.0.0 on Freebsd 10.1 VM
  2015-04-13 10:46   ` Thomas Monjalon
@ 2015-04-13 11:54     ` Raz Amir
  2015-04-14  2:25       ` Ouyang, Changchun
  0 siblings, 1 reply; 6+ messages in thread
From: Raz Amir @ 2015-04-13 11:54 UTC (permalink / raw)
  To: 'Thomas Monjalon'; +Cc: dev

Thanks. I will submit a patch

-----Original Message-----
From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] 
Sent: 13 April 2015 13:46
To: Raz Amir
Cc: dev@dpdk.org; david.marchand@6wind.com
Subject: Re: Crash related to virtio NICs in DPDK 2.0.0 on Freebsd 10.1 VM

2015-04-08 18:53, Raz Amir:
> The issues happens also in dpdk 1.8.0, and related to patch 
> http://dpdk.org/dev/patchwork/patch/239/
> 
> Adding Thomas and David to the thread and I will appreciate your input.
> 
> The patch comes to solve a file descriptor leak in the bsdapp version 
> of rte_eal_iopl_init after opening the /dev/io device.
> 
> Seems like this isn't a file descriptor leak, and it should remain 
> open - as I wrote below, I am using virtio.

Thanks for the bug report.
It seems there was no validation for FreeBSD with virtio.

> After removing it and testing the crash was resolved.
> 
> Any objection for removing the close(fd) that was added at dpdk 1.8.0?

No, there was a doubt because the man page was not clear.
	http://www.freebsd.org/cgi/man.cgi?query=io&sektion=4

In case you submit a patch, please add this line:
Fixes: 8a312224bcde ("eal/bsd: fix fd leak")

> Are there scenarios that might be impacted by removing it?

I don't think so.

Thanks

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

* Re: [dpdk-dev] Crash related to virtio NICs in DPDK 2.0.0 on Freebsd 10.1 VM
  2015-04-13 11:54     ` Raz Amir
@ 2015-04-14  2:25       ` Ouyang, Changchun
  0 siblings, 0 replies; 6+ messages in thread
From: Ouyang, Changchun @ 2015-04-14  2:25 UTC (permalink / raw)
  To: Raz Amir, 'Thomas Monjalon'; +Cc: dev

Hi Raz,

Thanks for identifying this issue.
A comments below.

> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Raz Amir
> Sent: Monday, April 13, 2015 7:54 PM
> To: 'Thomas Monjalon'
> Cc: dev@dpdk.org
> Subject: Re: [dpdk-dev] Crash related to virtio NICs in DPDK 2.0.0 on Freebsd
> 10.1 VM
> 
> Thanks. I will submit a patch

When you submit another patch,
Would you pls think about this solution?
Declare a static var to keep the fd which is opened for freebsd 
Then define a deinit function for virtio device,
Inside the deinit function, close the fd which was opened in init stage.
Done.

thanks 
Changchun

> 
> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]
> Sent: 13 April 2015 13:46
> To: Raz Amir
> Cc: dev@dpdk.org; david.marchand@6wind.com
> Subject: Re: Crash related to virtio NICs in DPDK 2.0.0 on Freebsd 10.1 VM
> 
> 2015-04-08 18:53, Raz Amir:
> > The issues happens also in dpdk 1.8.0, and related to patch
> > http://dpdk.org/dev/patchwork/patch/239/
> >
> > Adding Thomas and David to the thread and I will appreciate your input.
> >
> > The patch comes to solve a file descriptor leak in the bsdapp version
> > of rte_eal_iopl_init after opening the /dev/io device.
> >
> > Seems like this isn't a file descriptor leak, and it should remain
> > open - as I wrote below, I am using virtio.
> 
> Thanks for the bug report.
> It seems there was no validation for FreeBSD with virtio.
> 
> > After removing it and testing the crash was resolved.
> >
> > Any objection for removing the close(fd) that was added at dpdk 1.8.0?
> 
> No, there was a doubt because the man page was not clear.
> 	http://www.freebsd.org/cgi/man.cgi?query=io&sektion=4
> 
> In case you submit a patch, please add this line:
> Fixes: 8a312224bcde ("eal/bsd: fix fd leak")
> 
> > Are there scenarios that might be impacted by removing it?
> 
> I don't think so.
> 
> Thanks

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

end of thread, other threads:[~2015-04-14  2:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-07 15:41 [dpdk-dev] Crash related to virtio NICs in DPDK 2.0.0 on Freebsd 10.1 VM Raz Amir
2015-04-08 15:53 ` Raz Amir
2015-04-13  7:56   ` Raz Amir
2015-04-13 10:46   ` Thomas Monjalon
2015-04-13 11:54     ` Raz Amir
2015-04-14  2:25       ` Ouyang, Changchun

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).