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 E496C41CB1; Thu, 16 Feb 2023 13:54:34 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 84FC740EE3; Thu, 16 Feb 2023 13:54:34 +0100 (CET) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id C74FB40A8B for ; Thu, 16 Feb 2023 13:54:32 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1676552072; x=1708088072; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=QOsaEBl6Lzl60CW/c2H21602AJYk85kcWYoYEVeEqo8=; b=VFodTfwB0m9RTstebE1C4c5znjYJCOqB0ALX3oqIhAJU+rK7J7ElZcQI royivMhr8pNc8PVX23pMmXPX+Aq27YqSHkO0N/ASU8ex9Uj3R9b3PV6ZJ TvRtIniOrgJ3A3iSBFwLHbtInNJVoiLHgF8LBkoPKwX7TsF8NQ8eRTt0Q ctKUqu3mThAWbBqjWNd5MtYjZ39YH6jYIdGaDj/iByEhuzmy5vPATuHYI AD0pIuO7fD9erI8EKhSAA5aOvunTaV3AJb9jwbqJvRaMQz2XzDaAIn6DO oI+HuT1+ipRiIY241ocZWUfH05p4qHanM4PmKEOJK+B7guxQvuE3ST0f1 Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10622"; a="329428023" X-IronPort-AV: E=Sophos;i="5.97,302,1669104000"; d="scan'208";a="329428023" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Feb 2023 04:54:31 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10622"; a="619975508" X-IronPort-AV: E=Sophos;i="5.97,302,1669104000"; d="scan'208";a="619975508" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by orsmga003.jf.intel.com with ESMTP; 16 Feb 2023 04:54:31 -0800 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) 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.2507.16; Thu, 16 Feb 2023 04:54:30 -0800 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16 via Frontend Transport; Thu, 16 Feb 2023 04:54:30 -0800 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.41) 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.2507.16; Thu, 16 Feb 2023 04:54:30 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IK/mWMKTJKO/aXiQcurxFmgoMoKsIbGRs2JJiKsWbq2nAMFvr1dUKROIly9DX3ckx9GRB8mLftBg9+jUMKHE50XZ9FDZSVYReIXyOlBy6ZXdXXxigfdQTlvTmVp9Y35UE/hZEWvjjR1FMa4YezdxHSTXy5o6Wod5H9p2nYcLtFaHVfRDok/WzmPsvjIfI9fH6Auzjpb2o1gOgXFKru+2QAM+n9UJ7/9OlR2pONFWYwBjKX8xyZqvPLwSLKMPlOh6ZBxsR83TLlMjE2qVln9dYlD4FB/ry+VEtHytR/tEMm17bLOhpHflT0HuCMdj4SD/oVAe7UvoHAj+EchJfp8dbg== 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=kaOYEMMqAQTtlUelEAR4prVsXRnXYs6jcNvP4ExYv2c=; b=CEfujlznmuiUGSYollIWW+rodoxFY/EywAghppAdofFVluIScXuE8XnjlJHlKY4ghYFdUqZI3OLAyq33QQehhOz0GYJJiDgg3p68kSrcf33Gfr84PlabUf3vZ6zO9X61L5lKhXib/LrqQaJVPG4bB7+J3stFL5VySHSPSfT91G5/K1LH5zRahOwhNKjjNjsEIrH+x+05dzn9VqndMiF6iTsYADAb60VK3hQZoqWiRugF6xNMBZHv3xTOYoWvkpsisgvO88n4+swr/4CcrDEGxGn1RNdVn/+fV95uz4LTLJFADjjH7CSSwGuyjuxQs/laUj5LHB8713ygzpjpzIA8PQ== 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 Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) by PH0PR11MB5904.namprd11.prod.outlook.com (2603:10b6:510:14e::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6111.13; Thu, 16 Feb 2023 12:54:28 +0000 Received: from DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::aaba:abb7:8794:def]) by DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::aaba:abb7:8794:def%9]) with mapi id 15.20.6111.013; Thu, 16 Feb 2023 12:54:28 +0000 Date: Thu, 16 Feb 2023 12:54:20 +0000 From: Bruce Richardson To: fengchengwen CC: Ferruh Yigit , Dongdong Liu , , , , , Subject: Re: [PATCH v5 2/2] ethdev: support xstats reset telemetry command Message-ID: References: <20221219090723.29356-1-fengchengwen@huawei.com> <20230209023203.35269-1-fengchengwen@huawei.com> <20230209023203.35269-3-fengchengwen@huawei.com> <6921c549-c980-8911-cebf-2c7ab7872f02@amd.com> <92b271ec-3271-1c80-e148-4a53f97bc074@huawei.com> Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <92b271ec-3271-1c80-e148-4a53f97bc074@huawei.com> X-ClientProxiedBy: LO4P265CA0252.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:350::18) To DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR11MB7309:EE_|PH0PR11MB5904:EE_ X-MS-Office365-Filtering-Correlation-Id: a17dccc4-ae64-4aaf-00c9-08db101cf079 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: z8rQbjwSMSl3lH99gfb5Ume1wQt1V29LyPskMh/IxXB70ulcQT0eHdgWAtRUUzF44FiKaraR9z+aMzWoaa5n3MXFZyF8PbkzlgQrAkiTNlnDoL1iErNiOuxQhAqZaglxfmYXprwfjcABJ878zzVKu9sFJuZiPRFybXNr6OdNRWYmbIKpkCp5+NC5My/QgnnnTYeldXEXbp6NfLAUlcKCDvQauCRm6IWW45W7AUENWOTESRBQP7aVRU1YO1Cms+N287PdmIoARsABg19BtkcQ42aMmdNFmK20abXGimReiySffwV2TcTYgC8QdnWPaNJo3qccBMxNWO5TE3ajVap+U/pjrsZcepRakdKqNK0VTdZbPTgRqvm4mAo4sjtsWrlcfxvuz0vXad0RkehfJbKgZOPdI+QEs3qNbc9O6penJ9B1HDw5MlJSRSJ7109HDHSfB0xcFLmMkZWDwt8RyMC6Jukp5fkfc1N8RQ1Y1HYL0S3L6j9SkkJzDBL3qAxDtLROYyw8eL8VQGyp/rWWamg9CupJwB8+Cv0UgU7AMqDgk7Z/hCggg/mBKy5NZbYm20Ke3WUir58BFCEp8gRrilnEKCdypBfg4xKvc9ES2sW8WOVCzM71kFLhp/ZdLojx8APs+hGYSl3JO4TfNz/TsRCADNX9GunOvAgw7C5y23BlBr3r9HJrYVD0HGk0/m1xdq2H X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DS0PR11MB7309.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230025)(39860400002)(376002)(346002)(366004)(136003)(396003)(451199018)(38100700002)(82960400001)(86362001)(6916009)(44832011)(5660300002)(8936002)(66946007)(66476007)(66556008)(41300700001)(8676002)(2906002)(6512007)(83380400001)(186003)(54906003)(316002)(107886003)(6666004)(6506007)(53546011)(26005)(478600001)(6486002)(4326008)(67856001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?cT7khJUlC7cbvpp9icyaxIYuys+d4pB5wqZbZfy1ILgCswHNBnQtxfdtOe9r?= =?us-ascii?Q?K6VByulmZ+VHyc9SDt9awcJHpjohmoA1zgPgfRzXsQNM+11e4KQAn38YcKYJ?= =?us-ascii?Q?4Y27TaKMZlw1jn/eWMVHwJtMtdCTAN4aCk9UTBG1qQpv919zkWlJQMge/0S1?= =?us-ascii?Q?UYlmlG8ptG+gLr18pjcIMN1tau39NHvJtsflC5QHwDr2kc1RHWsFqFHFWPQ3?= =?us-ascii?Q?RwePPguyl+wUVBCaL5zdbXg883ECc/vwor9xm92GqtkMRPzgUZMOJrwLriA7?= =?us-ascii?Q?9HoM9jS0zX8tIY4SBcImyiNt5ndpDSaRJ+v8Zc5SoPhf0anCuckvVUjWs94P?= =?us-ascii?Q?lJOGMC9Ui56D9ZgYYDUMpFqjOs6cREtZ9xDhwCty3vD/WX5EvGeZlZ3x5L3W?= =?us-ascii?Q?MHIyzb3gmyfpTis+BkFrmyx+YiU/InF15anUif+xqKofaV9kMxZgk8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9JEzy0dDVl05v3Fad/OBqwRQ+b5Wd?= =?us-ascii?Q?CCn+RkfbBZ8thJwGW5qZHM2EoTXAFlye1Z3mB6UTWK/bCplcFO88e7oWsL9Z?= =?us-ascii?Q?UEHQqUHPh0zj/sE8UtlofDpBvbjzUzN21mJuxnDbiBHiKsSCEOw9H+XLAi0A?= =?us-ascii?Q?KSneu/Ew7sO+i5MZgJvT2TmxtoDqz1YdDgRLMy8isBJTssQh4eiUJrx/oCwg?= =?us-ascii?Q?rzpsS7Nx5tZU5gRJiLYXAFaeWAZYMYyHPPGq336P4dExE++dTLO6hedHqDHL?= =?us-ascii?Q?LA=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: a17dccc4-ae64-4aaf-00c9-08db101cf079 X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB7309.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Feb 2023 12:54:28.5147 (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: vsAzL/OqKKpg/MpnWtTILZMKSYujQscB0Rj/TEE4JnVyX3Sq4atjdBZOS1/IzwnozSJrvPdgQHYaKTyOwiZFS58RLQaP9azBc8mpg58nmcc= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB5904 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 On Thu, Feb 16, 2023 at 08:42:34PM +0800, fengchengwen wrote: > On 2023/2/16 20:06, Ferruh Yigit wrote: > > On 2/16/2023 11:53 AM, fengchengwen wrote: > >> On 2023/2/15 11:19, Dongdong Liu wrote: > >>> Hi Chengwen > >>> > >>> On 2023/2/9 10:32, Chengwen Feng wrote: > >>>> The xstats reset is useful for debugging, so add it to the ethdev > >>>> telemetry command lists. > >>>> > >>>> Signed-off-by: Chengwen Feng > >>> This patch looks good, so > >>> Reviewed-by: Dongdong Liu > >>> > >>> A minior question > >>> Do we need to support stats reset ? > >> > >> Stats is contained by xstats, and future direction I think is xstats. > >> So I think we don't need support stats reset. > >> > > > > I have similar question with Dongdong, readonly values are safe for > > telemetry, but modifying data can be more tricky since we don't have > > locking in ethdev APIs, this can cause concurrency issues. > > Yes, it indeed has concurrency issues. > > > > > Overall do we want telemetry go that way and become something that > > alters ethdev data/config? > > There are at least two part of data: config and status. > For stats (which belong status data) could help for debugging, I think it's acceptable. > > As for concurrency issues. People should know what to do and when to do, just like > the don't invoke config API (e.g. dev_configure/dev_start/...) concurrency. > While this is probably ok for now, I think in next release we should look to add some sort of support for locking for destructive ops in a future release. For example, we could: 1. Add support for marking a callback as "destructive" and only allow it to be called if only one connection is present or 2. Make it possible for callbacks to query the number of connections so that the callback itself is non-destructive in more than one connection is open. [Both of these will require locking support so that new connections aren't openned when the callback is in-flight!] Any other thoughts or suggestions? /Bruce