From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1216EC05027 for ; Mon, 6 Feb 2023 20:55:46 +0000 (UTC) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 14E9940A7D; Mon, 6 Feb 2023 21:55:46 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 8ADB240156 for ; Mon, 6 Feb 2023 21:55:44 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1675716944; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=VOZ5VMWzoC2cpf7SweKoBnCwz7jNzDNpIma2gwY3wfs=; b=KqC4EHjM/FvjCujEiKK2g5xbv9VXE67TCaDd+BD/R3KUc6+g9xPnHsGJqCYVAbFQjRRXHH cRtgSU4ySWEBucFDEphXhuXTD//Gw83KK+IIAi/Y23fqQAfKPhloyylu5/H2kVjC9RL9g4 P6ZuA0l+yW8XTs4/8RepkixdMfwl2hA= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-551-8HRa7pAaPV6PSKOpC8_Dvg-1; Mon, 06 Feb 2023 15:55:43 -0500 X-MC-Unique: 8HRa7pAaPV6PSKOpC8_Dvg-1 Received: by mail-wm1-f70.google.com with SMTP id e38-20020a05600c4ba600b003dc434dabbdso9522206wmp.6 for ; Mon, 06 Feb 2023 12:55:42 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:references:to:from:subject:cc:message-id:date :content-transfer-encoding:mime-version:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=VOZ5VMWzoC2cpf7SweKoBnCwz7jNzDNpIma2gwY3wfs=; b=EyKx7NLgILLjYI9VVR/Eaqf41mcHIUXlrzvvdng8fw7axlwL4ALnTYQZBgMYkzNYvP qZwz65EYDlTsk/ibbZTuoDxkfIECB/47tgsBRMz+AteoF6mmKzpTga/VheE3FgSca+O6 TmNBCsVdx9jMSaOqCmlix8yMbkGmxtnCBJitzXLRc58w4afDsv72suYQUVLe/V78NSqT Sk6lJqLsur3cAeH/N2cTuZtLiQYdSRkoHrhEXwrRyyHP+fmMfpfDLy6b/JRDMZp00FIF U1Eewi5AGTtrF1stCKrI2XmdP4WQ3aS+72WliqWFN3ESXVr6GSB+sP/vb+e0xWAKBIIY EHaw== X-Gm-Message-State: AO0yUKVvUCOiD35t1nKxb71zZrIXoEjfEeeH5nIftLlFlCcKwEArIW8U EFvMlVb0U8OSGy+tRpRP5/vymI0neJ5dqR6EsWKVvplv2gOYtvCOJNpWT58bj9T9wxXIEXRcYW7 ufr0= X-Received: by 2002:a5d:5949:0:b0:2c3:e80f:6a7f with SMTP id e9-20020a5d5949000000b002c3e80f6a7fmr190316wri.62.1675716941594; Mon, 06 Feb 2023 12:55:41 -0800 (PST) X-Google-Smtp-Source: AK7set9udtzvinVEQ7ziW8Y69FPv8WeAeiOoPqgNsg1sEyPhH0uZ807DsRki+w1Ed5PDlQNoYjfyrw== X-Received: by 2002:a5d:5949:0:b0:2c3:e80f:6a7f with SMTP id e9-20020a5d5949000000b002c3e80f6a7fmr190309wri.62.1675716941407; Mon, 06 Feb 2023 12:55:41 -0800 (PST) Received: from localhost (2a01cb000f483e00b4815b62aee6aa5b.ipv6.abo.wanadoo.fr. [2a01:cb00:f48:3e00:b481:5b62:aee6:aa5b]) by smtp.gmail.com with ESMTPSA id n9-20020a5d5989000000b002bc7fcf08ddsm9976435wri.103.2023.02.06.12.55.40 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 06 Feb 2023 12:55:40 -0800 (PST) Mime-Version: 1.0 Date: Mon, 06 Feb 2023 21:55:40 +0100 Message-Id: Cc: "Tyler Retzlaff" , "Kevin Laatz" , =?utf-8?q?Morten_Br=C3=B8rup?= Subject: Re: [PATCH v5 2/4] eal: allow applications to report their cpu usage From: "Robin Jarry" To: "Konstantin Ananyev" , "dev@dpdk.org" X-Mailer: aerc/0.14.0-64-gf10d00f8407e References: <20221123102612.1688865-1-rjarry@redhat.com> <20221216102109.64142-1-rjarry@redhat.com> <20221216102109.64142-3-rjarry@redhat.com> <9456959e61754f9394321e33a01746db@huawei.com> <3a2a9bbd83c241c09181d1b8315bb282@huawei.com> In-Reply-To: <3a2a9bbd83c241c09181d1b8315bb282@huawei.com> X-Mimecast-Spam-Score: 1 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 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 Konstantin Ananyev, Feb 06, 2023 at 21:44: > > Ok I see. But what should we do to prevent this? Simply ignore the > > request and log a warning? > > That's seems like simplest choice to me... Or if you still prefer to > allow it - put a special comment that it is user responsibility to > handle such possible race-condition (inside his CB function or so). The issue is that a warning can be easily overlooked and the application may assume that they can free up resources whereas the callback was never reset and may still access them. I wonder if this could be enforced with RTE_BUILD_BUG_ON somehow. Or at least by checking that the cb value is not NULL with RTE_ASSERT?