+ p->firmware = SOFTNIC_FIRMWARE;
+ p->cpu_id = SOFTNIC_CPU_ID;
+ p->sc = SOFTNIC_SC;
+ p->tm.n_queues = SOFTNIC_TM_N_QUEUES;
+ p->tm.qsize[0] = SOFTNIC_TM_QUEUE_SIZE;
+ p->tm.qsize[1] = SOFTNIC_TM_QUEUE_SIZE;
+ p->tm.qsize[2] = SOFTNIC_TM_QUEUE_SIZE;
+ p->tm.qsize[3] = SOFTNIC_TM_QUEUE_SIZE;
+ p->tm.qsize[4] = SOFTNIC_TM_QUEUE_SIZE;
+ p->tm.qsize[5] = SOFTNIC_TM_QUEUE_SIZE;
+ p->tm.qsize[6] = SOFTNIC_TM_QUEUE_SIZE;
+ p->tm.qsize[7] = SOFTNIC_TM_QUEUE_SIZE;
+ p->tm.qsize[8] = SOFTNIC_TM_QUEUE_SIZE;
+ p->tm.qsize[9] = SOFTNIC_TM_QUEUE_SIZE;
+ p->tm.qsize[10] = SOFTNIC_TM_QUEUE_SIZE;
+ p->tm.qsize[11] = SOFTNIC_TM_QUEUE_SIZE;
+ p->tm.qsize[12] = SOFTNIC_TM_QUEUE_SIZE;
+
+ /* Firmware script (optional) */
+ if (rte_kvargs_count(kvlist, PMD_PARAM_FIRMWARE) == 1) {
+ ret = rte_kvargs_process(kvlist, PMD_PARAM_FIRMWARE,
+ &get_string, &p->firmware);
+ if (ret < 0)
+ goto out_free;
+ }
+
+ /* Connection listening port (optional) */
+ if (rte_kvargs_count(kvlist, PMD_PARAM_CONN_PORT) == 1) {
+ ret = rte_kvargs_process(kvlist, PMD_PARAM_CONN_PORT,
+ &get_uint16, &p->conn_port);
+ if (ret < 0)
+ goto out_free;
+ }
+
+ /* CPU ID (optional) */
+ if (rte_kvargs_count(kvlist, PMD_PARAM_CPU_ID) == 1) {
+ ret = rte_kvargs_process(kvlist, PMD_PARAM_CPU_ID,
+ &get_uint32, &p->cpu_id);
+ if (ret < 0)
+ goto out_free;
+ }
+
+ /* Service cores (optional) */
+ if (rte_kvargs_count(kvlist, PMD_PARAM_SC) == 1) {
+ ret = rte_kvargs_process(kvlist, PMD_PARAM_SC,
+ &get_uint32, &p->sc);
+ if (ret < 0)
+ goto out_free;
+ }
+
+ /* TM number of queues (optional) */
+ if (rte_kvargs_count(kvlist, PMD_PARAM_TM_N_QUEUES) == 1) {
+ ret = rte_kvargs_process(kvlist, PMD_PARAM_TM_N_QUEUES,
+ &get_uint32, &p->tm.n_queues);
+ if (ret < 0)
+ goto out_free;
+ }
+
+ /* TM queue size 0 .. 3 (optional) */
+ if (rte_kvargs_count(kvlist, PMD_PARAM_TM_QSIZE0) == 1) {
+ ret = rte_kvargs_process(kvlist, PMD_PARAM_TM_QSIZE0,
+ &get_uint32, &p->tm.qsize[0]);
+ if (ret < 0)
+ goto out_free;
+ }
+
+ if (rte_kvargs_count(kvlist, PMD_PARAM_TM_QSIZE1) == 1) {
+ ret = rte_kvargs_process(kvlist, PMD_PARAM_TM_QSIZE1,
+ &get_uint32, &p->tm.qsize[1]);
+ if (ret < 0)
+ goto out_free;
+ }
+
+ if (rte_kvargs_count(kvlist, PMD_PARAM_TM_QSIZE2) == 1) {
+ ret = rte_kvargs_process(kvlist, PMD_PARAM_TM_QSIZE2,
+ &get_uint32, &p->tm.qsize[2]);
+ if (ret < 0)
+ goto out_free;
+ }
+
+ if (rte_kvargs_count(kvlist, PMD_PARAM_TM_QSIZE3) == 1) {
+ ret = rte_kvargs_process(kvlist, PMD_PARAM_TM_QSIZE3,
+ &get_uint32, &p->tm.qsize[3]);
+ if (ret < 0)
+ goto out_free;
+ }
+
+ if (rte_kvargs_count(kvlist, PMD_PARAM_TM_QSIZE4) == 1) {
+ ret = rte_kvargs_process(kvlist, PMD_PARAM_TM_QSIZE4,
+ &get_uint32, &p->tm.qsize[4]);
+ if (ret < 0)
+ goto out_free;
+ }
+
+ if (rte_kvargs_count(kvlist, PMD_PARAM_TM_QSIZE5) == 1) {
+ ret = rte_kvargs_process(kvlist, PMD_PARAM_TM_QSIZE5,
+ &get_uint32, &p->tm.qsize[5]);
+ if (ret < 0)
+ goto out_free;
+ }
+
+ if (rte_kvargs_count(kvlist, PMD_PARAM_TM_QSIZE6) == 1) {
+ ret = rte_kvargs_process(kvlist, PMD_PARAM_TM_QSIZE6,
+ &get_uint32, &p->tm.qsize[6]);
+ if (ret < 0)
+ goto out_free;
+ }
+
+ if (rte_kvargs_count(kvlist, PMD_PARAM_TM_QSIZE7) == 1) {
+ ret = rte_kvargs_process(kvlist, PMD_PARAM_TM_QSIZE7,
+ &get_uint32, &p->tm.qsize[7]);
+ if (ret < 0)
+ goto out_free;
+ }
+ if (rte_kvargs_count(kvlist, PMD_PARAM_TM_QSIZE8) == 1) {
+ ret = rte_kvargs_process(kvlist, PMD_PARAM_TM_QSIZE8,
+ &get_uint32, &p->tm.qsize[8]);
+ if (ret < 0)
+ goto out_free;
+ }
+ if (rte_kvargs_count(kvlist, PMD_PARAM_TM_QSIZE9) == 1) {
+ ret = rte_kvargs_process(kvlist, PMD_PARAM_TM_QSIZE9,
+ &get_uint32, &p->tm.qsize[9]);