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 7E345A0093; Fri, 11 Mar 2022 02:12:44 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 15D7A40E78; Fri, 11 Mar 2022 02:12:44 +0100 (CET) Received: from mail-pl1-f170.google.com (mail-pl1-f170.google.com [209.85.214.170]) by mails.dpdk.org (Postfix) with ESMTP id 3A6A540042 for ; Fri, 11 Mar 2022 02:12:42 +0100 (CET) Received: by mail-pl1-f170.google.com with SMTP id e2so6395883pls.10 for ; Thu, 10 Mar 2022 17:12:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=qck2f3k3spvwj/rSb832/F2Rwz2coVzulynm4lnK1Bs=; b=ugNhH0MVdz4F6+smlmQpC/64L4IAMH357STcBXYCZszgCGHpR2vjQ/exO5E8uL/l/6 80BZUd03J3El/Xwk2UbZ731n0c1E6DrFkooXfSfRmWqoufqOZaA53Xwa8tvi+Cmk5NUl u8hey82QSj80i38j7WIGWeFUkcP7GosyaoT+E4C2taKfsq/1HZWifZkwtCKPcZrXa5yd GLTHnIKrIUq0Y0vAsypp58hoHtD4aglDQ4SzP3qGyp/s1+4vnCm5gJBtxW0NCBrtLN5F nsKRHyZGfHrVRMWeoohg/TMNXXWg6gEusKy5GeqfiWnuYorJGrH1u3P6ZBL+B/3AVSyT Q8yA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=qck2f3k3spvwj/rSb832/F2Rwz2coVzulynm4lnK1Bs=; b=mKGChlCIdEflrYMKEeipoSMAiCcP9gaqrwFd/lO4p1Tc2+ezdjarNC6gWnOx+f3jx/ 8j32q5y55/GDmY1N/BQXNuUllZm02hd/BBkfZSVgXVi10lKbb9STyPV/c72F5XQbN1lt 7H0DEkoXB1/DwNcs2bDzR5CeYNYTs5niSLi+ENIm0DohT5f3zX08IXHjapXU0EeUzajp Kd+fdmZ5ql7P+Y4+VMXYgGT80VR2YMiQwizyAnoJklubCZ5ygGePMLSEOU1d7aIQQJnz KNlYf1ubX4WKEQ2Jp3EEXcPEfJj15TYYZT41jpzPtElVd86o76mVXEBdoPtoaNzj/Z8S qTfQ== X-Gm-Message-State: AOAM5309ItFfarCki4xHJA52Q5Z8olDehDXfjOxF4znetL6POvS6VYOS zCO+rExtkIq+3mfiGN2IQ5xVxA== X-Google-Smtp-Source: ABdhPJwGi4CkVFNwEg8XQ4recV8KvjejNLKwtPHvssPO8w3s0xchLPtQvldqUtE86gGYTJTpDJ7/6Q== X-Received: by 2002:a17:902:7fc1:b0:150:1ae7:94c5 with SMTP id t1-20020a1709027fc100b001501ae794c5mr7770176plb.45.1646961161171; Thu, 10 Mar 2022 17:12:41 -0800 (PST) Received: from hermes.local (204-195-112-199.wavecable.com. [204.195.112.199]) by smtp.gmail.com with ESMTPSA id v7-20020a637a07000000b0037c9268a310sm6910409pgc.3.2022.03.10.17.12.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Mar 2022 17:12:40 -0800 (PST) Date: Thu, 10 Mar 2022 17:12:38 -0800 From: Stephen Hemminger To: Nicolas Chautru Cc: dev@dpdk.org, gakhil@marvell.com, trix@redhat.com, thomas@monjalon.net, hemant.agrawal@nxp.com, mingshan.zhang@intel.com, david.marchand@redhat.com Subject: Re: [PATCH v1] bbdev: add new operation for FFT processing Message-ID: <20220310171238.526eb597@hermes.local> In-Reply-To: <1646956157-245769-2-git-send-email-nicolas.chautru@intel.com> References: <1646956157-245769-1-git-send-email-nicolas.chautru@intel.com> <1646956157-245769-2-git-send-email-nicolas.chautru@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII 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 On Thu, 10 Mar 2022 15:49:17 -0800 Nicolas Chautru wrote: > diff --git a/lib/bbdev/rte_bbdev.c b/lib/bbdev/rte_bbdev.c > index aaee7b7..a72ecba 100644 > --- a/lib/bbdev/rte_bbdev.c > +++ b/lib/bbdev/rte_bbdev.c > @@ -850,6 +850,9 @@ struct rte_bbdev * > case RTE_BBDEV_OP_LDPC_ENC: > result = sizeof(struct rte_bbdev_enc_op); > break; > + case RTE_BBDEV_OP_FFT: > + result = sizeof(struct rte_bbdev_fft_op); > + break; > default: > break; > } > @@ -873,6 +876,10 @@ struct rte_bbdev * > struct rte_bbdev_enc_op *op = element; > memset(op, 0, mempool->elt_size); > op->mempool = mempool; > + } else if (type == RTE_BBDEV_OP_FFT) { > + struct rte_bbdev_fft_op *op = element; > + memset(op, 0, mempool->elt_size); > + op->mempool = mempool; > } > } > > @@ -1123,6 +1130,7 @@ struct rte_mempool * > "RTE_BBDEV_OP_TURBO_ENC", > "RTE_BBDEV_OP_LDPC_DEC", > "RTE_BBDEV_OP_LDPC_ENC", > + "RTE_BBDEV_OP_FFT", > }; > > if (op_type < RTE_BBDEV_OP_TYPE_COUNT) > diff --git a/lib/bbdev/rte_bbdev.h b/lib/bbdev/rte_bbdev.h > index b88c881..e9ca673 100644 > --- a/lib/bbdev/rte_bbdev.h > +++ b/lib/bbdev/rte_bbdev.h > @@ -380,6 +380,12 @@ typedef uint16_t (*rte_bbdev_enqueue_dec_ops_t)( > struct rte_bbdev_dec_op **ops, > uint16_t num); > > +/** @internal Enqueue fft operations for processing on queue of a device. */ > +typedef uint16_t (*rte_bbdev_enqueue_fft_ops_t)( > + struct rte_bbdev_queue_data *q_data, > + struct rte_bbdev_fft_op **ops, > + uint16_t num); > + > /** @internal Dequeue encode operations from a queue of a device. */ > typedef uint16_t (*rte_bbdev_dequeue_enc_ops_t)( > struct rte_bbdev_queue_data *q_data, > @@ -390,6 +396,11 @@ typedef uint16_t (*rte_bbdev_dequeue_dec_ops_t)( > struct rte_bbdev_queue_data *q_data, > struct rte_bbdev_dec_op **ops, uint16_t num); > > +/** @internal Dequeue fft operations from a queue of a device. */ > +typedef uint16_t (*rte_bbdev_dequeue_fft_ops_t)( > + struct rte_bbdev_queue_data *q_data, > + struct rte_bbdev_fft_op **ops, uint16_t num); > + > #define RTE_BBDEV_NAME_MAX_LEN 64 /**< Max length of device name */ > > /** > @@ -438,6 +449,10 @@ struct __rte_cache_aligned rte_bbdev { > rte_bbdev_dequeue_enc_ops_t dequeue_ldpc_enc_ops; > /** Dequeue decode function */ > rte_bbdev_dequeue_dec_ops_t dequeue_ldpc_dec_ops; > + /** Enqueue FFT function */ > + rte_bbdev_enqueue_fft_ops_t enqueue_fft_ops; > + /** Dequeue FFT function */ > + rte_bbdev_dequeue_fft_ops_t dequeue_fft_ops; > const struct rte_bbdev_ops *dev_ops; /**< Functions exported by PMD */ > struct rte_bbdev_data *data; /**< Pointer to device data */ > enum rte_bbdev_state state; /**< If device is currently used or not */ Since rte_bbdev is exposed in rte_bbdev.h it can not be changed without breaking ABI. It would have been better if data structure was better hidden (hint). But you can't change it now until 22.11