Hi,

I tried to pass into dpdk_eal_init() the argument --socket-mem=2048,2048” and I get segmentation error when strsplit() function is called

        arg_num = rte_strsplit(strval, len,

                        arg, RTE_MAX_NUMA_NODES, ',');

 

 

In eal_common_string_fns.c gdb failed at the line shown below.

rte_strsplit(char *string, int stringlen,

             char **tokens, int maxtokens, char delim)

{

        int i, tok = 0;

        int tokstart = 1; /* first token is right at start of string */

 

        if (string == NULL || tokens == NULL)

                goto einval_error;

 

        for (i = 0; i < stringlen; i++) {

                if (string[i] == '\0' || tok >= maxtokens)

                        break;

                if (tokstart) {

                        tokstart = 0;

                        tokens[tok++] = &string[i];

                }

                if (string[i] == delim) {

                        string[i] = '\0';    <<<< Fails here with segmentation fault.

                        tokstart = 1;

                }

        }

        return tok;

 

If I pass “--socket_mem=2048”, --socket-mem=2048”, rte_eal_init() does not complain.

Not sure if this would ensure both CPU sockets will host 2-1G hugepages?  I suspect it doesn’t because I only see to rtemap_0 and rtemap_1 in /mnt/huge directory.  I think I should see four total.

 

# /opt/dpdk/dpdk-hugepages.py -s

Node Pages Size Total

0    2     1Gb    2Gb

1    2     1Gb    2Gb

 

I don’t know if I should believe the above output showing 2Gb on Numa Nodes 0 and 1.

 

Any help is appreciated.

 

Thanks,

Ed