> -unsigned int rte_get_next_lcore(unsigned int i, int skip_main, int wrap) > +#define LCORE_GET_LLC \ > + "ls -d /sys/bus/cpu/devices/cpu%u/cache/index[0-9] | sort -r > | grep -m1 index[0-9] | awk -F '[x]' '{print $2}' " >
This won't work for some SOCs. How to ensure the index you got is for an LLC? Some SOCs may only show upper-level caches here, therefore cannot be use blindly without knowing the SOC. Also, unacceptable to execute a shell script, consider implementing in C. --wathsala