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 D270DA0542; Tue, 31 May 2022 10:00:06 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7CA95400EF; Tue, 31 May 2022 10:00:06 +0200 (CEST) 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 E5CE5400D6 for ; Tue, 31 May 2022 10:00:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1653984004; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=th3AwCSlfWwBm6fray3Zg/pYUXY492xMREu79vhaH1g=; b=NBP2FgXCKHIfafWJp+ztZyaFjrfYN7pT2bc3wkdom+EjEiebB/lEIF/vxOns/pTiQfAdyO HxprFyZme6V0ppkVu+1+cfJ6jX5rtVQaakN58nSxvQHTPE/nxYpPU5W/P70kuznHHeTNrE UtGmIQm6Z4sm89ySO+tltamnJklKkKw= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-376-eBhuuUz-PnaxbpcHQCU5ew-1; Tue, 31 May 2022 04:00:00 -0400 X-MC-Unique: eBhuuUz-PnaxbpcHQCU5ew-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id CD78B2A2AD64; Tue, 31 May 2022 07:59:59 +0000 (UTC) Received: from [10.39.208.26] (unknown [10.39.208.26]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 69C998287E; Tue, 31 May 2022 07:59:57 +0000 (UTC) Message-ID: <93c28a9c-f08d-5619-bfa5-efaa6531852b@redhat.com> Date: Tue, 31 May 2022 09:59:55 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 To: "Chautru, Nicolas" , "dev@dpdk.org" , "gakhil@marvell.com" , "trix@redhat.com" Cc: "thomas@monjalon.net" , "Kinsella, Ray" , "Richardson, Bruce" , "hemant.agrawal@nxp.com" , "Vargas, Hernan" , "david.marchand@redhat.com" References: <1651083423-33202-1-git-send-email-nicolas.chautru@intel.com> <1653350912-53876-1-git-send-email-nicolas.chautru@intel.com> <1653350912-53876-5-git-send-email-nicolas.chautru@intel.com> <8b807ce3-af2e-4fba-15c3-bc84a5728b3f@redhat.com> From: Maxime Coquelin Subject: Re: [PATCH v5 4/5] baseband/acc100: modify validation code for ACC101 In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=maxime.coquelin@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 Hi Nicolas, On 5/26/22 00:15, Chautru, Nicolas wrote: > > >> -----Original Message----- >> From: Maxime Coquelin >> Sent: Wednesday, May 25, 2022 7:33 AM >> To: Chautru, Nicolas ; dev@dpdk.org; >> gakhil@marvell.com; trix@redhat.com >> Cc: thomas@monjalon.net; Kinsella, Ray ; >> Richardson, Bruce ; >> hemant.agrawal@nxp.com; Vargas, Hernan ; >> david.marchand@redhat.com >> Subject: Re: [PATCH v5 4/5] baseband/acc100: modify validation code for >> ACC101 >> >> >> >> On 5/24/22 02:08, Nicolas Chautru wrote: >>> The validation requirement is different for the two devices. >>> >>> Signed-off-by: Nicolas Chautru >>> --- >>> drivers/baseband/acc100/rte_acc100_pmd.c | 47 >> ++++++++++++++++++++++++-------- >>> 1 file changed, 35 insertions(+), 12 deletions(-) >>> >>> diff --git a/drivers/baseband/acc100/rte_acc100_pmd.c >>> b/drivers/baseband/acc100/rte_acc100_pmd.c >>> index 41475b2..e3706e0 100644 >>> --- a/drivers/baseband/acc100/rte_acc100_pmd.c >>> +++ b/drivers/baseband/acc100/rte_acc100_pmd.c >>> @@ -1289,6 +1289,21 @@ >>> RTE_BBDEV_TURBO_HALF_ITERATION_EVEN); >>> } >>> >>> +#ifdef RTE_LIBRTE_BBDEV_DEBUG >>> + >>> +static inline bool >>> +is_acc100(struct acc100_queue *q) >>> +{ >>> + return (q->d->device_variant == ACC100_VARIANT); >> >> I keep insisting, but please rely on the PCI device ID, there is no need to >> introduce a new field. > > Thanks. I have a couple of concerns changing this: > 1) the device id is not accessible from the structures currently passed by the functions which would rely on this. Ie. device_id is accessible from rte_bbdev/rte_device but not from acc100_device or acc100_queue. Would be convoluted to have to carry forward this structure when needed instead of using directly acc100_device structure. > 2) These call would be done as part of the workload operation where performance matters, best to keep the check as trivial as possible within the PMD. I think it is better to have a pointer to the rte_bbdev/rte_device than introducing a new ID. Regarding performance, is_acc100 is only defined in RTE_LIBRTE_BBDEV_DEBUG, so it should not be that critical. Regarding that, I have hard time to understand why we need to validate encoder/decoder parameters in ACC100 case, but not in ACC101 one. For example, I guess having a valid mempool pointer is required in both ACC100 and ACC101 cases. > Will aim for new patch in next few days based on the other refactory suggestions and unified driver. > > Thanks > Nic Thanks, Maxime