Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp258003ybc; Tue, 12 Nov 2019 00:41:51 -0800 (PST) X-Google-Smtp-Source: APXvYqwuL0nTr/FZOXBDrMwfkzXJ3BaXU7YH4ShPk0FcfmI0X4xox/Z0gEaH82bWXjr0qzMdNqpe X-Received: by 2002:a17:906:494d:: with SMTP id f13mr27304101ejt.250.1573548111163; Tue, 12 Nov 2019 00:41:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573548111; cv=none; d=google.com; s=arc-20160816; b=kX01tK8KvkO5v4js4W3FO+bnWqzoPx8cmgirZ+0Bo29oBgnn3pKg1lnSOdfJ+0KrcJ MhCa4foC3/aL6wq8BbIEe9ONzWtSh/+KTB3JycB9N2AX3Qr5f8/f4cCEOnQw8PcD6K2G m/6Bal1xpSWc4tBB4mbEA+10862mTjTZc8QZi5PPWvw/Dz6sRaBZ19UjOGG5wBChEZY0 avD/uLrB1zAhMmGGa/JXlx5NcKsjPw6z5Bk/+ur5V0QFciELWSGfVxIf7XmmbEyBBzzk jJO1obaLc+MO06W1kyMO5gSLFTOpCwuvlVfHkkLoKMNCjmWIGfhmP44O3ZrDnT5RHWWE tbQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=NahcFaikuYClDOnOPuiLEjw173OJEOXB48N20Zb+2hc=; b=BjQVet8REPn3/yT6p/PfDQGgOZ4N/XbCZyss3NxIpKKDxO5G03VzID9plm/q2r/bYM vczzPVzhqeT/x1vLeEb3iOkUVkM8xA4cyOlqNsI144yRZgNrEI4rYZH23nprEuk9nOS/ Z/JO5UIskqFMQLAlA/KawxRYvOx+469MIYDqsl0xuxfFUEJ81OcsHrmXlv51s4vLxYH1 5KeAHyu6WVgMUBGLaGtpS6vlippBagatlXi6hg+WHkB8NwNU7DA3sZjbo5n9BNxykkns hK27ITcrUcUrjqSPUZB3g11qrn9xK2bisgNLUyec2ZxvXej4Tw+Z0yEVFbmrtHWStxx+ fgHg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s13si9815399edt.427.2019.11.12.00.41.26; Tue, 12 Nov 2019 00:41:51 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727159AbfKLIkZ (ORCPT + 99 others); Tue, 12 Nov 2019 03:40:25 -0500 Received: from mga06.intel.com ([134.134.136.31]:2928 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725775AbfKLIkZ (ORCPT ); Tue, 12 Nov 2019 03:40:25 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Nov 2019 00:40:23 -0800 X-IronPort-AV: E=Sophos;i="5.68,295,1569308400"; d="scan'208";a="198005697" Received: from lingshan-mobl5.ccr.corp.intel.com (HELO [10.238.129.48]) ([10.238.129.48]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 12 Nov 2019 00:40:19 -0800 Subject: Re: [PATCH 2/2] IFC VDPA layer To: Mark D Rustad , Zhu Lingshan Cc: mst@redhat.com, jasowang@redhat.com, alex.williamson@redhat.com, linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org, kvm@vger.kernel.org, netdev@vger.kernel.org, dan.daly@intel.com, cunming.liang@intel.com, tiwei.bie@intel.com, jason.zeng@intel.com References: <1572946660-26265-1-git-send-email-lingshan.zhu@intel.com> <1572946660-26265-3-git-send-email-lingshan.zhu@intel.com> From: Zhu Lingshan Message-ID: <8df224df-f8f3-54f5-e8c3-ea3ad04f6eda@linux.intel.com> Date: Tue, 12 Nov 2019 16:40:15 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.1.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Mark, Thanks for your comments, I will change the lines in next patchset. Thanks, BR Zhu Lingshan On 11/10/2019 3:56 AM, Mark D Rustad wrote: > On Nov 5, 2019, at 1:37 AM, Zhu Lingshan wrote: > >> This commit introduced IFC operations for vdpa, which complys to >> virtio_mdev and vhost_mdev interfaces, handles IFC VF >> initialization, configuration and removal. >> >> Signed-off-by: Zhu Lingshan >> --- >> ?drivers/vhost/ifcvf/ifcvf_main.c | 605 >> +++++++++++++++++++++++++++++++++++++++ >> ?1 file changed, 605 insertions(+) >> ?create mode 100644 drivers/vhost/ifcvf/ifcvf_main.c >> >> diff --git a/drivers/vhost/ifcvf/ifcvf_main.c >> b/drivers/vhost/ifcvf/ifcvf_main.c >> new file mode 100644 >> index 0000000..7165457 >> --- /dev/null >> +++ b/drivers/vhost/ifcvf/ifcvf_main.c >> @@ -0,0 +1,605 @@ > > > >> +??? for (i = 0; i < IFCVF_MAX_QUEUE_PAIRS * 2; i++) { >> +??????? if (!vf->vring[i].ready) { >> +??????????? IFC_ERR(ifcvf->dev, >> +??????????????? "Failed to start datapath, vring %d not ready.\n", i); >> +??????????? return -EINVAL; >> +??????? } >> + >> +??????? if (!vf->vring[i].size) { >> +??????????? IFC_ERR(ifcvf->dev, >> +??????????????? "Failed to start datapath, vring %d size is >> zero.\n", i); >> +??????????? return -EINVAL; >> +??????? } >> + >> +??????? if (!vf->vring[i].desc || !vf->vring[i].avail || >> +??????????? !vf->vring[i].used) { >> +??????????? IFC_ERR(ifcvf->dev, >> +??????????????? "Failed to start datapath, " >> +??????????????? "invaild value for vring %d desc," >> +??????????????? "avail_idx or usex_idx.\n", i); > > Please don't break up the format string. Start it on the second line > and let it run as long as it needs to. Also you will find that it is > improperly spaced as it is. It makes it easier to grep the source to > find the source of a message. The coding style has an explicit > exception for such long lines for this reason. > > Also, please don't put .'s on the end of log messages. It serves no > purpose and just adds to the log, the binary size and the source size. > There are quite a few of these. > > > > -- > Mark Rustad, MRustad@gmail.com