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 DB0B6A00C5; Wed, 2 Feb 2022 09:49:57 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id ABB0540E03; Wed, 2 Feb 2022 09:49:57 +0100 (CET) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id BD16440DF4 for ; Wed, 2 Feb 2022 09:49:56 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1643791796; x=1675327796; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=zJbRNzFByA2iF7p+I1VNKsWnZd+FcnjseYnpwx4DpqA=; b=QlH2PINTOG2263HSzkmx3ZynUmIKegFN3tl7JbSwxRCjeGI5pWxWzik/ IQYtZ0kQrVjz1YLX8O7E6CwMu7GxR1t/qymJWIzxirb2CO713DwdEqbWz AwPGvQnTl7Vjw2fehPtnbc7+4iP7S3aheCuLfz/0VDtk/Kpd+XWaKT2gn ddaK2PqEWTbdewgtEFK5Z/RnuFJ7P6ZFy1Cw1Ak+hk81Yd9s57olEKcpy pPZ8YP47++o4N2/uk2L9vmn3VfrVAE5QqEfDfjzQulHl2fc71CicmD8Ln S4KYSdwxYttZtBsnEfaLIHZhLTAbpNKSafBUoSAavVBDPFegzyGNYaIVF Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10245"; a="272357378" X-IronPort-AV: E=Sophos;i="5.88,336,1635231600"; d="scan'208";a="272357378" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Feb 2022 00:49:54 -0800 X-IronPort-AV: E=Sophos;i="5.88,336,1635231600"; d="scan'208";a="698711745" Received: from aoifedem-mobl.ger.corp.intel.com (HELO bricha3-MOBL.ger.corp.intel.com) ([10.252.31.254]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 02 Feb 2022 00:49:52 -0800 Date: Wed, 2 Feb 2022 08:49:49 +0000 From: Bruce Richardson To: Honnappa Nagarahalli Cc: 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, kathleen.capella@arm.com, nd@arm.com Subject: Re: [PATCH 1/2] examples/l3fwd: use single set of variables throughout the code Message-ID: References: <20220202060403.118301-1-honnappa.nagarahalli@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220202060403.118301-1-honnappa.nagarahalli@arm.com> 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 Wed, Feb 02, 2022 at 06:04:02AM +0000, Honnappa Nagarahalli wrote: > nb_rxd and nb_txd are used in polling mode and event mode of > operation. nb_rxd and nb_txd are already global. Make them > visible to all parts of the application. > > Signed-off-by: Honnappa Nagarahalli > --- > 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. > Good change. DTS should not need to be patching DPDK code. Series-Acked-by: Bruce Richardson > 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 >