DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH 3/3] qat: use memset instead of bzero
Date: Tue,  1 Dec 2015 19:24:12 -0800	[thread overview]
Message-ID: <1449026652-7320-4-git-send-email-stephen@networkplumber.org> (raw)
In-Reply-To: <1449026652-7320-1-git-send-email-stephen@networkplumber.org>

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>

---
 examples/dpdk_qat/crypto.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/examples/dpdk_qat/crypto.c b/examples/dpdk_qat/crypto.c
index c03ea78..8954bf8 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;
-- 
2.1.4

  parent reply	other threads:[~2015-12-02  3:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-02  3:24 [dpdk-dev] [PATCH 0/3] replace bzero with memset Stephen Hemminger
2015-12-02  3:24 ` [dpdk-dev] [PATCH 1/3] test-pmd: use memset not bzero Stephen Hemminger
2015-12-02  3:24 ` [dpdk-dev] [PATCH 2/3] xen-virt: " Stephen Hemminger
2015-12-02  3:24 ` Stephen Hemminger [this message]
2015-12-02  8:28 ` [dpdk-dev] [PATCH 0/3] replace bzero with memset De Lara Guarch, Pablo
2015-12-06 22:51   ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1449026652-7320-4-git-send-email-stephen@networkplumber.org \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).