DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Xie, Huawei" <huawei.xie@intel.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH 1/2] lib/librte_vhost: vhost library support to facilitate integration with vswitch.
Date: Fri, 8 Aug 2014 05:51:44 +0000	[thread overview]
Message-ID: <C37D651A908B024F974696C65296B57B0F25D13F@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <20140807105849.62a80fc1@haswell.linuxnetplumber.net>


> -----Original Message-----
> From: Stephen Hemminger [mailto:stephen@networkplumber.org]
> Sent: Friday, August 08, 2014 1:59 AM
> To: Xie, Huawei
> Cc: dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH 1/2] lib/librte_vhost: vhost library support to
> facilitate integration with vswitch.
> 
> On Fri, 18 Jul 2014 13:39:05 +0800
> Huawei Xie <huawei.xie@intel.com> wrote:
> 
> > Signed-off-by: Huawei Xie <huawei.xie@intel.com>
> > Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
> > Acked-by: Thomos Long <thomas.long@intel.com>
> 
> This looks good, but there are some style convention issues:
> 
> 1. Please don't use really long lines. About 100 or 120 characters is maximum
>    reasonable length in an editor
> 
I plan to fix the length issues in subsequent patch. There are plenty of them, which are inherited from old vhost code. 
> 2. Don't put space here in function decl.
> 
> ERROR: space prohibited after that '*' (ctx:BxW)
> #1183: FILE: lib/librte_vhost/vhost-net-cdev.h:102:
> +	int (* set_vring_kick)(struct vhost_device_ctx, struct vhost_vring_file *);
>  	     ^
> 
In this patch, I only run checkpatch.pl against the source file I modified rather than the patch itself, so missed these checking.  I had sent the V3 patch in which those kind of issues are fixed. Please refer to the latest V3 patch.
> 3. Use BSD and kernel style brace
> Not:
> 
> +void
> +put_files_struct (struct files_struct *files)
> +{
> +	if (atomic_dec_and_test (&files->count))
> +	{
> +		BUG ();
> +	}
> +}
> 
> Instead:
> +void
> +put_files_struct (struct files_struct *files)
> +{
> +	if (atomic_dec_and_test (&files->count)) {
> +		BUG ();
> +	}
> +}
> 
> 4. All functions that are not used in other files should be marked static.
>    For example put_files_struct
> 
> 5. Switch should be indented at same level as case:
> Not:
> +	switch (ioctl)
> +	{
> +		case EVENTFD_COPY:
> +			if (copy_from_user (&eventfd_copy, argp, sizeof (struct
> eventfd_copy)))
> +				return -EFAULT;
> +
> 
> Instead:
> +	switch (ioctl) {
> +	case EVENTFD_COPY:
> +		if (copy_from_user (&eventfd_copy, argp, sizeof (struct
> eventfd_copy)))
> +			return -EFAULT

Thanks. As stated above, have fixed all the style issues except 80 length warning in v3 patch.

  reply	other threads:[~2014-08-08  5:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-18  5:39 [dpdk-dev] [PATCH 0/2] user space vhost library Huawei Xie
2014-07-18  5:39 ` [dpdk-dev] [PATCH 1/2] lib/librte_vhost: vhost library support to facilitate integration with vswitch Huawei Xie
2014-08-07 17:58   ` Stephen Hemminger
2014-08-08  5:51     ` Xie, Huawei [this message]
2014-07-18  5:39 ` [dpdk-dev] [PATCH 2/2] lib/Makefile: Turn off vhost_lib by default as it needs fuse, fuse-devel to compile Huawei Xie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=C37D651A908B024F974696C65296B57B0F25D13F@SHSMSX101.ccr.corp.intel.com \
    --to=huawei.xie@intel.com \
    --cc=dev@dpdk.org \
    --cc=stephen@networkplumber.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).