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 8D2BEA04B5; Sat, 3 Oct 2020 17:31:16 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1588E1C2B7; Sat, 3 Oct 2020 17:31:15 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by dpdk.org (Postfix) with ESMTP id BF5B41C1A5 for ; Sat, 3 Oct 2020 17:31:12 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1601739071; 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=3fxDIOaBIJC8Ka2tTpLBdrs6zbPVqYcS9BqvHeqoII4=; b=JhF9EEvbwGRLKIdl4omroVPYDETtzTFmKLZhNZlRrWEaanndb2Pv3gaxJ2WO1qCtH+TDMU za5YIOr5bmSj3rQhyipa+ecIs7YXcG9PgxleNXDWtDL6k7qpcxR+ksfkLacNCtTOqbicb/ 5tEI8tVhqXd7oo5fdJ3altKyXS5PywY= Received: from mail-qv1-f71.google.com (mail-qv1-f71.google.com [209.85.219.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-184-szk6p8BFPrqXDAh5MUhneA-1; Sat, 03 Oct 2020 11:31:08 -0400 X-MC-Unique: szk6p8BFPrqXDAh5MUhneA-1 Received: by mail-qv1-f71.google.com with SMTP id de12so2839547qvb.12 for ; Sat, 03 Oct 2020 08:31:08 -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=3fxDIOaBIJC8Ka2tTpLBdrs6zbPVqYcS9BqvHeqoII4=; b=Aohn/W5BTPvcYObuj1GMafLONBuxcWKi/6R2txsupuS3GQZTGGpJHkl+MC69yvYMlO JhomEgYlNVa+gIf+3ugonR5zSG4vQyNA8KrhY+km+esf+GQjq/GCQwP89JLZJmk6Imqo qRKm/shCJAHEAq4QLzRKoxiBynkoFHK0LqPPeUvjAMDrdB1tCY1YXl6iaWDwjI51t/N1 eHtswS1DCWMEaEyr76sF4Hgq2puZbEB0MW2bLN2YjaArBN0Hn9Fe1qXZvr3G+yJXsH/6 ONn7cfnrTF48kem+Y5li1UdASkhL6YmCvpBqEhbDUdQq/tz9fJBu0NK/dXTgy+8O7TPB DIYQ== X-Gm-Message-State: AOAM531YSid/pfm2YZwtGmKET+wfMlKPQQcIbRuoCfXKe/cerhSn/3Nf /yx3nKK7u2gJVut4gV+pZbqdvqvBWz85bOaeuM4rOOcn8j1kDMCZ5cKKtQzgCQ2AAVmdFAIJX1I cmM0= X-Received: by 2002:aed:3b05:: with SMTP id p5mr7048599qte.319.1601739067755; Sat, 03 Oct 2020 08:31:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxroGGoKhy3uj4h2VHmSDrji/hu7QQ2Ik2MSTv6AGzW7Xhbdp8/PPdbnDGO6mSGme4/rZFOmA== X-Received: by 2002:aed:3b05:: with SMTP id p5mr7048585qte.319.1601739067458; Sat, 03 Oct 2020 08:31:07 -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 d21sm3465921qtp.97.2020.10.03.08.31.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 03 Oct 2020 08:31:06 -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-3-maxime.coquelin@redhat.com> From: Tom Rix Message-ID: <2bd74daa-b8de-ea4a-7faf-0e8008cc22a0@redhat.com> Date: Sat, 3 Oct 2020 08:31:05 -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-3-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 2/2] baseband/fpga_lte_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_lte_fec API is still experimental. > > Signed-off-by: Maxime Coquelin > --- > app/test-bbdev/test_bbdev_perf.c | 6 +++--- > doc/guides/bbdevs/fpga_lte_fec.rst | 14 +++++++------- > drivers/baseband/fpga_lte_fec/fpga_lte_fec.c | 10 +++++----- > drivers/baseband/fpga_lte_fec/fpga_lte_fec.h | 6 +++--- > .../rte_pmd_bbdev_fpga_lte_fec_version.map | 2 +- > 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 14f150704e..d4a3681344 100644 > --- a/app/test-bbdev/test_bbdev_perf.c > +++ b/app/test-bbdev/test_bbdev_perf.c > @@ -568,14 +568,14 @@ add_bbdev_dev(uint8_t dev_id, struct rte_bbdev_info *info, > #ifdef RTE_LIBRTE_PMD_BBDEV_FPGA_LTE_FEC > if ((get_init_device() == true) && > (!strcmp(info->drv.driver_name, FPGA_LTE_PF_DRIVER_NAME))) { > - struct fpga_lte_fec_conf conf; > + struct rte_fpga_lte_fec_conf conf; > unsigned int i; > > printf("Configure FPGA LTE FEC Driver %s with default values\n", > info->drv.driver_name); > > /* clear default configuration before initialization */ > - memset(&conf, 0, sizeof(struct fpga_lte_fec_conf)); > + memset(&conf, 0, sizeof(struct rte_fpga_lte_fec_conf)); > > /* Set PF mode : > * true if PF is used for data plane > @@ -603,7 +603,7 @@ add_bbdev_dev(uint8_t dev_id, struct rte_bbdev_info *info, > conf.flr_time_out = FLR_4G_TIMEOUT; > > /* setup FPGA PF with configuration information */ > - ret = fpga_lte_fec_configure(info->dev_name, &conf); > + ret = rte_fpga_lte_fec_configure(info->dev_name, &conf); > TEST_ASSERT_SUCCESS(ret, > "Failed to configure 4G FPGA PF for bbdev %s", > info->dev_name); > diff --git a/doc/guides/bbdevs/fpga_lte_fec.rst b/doc/guides/bbdevs/fpga_lte_fec.rst > index fdc8a76981..a8cc3c58a8 100644 > --- a/doc/guides/bbdevs/fpga_lte_fec.rst > +++ b/doc/guides/bbdevs/fpga_lte_fec.rst > @@ -169,12 +169,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_lte_fec_configure()``, which sets up the > -parameters defined in ``fpga_lte_fec_conf`` structure: > +be achieved by using the function ``rte_fpga_lte_fec_configure()``, which sets up the > +parameters defined in ``rte_fpga_lte_fec_conf`` structure: > > .. code-block:: c > > - struct fpga_lte_fec_conf { > + struct rte_fpga_lte_fec_conf { > bool pf_mode_en; > uint8_t vf_ul_queues_number[FPGA_LTE_FEC_NUM_VFS]; > uint8_t vf_dl_queues_number[FPGA_LTE_FEC_NUM_VFS]; > @@ -213,15 +213,15 @@ parameters defined in ``fpga_lte_fec_conf`` structure: > the FLR time out then set this setting to 0x262=610. > > > -An example configuration code calling the function ``fpga_lte_fec_configure()`` is shown > +An example configuration code calling the function ``rte_fpga_lte_fec_configure()`` is shown > below: > > .. code-block:: c > > - struct fpga_lte_fec_conf conf; > + struct rte_fpga_lte_fec_conf conf; > unsigned int i; > > - memset(&conf, 0, sizeof(struct fpga_lte_fec_conf)); > + memset(&conf, 0, sizeof(struct rte_fpga_lte_fec_conf)); > conf.pf_mode_en = 1; > > for (i = 0; i < FPGA_LTE_FEC_NUM_VFS; ++i) { > @@ -234,7 +234,7 @@ below: > conf.ul_load_balance = 64; > > /* setup FPGA PF */ > - ret = fpga_lte_fec_configure(info->dev_name, &conf); > + ret = rte_fpga_lte_fec_configure(info->dev_name, &conf); > TEST_ASSERT_SUCCESS(ret, > "Failed to configure 4G FPGA PF for bbdev %s", > info->dev_name); > diff --git a/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c b/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c > index 37018b9c7f..71de399eef 100644 > --- a/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c > +++ b/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c > @@ -2432,10 +2432,10 @@ fpga_lte_fec_remove(struct rte_pci_device *pci_dev) > } > > static inline void > -set_default_fpga_conf(struct fpga_lte_fec_conf *def_conf) > +set_default_fpga_conf(struct rte_fpga_lte_fec_conf *def_conf) > { > /* clear default configuration before initialization */ > - memset(def_conf, 0, sizeof(struct fpga_lte_fec_conf)); > + memset(def_conf, 0, sizeof(struct rte_fpga_lte_fec_conf)); > /* Set pf mode to true */ > def_conf->pf_mode_en = true; > > @@ -2450,15 +2450,15 @@ set_default_fpga_conf(struct fpga_lte_fec_conf *def_conf) > > /* Initial configuration of FPGA LTE FEC device */ > int > -fpga_lte_fec_configure(const char *dev_name, > - const struct fpga_lte_fec_conf *conf) > +rte_fpga_lte_fec_configure(const char *dev_name, > + const struct rte_fpga_lte_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_lte_fec_conf def_conf; > + struct rte_fpga_lte_fec_conf def_conf; > > if (bbdev == NULL) { > rte_bbdev_log(ERR, > diff --git a/drivers/baseband/fpga_lte_fec/fpga_lte_fec.h b/drivers/baseband/fpga_lte_fec/fpga_lte_fec.h > index b2e423c87c..b35c7a484e 100644 > --- a/drivers/baseband/fpga_lte_fec/fpga_lte_fec.h > +++ b/drivers/baseband/fpga_lte_fec/fpga_lte_fec.h > @@ -30,7 +30,7 @@ extern "C" { > /** > * Structure to pass FPGA 4G FEC configuration. > */ > -struct fpga_lte_fec_conf { > +struct rte_fpga_lte_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_lte_fec_conf { > */ > __rte_experimental > int > -fpga_lte_fec_configure(const char *dev_name, > - const struct fpga_lte_fec_conf *conf); > +rte_fpga_lte_fec_configure(const char *dev_name, > + const struct rte_fpga_lte_fec_conf *conf); > > #ifdef __cplusplus > } > diff --git a/drivers/baseband/fpga_lte_fec/rte_pmd_bbdev_fpga_lte_fec_version.map b/drivers/baseband/fpga_lte_fec/rte_pmd_bbdev_fpga_lte_fec_version.map > index a2ab086cd8..b95b7838e8 100644 > --- a/drivers/baseband/fpga_lte_fec/rte_pmd_bbdev_fpga_lte_fec_version.map > +++ b/drivers/baseband/fpga_lte_fec/rte_pmd_bbdev_fpga_lte_fec_version.map > @@ -5,6 +5,6 @@ DPDK_21 { > EXPERIMENTAL { > global: > > - fpga_lte_fec_configure; > + rte_fpga_lte_fec_configure; > > }; Looks fine. Reviewed-by: Tom Rix