X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=examples%2Fip_pipeline%2Fcpu_core_map.c;h=dd8f6785eb38a36e355c3a6270e4fcd768dce3d1;hb=39aad0e88c583c3e47cdc9729ae801d4769970fe;hp=331b946e47fb1343edb655b6fe88e9c0f9fc305c;hpb=7f64b9c004aa39d50fd5ee254b399e4267a5aa5d;p=dpdk.git diff --git a/examples/ip_pipeline/cpu_core_map.c b/examples/ip_pipeline/cpu_core_map.c index 331b946e47..dd8f6785eb 100644 --- a/examples/ip_pipeline/cpu_core_map.c +++ b/examples/ip_pipeline/cpu_core_map.c @@ -276,7 +276,7 @@ cpu_core_map_get_n_lcores_linux(void) if (string == NULL) return -1; - return (atoi(++string) + 1); + return atoi(++string) + 1; } #define FILE_LINUX_CPU_CORE_ID \ @@ -351,8 +351,10 @@ cpu_core_map_compute_linux(struct cpu_core_map *map) int lcore_socket_id = cpu_core_map_get_socket_id_linux(lcore_id); +#if !defined(RTE_ARCH_PPC_64) if (lcore_socket_id < 0) return -1; +#endif if (((uint32_t) lcore_socket_id) == socket_id) n_detected++; @@ -368,6 +370,7 @@ cpu_core_map_compute_linux(struct cpu_core_map *map) cpu_core_map_get_socket_id_linux( lcore_id); +#if !defined(RTE_ARCH_PPC_64) if (lcore_socket_id < 0) return -1; @@ -377,9 +380,14 @@ cpu_core_map_compute_linux(struct cpu_core_map *map) if (lcore_core_id < 0) return -1; +#endif +#if !defined(RTE_ARCH_PPC_64) if (((uint32_t) lcore_socket_id == socket_id) && ((uint32_t) lcore_core_id == core_id)) { +#else + if (((uint32_t) lcore_socket_id == socket_id)) { +#endif uint32_t pos = cpu_core_map_pos(map, socket_id, core_id_contig, @@ -488,6 +496,5 @@ cpu_core_map_get_lcore_id(struct cpu_core_map *map, void cpu_core_map_free(struct cpu_core_map *map) { - if (map) - free(map); + free(map); }