Hi Stuart,

make check under root says that you deference null pointer.


[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/opt/Linaro/odp2.git/test/performance/.libs/lt-odp_l2fwd -i pktiop1p0,pktiop2p3'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00002ba318e13453 in pkt_mmap_v2_tx (sock=4, ring=0x2ba318aae700, pkt_table=0x2ba31e9ecdc0, len=16) at pktio/socket_mmap.c:221
221            if (odp_likely(hdr->tp_status == TP_STATUS_AVAILABLE)) {
(gdb) bt
#0 0x00002ba318e13453 in pkt_mmap_v2_tx (sock=4, ring=0x2ba318aae700, pkt_table=0x2ba31e9ecdc0, len=16) at pktio/socket_mmap.c:221 #1 0x00002ba318e13fee in sock_mmap_send (pktio_entry=0x2ba318aae640, pkt_table=0x2ba31e9ecdc0, len=16) at pktio/socket_mmap.c:489 #2 0x00002ba318e1075d in odp_pktio_send (id=0x2, pkt_table=0x2ba31e9ecdc0, len=16) at odp_packet_io.c:420 #3 0x0000000000401f26 in pktio_direct_recv_thread (arg=0x2ba318ad3030) at odp_l2fwd.c:270 #4 0x00002ba318bf9a07 in odp_run_start_routine (arg=0x1376950) at linux.c:35 #5 0x00002ba319035182 in start_thread (arg=0x2ba31e9ed700) at pthread_create.c:312 #6 0x00002ba31934547d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
(gdb) p hdr
$1 = (struct tpacket2_hdr *) 0x0
(gdb) l
216 * after some of the packets in the ring have already been sent, so we 217 * need to inspect the packet status to determine which were sent. */
218        for (n = first_frame_num; n < first_frame_num + i; ++n) {
219            struct tpacket2_hdr *hdr = ring->rd[n].iov_base;
220
221            if (odp_likely(hdr->tp_status == TP_STATUS_AVAILABLE)) {
222                nb_tx++;
223            } else if (hdr->tp_status & TP_STATUS_WRONG_FORMAT) {
224                /* status will be cleared on the next send request */
225                break;
(gdb)


On 10/23/2015 12:16, Stuart Haslam wrote:
Fixes bug: https://bugs.linaro.org/show_bug.cgi?id=1365

Changes since v3:
  - Rebased
  - Fix comment typo in 5/5

Changes since v2:
  - Conditionally check for ability to run test and report as
    inactive if not.
  - dropped patch 1/7, not required after other test changes
  - dropped patch 4/7 removing MAC print, not really related
    to this series. We should add a proper test for MAC address
    but that's unrelated and TBD.

Stuart Haslam (5):
   linux-generic: pktio: increase MTU of loop interface
   linux-generic: pktio: handle transmit errors correctly
   validation: pktio: pass interface index rather than name
   validation: pktio: add support for direct receive
   validation: pktio: test for transmit error handling

  .../linux-generic/include/odp_packet_io_internal.h |   6 +
  platform/linux-generic/pktio/loop.c                |   5 +-
  platform/linux-generic/pktio/socket.c              |  27 ++-
  platform/linux-generic/pktio/socket_mmap.c         |  96 ++++----
  test/validation/pktio/pktio.c                      | 250 +++++++++++++++++----
  test/validation/pktio/pktio.h                      |   2 +
  6 files changed, 284 insertions(+), 102 deletions(-)


_______________________________________________
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to