From patchwork Fri Nov 1 17:51:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 178322 Delivered-To: patch@linaro.org Received: by 2002:a92:409a:0:0:0:0:0 with SMTP id d26csp823457ill; Fri, 1 Nov 2019 10:55:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqzWciHpX1dMRvCoU4xYBok4oTHYG8M241dNbosDkQ79zBY3U1a2t5DwYI9fx5suCwd5fVUi X-Received: by 2002:aa7:d652:: with SMTP id v18mr4371182edr.184.1572630910663; Fri, 01 Nov 2019 10:55:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572630910; cv=none; d=google.com; s=arc-20160816; b=Rj+qwScyi6/p3QRkgCUsiTjZxs5C364+XqWroDZ3eILJLwCraAv/PMycrrrtUpBpCb m03bR6dKWsMEuEGqMYztNnt+64Rsg/3vPdK1MT7Vo5bpfJroCg1qrYkbfvsA5qP7Eajj Sq/lE3Rd+UkCYHJBMj97Pu5KF2YVUX9IEt1dQYtDHJkjt7zy5/gv7FOzx+KdZ+FYCdMI 7wuBfvRhrpSh7+F4lWflK7bLzxlSE+DdxpREoK3uN0gGTK9v+rzw8MvIbFXjJ948WVau t9xItw9O0QThELallbHA18my2emUlAlRi4s3YqYLIoNKSOKeJhXuZ06MEy+jDyylb5wY 0Avg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:to:from; bh=8HIILJ163YLD7hSNu/UgJ8OyJL22og3OfjwDBekrDqA=; b=TI+XVFl87xHFi5qwZMOOm9bNhF5vmprGg3YUo9xaxpvvFiRELB5t5x9DjGKCHCXZwA mPnNguDQ7grX8TAa65jH8ZPBM53IYZh4J4DXydfWeMyYMbLQ46i9cWlux8ixh87pr1sp x/f+lEsHWnEZtkg6oVW3VrPcJzmUATH/rAgIziB4tHlZl6ZCAQsQ43f6SMemIQkJsj/Y LVe7Iswpp4jL90IFpD0N64/rytc1EXf6HVAJJQYTJJLLyPDUMiew10vpmApb2AZ1jhx5 ETmsA3cmB3FOlBr46lbDnMyEF12XeYI3CNewyZPFnVRnQDdivu8BdMUR1fZ/IzH5J+Vu x3xA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id a3si6185483ejy.286.2019.11.01.10.55.10; Fri, 01 Nov 2019 10:55:10 -0700 (PDT) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 840AB1E87C; Fri, 1 Nov 2019 18:54:53 +0100 (CET) Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by dpdk.org (Postfix) with ESMTP id 60BAD1E570 for ; Fri, 1 Nov 2019 18:54:48 +0100 (CET) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 4EE221A0678; Fri, 1 Nov 2019 18:54:47 +0100 (CET) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id DE4F91A02D1; Fri, 1 Nov 2019 18:54:45 +0100 (CET) Received: from bf-netperf1.ap.freescale.net (bf-netperf1.ap.freescale.net [10.232.133.63]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id A68E440307; Sat, 2 Nov 2019 01:54:43 +0800 (SGT) From: Hemant Agrawal To: dev@dpdk.org, akhil.goyal@nxp.com Date: Fri, 1 Nov 2019 23:21:31 +0530 Message-Id: <20191101175141.4663-3-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191101175141.4663-1-hemant.agrawal@nxp.com> References: <20191025083336.24212-1-hemant.agrawal@nxp.com> <20191101175141.4663-1-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH v2 03/13] crypto/dpaa_sec: add check for the session validity X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Check if the session is not null during processing. Signed-off-by: Hemant Agrawal --- drivers/crypto/dpaa_sec/dpaa_sec.c | 8 ++++++++ 1 file changed, 8 insertions(+) -- 2.17.1 diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c index 31fe092ce..8704fe33d 100644 --- a/drivers/crypto/dpaa_sec/dpaa_sec.c +++ b/drivers/crypto/dpaa_sec/dpaa_sec.c @@ -1773,6 +1773,14 @@ dpaa_sec_enqueue_burst(void *qp, struct rte_crypto_op **ops, nb_ops = loop; goto send_pkts; } + + if (!ses) { + DPAA_SEC_DP_ERR("session not available"); + frames_to_send = loop; + nb_ops = loop; + goto send_pkts; + } + if (unlikely(!ses->qp[rte_lcore_id() % MAX_DPAA_CORES])) { if (dpaa_sec_attach_sess_q(qp, ses)) { frames_to_send = loop;