On Wednesday 08 April 2015 11:34 PM, Mike Holmes wrote:
when not run as root ./odp_classifier -i eth0

odp_shared_memory.c:265:odp_shm_reserve(): packet_pool:
No huge pages, fall back to normal pages,
check: /proc/sys/vm/nr_hugepages.
odp_packet_socket.c:438:mmap_pkt_socket():socket(SOCK_RAW): Operation not
permitted
odp_packet_socket.c:149:setup_pkt_sock():socket(): Operation not permitted
odp_packet_socket.c:149:setup_pkt_sock():socket(): Operation not permitted
odp_packet_io.c:273:setup_pktio_entry():Unable to init any I/O type.
odp_classifier.c:197:create_pktio(): pktio create failed for eth0
Aborted (core dumped)


Also ./odp_classifier  -h says

...
Mandatory OPTIONS:
   -i, --interface Eth interface
   -p, --policy <odp_pmr_term_e>:<match type>:<value1>:<value2>:<queue name>


Yet I did not pass -p so I assume it is not mandatory ?

This is an issue and I will correct the same in next version. -p is a mandatory option.

Regards,
Bala


On 8 April 2015 at 13:13, Maxim Uvarov <[email protected]> wrote:

On 04/08/15 20:01, [email protected] wrote:

+       /* Reserve memory for args from shared mem */
+       shm = odp_shm_reserve("cls_shm_args", sizeof(appl_args_t),
+                             ODP_CACHE_LINE_SIZE, 0);
+       args = odp_shm_addr(shm);
+
+       if (args == NULL) {
+               EXAMPLE_ERR("Error: shared mem alloc failed.\n");
+               exit(EXIT_FAILURE);
+       }
+

That is not good I think:

void *odp_shm_addr(odp_shm_t shm)
{
     uint32_t i;

     i = from_handle(shm);

     if (i > (ODP_CONFIG_SHM_BLOCKS - 1))
         return NULL;

     return odp_shm_tbl->block[i].addr;
}

There is might be some block which was not freed it's addr.
You need to check shm == ODP_SHM_INVALID.

Thanks,
Maxim.

_______________________________________________
lng-odp mailing list
[email protected]
https://lists.linaro.org/mailman/listinfo/lng-odp





_______________________________________________
lng-odp mailing list
[email protected]
https://lists.linaro.org/mailman/listinfo/lng-odp

_______________________________________________
lng-odp mailing list
[email protected]
https://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to