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 2FE08A00C3; Fri, 13 May 2022 17:37:59 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1E88D40DF7; Fri, 13 May 2022 17:37:59 +0200 (CEST) Received: from mail-pj1-f54.google.com (mail-pj1-f54.google.com [209.85.216.54]) by mails.dpdk.org (Postfix) with ESMTP id 6F3B840DDE for ; Fri, 13 May 2022 17:37:57 +0200 (CEST) Received: by mail-pj1-f54.google.com with SMTP id cq17-20020a17090af99100b001dc0386cd8fso8093246pjb.5 for ; Fri, 13 May 2022 08:37:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=OXTeQJC2KSGVSy8VROec5yOnRgXWv9svQsBrUbRfNZ0=; b=isyoVg4uzjlXss/q1lgUKicatvYFItf4b/f2SRufPpXPDdZ9YG4eDfz4j0K1MEqbOt S2Y9AGF9sUi2jjzWDm1P0CUlFjVsRgfkQM4plQesVo6MZu8PuV/hCfXnoU6ZYkKu4Qov +QLVQSy6b2nsTgdjQHCV/RrtKb+5FhnGxl6RVHXKWdDm4v8+IRFr7+XA28BoOC9OV71V q1usyxB69j32i/hRe8qTvIycJ0udb5/V4Ypm4yZTHUWAJbcRH3nvMITBt7A3gnQdK/V9 nEUrkmbOIc5tu+NofyeLjfuMKC0JEe/qZPRFrYcZJmA/EMzAOEPN2zfbytjLWMGN3oRH DVSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=OXTeQJC2KSGVSy8VROec5yOnRgXWv9svQsBrUbRfNZ0=; b=l8pbDkVpY+iF13+F053LPOJSV4BlrRYpbksIR72mNsiiVlJF6aK4K3XS7r+mtGO9gG 5k0uMEO0n55N0r/m81viRfcvQnKHkxXFL7BtYOgfjIrQ3077vSwRJf6d5Mui2619VRbH sQ2CsxK25KOV9PlFa5yktGPpwVe6LTCCv7V+vyZpjBtdGd4n6ifJjYTKFiriiykpKYQP CEnO1iOCyS3dbGyP2UabH3g7vVHQ/ihqK34deikRT2fCi1xf4XZ3H7/CMyB1TP7S6aFc jMs9297ifyfG9nGOYpNz5FtU/3XtfI9KQ5/PlnQt/ZCocovnQVkak1YeDU2BXS34YTwz OeWA== X-Gm-Message-State: AOAM532Ntm8Jkzr3K8B7Meofnc/4OroHl1xC/0HFy52tzrEBYGWEo8SH w8KPp33LmkVpVNGkGkt2gU5utQ== X-Google-Smtp-Source: ABdhPJzc2YQDFJE7cR0mr/GI6/KTv/yVQ466Fz6GbgCKNOF+PqMFQs82RyCH6Vhz3EJfU49dm6LU6g== X-Received: by 2002:a17:903:18f:b0:15e:93bd:730f with SMTP id z15-20020a170903018f00b0015e93bd730fmr5284122plg.172.1652456276697; Fri, 13 May 2022 08:37:56 -0700 (PDT) Received: from hermes.local (204-195-112-199.wavecable.com. [204.195.112.199]) by smtp.gmail.com with ESMTPSA id 129-20020a620487000000b0050dc76281e0sm1895958pfe.186.2022.05.13.08.37.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 May 2022 08:37:56 -0700 (PDT) Date: Fri, 13 May 2022 08:37:53 -0700 From: Stephen Hemminger To: "Pei, Andy" Cc: "Xia, Chenbo" , "dev@dpdk.org" , "maxime.coquelin@redhat.com" , "Cao, Gang" , "Liu, Changpeng" Subject: Re: [PATCH v7 12/18] vdpa/ifc: add some log at vDPA launch before qemu connect Message-ID: <20220513083753.456996a7@hermes.local> In-Reply-To: <6a12484f659347bc853d337b8358a61e@intel.com> References: <1643093258-47258-2-git-send-email-andy.pei@intel.com> <1651048206-282372-1-git-send-email-andy.pei@intel.com> <1651048206-282372-13-git-send-email-andy.pei@intel.com> <6a12484f659347bc853d337b8358a61e@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 Fri, 13 May 2022 08:34:38 +0000 "Pei, Andy" wrote: > Hi Chenbo, > > Thanks for your reply. > My reply is inline. > > > -----Original Message----- > > From: Xia, Chenbo > > Sent: Thursday, May 12, 2022 9:53 PM > > To: Pei, Andy ; dev@dpdk.org > > Cc: maxime.coquelin@redhat.com; Cao, Gang ; Liu, > > Changpeng > > Subject: RE: [PATCH v7 12/18] vdpa/ifc: add some log at vDPA launch before > > qemu connect > > > > > -----Original Message----- > > > From: Pei, Andy > > > Sent: Wednesday, April 27, 2022 4:30 PM > > > To: dev@dpdk.org > > > Cc: Xia, Chenbo ; maxime.coquelin@redhat.com; > > > Cao, Gang ; Liu, Changpeng > > > > > > Subject: [PATCH v7 12/18] vdpa/ifc: add some log at vDPA launch before > > > qemu connect > > > > Title can be: > > > > vdpa/ifc: add log for config space of virtio blk > > > Sure. > > > > > > Add some log of virtio blk device config space information at VDPA > > > launch before qemu connects. > > > > > > Signed-off-by: Andy Pei > > > --- > > > drivers/vdpa/ifc/ifcvf_vdpa.c | 28 ++++++++++++++++++++++++++++ > > > 1 file changed, 28 insertions(+) > > > > > > diff --git a/drivers/vdpa/ifc/ifcvf_vdpa.c > > > b/drivers/vdpa/ifc/ifcvf_vdpa.c index ca49bc3..4060a44 100644 > > > --- a/drivers/vdpa/ifc/ifcvf_vdpa.c > > > +++ b/drivers/vdpa/ifc/ifcvf_vdpa.c > > > @@ -1363,6 +1363,9 @@ struct rte_vdpa_dev_info dev_info[] = { > > > struct rte_kvargs *kvlist = NULL; > > > int ret = 0; > > > int16_t device_id; > > > + uint64_t capacity = 0; > > > + uint8_t *byte; > > > + uint32_t i; > > > > > > if (rte_eal_process_type() != RTE_PROC_PRIMARY) > > > return 0; > > > @@ -1429,6 +1432,31 @@ struct rte_vdpa_dev_info dev_info[] = { > > > internal->features = features & > > > ~(1ULL << > > VIRTIO_F_IOMMU_PLATFORM); > > > internal->features |= dev_info[IFCVF_BLK].features; > > > + > > > + /* cannot read 64-bit register in one attempt, > > > + * so read byte by byte. > > > + */ > > > + for (i = 0; i < sizeof(internal->hw.blk_cfg->capacity); i++) { > > > + byte = (uint8_t *)&internal->hw.blk_cfg->capacity + i; > > > + capacity |= (uint64_t)*byte << (i * 8); > > > + } > > > + DRV_LOG(INFO, "capacity : %"PRIu64"G", capacity >> 21); > > > > I believe this '21' should be calculated rather than hard-code. Sounds like a debug not info message. It is meant for developer not end user.