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 6433F41CC1; Fri, 17 Feb 2023 17:33:27 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4E19F40F18; Fri, 17 Feb 2023 17:33:27 +0100 (CET) Received: from mail-pl1-f179.google.com (mail-pl1-f179.google.com [209.85.214.179]) by mails.dpdk.org (Postfix) with ESMTP id 26F2340EE3 for ; Fri, 17 Feb 2023 17:33:26 +0100 (CET) Received: by mail-pl1-f179.google.com with SMTP id x5so1890715plg.9 for ; Fri, 17 Feb 2023 08:33:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; 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=UThFJgHVj7ZWR16m7IByuUIjcrlx7Ch/OdcOENOo0bM=; b=7KRbxJaR0Yo3SkIGhAZV567D2oWuPt54zZ4KoCy516//cbVdqgSlic0K+Tyr/lyk2m 8ghXKbKhA5zzUSCEBDbMGGo9xyx3zCQUlc1MT8WdlFTpeWjDHgxJnrdUhYQ3y9WaOpUa trUQxQC2eqM4kIFLzA11kK2ibvxCyfWNPdG5gikaP83do32KjPuGhu6FM7WzOpdg+uKa 96pi0r//DaQoPDvJJOSOh23Q+7DFozT1Gx0bzg5WvWI1J1xQRFZFkrpitRhS5p6fUruG QR8CT6WyQ5cuKtMZtQr+cBxmOgeiyjZHEiFWNv0UwntsTAE3HSp8YYWX8lig6rcKTiUP ctaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=UThFJgHVj7ZWR16m7IByuUIjcrlx7Ch/OdcOENOo0bM=; b=RG3oZ0qyJlwLOag380WfL/ZuuiJrexqkCh7XM26yAFWOyJYuNYiHuF7Rl8DSsS81Pc VsInEzxyCcC4tkTni16GITpATbx16Ih/yAaKGx6vnViqWj+euiP1iHXHASqfk8uEk2kk WEOgpWBu80BCnntTrys2nSDIDgN8TqChX1k9fKfGxyDVZ+C4ks/5E8mmHMu/XmSywzuC q6PF9ZfZ1oLhg8+4rrTWPdU1fRbu3Dp6HB3YyOqN3idoQ0M4o3KEWsdxCq1jlFjbhOqb /gklPjF65oWbrULJ+JzbJQjwwP+GXBknpWBNmXqQu8vQ2oNCzuW2FKpHgNDdzygw0/Ep myow== X-Gm-Message-State: AO0yUKVxOCDoHGeoLNlfAfiVUeEt/G5TyxQydW9CL4nOcxLSKbQEguXb JkV/D4Qf4NpKNwZpAV2POEKJSw== X-Google-Smtp-Source: AK7set8loaJLcEvovdcHWdzvzKc2KBg/NDIbw/jaCh2hlDewyr2QMOZfbEQX2OROIAWFc7hf5hb0pg== X-Received: by 2002:a05:6a20:491b:b0:c7:5618:5e8f with SMTP id ft27-20020a056a20491b00b000c756185e8fmr3819877pzb.23.1676651605265; Fri, 17 Feb 2023 08:33:25 -0800 (PST) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id h184-20020a636cc1000000b004e52190d5a7sm2991126pgc.11.2023.02.17.08.33.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Feb 2023 08:33:25 -0800 (PST) Date: Fri, 17 Feb 2023 08:33:23 -0800 From: Stephen Hemminger To: "Sevincer, Abdullah" Cc: "dev@dpdk.org" , "jerinj@marvell.com" Subject: Re: [PATCH v3] app/procinfo: display eventdev xstats for PMD data Message-ID: <20230217083323.45074019@hermes.local> In-Reply-To: References: <20220409153056.1010236-1-timothy.mcdaniel@intel.com> <20230206230505.3029148-1-abdullah.sevincer@intel.com> <20230206162227.2a8234c3@hermes.local> 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 Fri, 17 Feb 2023 15:58:52 +0000 "Sevincer, Abdullah" wrote: > From: Sevincer, Abdullah > Sent: Sunday, February 12, 2023 11:44 AM > To: Stephen Hemminger > Cc: dev@dpdk.org; jerinj@marvell.com > Subject: RE: [PATCH v3] app/procinfo: display eventdev xstats for PMD data > > Thanks Stephen, > I will remove extra line there. > > Instead malloc using of calloc is required or just suggestion? > I can see allocation is done in same way with malloc in lib\eventdev\rte_eventdev.c (reference to eventdev_build_telemetry_data function). > I will keep malloc as it is if there is no opposition. It doesn't matter much if you use malloc vs calloc. But there are some static analysis tools that might look at calloc as way to determine number of elememts for later array checks. Also, the kernel checkpatch warns when kmalloc is used but kcalloc or kmalloc_array could be used instead. That is Linux kernel specific but same idea applies.