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 5B777440B6; Fri, 24 May 2024 16:45:18 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0DDF5402D7; Fri, 24 May 2024 16:45:18 +0200 (CEST) Received: from mail-lf1-f52.google.com (mail-lf1-f52.google.com [209.85.167.52]) by mails.dpdk.org (Postfix) with ESMTP id 2A6BA40395 for ; Fri, 24 May 2024 16:45:17 +0200 (CEST) Received: by mail-lf1-f52.google.com with SMTP id 2adb3069b0e04-52388d9ca98so13640836e87.0 for ; Fri, 24 May 2024 07:45:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1716561916; x=1717166716; darn=dpdk.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=EyyY0tr6lv4/DmaDZLa+2nlYPrO3SzDiGpUpibHAYuc=; b=PgPrBbLAGNB/Uga2KB0GuDVafzTLL+3lbt3NUENnguiW6huISJNPPvm1UCL9R8ebQU ZCTq4M9fyLAgoxWlvhoTtSbgjEoebSIs9E8aWYrtnaJH+/YDWis01H+H1nQaSuUDoTPo Zm+wgaCAE0C5dcQIZp9DhmM9wjI1akuRgtR3G2oQTWhHJZH9ptAgrk5RcVYDCsdBYfDs Vnbe+5dtLvTlbMNdivq0UlYiJVkEsia/JFtIAquS7pwIbsb/3Dx17Q2iyBZez+vPuVV/ iGdc15UzhZ+U7W/T59u2zJ0NHUDbWg3oJ4PaUgaAEWbjuAWtfjhwKnLkgWobcB6S50Zm f7Ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716561916; x=1717166716; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=EyyY0tr6lv4/DmaDZLa+2nlYPrO3SzDiGpUpibHAYuc=; b=egYYKvEqMtJXLa0kr3sGQjwESvQYtNGnY++JBu7d85nZzlychKIRAKSkTyDnikFpX1 KcqKdS/+1zpIXUh+Av7J/HftQrb2EHIvW6hezWDqPWFgG+CtphdVxasY/JTJaPeIcxii 17KufI9pYfPto1GdVS1AdPxx38IHCH+QCibPpGyU5M29z4160XQWZTlmcZ/LdDOIw2Bc hnkPU53/lXPTY7F/vRQNvK3Zj2Gxbx4EB/XMeO7CNegoizIBM+XyMnsEHhjnCL+U1px4 1rvADWf7CipLoFseOCHXANmhd/he98KL2/X04c7AiI7Kb5pntf+ce0py17/ftKx0ejom 4OaQ== X-Forwarded-Encrypted: i=1; AJvYcCXF45B80RNnD2uUqcuialQHEfOMzB23Q8a84x/lU0ZG7wYweTJeqrJI5JJa4dw48pbFmWnhTmGZoYSpolU= X-Gm-Message-State: AOJu0YzrqfompJyI2fIMS8GSmV0dagVz+nxrQ861lCEkNJYeFxkOLCK5 AzgD0od8J/hPD759D78AdNlCT2erGyS669amuFeD/KaufVx959QRCPeNf+ktf3V7ZjZlaXmFx5j N+C2DhbWQxHnFb7giB9Kax7ruG4r63d2f3Urn0A== X-Google-Smtp-Source: AGHT+IFOdPZepZRcsaoDX2QXT9XxRFhQJU8Syj3M4Jn77aUvcEuy6nrvmtqaW+LCtUn1rylXH9eSkXBH0kZWsX86NfE= X-Received: by 2002:ac2:46e2:0:b0:51f:4d57:6812 with SMTP id 2adb3069b0e04-5296594cfc7mr2018961e87.19.1716561916495; Fri, 24 May 2024 07:45:16 -0700 (PDT) MIME-Version: 1.0 References: <20240422143102.251-1-zhangfei.gao@linaro.org> <20240422143102.251-3-zhangfei.gao@linaro.org> In-Reply-To: From: Zhangfei Gao Date: Fri, 24 May 2024 22:45:04 +0800 Message-ID: Subject: Re: [EXTERNAL] [PATCH 2/3] compress/uadk: support basic operations To: Akhil Goyal Cc: Fan Zhang , Ashish Gupta , "dev@dpdk.org" 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 Fri, 24 May 2024 at 18:20, Akhil Goyal wrote: > > > > > +static int > > > > +uadk_compress_pmd_config(struct rte_compressdev *dev, > > > > + struct rte_compressdev_config *config) > > > > +{ > > > > + char mp_name[RTE_MEMPOOL_NAMESIZE]; > > > > + struct uadk_compress_priv *priv; > > > > + struct rte_mempool *mp; > > > > + int ret; > > > > + > > > > + if (dev == NULL || config == NULL) > > > > + return -EINVAL; > > > > + > > > > + snprintf(mp_name, RTE_MEMPOOL_NAMESIZE, > > > > + "stream_mp_%u", dev->data->dev_id); > > > > + priv = dev->data->dev_private; > > > > + > > > > + /* alloc resources */ > > > > + ret = wd_comp_env_init(NULL); > > > > + if (ret < 0) > > > > + return -EINVAL; > > > > + > > > > + mp = priv->mp; > > > > + if (mp == NULL) { > > > > + mp = rte_mempool_create(mp_name, > > > > + config->max_nb_priv_xforms + > > > > + config->max_nb_streams, > > > > + sizeof(struct uadk_stream), > > > > + 0, 0, NULL, NULL, NULL, > > > > + NULL, config->socket_id, 0); > > > > + if (mp == NULL) { > > > > + UADK_LOG(ERR, "Cannot create private xform pool on > > > > socket %d\n", > > > > + config->socket_id); > > > > + ret = -ENOMEM; > > > > + goto err_mempool; > > > > + } > > > > + priv->mp = mp; > > > > + } > > > > > > Do you really need a mempool here? It is for uadk_stream which is just struct of > > pointer and an enum. > > > It can simply be rte_malloc. > > > And even you do not need uadk_compress_priv. > > > This can be simplified. Right? > > > > Yes, good idea, this can be simplified, and can remove > > uadk_compress_priv as well. > > > > But it looks like rte_compressdev_pmd_create requires the priv data, > > otherwise it will return an error if private_data_size == 0. > > Could rte_compressdev_pmd_create be changed only alloc > > compressdev->data->dev_private only if data_size != 0. > > > > Or I am checking whether to simply add one priv. > > Normally, each PMD need some priv space. > Even you can also add capabilities in it instead of having global variable. Yes, understand. > > > > > > > > > Also remove the execution part of documentation from 1/3 and add it in 3/3 > > > Since the PMD is complete in 3/3, release notes and execution part of > > documentation should be in last patch. > > OK. > > > > One more question, > > rte_compressdev_pmd_init_params does not have .max_nb_queue_pairs as > > rte_cryptodev_pmd_init_params. > > So dpdk-test-compress-perf will use 128 queues by default, except > > adding -l 1,2. > > Is this expected? > > > rte_compressdev_pmd_init_params is internal for PMD-lib interaction and should not be used by app. > For application, rte_compressdev_info should be used and it has that max_nb_queue_pairs. > Is there a method to configure the max_nb_queue_pairs? Seems not workable to use RTE_PMD_REGISTER_PARAM_STRING like crypto, which only sets the init_params, which has no member. Or have to use a fixed value? Thanks