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 A3FB1A0C4B; Sat, 17 Jul 2021 19:51:12 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 26BC64067B; Sat, 17 Jul 2021 19:51:12 +0200 (CEST) Received: from mail-pf1-f169.google.com (mail-pf1-f169.google.com [209.85.210.169]) by mails.dpdk.org (Postfix) with ESMTP id 0E5844003C for ; Sat, 17 Jul 2021 19:51:11 +0200 (CEST) Received: by mail-pf1-f169.google.com with SMTP id j9so11966026pfc.5 for ; Sat, 17 Jul 2021 10:51:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=OOIoHuE9J1ruOhkRA5Gsz3LhjTnBbHzbCM5kM8XFLhU=; b=C1pkvh2ffW56PlBUQqMJOlMj3Jx0rBiF3nbflL8JTYPGxowMOQTK83u7AXWInETVzm fbjCWAotXoBG/cGEQ5eNhqLCFfDXOaE6xswIP/bKsydoY9PMBNss9tIG+Csr/Zi9nICE QmvOWCwKCIErdoV3JnnnU+0fvPT2qy39XfS79AF+nLkocOa3Aefu5fDuk/rarA8vsB08 t0C8Im6h+1uR/oLhSc7W6vz1K+TNMiElRCNMZ8rwd0eMMERWM7uxvAYd/BSFsaRzoa9I fkU7Opb8EFX/vyp5KaZ2BCk/RA5iPVXzAkJ8g4Y6cXzxId4BBLxHJ3f+A2rNkmQP0G1q DqqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=OOIoHuE9J1ruOhkRA5Gsz3LhjTnBbHzbCM5kM8XFLhU=; b=kmcS/FANSGYeXIUYcNPlbb3R/kLpBaZn6ZdhH6nXoBpjEHKtMjD1Pcg18m1J9okkud PlQJALHrV3nRaIcnaR0kgzOWPqAVZIcfsW+esb1cvpdLApMATPiYAIDtfG9aqxI5EI5b F6YfnZBVedGiOI+TSMVaNT2iNEuAp1oPaH+lxdIbjcjgqlkv3eqq2Rr4vtWH5Rq83x8o N2fE2MS7KnIg5A9dq4wAKyO3BVwUlA0Nl52ab07XL6QLzTLxw8v0mQ6H2IHcf0L+F6zt 9dJMbSngdXqWuLsBOSGlgWLhy4VtBTwVZrAy2p0emV/F6p/uE8kD6kMmTrV4J+l4KA2A 1rCg== X-Gm-Message-State: AOAM530NWDYes/6DPL5+FCBMTklZ5pKDN1DWAF0TpLCifYLP/8R1l9Sx Y4k/WjxNVujSqWrTAwYz3Ud4gA== X-Google-Smtp-Source: ABdhPJx+a3O5tCmQM1gJ+UUksD5MBS/h0OssBLC2XPE23AChp8rZaPWgc5TcNdx1WUQ7/MHHs9Cb/Q== X-Received: by 2002:a63:1205:: with SMTP id h5mr9354346pgl.204.1626544270258; Sat, 17 Jul 2021 10:51:10 -0700 (PDT) Received: from hermes.local (204-195-33-123.wavecable.com. [204.195.33.123]) by smtp.gmail.com with ESMTPSA id g17sm266962pgi.70.2021.07.17.10.51.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Jul 2021 10:51:10 -0700 (PDT) Date: Sat, 17 Jul 2021 10:51:07 -0700 From: Stephen Hemminger To: "Min Hu (Connor)" Cc: , , Message-ID: <20210717105107.3d87bd56@hermes.local> In-Reply-To: <1619355742-15429-1-git-send-email-humin29@huawei.com> References: <1619355742-15429-1-git-send-email-humin29@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] app/procinfo: add device registers dump 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 Sender: "dev" On Sun, 25 Apr 2021 21:02:22 +0800 "Min Hu (Connor)" wrote: > + > + memset(®_info, 0, sizeof(reg_info)); > + memset(&dev_info, 0, sizeof(dev_info)); This memset is redundant, rte_eth_dev_info_get already has the same memset. For the registers, ethdev should be fixed to do it. > + > + ret = rte_eth_dev_info_get(i, &dev_info); > + if (ret) { > + printf("Error getting device info: %d\n", ret); > + continue; > + } > + > + ret = rte_eth_dev_get_reg_info(i, ®_info); > + if (ret) { > + printf("Error getting device reg info: %d\n", ret); > + continue; > + }