summaryrefslogtreecommitdiffstats
path: root/src/plugins/vmxnet3
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/vmxnet3')
-rw-r--r--src/plugins/vmxnet3/cli.c2
-rw-r--r--src/plugins/vmxnet3/vmxnet3.c16
-rw-r--r--src/plugins/vmxnet3/vmxnet3_api.c4
-rw-r--r--src/plugins/vmxnet3/vmxnet3_test.c2
4 files changed, 12 insertions, 12 deletions
diff --git a/src/plugins/vmxnet3/cli.c b/src/plugins/vmxnet3/cli.c
index 170f9ad7f5b..1a97dc0d0fa 100644
--- a/src/plugins/vmxnet3/cli.c
+++ b/src/plugins/vmxnet3/cli.c
@@ -38,7 +38,7 @@ vmxnet3_create_command_fn (vlib_main_t * vm, unformat_input_t * input,
if (!unformat_user (input, unformat_line_input, line_input))
return 0;
- memset (&args, 0, sizeof (args));
+ clib_memset (&args, 0, sizeof (args));
while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
{
if (unformat (line_input, "%U", unformat_vlib_pci_addr, &args.addr))
diff --git a/src/plugins/vmxnet3/vmxnet3.c b/src/plugins/vmxnet3/vmxnet3.c
index 375224142f9..e34b3e69a27 100644
--- a/src/plugins/vmxnet3/vmxnet3.c
+++ b/src/plugins/vmxnet3/vmxnet3.c
@@ -153,7 +153,7 @@ vmxnet3_provision_driver_shared (vlib_main_t * vm, vmxnet3_device_t * vd)
if (error)
return error;
- memset (vd->dma, 0, sizeof (*vd->dma));
+ clib_memset (vd->dma, 0, sizeof (*vd->dma));
q = &vd->dma->queues;
q->tx.cfg.desc_address = vmxnet3_dma_addr (vm, vd, txq->tx_desc);
@@ -229,7 +229,7 @@ vmxnet3_rxq_init (vlib_main_t * vm, vmxnet3_device_t * vd, u16 qid, u16 qsz)
vec_validate_aligned (vd->rxqs, qid, CLIB_CACHE_LINE_BYTES);
rxq = vec_elt_at_index (vd->rxqs, qid);
- memset (rxq, 0, sizeof (*rxq));
+ clib_memset (rxq, 0, sizeof (*rxq));
rxq->size = qsz;
for (rid = 0; rid < VMXNET3_RX_RING_SIZE; rid++)
{
@@ -239,14 +239,14 @@ vmxnet3_rxq_init (vlib_main_t * vm, vmxnet3_device_t * vd, u16 qid, u16 qsz)
512);
if (error)
return error;
- memset (rxq->rx_desc[rid], 0, qsz * sizeof (*rxq->rx_desc[rid]));
+ clib_memset (rxq->rx_desc[rid], 0, qsz * sizeof (*rxq->rx_desc[rid]));
}
rxq->rx_comp = vlib_physmem_alloc_aligned (vm, vmxm->physmem_region, &error,
qsz * sizeof (*rxq->rx_comp),
512);
if (error)
return error;
- memset (rxq->rx_comp, 0, qsz * sizeof (*rxq->rx_comp));
+ clib_memset (rxq->rx_comp, 0, qsz * sizeof (*rxq->rx_comp));
for (rid = 0; rid < VMXNET3_RX_RING_SIZE; rid++)
{
vmxnet3_rx_ring *ring;
@@ -280,20 +280,20 @@ vmxnet3_txq_init (vlib_main_t * vm, vmxnet3_device_t * vd, u16 qid, u16 qsz)
vec_validate_aligned (vd->txqs, qid, CLIB_CACHE_LINE_BYTES);
txq = vec_elt_at_index (vd->txqs, qid);
- memset (txq, 0, sizeof (*txq));
+ clib_memset (txq, 0, sizeof (*txq));
txq->size = qsz;
txq->tx_desc = vlib_physmem_alloc_aligned (vm, vmxm->physmem_region, &error,
qsz * sizeof (*txq->tx_desc),
512);
if (error)
return error;
- memset (txq->tx_desc, 0, qsz * sizeof (*txq->tx_desc));
+ clib_memset (txq->tx_desc, 0, qsz * sizeof (*txq->tx_desc));
txq->tx_comp = vlib_physmem_alloc_aligned (vm, vmxm->physmem_region, &error,
qsz * sizeof (*txq->tx_comp),
512);
if (error)
return error;
- memset (txq->tx_comp, 0, qsz * sizeof (*txq->tx_comp));
+ clib_memset (txq->tx_comp, 0, qsz * sizeof (*txq->tx_comp));
vec_validate_aligned (txq->tx_ring.bufs, txq->size, CLIB_CACHE_LINE_BYTES);
txq->tx_ring.gen = VMXNET3_TXF_GEN;
txq->tx_comp_ring.gen = VMXNET3_TXCF_GEN;
@@ -663,7 +663,7 @@ vmxnet3_delete_if (vlib_main_t * vm, vmxnet3_device_t * vd)
vlib_physmem_free (vm, vmxm->physmem_region, vd->dma);
clib_error_free (vd->error);
- memset (vd, 0, sizeof (*vd));
+ clib_memset (vd, 0, sizeof (*vd));
pool_put (vmxm->devices, vd);
}
diff --git a/src/plugins/vmxnet3/vmxnet3_api.c b/src/plugins/vmxnet3/vmxnet3_api.c
index e0c2cfa6cf0..b41866be117 100644
--- a/src/plugins/vmxnet3/vmxnet3_api.c
+++ b/src/plugins/vmxnet3/vmxnet3_api.c
@@ -65,7 +65,7 @@ vl_api_vmxnet3_create_t_handler (vl_api_vmxnet3_create_t * mp)
vmxnet3_create_if_args_t args;
int rv;
- memset (&args, 0, sizeof (vmxnet3_create_if_args_t));
+ clib_memset (&args, 0, sizeof (vmxnet3_create_if_args_t));
args.enable_elog = ntohl (mp->enable_elog);
args.addr.as_u32 = ntohl (mp->pci_addr);
@@ -125,7 +125,7 @@ send_vmxnet3_details (vl_api_registration_t * reg, vmxnet3_device_t * vd,
hwif = vnet_get_sup_hw_interface (vnm, swif->sw_if_index);
mp = vl_msg_api_alloc (sizeof (*mp));
- memset (mp, 0, sizeof (*mp));
+ clib_memset (mp, 0, sizeof (*mp));
mp->_vl_msg_id = htons (VL_API_VMXNET3_DETAILS + vmxm->msg_id_base);
mp->context = context;
diff --git a/src/plugins/vmxnet3/vmxnet3_test.c b/src/plugins/vmxnet3/vmxnet3_test.c
index 1b5fd5b7c9a..53097f02d63 100644
--- a/src/plugins/vmxnet3/vmxnet3_test.c
+++ b/src/plugins/vmxnet3/vmxnet3_test.c
@@ -104,7 +104,7 @@ api_vmxnet3_create (vat_main_t * vam)
int ret;
u32 x[4];
- memset (&args, 0, sizeof (vmxnet3_create_if_args_t));
+ clib_memset (&args, 0, sizeof (vmxnet3_create_if_args_t));
while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
{