Well, after spending some time looking into this and doing some /tmp
cleanup and more rebooting everything seems to be working for me again
for both l2fwd_simple and this program.  However I do see this:

bill@Ubuntu15:~/linaro/review/test/common_plat/performance$
./odp_pktio_ordered_run.sh
using PCAP_IN = ./udp64.pcap
_ishm.c:859:_odp_ishm_reserve():No huge pages, fall back to normal
pages. check: /proc/sys/vm/nr_hugepages.
 PKTIO: initialized loop interface.
 PKTIO: initialized pcap interface.
 PKTIO: initialized socket mmap, use export
ODP_PKTIO_DISABLE_SOCKET_MMAP=1 to disable.
 PKTIO: initialized socket mmsg,use export
ODP_PKTIO_DISABLE_SOCKET_MMSG=1 to disable.

ODP system info
---------------
ODP API version: 1.12.0
ODP impl name:   odp-linux
CPU model:       Intel(R) Core(TM) i7-4790K CPU
CPU freq (hz):   4000000000
Cache line size: 64
CPU count:       6

Running ODP appl: "odp_pktio_ordered"
-----------------
IF-count:        2
Using IFs:       pcap:in=./udp64.pcap pcap:out=pcapout.pcap

Num worker threads: 4
First CPU:          2
CPU mask:           0x3C


Pool info
---------
  pool            0
  name            packet pool
  pool type       packet
  pool shm        10
  user area shm   11
  num             8192
  align           64
  headroom        66
  data size       8126
  max data len    48756
  max seg len     8126
  tailroom        0
  block size      8896
  uarea size      64
  shm size        72876032
  base addr       0x7fad4a243000
  uarea shm size  524288
  uarea base addr 0x7fad80c7b000

Created pktio 1 (pcap:in=./udp64.pcap)
Allocating 1 shared output queues, 12 requested
Created 1 input and 1 output queues on (pcap:in=./udp64.pcap)

pktio
  handle            1
  name              pcap:in=./udp64.pcap
  type              pcap
  state             opened
  mac               02:e9:34:80:73:04
  mtu               65536
  promisc           yes
  max input queues  1
  max output queues 1

Created pktio 2 (pcap:out=pcapout.pcap)
Allocating 1 shared output queues, 12 requested
Created 1 input and 1 output queues on (pcap:out=pcapout.pcap)

pktio
  handle            2
  name              pcap:out=pcapout.pcap
  type              pcap
  state             opened
  mac               02:e9:34:80:73:04
  mtu               65536
  promisc           yes
  max input queues  1
  max output queues 1


Application parameters
----------------------
Input queues: 1
Mode:         PKTIN_SCHED_ORDERED
Flows:        1
Extra rounds: 15

linux.c:273:odpthread_run_start_routine():helper: ODP worker thread
started as linux pthread. (pid=22302)
linux.c:273:odpthread_run_start_routine():helper: ODP worker thread
started as linux pthread. (pid=22302)
linux.c:273:odpthread_run_start_routine():helper: ODP worker thread
started as linux pthread. (pid=22302)
linux.c:273:odpthread_run_start_routine():helper: ODP worker thread
started as linux pthread. (pid=22302)
200 pps, 200 max pps, 0 rx drops, 0 tx drops, 0 invalid seq
0 pps, 200 max pps, 0 rx drops, 0 tx drops, 0 invalid seq
TEST RESULT: 200 maximum packets per second.
_ishm.c:1556:_odp_ishm_term_global():block 'shm_args' (file ) was
never freed (cleaning up...).
bill@Ubuntu15:~/linaro/review/test/common_plat/performance$

So it looks like an shm area is not properly freed as part of
termination processing.

On Tue, Jan 3, 2017 at 9:36 AM, Christophe Milard
<christophe.mil...@linaro.org> wrote:
> The problem seems to be the name of the shm memory block:
> "pktio-pcap:in=./udp64.pcap"
> The name of the block is used for creating the filename used to get
> the file descriptor. Filenames containing "/" and other strange
> characters will be problems.
> I guess I can create other "random" filenames, but I thought that
> getting the file name as its underlying block would be nice. Another
> alternative would be to convert strange char to underscore, but that
> would bug if 2 blocks are distinct only by some strange char ,e.g.
> "test" and "test/"
> Or we could restrict block names to "identifier-like" syntax. I think
> this makes more sense (we are programmers).
> Anyway, the API should be clear on what is allowed. I guess we don't
> want control characters or international characters (like öäå) in
> there... do we?
>
> On 3 January 2017 at 13:44, Bill Fischofer <bill.fischo...@linaro.org> wrote:
>> On Tue, Jan 3, 2017 at 12:51 AM, Elo, Matias (Nokia - FI/Espoo)
>> <matias....@nokia-bell-labs.com> wrote:
>>>
>>>> I see the same sort of behavior with l2fwd_simple, so I'm inclined to
>>>> agree with you. I've verified that libpcap-dev is installed. What more
>>>> should be needed to run these?
>>>>
>>>
>>> Libpcap-dev should be enough to run these tests. Based on the error log I'm 
>>> guessing shm is causing this. I would try cleaning /tmp, check that there 
>>> aren’t any other ODP processes running in the background, or reboot the 
>>> system.
>>
>> After doing both of these I get some more detail:
>>
>> bill@Ubuntu15:~/linaro/review/example/l2fwd_simple$ ./l2fwd_simple_run.sh
>> using PCAP_IN = ./udp64.pcap
>> _ishm.c:859:_odp_ishm_reserve():No huge pages, fall back to normal
>> pages. check: /proc/sys/vm/nr_hugepages.
>>  PKTIO: initialized loop interface.
>>  PKTIO: initialized socket mmap, use export
>> ODP_PKTIO_DISABLE_SOCKET_MMAP=1 to disable.
>>  PKTIO: initialized socket mmsg,use export
>> ODP_PKTIO_DISABLE_SOCKET_MMSG=1 to disable.
>> pktio/socket_mmap.c:78:mmap_pkt_socket():socket(SOCK_RAW): Operation
>> not permitted
>> _ishm.c:451:create_file():open failed for
>> /tmp/odp-3150-ishm-pktio-pcap:in=./udp64.pcap: No such file or
>> directory.
>> _ishm.c:891:_odp_ishm_reserve():_ishm_reserve failed.
>> odp_packet_io.c:224:setup_pktio_entry():Unable to init any I/O type.
>> Failed to open pcap:in=./udp64.pcap
>> ./l2fwd_simple_run.sh: line 15: kill: (3150) - No such process
>> Error: status was: 1, expected 0
>>
>> +cc Christophe as the _ishm msgs may be a clue. My recollection is
>> that the last time I successfully ran pcap stuff we prior to the
>> integration of the _ishm code.
>>
>>>
>>> -Matias
>>>

Reply via email to