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 9D32FA00C3 for ; Thu, 13 Oct 2022 05:33:36 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 96E5242CF3; Thu, 13 Oct 2022 05:33:36 +0200 (CEST) Received: from mail-pj1-f52.google.com (mail-pj1-f52.google.com [209.85.216.52]) by mails.dpdk.org (Postfix) with ESMTP id 71BB342C94 for ; Thu, 13 Oct 2022 05:33:34 +0200 (CEST) Received: by mail-pj1-f52.google.com with SMTP id x31-20020a17090a38a200b0020d2afec803so836506pjb.2 for ; Wed, 12 Oct 2022 20:33:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=/Hq/Vy4KG31aoancdydIppn9pvS2JePkD1QoMPd9APc=; b=k7S0lfwlsjiXDrfAOZkil6P9FPTbwilnmeVqRVPg8zJD5c6Q9Oc+9gsZN5ERjnDMXv am6XZ0a9DcYmOGYI9dIIN3l3LB9cRJNIHYnjb1fQvM6eWDkLz2m1ZBwOKjqkkMcDbIOD EspXX/yMyP5p10SKeifFs9MwDa+Td325YHGUXMMU+GPmSiQSLWPRiYK4uRx3BHjbPBKw mhQ/5Yf8vQZ5i038PttBN8SY7ioiptEe6hNAk/G7qil3+Rv0XXvl3RYLRF1SIUJLxs/5 wNcOiGpihBs7ysk6aGyWjNeaDV5J8wGrGGVdJwLdUDiyaiWzvT2gzKt4kVeS1EoOo7FU J7RQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/Hq/Vy4KG31aoancdydIppn9pvS2JePkD1QoMPd9APc=; b=spVwgh+VZLxSTD7SEQv49r2HJMGB124sJHPHdx+cH8NaxfccPlRzau9BxvmNu2UQFF zykmtmt5wOYG6iZBXhJJdztrU7WqBP9GUPePb2+3oNjVp1RtMaU6G9Lv2DwUtUMupY+D voTkDoAolLZS8qkpHm+/ZNWWOSSCBqpejD/zmYaJi3pm2cHNjTQvKGkPZRoXquazkIUb ZVRHNbNymQA/nwUs8P0xIQODm3NInIXqa4isO1gsJzX+Pi7Mb6Xfdtt8ZG0wamz4sQXY zh/OWRG7tTsTrIm7cS9zsyJvbzzEAZDZq81R5/y+rdUHr9djZ28V2KKp20GMIdy3PXmq 29WQ== X-Gm-Message-State: ACrzQf0NQPoo0SIxUuzvAZBPZR/KelvXM0WobrCpNXVxJVtRe+U7EAiI QdlsbTVpRu0cFczGGoCa7fk1Jg== X-Google-Smtp-Source: AMsMyM4w5eEQ0xvmx5qbgYFsRKwBfokwPwM/XjdS+ptPPjfUy+y97iGYhVRmItsGWw6EM7ZgJBVDDg== X-Received: by 2002:a17:903:230a:b0:17d:707a:360e with SMTP id d10-20020a170903230a00b0017d707a360emr33042740plh.118.1665632013444; Wed, 12 Oct 2022 20:33:33 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id a11-20020a170902900b00b00179c99eb815sm11373734plp.33.2022.10.12.20.33.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Oct 2022 20:33:33 -0700 (PDT) Date: Wed, 12 Oct 2022 20:33:31 -0700 From: Stephen Hemminger To: Peng Zhang Cc: dev@dpdk.org, andrew.rybchenko@oktetlabs.ru, aman.deep.singh@intel.com, yuying.zhang@intel.com, stable@dpdk.org Subject: Re: [PATCH v3] app/testpmd: fix incorrect queues state of secondary process Message-ID: <20221012203331.60fa714a@hermes.local> In-Reply-To: <20220906145310.8849-1-peng1x.zhang@intel.com> References: <20220819100940.657437-1-peng1x.zhang@intel.com> <20220906145310.8849-1-peng1x.zhang@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org On Tue, 6 Sep 2022 22:53:10 +0800 Peng Zhang wrote: > + if (rte_eal_process_type() != RTE_PROC_PRIMARY) { > + struct fwd_stream *fs = fwd_streams[i]; > + struct rte_eth_dev_data *dev_rx_data, *dev_tx_data; > + > + dev_rx_data = (&rte_eth_devices[fs->rx_port])->data; > + dev_tx_data = (&rte_eth_devices[fs->tx_port])->data; > + > + uint8_t rx_state = dev_rx_data->rx_queue_state[fs->rx_queue]; > + ports[fs->rx_port].rxq[fs->rx_queue].state = rx_state; > + uint8_t tx_state = dev_tx_data->tx_queue_state[fs->tx_queue]; > + ports[fs->tx_port].txq[fs->tx_queue].state = tx_state; > + } Could the logic be put in stream_init() like this? It keeps with the function pointer model object style model in that code. Also, it makes testpmd more dependent on data structures that should be hidden and internal only (rte_eth_devices).