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 4E5DC41CB1; Thu, 16 Feb 2023 13:56:13 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3B9F240EE3; Thu, 16 Feb 2023 13:56:13 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id A073840A8B for ; Thu, 16 Feb 2023 13:56:10 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1676552170; x=1708088170; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=Ox9X6a3gTV4qJmk/ArWuO8PrI92CB4MB3ABEwR2bb/c=; b=O5b/4OVIM3ea6PC6mU6DEbSpykzjkNCyWgf1wUTYjQcQjotQMvNNI+o1 DQj6wWJyvecPasHds44ada0hgtuTiAfx0lKdMo9lfnTccCelSpeC+s0mc LprBerGh1corle+oWhFdogLpfz2eic+4EbnPTPgAtziYjzKl28Gdkza/2 +ZKr/hNHxErsnyBnzPLuk4kOwFFIoxQ96vd60bUngMlO9Cl6Br2s4WsMq qUlBFy3azUyGCkyLgn7KBpOCJfXO4mAUqR0RzLN/Vb3e/QrLyS4Zq9K0g CCnqb0i9MN7UPazgIR/iZ6F59OU49H+XRtqg2iZJEsEwEA0rKs1xTyCnK A==; X-IronPort-AV: E=McAfee;i="6500,9779,10622"; a="331704780" X-IronPort-AV: E=Sophos;i="5.97,302,1669104000"; d="scan'208";a="331704780" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Feb 2023 04:56:09 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10622"; a="670116918" X-IronPort-AV: E=Sophos;i="5.97,302,1669104000"; d="scan'208";a="670116918" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orsmga002.jf.intel.com with ESMTP; 16 Feb 2023 04:56:08 -0800 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx601.amr.corp.intel.com (10.18.126.81) 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:56:08 -0800 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) 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.2507.16; Thu, 16 Feb 2023 04:56:07 -0800 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx603.amr.corp.intel.com (10.18.126.83) 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:56:07 -0800 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.42) 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:56:07 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=M6NdPXYCwtaVnGyU+mVtdsApQd2BTQLr9t84qJHE2kadkDl7sOSKnyTLLVHrW/Bt8gas3WE/Ln+wFXPH4WbHMuOdgBQNPL2vdcyxZogJ3Xf6wjI4g4oaqLsG8RVR/k+uIYZNh30sBlEyfN6aunYXhYXpmppvmwGO4895SkYXiEQHdgcvp02/TG0vFFr4L6EZ+xky0DrfMcu+JyXCZdG6D2VYae43s6EUI95G6C0lXaH6W8QGPjMaFK+ZQkWcMrIXFCps+1njfF0IaKMOqvUrR7ipeTLgpR4siB9U4ZS2Mr7PMoz5AsM9EQZeSMwT+Uj844o245lxZVzos/8GZOaTXg== 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=/lJQNcL3HDeFnRATBq8/MsQcyR3X5zaTpuz6FHMxl38=; b=NreGE6RrzhEJggUhXYhbg2v3VUSu/ms+upO8t19PJyfMIdiBlGII/Ve0ecxEsX85PkHCebtYHDNFdOH1tzPta1K2IiM16Z0NBo6FR1VMuOyJaUmqlHQowD2z3kQO3iawu8iW9SZ3NacxQMAGsQSiLGXpzfRbrk5bR53Tx73XsWTY4ESVhDyXhu07JJ/TRLN+tUXsH4aK74kKtda1lZ1y277hcH1AoWjDZ1n3GRljquwcs7FZXFSRo521otUTtwdlhy8gT3tY0D5Qrmaq7oiz0JdGr/hXlCRb/AymfGA8BotMh49XTYh2bVR3Yhx20kYyvz3SyGMXTUYRI3JCncsNng== 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:56:05 +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:56:05 +0000 Date: Thu, 16 Feb 2023 12:55:59 +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: X-ClientProxiedBy: LO4P265CA0257.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:37c::19) 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: cc379698-e1aa-4eca-addc-08db101d2a28 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: KAJmKqUbluVFVBrAFJ9FqpBxaWInVRVjua53L5xbsM0opSCcBt4XGWzAvCqD7nfqiy8ar5rqAPsz0KNNLGUJ+kOzYr16Iuz6UftNq0Av6XQO6p2lDIbJHfFsO2IDIC1HGqew89Q5qnBG5EEH85wN5ouF5nbpt56qkJ8Q0raMqFnvqzqM0+3X4//dzWGeVlgNaTmLxECvRNkWNPVgKAS0sae37cHbGc8AHsoIUwW0h9SG4dj328n3cOgtJFi5uFn//BH2R3zQUNVcS1kLusEaychZi0mKmJvKu/HexGbES+BsZpmJ/Pr2yiC7E1DeCkDCts3MSUgYl2TFAaRFxaGzZ/tZyNWFW4ZbgraFdA1JzCaw0WG+ug60X4ywqXr5zSzBLxBnDHsE0LI4w6Pp9NTfc09Rk3sjZ8xzlFM8FPEoRoX7/BG1dESvKk23g3HLxKLhWiNn10qRzG/Z0T7tohdgf9UPhZKLnkYp8Q4rM4xCnfD66fZJWsRHe86xW0saNpI2vb6DDP9UGXjUEwYjg+Jm/UoERPCCkgbFbK38gtGApwfx2DKuw59rrn1PF7BXCwN1DqTdB3x8u5h/l7rNsU4J95QqmorJuA5m9axdDO1wZ/lu2gBOq0oob6KgsVDFhONZoNRCoeuQf4zWRkT5iq9NdAMBkX3DQv3J/b05TOJB9zy1dMSZuBj4tlQRN+PxtooX 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?R5DZYAKx0s8g8hEI712iCmbwIyoOI+I5WJ9+5d85gB0FNnDOV4YLi2/8w/DU?= =?us-ascii?Q?sEymjZH9FXX98XS+2sdzOTslFLB+e7TsSXUpOBavbwaXIu4AAeleXj8AHpuT?= =?us-ascii?Q?XFJ4ndz399f9EG/NIQMVexs6LSQ1H5q2GeIl642P648rvQsdpmLwhbz5Etb/?= =?us-ascii?Q?OhrsMQgB3mCphC0HQ/O8ZYDFxQZLQx6srnukwXMmWH9Wvo9a+qrEcMnDe/Om?= =?us-ascii?Q?q0k9anMPKhxtnCI7LLaKa8zl1QNdNVQiPm91NpbcVy3RtK9dQ1T3Bn8v+nv8?= =?us-ascii?Q?ukST9NueYrvMrfKPfuopbRs7XS/y1nxI9C8ZE0f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bJkHWBCZWJKe0ieUknrsrPVtC3ncpC+Pn4ey8URllBE?= =?us-ascii?Q?1V1A27iIQEJ+8Yf0ZHNLKsHFp9NCql9lgA6IwAhko29nYYKSrsrOr4Ef7qNc?= =?us-ascii?Q?xTU8CxUMAUs1lw+wmUpz745JsOGVuBpAxd0NlimJIJaTrgomZChS+s68J2sv?= =?us-ascii?Q?CbC/39MC8rK/UnPiSgOcgTQWNnQzTMALK/YnrBNREChQAJ+3r1ygtUSWIw5t?= =?us-ascii?Q?WwGh+M+fDLMdMZW6HD08CvCeqqZ7Jq5dzBJQA9Ub/xAHhetaWWjr/MhToPKP?= =?us-ascii?Q?69MDIH2wGHSHPjfgb49ybm+uF0L18whAdmUzyZLO9GpdlMDLIU/sqtrMg+FB?= =?us-ascii?Q?EWYw/bfeisBH+Y+G8hl2XJ0ivTpDcNQXhjOIrW+zLtsGVu9ulhZBmH+zZ0G9?= =?us-ascii?Q?kQ=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: cc379698-e1aa-4eca-addc-08db101d2a28 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:56:05.2192 (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: aO4HON1+NzbpYzPuaEt5me3i/SPTOPfO47xHnHtAHnp0YIm/U/JIJdeVGGXkOKIKH6t6gLPPJDs/aBdqrtphM8i1PQ2kprTwe60QpccfSXI= 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 12:54:20PM +0000, Bruce Richardson wrote: > 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? > Actually, another thought - we could also make the max-connections configurable at runtime, so that the user can enforce only a single connection. /Bruce