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 AA193A0C4A; Fri, 16 Jul 2021 11:10:12 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2D8DB4067B; Fri, 16 Jul 2021 11:10:12 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id BF0074014D; Fri, 16 Jul 2021 11:10:09 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10046"; a="191073762" X-IronPort-AV: E=Sophos;i="5.84,244,1620716400"; d="scan'208";a="191073762" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Jul 2021 02:09:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,244,1620716400"; d="scan'208";a="563078878" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by orsmga004.jf.intel.com with ESMTP; 16 Jul 2021 02:09:47 -0700 Received: from orsmsx607.amr.corp.intel.com (10.22.229.20) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.10; Fri, 16 Jul 2021 02:09:47 -0700 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) by ORSMSX607.amr.corp.intel.com (10.22.229.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.10; Fri, 16 Jul 2021 02:09:46 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.10 via Frontend Transport; Fri, 16 Jul 2021 02:09:46 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.175) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.10; Fri, 16 Jul 2021 02:09:46 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mW/6yM/HG6j8CZkvrIpRKPSZtt6mleuog0uYkxv5BQVt4bHx0f7F7J33gVHlHnyBRD5OUVoKCaBKz7no9l3S1Gx8ed62VniWFhBkiXkfsd0yBeEP60EBzL54yfhiXGNxsrMTN24RGOgYEZFLwpJsGQMtNYNd9TPIoJLsppBxWJcnNaGZtOKPmmwOmn52N2d29iNof8eOh3tnvsXLlg5oaE9zXn+MMi5UZlDOG+N+o9KqxQN+ElWU9htCyJTEzWllfXtilRo9Jk8df7iC/YoBLvok+tYSB568L9YSJ83RzbRA2YsPaunK4hyKQQYB1ldsTirPTpV7AySVBQsdPH/gxQ== 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-SenderADCheck; bh=k8XSE75BRQD+Opf0o04mxcmQT1pdX16QdyZB+D0aPNw=; b=SjUUpdV1x/PkoAK0UBMMPNFE9Tgsash8Lh0JLe/P7KKK4PHoIatjcVTDdsN1PRvd+wcX2eIhspd2cEzQ8KM2fGGtsELZFsi3udbrvyBW7IYJRrtrjnOPBafcR+pfJtJntjDC88R7x4KH9BUckQ0ggtD4/XgBlbRaG30B7nXOitplH98S+UJvsHmhUAZHhm8SWwd88T53IMP9isY7KVMYOrwaoQKUALRBLbqK7Mp3eftS+JghBNgk+mAuvrEMP7L1X8lPjKruylaSy8jBu7J9J1aX3M4iU4b0uOt/UEPdmlDf/NlMgpc2D7CpfogQCDl0VNdjjv0hzWkrdYIyLU2abg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=k8XSE75BRQD+Opf0o04mxcmQT1pdX16QdyZB+D0aPNw=; b=wjOX7Gao2opET5fjy4sU6kgy3qUyZQJqvnphWSLh3VEk734T+xsufRZQ7jdu0mabxwhDgFZr9RqENs73+6G/0KyaLgf4+ccamhsgBkMUYDYLOtOy9Jf/LFU054ihrmIOlrQtlFGiGOjg92ZfclDM+buwKcbOdeh0HDNvn6yKTmY= Authentication-Results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=intel.com; Received: from PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) by PH0PR11MB4872.namprd11.prod.outlook.com (2603:10b6:510:32::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4331.23; Fri, 16 Jul 2021 09:09:45 +0000 Received: from PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::bde5:66de:e755:c5bb]) by PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::bde5:66de:e755:c5bb%4]) with mapi id 15.20.4331.026; Fri, 16 Jul 2021 09:09:45 +0000 To: "Li, Xiaoyun" , Andrew Rybchenko , "Wang, Jie1X" , "dev@dpdk.org" CC: "stable@dpdk.org" References: <20210709155717.103425-1-jie1x.wang@intel.com> <987e1c1b-a695-a8ce-1ee3-da87c9612415@oktetlabs.ru> From: Ferruh Yigit X-User: ferruhy Message-ID: <13e8c371-935b-35ce-2565-c3a419938dd8@intel.com> Date: Fri, 16 Jul 2021 10:09:40 +0100 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-ClientProxiedBy: MWHPR15CA0067.namprd15.prod.outlook.com (2603:10b6:301:4c::29) To PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [192.168.0.206] (37.228.236.146) by MWHPR15CA0067.namprd15.prod.outlook.com (2603:10b6:301:4c::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4331.22 via Frontend Transport; Fri, 16 Jul 2021 09:09:44 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f1dbe8ea-e6a0-44f4-7b09-08d94839747c X-MS-TrafficTypeDiagnostic: PH0PR11MB4872: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ElpeFstbp7QCppHkIv0QzjoNSIoyFnRGhTVc0s5Rvz51W+nesR2S61WTZQM+lvRXuXASzscw3DyEoHi0iisFdAUp8VY++Uqp4N3kR9GslxZtakUvytTC/dgiQDwmiYffPT1ZwbY4JBana3+NXr6wUfnLAQNqhMY6rdrs9YEyeVTIgcgM639Lc1YkHXZAen1bb6Oor2WCUJmtEOBWiA5eDs9Nj9MLK8/KbXqqG97IMYHKr05hlVIKZGS9EgTeWuvg4aGRtRs1fBHyECIFXjkd1M1naTb97CLRos4UsP2oHvqeuD07eES/ynpRkL8wptX7qSTKnHkF44D5AKXQ8IXUpAZGf9HtpCzuMiTBqYvznhCppnUxEz0BKTsT/zaRkr5AtYuo4+OAriKRF6bzo80M/5iZQyFZH+b1uASGyDVKdcF1sFoVTAsv4VjXk3Z8l58QtXeBwr7mQODju1VA6geB4mQnMAkl0+ruw2oa1BgVqxxKUUkSX+vWLHCbQ5R19nB73be/p024AApM+WIctetc/V0fhl7RUtwgK1p9MhLQ6Dq1UVy1NnHbQ3TtjsdoTYmnhnJ/S8nMKfCXcrR0OJ0+KgYgP6bgs5rckjTDmzEf9m9HJHSRbOfHi6yDP8eKLuynB+OjuoQJnS0yYAwYsQF9Yo44as5LrW60LN52KQAR7VRIc0c6t/J3wKzIlLxR4sZXf8piDRYXPUBvAYxHOrcV//yVyJPTm5ag9/YkKvC7WMw= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB5000.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(366004)(396003)(39860400002)(376002)(346002)(16576012)(316002)(38100700002)(5660300002)(4326008)(8676002)(2906002)(8936002)(36756003)(110136005)(2616005)(6486002)(956004)(53546011)(31696002)(44832011)(83380400001)(478600001)(66946007)(66476007)(26005)(31686004)(66556008)(186003)(86362001)(6666004)(21314003)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?ckhPVThEcTNKRXBTcGtGNS9tSmpYc2ZXMzcrdysvQ1BiQzNvSU9JOVZGN2hh?= =?utf-8?B?SzdkNWxUb3EzRG5TdXhyUU9WZ21iWDVQWXBFYmFtQjBRRmlwaXpBdlIrWktr?= =?utf-8?B?UlduM08rTStEcXhaQkZzbnBLaC9jM0RBWXZGQlVIaFMrSWJSN3NEazRFdnpH?= =?utf-8?B?OTcvTUhSTExkUlJTQ1JVTGdvakVTdDFIaURKMm83UFhCTWFKWUdleDZ5WEph?= =?utf-8?B?VGo5NFQybnVVM2dCb3p4OXkwOG1qSXE1Q3ZxT3h3SWN6NjduQ091bGRuWWNL?= =?utf-8?B?dVBjVUNJZkZBLzJhc2t3T0wxeU1iNEtNc01JQTVyeDlXQjYzdEgrWWxYV05W?= =?utf-8?B?V2tLbWJLNUx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=?utf-8?B?NXBZWEY3dktTL3ZQZHN3K00vdEN2V205VlNTMExwd3dOQTdYQ3lCaFhPZE81?= =?utf-8?B?ZUxPSVlVQUpXeG1uUW9abFpCclVabUFlNWllY0hxY3VrdWJySHJLaTdlRFph?= =?utf-8?B?aFFkYkdsTFNMNE8yZ3pZSVF3VEg2UGhLVGpzY09XU1lySkVKZnlFQ1hDYXlu?= =?utf-8?B?SlI5MEFLMnpvdTRFZzdGZDkrWStoVytMOE1sZmRSZjVmejFORFdnM0hNd1Zq?= =?utf-8?B?RHcybk9aRXZFdGR2NmVoSDF3WHhNbldVbVFxVlBtY0JkL25PMElVOG9TY2xJ?= =?utf-8?B?UGZYSWdGRytEODFJS1lnWHBQMGxseFJOTWpXaWhFeTR2djA5UHBtell0aklq?= =?utf-8?B?WWgvTktLNUo2bWF5V0hIcW1UKzY2dWg3VzlLQTRKWkRybnA0WjhtU21CODNj?= =?utf-8?B?dlkwSHZYNFU2Nmk1UGRETzFOWXQrMGRnbXltZ2sydUtRRmhZRHVOSmtGRGlh?= =?utf-8?Q?vKbY1xXS5Kmiyh/FffGtQKiIOKuMydr7l5jrNDu?= X-MS-Exchange-CrossTenant-Network-Message-Id: f1dbe8ea-e6a0-44f4-7b09-08d94839747c X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5000.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jul 2021 09:09:45.6158 (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: fwoK/5WASW5eix+x6fd0/Y1WhAHLDF3ZkLz5TvJgwPbKvY9cYHiNPmp4ugKrOOVlxt+80gJxMm71mcOOInmCDQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB4872 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [dpdk-stable] [PATCH] app/testpmd: fix testpmd doesn't show RSS hash offload 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 Sender: "dev" On 7/12/2021 4:12 AM, Li, Xiaoyun wrote: > > >> -----Original Message----- >> From: Andrew Rybchenko >> Sent: Friday, July 9, 2021 17:27 >> To: Wang, Jie1X ; dev@dpdk.org >> Cc: Li, Xiaoyun ; stable@dpdk.org >> Subject: Re: [dpdk-dev] [PATCH] app/testpmd: fix testpmd doesn't show RSS >> hash offload >> >> On 7/9/21 6:57 PM, Jie Wang wrote: >>> This patch reapply Rx/Tx offloads configuration for all ports after >>> the program configuring the device port. When the program configures >>> the ports, the default Rx/Tx offloads are modified. >>> >>> So it is need to reapply Rx/Tx offloads configuration before testpmd >>> showing offloads. >>> >>> Fixes: ce8d561418d4 ("app/testpmd: add port configuration settings") >>> Cc: stable@dpdk.org >>> >>> Signed-off-by: Jie Wang >>> --- >>> app/test-pmd/testpmd.c | 15 +++++++++++++++ >>> 1 file changed, 15 insertions(+) >>> >>> diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index >>> 1cdd3cdd12..7089ae216d 100644 >>> --- a/app/test-pmd/testpmd.c >>> +++ b/app/test-pmd/testpmd.c >>> @@ -2475,6 +2475,9 @@ start_port(portid_t pid) >>> } >>> >>> if (port->need_reconfig > 0) { >>> + const struct rte_eth_dev *dev = &rte_eth_devices[pi]; >>> + int k; >>> + >>> port->need_reconfig = 0; >>> >>> if (flow_isolate_all) { >>> @@ -2508,6 +2511,18 @@ start_port(portid_t pid) >>> port->need_reconfig = 1; >>> return -1; >>> } >>> + >>> + /* Apply TxRx configuration for all ports */ >>> + port->dev_conf.txmode = dev->data- >>> dev_conf.txmode; >>> + port->dev_conf.rxmode = dev->data- >>> dev_conf.rxmode; >>> + /* Apply Rx offloads configuration */ >>> + for (k = 0; k < port->dev_info.max_rx_queues; k++) >>> + port->rx_conf[k].offloads = >>> + port->dev_conf.rxmode.offloads; >>> + /* Apply Tx offloads configuration */ >>> + for (k = 0; k < port->dev_info.max_tx_queues; k++) >>> + port->tx_conf[k].offloads = >>> + port->dev_conf.txmode.offloads; >> >> Does testpmd really require these copies? May be the right fix is to get rid of >> these copies at all and show actual information from data->dev_conf ? >> > The "show" command cmd_rx_offload_get_configuration_parsed() actually should only touch port->dev_conf. > And It doesn't only show dev_conf, but also per queue rx_conf. It's impossible to show per queue rx conf info from data->dev_conf. > Testpmd having these copies also bothers me. This seems because ethdev doesn't provide a way to get current config, so application has to keep the copy, but this is causing complexities and diversions as this case. So we can try to address this in a larger scale and try to eliminate the need of application config copies. Also RSS_HASH offload flag being set by PMDs unconventionally (instead of application) making this issue visible, but I think there isn't much we can do about RSS_HASH. > The copy is already done in init_config actually. But by then, dev->data->dev_conf doesn't include RSS_HASH. > RSS_HASH is added by driver in dev_configure. That's why this patch wants to copy again after dev_configure I guess. > > But this patch is INCORRECT anyway. > Because any cmd that changes port offload will change port->dev_conf and port->rx/tx_conf NOT dev->data->dev_conf. > So after this patch, if a user " port config 0 rx_offload xxx on", all of the new config will disappear. >