diff options
-rw-r--r-- | src/plugins/memif/device.c | 2 | ||||
-rw-r--r-- | src/plugins/memif/memif_test.c | 11 | ||||
-rw-r--r-- | src/plugins/memif/node.c | 2 |
3 files changed, 7 insertions, 8 deletions
diff --git a/src/plugins/memif/device.c b/src/plugins/memif/device.c index ff6068f8243..ba4a19a5fe3 100644 --- a/src/plugins/memif/device.c +++ b/src/plugins/memif/device.c @@ -611,7 +611,7 @@ no_free_slots: if (PREDICT_TRUE (!fallback)) { vlib_dma_batch_set_cookie (vm, b, - (mif_id << 16) | (mq - mif->tx_queues)); + ((u64) mif_id << 16) | (mq - mif->tx_queues)); vlib_dma_batch_submit (vm, b); dma_info->finished = 0; diff --git a/src/plugins/memif/memif_test.c b/src/plugins/memif/memif_test.c index e8fb37c949f..d3290ac0340 100644 --- a/src/plugins/memif/memif_test.c +++ b/src/plugins/memif/memif_test.c @@ -407,12 +407,11 @@ api_memif_create_v2 (vat_main_t *vam) mp->ring_size = clib_host_to_net_u32 (ring_size); mp->buffer_size = clib_host_to_net_u16 (buffer_size & 0xffff); mp->socket_id = clib_host_to_net_u32 (socket_id); - if (secret != 0) - { - char *p = (char *) &mp->secret; - p += vl_api_vec_to_api_string (secret, (vl_api_string_t *) p); - vec_free (secret); - } + + char *p = (char *) &mp->secret; + p += vl_api_vec_to_api_string (secret, (vl_api_string_t *) p); + vec_free (secret); + memcpy (mp->hw_addr, hw_addr, 6); mp->rx_queues = rx_queues; mp->tx_queues = tx_queues; diff --git a/src/plugins/memif/node.c b/src/plugins/memif/node.c index 1ee94f2e81b..4d97ed22d64 100644 --- a/src/plugins/memif/node.c +++ b/src/plugins/memif/node.c @@ -1286,7 +1286,7 @@ memif_device_input_inline_dma (vlib_main_t *vm, vlib_node_runtime_t *node, mq->dma_info_tail = 0; done: - vlib_dma_batch_set_cookie (vm, db, (mif_id << 16) | qid); + vlib_dma_batch_set_cookie (vm, db, ((u64) mif_id << 16) | qid); vlib_dma_batch_submit (vm, db); vec_reset_length (ptd->copy_ops); |