From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 56BEDA034F; Tue, 1 Mar 2022 09:01:08 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2B66D40DF6; Tue, 1 Mar 2022 09:01:08 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 10AA6407FF for ; Tue, 1 Mar 2022 09:01:05 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1646121665; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=5VgTF1zrEuLagnOmfL3eT0LB3GFQtyajhfzUL8ITc1g=; b=dPM7VWlIQ2cRXXOW5zAj4P4rWUuqp6DEP6oV8A+6XvKZutdWLY+jQkmfSniA+ljgccV173 i49sjEIFFz48LCs2ufdOef5DDi/2sK1YWmUHu+E16gk4E+AW4pQExmfwdWxOPtPJZ8vnhm 8YNOuwfOsLyV5ysamZ6lUNL1jlVudzE= Received: from mail-lj1-f200.google.com (mail-lj1-f200.google.com [209.85.208.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-674-GsafAPxqP5ypqxDxP0GjRw-1; Tue, 01 Mar 2022 03:01:04 -0500 X-MC-Unique: GsafAPxqP5ypqxDxP0GjRw-1 Received: by mail-lj1-f200.google.com with SMTP id 20-20020a2e0914000000b0024635d136ddso6913581ljj.22 for ; Tue, 01 Mar 2022 00:01:04 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=5VgTF1zrEuLagnOmfL3eT0LB3GFQtyajhfzUL8ITc1g=; b=i55oWhaFATQsOdqaQfvfmJYXzQIn4d2TplR8+4+0wOrN5CKxjhd87X57i/87gQHc5D cJBBTB1au8ZmJrP0KCNlviX25i69XypeRjczEUi/6PsMDNMbeDxnq9ZLj3tQtDHNGYqg esRmnhAy0Md6Pxa/x+pQbYU/qw1ytP5G50VZNyoBEZO/ftAtCTpey8JF4Yj4taIOd/vs SQxzLC4ncfzyRCBrE59YJjfyUQy8BTGTAbI2wq408ub6jcIL/NKOuNK/Or8sMwH8IsyP Lnx62zuECeVubbD6H0DIPR9i6E41/XEhrjeEVQTnVp3zpkNT90uHh/3XNZwGt8SufFrx RtBg== X-Gm-Message-State: AOAM531VL5z6T+HqTDt8vsQS7ssXmqSnnIkq1veB28koaE4011bTodWe 2hSFEsr6dHxvb5lFCfjPZluFB+aHIJwje0s24FfMuGaq0Qf1nBVEDo1b2my/pAstnJpkJD3YTel tcnEvWfK7drs3/zw9tRM= X-Received: by 2002:a05:6512:3d04:b0:442:1093:aa9b with SMTP id d4-20020a0565123d0400b004421093aa9bmr15217787lfv.499.1646121663027; Tue, 01 Mar 2022 00:01:03 -0800 (PST) X-Google-Smtp-Source: ABdhPJzgiKgFF5v/J2MqxMu7bPDrTdX6FvjiFlRgpmY2xl6AdkfOhByFIC6GzhRfCV51Baqhicl/a2jnK5rEkyMBTac= X-Received: by 2002:a05:6512:3d04:b0:442:1093:aa9b with SMTP id d4-20020a0565123d0400b004421093aa9bmr15217778lfv.499.1646121662783; Tue, 01 Mar 2022 00:01:02 -0800 (PST) MIME-Version: 1.0 References: <20220228173639.51393-1-kai.ji@intel.com> In-Reply-To: <20220228173639.51393-1-kai.ji@intel.com> From: David Marchand Date: Tue, 1 Mar 2022 09:00:51 +0100 Message-ID: Subject: Re: [dpdk-dev] crypto/qat: fix process type handling To: Kai Ji Cc: dev , Fan Zhang , Akhil Goyal Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Mon, Feb 28, 2022 at 6:36 PM Kai Ji wrote: > > This patch fix the process type handling in QAT PMDs where > only primary and secondary process are supported in qat > build request > > Signed-off-by: Kai Ji > --- > drivers/crypto/qat/dev/qat_crypto_pmd_gen3.c | 3 +++ > drivers/crypto/qat/dev/qat_crypto_pmd_gen4.c | 3 +++ > drivers/crypto/qat/dev/qat_sym_pmd_gen1.c | 3 +++ > drivers/crypto/qat/qat_sym.c | 8 ++++---- > 4 files changed, 13 insertions(+), 4 deletions(-) > > diff --git a/drivers/crypto/qat/dev/qat_crypto_pmd_gen3.c b/drivers/crypto/qat/dev/qat_crypto_pmd_gen3.c > index 5084a5fcd1..739404b1d4 100644 > --- a/drivers/crypto/qat/dev/qat_crypto_pmd_gen3.c > +++ b/drivers/crypto/qat/dev/qat_crypto_pmd_gen3.c > @@ -358,6 +358,9 @@ qat_sym_crypto_set_session_gen3(void *cdev __rte_unused, void *session) > enum rte_proc_type_t proc_type = rte_eal_process_type(); > int ret; > > + if (proc_type < 0 || proc_type == RTE_PROC_INVALID) > + return -EINVAL; This is not supposed to happen after rte_eal_init() is called. I have a doubt on Windows init because I can't see where rte_config.process_type is initialised. Are you seeing this issue on Windows? In any case, the commitlog needs more explanation. -- David Marchand