diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index 093952f0c8..98ae46d31b 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -1512,7 +1512,7 @@ attach_port(char *identifier) nb_ports = rte_eth_dev_count(); /* set_default_fwd_ports_config(); */ - bzero(fwd_ports_ids, sizeof(fwd_ports_ids)); + memset(fwd_ports_ids, 0, sizeof(fwd_ports_ids)); i = 0; FOREACH_PORT(j, ports) { fwd_ports_ids[i] = j; @@ -1547,7 +1547,7 @@ detach_port(uint8_t port_id) nb_ports = rte_eth_dev_count(); /* set_default_fwd_ports_config(); */ - bzero(fwd_ports_ids, sizeof(fwd_ports_ids)); + memset(fwd_ports_ids, 0, sizeof(fwd_ports_ids)); i = 0; FOREACH_PORT(pi, ports) { fwd_ports_ids[i] = pi; diff --git a/drivers/net/xenvirt/rte_eth_xenvirt.c b/drivers/net/xenvirt/rte_eth_xenvirt.c index e83c08c383..3353bcbab2 100644 --- a/drivers/net/xenvirt/rte_eth_xenvirt.c +++ b/drivers/net/xenvirt/rte_eth_xenvirt.c @@ -640,7 +640,8 @@ eth_dev_xenvirt_create(const char *name, const char *params, struct pmd_internals *internals = NULL; struct rte_eth_dev *eth_dev = NULL; struct xenvirt_dict dict; - bzero(&dict, sizeof(struct xenvirt_dict)); + + memset(&dict, 0, sizeof(struct xenvirt_dict)); RTE_LOG(INFO, PMD, "Creating virtio rings backed ethdev on numa socket %u\n", numa_node); diff --git a/examples/dpdk_qat/crypto.c b/examples/dpdk_qat/crypto.c index c03ea78424..8954bf876a 100644 --- a/examples/dpdk_qat/crypto.c +++ b/examples/dpdk_qat/crypto.c @@ -307,7 +307,7 @@ getCoreAffinity(Cpa32U *coreAffinity, const CpaInstanceHandle instanceHandle) Cpa16U i = 0; CpaStatus status = CPA_STATUS_SUCCESS; - bzero(&info, sizeof(CpaInstanceInfo2)); + memset(&info, 0, sizeof(CpaInstanceInfo2)); status = cpaCyInstanceGetInfo2(instanceHandle, &info); if (CPA_STATUS_SUCCESS != status) { @@ -380,7 +380,7 @@ initCySymSession(const int pkt_cipher_alg, CpaBoolean isCrypto = CPA_TRUE, isHmac = CPA_TRUE; CpaCySymSessionSetupData sessionSetupData; - bzero(&sessionSetupData, sizeof(CpaCySymSessionSetupData)); + memset(&sessionSetupData, 0, sizeof(CpaCySymSessionSetupData)); /* Assumption: key length is set to each algorithm's max length */ switch (pkt_cipher_alg) { @@ -781,7 +781,7 @@ crypto_encrypt(struct rte_mbuf *rte_buff, enum cipher_alg c, enum hash_alg h) lcore_id = rte_lcore_id(); - bzero(opData, sizeof(CpaCySymDpOpData)); + memset(opData, 0, sizeof(CpaCySymDpOpData)); opData->srcBuffer = opData->dstBuffer = PACKET_DATA_START_PHYS(rte_buff); opData->srcBufferLen = opData->dstBufferLen = rte_buff->data_len; @@ -856,7 +856,7 @@ crypto_decrypt(struct rte_mbuf *rte_buff, enum cipher_alg c, enum hash_alg h) lcore_id = rte_lcore_id(); - bzero(opData, sizeof(CpaCySymDpOpData)); + memset(opData, 0, sizeof(CpaCySymDpOpData)); opData->dstBuffer = opData->srcBuffer = PACKET_DATA_START_PHYS(rte_buff); opData->dstBufferLen = opData->srcBufferLen = rte_buff->data_len;