From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id E961CA04B5; Sat, 3 Oct 2020 17:26:47 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3E8ED1C2B3; Sat, 3 Oct 2020 17:26:46 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by dpdk.org (Postfix) with ESMTP id 3B3DD1C2AA for ; Sat, 3 Oct 2020 17:26:44 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1601738802; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=k4lgYHDljoDKx/gdWZRd4O9rPs0tNHdo6ctBUfTcRs0=; b=ZpTVvaqEr63twvdzP3g6SQOFx61rzt1uRMOxYHpmnD8pWVaajnOHM7Srpcf6M2zLSE8HYS Bln9tY3cYB1h28XShrUKJ51xi2zI6ZOE9xa5rH3u1lS8vYwU3hvvPUGAO/djKDNknPEliO 8yfl/EXg2S3abWqXSveCv+WBrhPEBFI= Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-345-DKH9VKKANgO0WkW-li1TLw-1; Sat, 03 Oct 2020 11:26:41 -0400 X-MC-Unique: DKH9VKKANgO0WkW-li1TLw-1 Received: by mail-qk1-f199.google.com with SMTP id 196so3293618qkn.6 for ; Sat, 03 Oct 2020 08:26:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=k4lgYHDljoDKx/gdWZRd4O9rPs0tNHdo6ctBUfTcRs0=; b=XwK8bbe4el8M7/MtGTh4ThjAWAI0be9hpun9yFiG140h2A22VMQdUOESt8KZm0fFo1 ljqTgPRO+1soqdritm9SD+Wg3f9dQ5vDTna5h7XKzAVop5DWcbUC6AFR/35oKsd4mEUb eMabMN3Qxu5MkaAal/BhBjcQedngxUznJl51B8YsF106hkzDY1Bsh3I6/U8P5Z7AfhJx 898PNTJzfecaOaEthD/fM3YtHHvIqWQ6dIeg7kHQR7xyMgdwIllek8gZb/mI1C7yZ2Nh tSu5f3zSN9E5XbTI3+pVCgThoSxn2wMC6wV+dOgMQI2MhhsnotDiAU9YOba6ppGueu4r lUvA== X-Gm-Message-State: AOAM5310XHJzzZKCDLWYkmrzWlP6js/lciOBeDUZOql1iLWChvx/ml9z 6EuNBZZ5AaXFFii5hzAmZst5BLgvFazspIMj7TWiAxLdRp8YP/PMeRtZH/mi5ITF2UM/tjAysJG wPHE= X-Received: by 2002:ac8:7c90:: with SMTP id y16mr6760269qtv.45.1601738800564; Sat, 03 Oct 2020 08:26:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyV+KuMyQtWXH5nGTnHng9RKqlEnJKjZePULw/bEqWYfBSTYbDL6D07CRqKDFY1vlJvUWoi4Q== X-Received: by 2002:ac8:7c90:: with SMTP id y16mr6760254qtv.45.1601738800268; Sat, 03 Oct 2020 08:26:40 -0700 (PDT) Received: from trix.remote.csb (075-142-250-213.res.spectrum.com. [75.142.250.213]) by smtp.gmail.com with ESMTPSA id y46sm3613912qtc.30.2020.10.03.08.26.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 03 Oct 2020 08:26:39 -0700 (PDT) To: Maxime Coquelin , dev@dpdk.org, akhil.goyal@nxp.com, nicolas.chautru@intel.com, ferruh.yigit@intel.com References: <20201002085931.265699-1-maxime.coquelin@redhat.com> <20201002085931.265699-2-maxime.coquelin@redhat.com> From: Tom Rix Message-ID: <8b19943c-7430-ab0d-9635-d465d91f1c82@redhat.com> Date: Sat, 3 Oct 2020 08:26:37 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: <20201002085931.265699-2-maxime.coquelin@redhat.com> Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=trix@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US Subject: Re: [dpdk-dev] [PATCH 1/2] baseband/fpga_5gnr_fec: fix API naming 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" On 10/2/20 1:59 AM, Maxime Coquelin wrote: > DPDK APIs have to be prefixed with "rte_" in order to avoid > namespace pollution. > > Let's fix it while fpga_5gnr_fec API is still experimental. > > Signed-off-by: Maxime Coquelin > --- > app/test-bbdev/test_bbdev_perf.c | 6 +++--- > doc/guides/bbdevs/fpga_5gnr_fec.rst | 14 +++++++------- > drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c | 10 +++++----- > .../rte_pmd_bbdev_fpga_5gnr_fec_version.map | 2 +- > .../baseband/fpga_5gnr_fec/rte_pmd_fpga_5gnr_fec.h | 6 +++--- > 5 files changed, 19 insertions(+), 19 deletions(-) > > diff --git a/app/test-bbdev/test_bbdev_perf.c b/app/test-bbdev/test_bbdev_perf.c > index 45c0d62aca..14f150704e 100644 > --- a/app/test-bbdev/test_bbdev_perf.c > +++ b/app/test-bbdev/test_bbdev_perf.c > @@ -612,14 +612,14 @@ add_bbdev_dev(uint8_t dev_id, struct rte_bbdev_info *info, > #ifdef RTE_LIBRTE_PMD_BBDEV_FPGA_5GNR_FEC > if ((get_init_device() == true) && > (!strcmp(info->drv.driver_name, FPGA_5GNR_PF_DRIVER_NAME))) { > - struct fpga_5gnr_fec_conf conf; > + struct rte_fpga_5gnr_fec_conf conf; > unsigned int i; > > printf("Configure FPGA 5GNR FEC Driver %s with default values\n", > info->drv.driver_name); > > /* clear default configuration before initialization */ > - memset(&conf, 0, sizeof(struct fpga_5gnr_fec_conf)); > + memset(&conf, 0, sizeof(struct rte_fpga_5gnr_fec_conf)); > > /* Set PF mode : > * true if PF is used for data plane > @@ -647,7 +647,7 @@ add_bbdev_dev(uint8_t dev_id, struct rte_bbdev_info *info, > conf.flr_time_out = FLR_5G_TIMEOUT; > > /* setup FPGA PF with configuration information */ > - ret = fpga_5gnr_fec_configure(info->dev_name, &conf); > + ret = rte_fpga_5gnr_fec_configure(info->dev_name, &conf); > TEST_ASSERT_SUCCESS(ret, > "Failed to configure 5G FPGA PF for bbdev %s", > info->dev_name); > diff --git a/doc/guides/bbdevs/fpga_5gnr_fec.rst b/doc/guides/bbdevs/fpga_5gnr_fec.rst > index 6760391e8c..5849b31857 100644 > --- a/doc/guides/bbdevs/fpga_5gnr_fec.rst > +++ b/doc/guides/bbdevs/fpga_5gnr_fec.rst > @@ -170,12 +170,12 @@ queues, priorities, load balance, bandwidth and other settings necessary for the > device to perform FEC functions. > > This configuration needs to be executed at least once after reboot or PCI FLR and can > -be achieved by using the function ``fpga_5gnr_fec_configure()``, which sets up the > -parameters defined in ``fpga_5gnr_fec_conf`` structure: > +be achieved by using the function ``rte_fpga_5gnr_fec_configure()``, which sets up the > +parameters defined in ``rte_fpga_5gnr_fec_conf`` structure: > > .. code-block:: c > > - struct fpga_5gnr_fec_conf { > + struct rte_fpga_5gnr_fec_conf { > bool pf_mode_en; > uint8_t vf_ul_queues_number[FPGA_5GNR_FEC_NUM_VFS]; > uint8_t vf_dl_queues_number[FPGA_5GNR_FEC_NUM_VFS]; > @@ -214,15 +214,15 @@ parameters defined in ``fpga_5gnr_fec_conf`` structure: > the FLR time out then set this setting to 0x262=610. > > > -An example configuration code calling the function ``fpga_5gnr_fec_configure()`` is shown > +An example configuration code calling the function ``rte_fpga_5gnr_fec_configure()`` is shown > below: > > .. code-block:: c > > - struct fpga_5gnr_fec_conf conf; > + struct rte_fpga_5gnr_fec_conf conf; > unsigned int i; > > - memset(&conf, 0, sizeof(struct fpga_5gnr_fec_conf)); > + memset(&conf, 0, sizeof(struct rte_fpga_5gnr_fec_conf)); > conf.pf_mode_en = 1; > > for (i = 0; i < FPGA_5GNR_FEC_NUM_VFS; ++i) { > @@ -235,7 +235,7 @@ below: > conf.ul_load_balance = 64; > > /* setup FPGA PF */ > - ret = fpga_5gnr_fec_configure(info->dev_name, &conf); > + ret = rte_fpga_5gnr_fec_configure(info->dev_name, &conf); > TEST_ASSERT_SUCCESS(ret, > "Failed to configure 4G FPGA PF for bbdev %s", 4G ? Consider a future patch to clean this up. > info->dev_name); > diff --git a/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c b/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c > index 61f9c04ba2..1d73f9540e 100644 > --- a/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c > +++ b/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c > @@ -1944,10 +1944,10 @@ fpga_5gnr_fec_remove(struct rte_pci_device *pci_dev) > } > > static inline void > -set_default_fpga_conf(struct fpga_5gnr_fec_conf *def_conf) > +set_default_fpga_conf(struct rte_fpga_5gnr_fec_conf *def_conf) > { > /* clear default configuration before initialization */ > - memset(def_conf, 0, sizeof(struct fpga_5gnr_fec_conf)); > + memset(def_conf, 0, sizeof(struct rte_fpga_5gnr_fec_conf)); > /* Set pf mode to true */ > def_conf->pf_mode_en = true; > > @@ -1962,15 +1962,15 @@ set_default_fpga_conf(struct fpga_5gnr_fec_conf *def_conf) > > /* Initial configuration of FPGA 5GNR FEC device */ > int > -fpga_5gnr_fec_configure(const char *dev_name, > - const struct fpga_5gnr_fec_conf *conf) > +rte_fpga_5gnr_fec_configure(const char *dev_name, > + const struct rte_fpga_5gnr_fec_conf *conf) > { > uint32_t payload_32, address; > uint16_t payload_16; > uint8_t payload_8; > uint16_t q_id, vf_id, total_q_id, total_ul_q_id, total_dl_q_id; > struct rte_bbdev *bbdev = rte_bbdev_get_named_dev(dev_name); > - struct fpga_5gnr_fec_conf def_conf; > + struct rte_fpga_5gnr_fec_conf def_conf; > > if (bbdev == NULL) { > rte_bbdev_log(ERR, > diff --git a/drivers/baseband/fpga_5gnr_fec/rte_pmd_bbdev_fpga_5gnr_fec_version.map b/drivers/baseband/fpga_5gnr_fec/rte_pmd_bbdev_fpga_5gnr_fec_version.map > index d723bc9b0e..db43cd8403 100644 > --- a/drivers/baseband/fpga_5gnr_fec/rte_pmd_bbdev_fpga_5gnr_fec_version.map > +++ b/drivers/baseband/fpga_5gnr_fec/rte_pmd_bbdev_fpga_5gnr_fec_version.map > @@ -5,6 +5,6 @@ DPDK_21 { > EXPERIMENTAL { > global: > > - fpga_5gnr_fec_configure; > + rte_fpga_5gnr_fec_configure; > > }; > diff --git a/drivers/baseband/fpga_5gnr_fec/rte_pmd_fpga_5gnr_fec.h b/drivers/baseband/fpga_5gnr_fec/rte_pmd_fpga_5gnr_fec.h > index 70a4acf0b7..c2752fbd52 100644 > --- a/drivers/baseband/fpga_5gnr_fec/rte_pmd_fpga_5gnr_fec.h > +++ b/drivers/baseband/fpga_5gnr_fec/rte_pmd_fpga_5gnr_fec.h > @@ -30,7 +30,7 @@ extern "C" { > /** > * Structure to pass FPGA 4G FEC configuration. 4G ? There are a number of 4G references in this file's comments. Consider a future patch to clean this up. > */ > -struct fpga_5gnr_fec_conf { > +struct rte_fpga_5gnr_fec_conf { > /** 1 if PF is used for dataplane, 0 for VFs */ > bool pf_mode_en; > /** Number of UL queues per VF */ > @@ -64,8 +64,8 @@ struct fpga_5gnr_fec_conf { > */ > __rte_experimental > int > -fpga_5gnr_fec_configure(const char *dev_name, > - const struct fpga_5gnr_fec_conf *conf); > +rte_fpga_5gnr_fec_configure(const char *dev_name, > + const struct rte_fpga_5gnr_fec_conf *conf); > > #ifdef __cplusplus > } Changes look complete. Reviewed-by: Tom Rix