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 7821F430B7; Mon, 21 Aug 2023 04:53:16 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9D2424282D; Mon, 21 Aug 2023 04:53:15 +0200 (CEST) Received: from mail-pl1-f179.google.com (mail-pl1-f179.google.com [209.85.214.179]) by mails.dpdk.org (Postfix) with ESMTP id 8E95D40EE3 for ; Mon, 21 Aug 2023 04:53:13 +0200 (CEST) Received: by mail-pl1-f179.google.com with SMTP id d9443c01a7336-1bf092a16c9so22461895ad.0 for ; Sun, 20 Aug 2023 19:53:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1692586392; x=1693191192; 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=eUcxT9QEg7Em07PTh943EQABnl7pSsmZIbHeyCO2byA=; b=NFbM2VDlocXSJgaCYkU/nTqtcuxr08Q9pemDW+pNBGsJSYOGsSHYvziLWXMDZGBINd oqwolKSaoOZnsJ/41sQccPQC9I2RvRIhcPmTlq9bx4dUJMsWdmsH3so5BNwcthUb23Fa 8aC4rZamVKw+MAymmG8GiQSuivzcm7V0xh3XI/Gz9/5wjzbAfVN1sb348DHXU7Fwc08e ea58lw+NZTdSQfSoPVo1DroOqymO0iCkTw85epNiDPErxrhCBntx/QEDsxRkjY1necOW b/YsI7qekAOghjbIBo7yvnaj6ilK+ZgKfbieTULX756HnD1knTHSGT8J5a0GWyvzF+Rv uziQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692586392; x=1693191192; 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=eUcxT9QEg7Em07PTh943EQABnl7pSsmZIbHeyCO2byA=; b=X12YX52zxh2+NR3E8URvDD/mChteCG3bWoDsPbjuqphV0kwjsU0jzni8stdc8uyH16 +1GPvd5tWI0RjRrTLiZb/5dPON9fmGcDCrgGWFv7R0VUu6SrytHDzVbKgLcdBxf0vbDB Ld91uQ+8L04+1GNpfeJVOW8eo/9R5dwI7vN0csXN1EPanpEKBO716xI0Qbt2uBr4jcj+ DpZczKKtioDL/q8LGfMIL84/uNnjxBcG8MyimkerZfrq6te7zl3gkXtpZ92cBLqk4MEE AzuytuQ6mi46WiZ7gwipErrMkEauf5mc/NPow+NBYS/CN8zqN3YcwRlqP2W4rU3zer60 D0Ag== X-Gm-Message-State: AOJu0YxvSvv11EKQPOBONxPvGQEniB4dLSqnpqzPEsXh1+spl/wFOq+G 0NhvD6VDh6qPRTB/G8/Ovasg3Q== X-Google-Smtp-Source: AGHT+IFcvPDQ6qHJPE6og4p74jQH0w33y0gM2OUCroas2Stdinza7tpdevtaX4HuKZ1TMaHobmyyZw== X-Received: by 2002:a17:902:c411:b0:1bf:73ec:b977 with SMTP id k17-20020a170902c41100b001bf73ecb977mr4621812plk.46.1692586392516; Sun, 20 Aug 2023 19:53:12 -0700 (PDT) Received: from hermes.local (204-195-127-207.wavecable.com. [204.195.127.207]) by smtp.gmail.com with ESMTPSA id i1-20020a17090332c100b001bf2dcfe352sm5759769plr.234.2023.08.20.19.53.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 20 Aug 2023 19:53:12 -0700 (PDT) Date: Sun, 20 Aug 2023 19:53:10 -0700 From: Stephen Hemminger To: Wenwu Ma Cc: nipun.gupta@amd.com, dev@dpdk.org, david.marchand@redhat.com, maxime.coquelin@redhat.com, chenbo.xia@intel.com, miao.li@intel.com, weix.ling@intel.com, stable@dpdk.org Subject: Re: [PATCH v2] bus/pci: fix legacy device IO port map in secondary process Message-ID: <20230820195310.086bebad@hermes.local> In-Reply-To: <20230821012707.315173-1-wenwux.ma@intel.com> References: <20230807015820.1329972-1-wenwux.ma@intel.com> <20230821012707.315173-1-wenwux.ma@intel.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 Mon, 21 Aug 2023 09:27:07 +0800 Wenwu Ma wrote: > + struct vfio_device_info device_info = { .argsz = sizeof(device_info) }; > + char pci_addr[PATH_MAX] = {0} Not sure if some tools will complain about initializing chars as zero. Anyway, why bother since you are using it with snprintf. Also, the new variables that are only used in the secondary case should be declared in that if() not for whole function.