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 711C3A00C3; Thu, 3 Feb 2022 14:52:19 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 110A940143; Thu, 3 Feb 2022 14:52:19 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id 18F9740140; Thu, 3 Feb 2022 14:52:16 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1643896337; x=1675432337; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=ycy9Y3ctVvnG6sfjfDL6gNsrlo9PtCPJ0lkpq/5Jxqo=; b=YF3gEePK2ruIvqkZTaTfIOjZU7HzK+xZav9epIhBwXr2XubKsZ790t6D eBi/SvSaIBBNiKowJlu9TsQ3w3/cIcQtxwYYlzjweouH9Ju5nmhjeko1P i3xeMRCbP6NFKMb6wjSF4hBEdT1v6gk/QdBJL78GF9nMU8qtEVGC1i30r rNweuw5a6nzTUFHAx+R/iPG8xaTfDk9T1GiLQS75hBBQiGHElBjDCfVHb HeiDCaw4pTu16BOLIjMbbtNq0pHNta6y7PXfr/3UW3XnOdbR37Y3BGArK 9ruCyZ43XA63fvtd8EvAZ9zotz8kUj3xX8Mz0unvwORlAGJMAGPDAuhP+ g==; X-IronPort-AV: E=McAfee;i="6200,9189,10246"; a="248360831" X-IronPort-AV: E=Sophos;i="5.88,340,1635231600"; d="scan'208";a="248360831" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Feb 2022 05:52:15 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,340,1635231600"; d="scan'208";a="631346152" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by orsmga004.jf.intel.com with ESMTP; 03 Feb 2022 05:52:15 -0800 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Thu, 3 Feb 2022 05:52:15 -0800 Received: from fmsmsx605.amr.corp.intel.com (10.18.126.85) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Thu, 3 Feb 2022 05:52:14 -0800 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx605.amr.corp.intel.com (10.18.126.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20 via Frontend Transport; Thu, 3 Feb 2022 05:52:14 -0800 Received: from NAM02-SN1-obe.outbound.protection.outlook.com (104.47.57.46) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.20; Thu, 3 Feb 2022 05:52:14 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=C0dV+VkxwZlQEl3/RGkVSDZtA6H5s44E9lyYUXCtvc3J60xuPZfGOmr+McnGMCosDAYGZ3QP0fYqp3Iffju2jwBQDhjuu1/mCYLfqzyOATMfp0kRD8o6vhoaiY2APxSSAKS4G+KfWuMvGSM0G5Tp5JRMQ371lc8jA/axAWJGYItAH+qvv1EXns8xOxgbWBz1WvcnnhjFcvvNG8B7JInuE2KYFHmeeRe2beQzGltklIhso2YH2dl//9uOFc2MGN2M5Gt1EFmYlO6zEyFz9ZZDYt1X/5uY6cC/X7hirCNf8x9UMe6G031alG48iJRNcVXpxTHjZAnQ486OO2Lp/lb6/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=R1RFqcUe7CLAhRDLXqZqxzIe5dM3oIMfWfe22WizWqc=; b=AtuFoOOcjT2uzrgRGgy9yQXoFnRQ7Teg7HJhZINFEyms6uECfy3s8uR2Xe48qYtrnn1EmEh1Y+u6x6/a6Twz+rtQgaM4bFOUQOZwpYiFfl1T7kKcSZsi4THU6idEduOzwZUV+q/RdtlNzXoX1c4YmJ5LMfvN/CxR2Qhs6VQTj0UtmcJl5gu17ViMH0p2XggcJ3gW42B0/Y8YZW7z4Q15Dn8yNtZyJytZGH8LgvLZlUYS6MdmV1Y+EScFBDQMJK9u/yazyr0P2mDN0eJtMS9UgOq1hln3Y6U3fRXDjL0yts6NSkuOW/A3AZdcQwR8scZ9GZkZZHxm6EQEMmaVPRCqIQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from MWHPR11MB0062.namprd11.prod.outlook.com (2603:10b6:301:67::34) by CH2PR11MB4456.namprd11.prod.outlook.com (2603:10b6:610:48::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4951.12; Thu, 3 Feb 2022 13:52:12 +0000 Received: from MWHPR11MB0062.namprd11.prod.outlook.com ([fe80::417b:7df4:d3fb:2b0a]) by MWHPR11MB0062.namprd11.prod.outlook.com ([fe80::417b:7df4:d3fb:2b0a%3]) with mapi id 15.20.4951.012; Thu, 3 Feb 2022 13:52:12 +0000 Message-ID: <7ce4546d-94ce-d204-dcc2-6466aa5521f7@intel.com> Date: Thu, 3 Feb 2022 19:22:00 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.5.1 Subject: Re: [PATCH] app/testpmd: skip stopped queues when forwarding Content-Language: en-US To: Dmitry Kozlyuk , CC: Xiaoyun Li , Yuying Zhang , , , Raslan Darawsheh References: <20220113092103.282538-1-dkozlyuk@nvidia.com> From: "Singh, Aman Deep" In-Reply-To: <20220113092103.282538-1-dkozlyuk@nvidia.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: BM1PR01CA0074.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:1::14) To MWHPR11MB0062.namprd11.prod.outlook.com (2603:10b6:301:67::34) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4442423a-3574-4f0d-42af-08d9e71c60ef X-MS-TrafficTypeDiagnostic: CH2PR11MB4456:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:10000; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 87oZ9LMHjB/W3hTMytB2HlrifkJwYSECfZPmHn4xwKkcEBYzvwNpN1yebrkeAEijK1LZWqUCyQ3KwZJcHoL1gcd4iq9uIt/mxAPIL4WLnLpg2rS2w8cz7BPY5yVA3gNsicdnevXsmp+oNQx781/Q9ENQOXQdKdcz1VcyPwMeaTJZ3Lb0bUQZ7iYI7rUQfWYIunPYEXiWrvn86X0/M1z5Iwt1o9rJeuTI2HWqXV8Zy31dh+Pv9pVaED2QBo308eZNmQ5ZyKjjTmh51uczUHn2AFTbkafYI08O/WFsKwDspUyBFI/HXCi0sF/Xtq/Ggd0K1gZV91wf7lpfAVppyGzkidl+7JbTThTsb/6/3tPAD5l0AKxVAr/fmiUzoqic7pwKqF/18hckdCsrrnhGItISGQ88LrV00HSle5Ax+2LNS0HEHMv/Ld01dmyrUOBRjk4XnoUdwoPJH5fQvXUZ9HJIoykUVap1Q4XDs4LilCy953hv9uFZEB2tfrI6DB5B3wzGDifxgRmPTbD3trYWziR2F3AfIgnv+VCk1b8OsKDiZ3VoLW/SrB9qtUCYZ1mG+uneiaOEUmOd5uzuyFyvdNFais/YL3Tdj9MkQv8328FnJ+k0fubfoGG+XtqMF09ZJWGc5/6jiwdG/mzyWZM1++h6Bnx0ZCgvn8N342fMwtCVj9lomFKFSvnNiVBeVe6x058m2qW4pOCyGDuS2EKWcsn2d0fmRI3yGM6xbP5MUmXUMLU= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MWHPR11MB0062.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(66476007)(66556008)(66946007)(8676002)(8936002)(4326008)(86362001)(316002)(508600001)(26005)(83380400001)(38100700002)(54906003)(2616005)(6486002)(186003)(82960400001)(31696002)(31686004)(2906002)(6506007)(6666004)(53546011)(6512007)(36756003)(5660300002)(43740500002)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?YitQQ3RadmRNWXpqYUJRQ1FWSFhLc1BFM3FXd2pYYnBLTEdqS2xmVGkyaTc1?= =?utf-8?B?VWJyNXBnK01HTTBITjZOaUxEVjR1RlpIRnRmV1AyY21zVU1KY2wvaVVDck53?= =?utf-8?B?Tmtwemc0NTd3c0N4c01OSDFNbmxyZkdpR1ZZamxnQkVYcE13eGZkSi9OTlI0?= =?utf-8?B?OHgzQjk5MGExSERlWnkzdWZ1N0ZhRFNMUjdHcURkaWpnNGVaVnFDRUc2WXhM?= =?utf-8?B?YlFYd3EzMk50cUl1b3Rkc2xaeTdUazhqSlMrQ2hlMGE2Qm9seExSNE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ZpMmpDZGZTN2ExWEVpTG9IdnpLcE9X?= =?utf-8?B?M0RtaVhRVFcvMGRCQ3o1dlQvNWkza3E3QjdJdzZIdGlsR2s3dHU5NEJEU3VZ?= =?utf-8?B?YjlHSnRSbG5NZ2ZrN0JSVjUwam9DYjJoZS9jWGRKS0hSWnNIRUZIdzIvTEhB?= =?utf-8?Q?iSRXTfqh1lh0+SGVgW2/6Zbb4z09kKUinF0qi+jwmA=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 4442423a-3574-4f0d-42af-08d9e71c60ef X-MS-Exchange-CrossTenant-AuthSource: MWHPR11MB0062.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Feb 2022 13:52:12.5091 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 0iv9K7p8Jo52zoytZKY+WC2Sqx2GK1nmcsgaWC5KVn2snPakCG6rcY5A0SwjVwG3X85XHISnyGjJdFJCK34jwWobivaWHvb4hEYFtRcXEPU= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR11MB4456 X-OriginatorOrg: intel.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 Hi Dmitry, Thanks for the patch. On 1/13/2022 2:51 PM, Dmitry Kozlyuk wrote: > After "port rxq|txq stop" > the stopped queue was used in forwarding nonetheless, > which may cause undefined behavior in the PMD. > > Record the configured queue state > and account for it when launching forwarding as follows: > +--------+---------+-----------------+---------------+ > |RxQ |TxQ |Configured mode |Launch routine | > +--------+---------+-----------------+---------------+ > |stopped |stopped |* |- | > |stopped |started |txonly |(configured) | > |stopped |started |* |- | > |started |stopped |* |rxonly | > |started |started |* |(configured) | > +--------+---------+-----------------+---------------+ > Display stopped queues on "show port config rxtx". > > Fixes: 5f4ec54f1d16 ("testpmd: queue start and stop") > Cc: jing.d.chen@intel.com > Cc: stable@dpdk.org > > Signed-off-by: Dmitry Kozlyuk > Reviewed-by: Raslan Darawsheh > --- > app/test-pmd/cmdline.c | 8 ++++++++ > app/test-pmd/config.c | 6 ++++++ > app/test-pmd/testpmd.c | 18 ++++++++++++++++-- > app/test-pmd/testpmd.h | 10 ++++++++++ > 4 files changed, 40 insertions(+), 2 deletions(-) > > diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c > index e626b1c7d9..8b0920e23d 100644 > --- a/app/test-pmd/cmdline.c > +++ b/app/test-pmd/cmdline.c > @@ -2702,6 +2702,14 @@ cmd_config_rxtx_queue_parsed(void *parsed_result, > > if (ret == -ENOTSUP) > fprintf(stderr, "Function not supported in PMD\n"); > + if (ret == 0) { > + struct rte_port *port; > + struct queue_state *states; > + > + port = &ports[res->portid]; > + states = isrx ? port->rxq_state : port->txq_state; > + states[res->qid].stopped = !isstart; > + } > } > > cmdline_parse_token_string_t cmd_config_rxtx_queue_port = > diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c > index 1722d6c8f8..7ce9cb483a 100644 > --- a/app/test-pmd/config.c > +++ b/app/test-pmd/config.c > @@ -2817,6 +2817,9 @@ rxtx_config_display(void) > rx_conf->share_qid); > printf("\n"); > } > + for (qid = 0; qid < nb_rxq; qid++) > + if (ports[pid].rxq_state[qid].stopped) > + printf(" RX queue %d is stopped\n", qid); > > /* per tx queue config only for first queue to be less verbose */ > for (qid = 0; qid < 1; qid++) { > @@ -2850,6 +2853,9 @@ rxtx_config_display(void) > printf(" TX offloads=0x%"PRIx64" - TX RS bit threshold=%d\n", > offloads_tmp, tx_rs_thresh_tmp); > } > + for (qid = 0; qid < nb_txq; qid++) > + if (ports[pid].txq_state[qid].stopped) > + printf(" TX queue %d is stopped\n", qid); > } > } > > diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c > index 6c387bde84..36ff845181 100644 > --- a/app/test-pmd/testpmd.c > +++ b/app/test-pmd/testpmd.c > @@ -2152,6 +2152,8 @@ flush_fwd_rx_queues(void) > for (rxp = 0; rxp < cur_fwd_config.nb_fwd_ports; rxp++) { > for (rxq = 0; rxq < nb_rxq; rxq++) { > port_id = fwd_ports_ids[rxp]; > + if (ports[port_id].rxq_state[rxq].stopped) > + continue; > /** > * testpmd can stuck in the below do while loop > * if rte_eth_rx_burst() always returns nonzero > @@ -2223,8 +2225,20 @@ run_pkt_fwd_on_lcore(struct fwd_lcore *fc, packet_fwd_t pkt_fwd) > static int > start_pkt_forward_on_core(void *fwd_arg) > { > - run_pkt_fwd_on_lcore((struct fwd_lcore *) fwd_arg, > - cur_fwd_config.fwd_eng->packet_fwd); > + struct fwd_lcore *fc = fwd_arg; > + struct fwd_stream *fsm = fwd_streams[fc->stream_idx]; > + struct queue_state *rxq = &ports[fsm->rx_port].rxq_state[fsm->rx_queue]; > + struct queue_state *txq = &ports[fsm->tx_port].txq_state[fsm->tx_queue]; > + struct fwd_engine *fwd_engine = cur_fwd_config.fwd_eng; > + packet_fwd_t packet_fwd; > + > + /* Check if there will ever be any packets to send. */ > + if (rxq->stopped && (txq->stopped || fwd_engine != &tx_only_engine)) > + return 0; > + /* Force rxonly mode if RxQ is started, but TxQ is stopped. */ > + packet_fwd = !rxq->stopped && txq->stopped ? rx_only_engine.packet_fwd > + : fwd_engine->packet_fwd; Should we have a print here for user info, that mode has been changed or ignored. > + run_pkt_fwd_on_lcore(fc, packet_fwd); > return 0; > } > > diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h > index 2149ecd93a..2744fa4d76 100644 > --- a/app/test-pmd/testpmd.h > +++ b/app/test-pmd/testpmd.h > @@ -216,6 +216,12 @@ struct xstat_display_info { > bool allocated; > }; > > +/** Application state of a queue. */ > +struct queue_state { > + /** The queue is stopped and should not be used. */ > + bool stopped; > +}; > + > /** > * The data structure associated with each port. > */ > @@ -256,6 +262,10 @@ struct rte_port { > uint64_t mbuf_dynf; > const struct rte_eth_rxtx_callback *tx_set_dynf_cb[RTE_MAX_QUEUES_PER_PORT+1]; > struct xstat_display_info xstats_info; > + /** Per-Rx-queue state. */ > + struct queue_state rxq_state[RTE_MAX_QUEUES_PER_PORT]; > + /** Per-Tx-queue state. */ > + struct queue_state txq_state[RTE_MAX_QUEUES_PER_PORT]; Can we think of adding rxq_state/txq_state as part of existing structures under rte_port->rte_eth_rxconf/rte_eth_txconf. And if it helps, rather than bool can we use u8 with eth_dev defines- #define RTE_ETH_QUEUE_STATE_STOPPED 0 /**< Queue stopped. */ #define RTE_ETH_QUEUE_STATE_STARTED 1 /**< Queue started. */ > }; > > /**