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 2A4B4A034C; Wed, 23 Feb 2022 10:22:41 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 11D8941169; Wed, 23 Feb 2022 10:22:41 +0100 (CET) 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 2A86940140 for ; Wed, 23 Feb 2022 10:22:39 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1645608158; 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=uw0H6f7PEQioW4An2zjRGMLFMsgrrty7mIQVA3US57M=; b=UCA/Mpl/NR4bHr2fg8LOUc4SicKQM6yJ94q6tCcassWt0tkm2eOtIia5FJmHNLmfdinFGI IrD8KGU5Bs+LroLtuTFUdC12qTOCWiP/PMyQmnfTh1U89OmKkG1y8P2uBAml88PYETCoMI 9+ViNDF3s8/4Kl3khUC2Yhuixs4uQCQ= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-312-I_Aldq0sO1SmlDP4ahDKrg-1; Wed, 23 Feb 2022 04:22:37 -0500 X-MC-Unique: I_Aldq0sO1SmlDP4ahDKrg-1 Received: by mail-wr1-f71.google.com with SMTP id p18-20020adfba92000000b001e8f7697cc7so7965431wrg.20 for ; Wed, 23 Feb 2022 01:22:37 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent :content-language:to:cc:references:from:subject:in-reply-to :content-transfer-encoding; bh=uw0H6f7PEQioW4An2zjRGMLFMsgrrty7mIQVA3US57M=; b=14HHBgG5fAs2hRwVBifYlJvKr0xTgPeKukJPYM+JTpmtaejmZpkQx4E/lwWWemEnGR YJ+KRQV6eZ10MpduOEaYPbPPWtdB+eZjQ+RIhFuYWsPoOl/txe243kjsb7t/tLMwOf0m G1FN/V2O11bGJOXYFdK9ssF5DkMcEoEinSMrNzLzJjGTDOlJh2FhjF9MCwhFZFLOWJQ9 JbiQaAyTu5AbVBDL/knm1EiptTsiIcVpbL9MyyWrvwgbLt6LI+Rl4ZLx+l7FaqoLpjFy QLCcunfdlfCW9VvS6qpiDIk+eN6+3cc6oHu1nlg2MiE/bDxw89myqUl6FTPUI3vsMF5e zG8A== X-Gm-Message-State: AOAM532VGC6Xy8PP5q1nrT6jMAOH+DDY2d9BlnVCcioX7EYLlICJ2b90 wwoeTsAES4Qek3o0BMPE9nuLjGp5sgJnx021NDcP596w33r1AuXrBOW2F9hr2NyCnWKBN3oW7U7 Tfh0= X-Received: by 2002:adf:dd87:0:b0:1e4:b8e2:2793 with SMTP id x7-20020adfdd87000000b001e4b8e22793mr22811241wrl.382.1645608156284; Wed, 23 Feb 2022 01:22:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJzMaJQGclonXgvNaiN1SevVO87P8KH5231OJOD88btmrMRNJz1xIw9U3Ajx8g77odvnMEQUVA== X-Received: by 2002:adf:dd87:0:b0:1e4:b8e2:2793 with SMTP id x7-20020adfdd87000000b001e4b8e22793mr22811225wrl.382.1645608155995; Wed, 23 Feb 2022 01:22:35 -0800 (PST) Received: from [192.168.0.36] ([78.16.131.8]) by smtp.gmail.com with ESMTPSA id u23-20020a7bcb17000000b0037bdfa1665asm5639130wmj.18.2022.02.23.01.22.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 23 Feb 2022 01:22:35 -0800 (PST) Message-ID: <1fb40c72-8a5c-ba53-73bc-8bc4a139542f@redhat.com> Date: Wed, 23 Feb 2022 09:22:33 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 To: Honnappa Nagarahalli , "dev@dpdk.org" , "lijuan.tu@intel.com" , "juraj.linkes@pantheon.tech" , "ohilyard@iol.unh.edu" , "david.marchand@redhat.com" , "thomas@monjalon.net" , "jerinj@marvell.com" , "bruce.richardson@intel.com" , "stephen@networkplumber.org" , "bluca@debian.org" , "christian.ehrhardt@canonical.com" , "xuemingl@nvidia.com" , "stable@dpdk.org" Cc: Kathleen Capella , nd , Ruifeng Wang References: <20220202060403.118301-1-honnappa.nagarahalli@arm.com> <20220223060931.2661907-1-honnappa.nagarahalli@arm.com> From: Kevin Traynor Subject: Re: [PATCH v3 1/2] examples/l3fwd: use single set of variables throughout the code In-Reply-To: Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ktraynor@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 Honnappa, On 23/02/2022 06:13, Honnappa Nagarahalli wrote: > Question for stable maintainers. > > DTS WG would like this patch to be merged in 21.11 and 20.11 stable releases even though it is not a bug fix. This allows for a single DTS version to be used with both those stable releases and master. > > Do you have any objections? > No objection for 21.11. It is example code and just a minor addition that is not changing defaults. Please add the stable tag in the commit message on merge (or next rev) so it will be found by our scripts. thanks, Kevin. > Thank you, > Honnappa > > >> -----Original Message----- >> From: Honnappa Nagarahalli >> Sent: Wednesday, February 23, 2022 12:10 AM >> To: dev@dpdk.org; Honnappa Nagarahalli ; >> lijuan.tu@intel.com; juraj.linkes@pantheon.tech; ohilyard@iol.unh.edu; >> david.marchand@redhat.com; thomas@monjalon.net; jerinj@marvell.com; >> bruce.richardson@intel.com; stephen@networkplumber.org; >> bluca@debian.org; ktraynor@redhat.com; christian.ehrhardt@canonical.com; >> xuemingl@nvidia.com >> Cc: Kathleen Capella ; nd ; >> Ruifeng Wang >> Subject: [PATCH v3 1/2] examples/l3fwd: use single set of variables throughout >> the code >> >> nb_rxd and nb_txd are used in polling mode and event mode of operation. >> nb_rxd and nb_txd are already global in polling mode but are not visible to >> event mode code. Make them visible to all parts of the application. >> >> Signed-off-by: Honnappa Nagarahalli >> Reviewed-by: Kathleen Capella >> Reviewed-by: Ruifeng Wang >> Acked-by: Bruce Richardson >> --- >> DTS test cases require changing the RX and TX queue depths. >> Currently, this is achieved by patching the DPDK code. This patch set provides a >> mechanism to configure the queue depths while launching the application. With >> this change DTS test cases do not need to modify the DPDK code. >> >> v2 - Single parse function, additional validation on input (Stephen) >> >> v2 - Fixed typo (Ruifeng) and adjusted the commit msg (Kathleen). >> >> examples/l3fwd/l3fwd.h | 4 ++++ >> examples/l3fwd/l3fwd_event.c | 2 -- >> examples/l3fwd/main.c | 5 ++--- >> 3 files changed, 6 insertions(+), 5 deletions(-) >> >> diff --git a/examples/l3fwd/l3fwd.h b/examples/l3fwd/l3fwd.h index >> 38ca19133c..4ccdb28b4a 100644 >> --- a/examples/l3fwd/l3fwd.h >> +++ b/examples/l3fwd/l3fwd.h >> @@ -81,6 +81,10 @@ struct lcore_conf { >> >> extern volatile bool force_quit; >> >> +/* RX and TX queue depths */ >> +extern uint16_t nb_rxd; >> +extern uint16_t nb_txd; >> + >> /* ethernet addresses of ports */ >> extern uint64_t dest_eth_addr[RTE_MAX_ETHPORTS]; extern struct >> rte_ether_addr ports_eth_addr[RTE_MAX_ETHPORTS]; diff --git >> a/examples/l3fwd/l3fwd_event.c b/examples/l3fwd/l3fwd_event.c index >> dd9eafa9b9..7a401290f8 100644 >> --- a/examples/l3fwd/l3fwd_event.c >> +++ b/examples/l3fwd/l3fwd_event.c >> @@ -43,8 +43,6 @@ l3fwd_eth_dev_port_setup(struct rte_eth_conf >> *port_conf) { >> struct l3fwd_event_resources *evt_rsrc = l3fwd_get_eventdev_rsrc(); >> uint16_t nb_ports = rte_eth_dev_count_avail(); >> - uint16_t nb_rxd = RTE_TEST_RX_DESC_DEFAULT; >> - uint16_t nb_txd = RTE_TEST_TX_DESC_DEFAULT; >> unsigned int nb_lcores = rte_lcore_count(); >> struct rte_eth_conf local_port_conf; >> struct rte_eth_dev_info dev_info; >> diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c index >> eb68ffc5aa..acd186ab7d 100644 >> --- a/examples/l3fwd/main.c >> +++ b/examples/l3fwd/main.c >> @@ -53,9 +53,8 @@ >> >> #define MAX_LCORE_PARAMS 1024 >> >> -/* Static global variables used within this file. */ -static uint16_t nb_rxd = >> RTE_TEST_RX_DESC_DEFAULT; -static uint16_t nb_txd = >> RTE_TEST_TX_DESC_DEFAULT; >> +uint16_t nb_rxd = RTE_TEST_RX_DESC_DEFAULT; uint16_t nb_txd = >> +RTE_TEST_TX_DESC_DEFAULT; >> >> /**< Ports set in promiscuous mode off by default. */ static int >> promiscuous_on; >> -- >> 2.25.1 >