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 979B445B8A; Mon, 21 Oct 2024 01:28:58 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 320194021F; Mon, 21 Oct 2024 01:28:58 +0200 (CEST) Received: from mail-pg1-f174.google.com (mail-pg1-f174.google.com [209.85.215.174]) by mails.dpdk.org (Postfix) with ESMTP id A2A57400EF for ; Mon, 21 Oct 2024 01:28:57 +0200 (CEST) Received: by mail-pg1-f174.google.com with SMTP id 41be03b00d2f7-656d8b346d2so2477923a12.2 for ; Sun, 20 Oct 2024 16:28:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1729466937; x=1730071737; darn=dpdk.org; 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=fVJmAeXe9tAJ55Ak8Ty9JI52MMfycx4G5r+kCKHoyt4=; b=NnNYlgUeaymMb3+kreMHjPKQpMvQqnG2o4wbS0Z1RdQj0aMVvoHT83XbjburxrQGAm JIQqz/F3j47r8LK8UyPhuOr0hb9vVFFfDtwo1atC/IIXgs8X9lKtU6JeU8MVncJ+CbVm LGmCxk/StCMO3GJZ+iKv2pIr+BfMhRjbXSo14RyiJbGt0b+D+kQs8E8oETfIHko8K9Sp MAnFloV4Zx58Aee4GMO2ad+Zvzuk1nxirB3rFFOjEYjEuRWpzgmIhrcAG5OWsiZuRgzz 5lxRlMn095U75UP+ZLQfWtSJyaXEqLMgaUrcgKU5l8r6dwtWz2HlVHLi198N6g17P7Nb g4hw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729466937; x=1730071737; 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=fVJmAeXe9tAJ55Ak8Ty9JI52MMfycx4G5r+kCKHoyt4=; b=TVZah1qRowurgctCIzSfC3QEmci2wX2uA1FRbc6sG70O0w+rbOSxaxRkCW2YCyptgw mWmL7lG0xxlmocz+9FbncTcwo/0nkrfTxnO2WTPCq3D2QmTSYlca425emkX4gwkfn9PN M3VT7+DVUFP1W/amZvQ9q6sLA5q697TNhoHjfbX0/7s+X9hMLrTp7SxgCyme/B8lwGMc 34UdubwnWA4vw9sw2V5KpwrtrqjeArenrxbfIs4Fmok/FcSGGXb79Lqu9Gsgs3mdCb30 F5wWAMJvifEiDbbFMXdL9tVfHGGrOal861nevKwwmftHrkthP8RwMUyWz+PAhH0ZDEJ0 5Phg== X-Forwarded-Encrypted: i=1; AJvYcCXm2Jm28n/PZdc1FLmrEEdLO41MmQGZWL+WLHO3xBi6BBqFSToGKIXlPGVCRruReoPEHjc=@dpdk.org X-Gm-Message-State: AOJu0Yy0usIA9WcJivnFGBp//CfyBE7rNsjMkB9HJ0C+WqiKXcibAG8Z Y+548GIQzFm/OemyYfZMHEpoy+EfuYWIGeNCP3Mb/XVh5wVZr629ny8UH4t23SU= X-Google-Smtp-Source: AGHT+IG3P9beA/mqGW3EEkwaKFBq9AZk7qlYt0+1jytauDK9K1unxhvk3azGIuKPq2rCPPc2i5c1xg== X-Received: by 2002:a05:6a21:2d08:b0:1d8:ae07:bf8 with SMTP id adf61e73a8af0-1d92c56d2c1mr12759194637.31.1729466936695; Sun, 20 Oct 2024 16:28:56 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-71ec13eb08asm1698801b3a.173.2024.10.20.16.28.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 20 Oct 2024 16:28:56 -0700 (PDT) Date: Sun, 20 Oct 2024 16:28:54 -0700 From: Stephen Hemminger To: Sivaprasad Tummala Cc: , , , , , , , , , Subject: Re: [PATCH v6 2/5] power: refactor uncore power management library Message-ID: <20241020162854.20771162@hermes.local> In-Reply-To: <20241020092233.2906612-3-sivaprasad.tummala@amd.com> References: <20241017102650.1041030-1-sivaprasad.tummala@amd.com> <20241020092233.2906612-1-sivaprasad.tummala@amd.com> <20241020092233.2906612-3-sivaprasad.tummala@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 Sun, 20 Oct 2024 09:22:29 +0000 Sivaprasad Tummala wrote: > +uint32_t > +rte_power_get_uncore_freq(unsigned int pkg, unsigned int die) > +{ > + RTE_ASSERT(global_uncore_ops != NULL); All these RTE_ASSERT calls seem like a good idea, they really don't help. If RTE_ASSERT fails it prints a message and calls abort. If you skip the RTE_ASSERT, the next line will cause a NULL dereference illegal pointer reference and crash. So in either case it crashes, and the RTE_ASSERT() doesn't add much help. Also RTE_ENABLE_ASSERT() is usually disabled.