qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@gmail.com>
To: Vincenzo Maffione <v.maffione@gmail.com>
Cc: anthony@codemonkey.ws, mst@redhat.com, jasowang@redhat.com,
	qemu-devel@nongnu.org, stefanha@redhat.com, pbonzini@redhat.com
Subject: Re: [Qemu-devel] [PATCH] e1000: NetClientInfo.receive_iov implemented
Date: Tue, 10 Sep 2013 10:31:56 +0200	[thread overview]
Message-ID: <20130910083156.GD10477@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <1378731102-4005-1-git-send-email-v.maffione@gmail.com>

On Mon, Sep 09, 2013 at 02:51:42PM +0200, Vincenzo Maffione wrote:

Just two small style comments:

> @@ -834,11 +837,14 @@ e1000_receive(NetClientState *nc, const uint8_t *buf, size_t size)
>      unsigned int n, rdt;
>      uint32_t rdh_start;
>      uint16_t vlan_special = 0;
> -    uint8_t vlan_status = 0, vlan_offset = 0;
> +    uint8_t vlan_status = 0;
>      uint8_t min_buf[MIN_BUF_SIZE];
>      size_t desc_offset;
>      size_t desc_size;
>      size_t total_size;
> +    size_t size = iov_size(iov, iovcnt), iov_ofs = 0;

Please keep these initializers on separate lines (not a hard rule, but I
find it clearer especially when calling functions):

size_t size = iov_size(iov, iovcnt);
size_t iov_ofs = 0;

> +    struct iovec iv;

This iovec is for min_buf[].  I suggest moving it below the min_buf[]
declaration and renaming it to make its purpose clearer:

struct iovec min_iovec;

Stefan

      reply	other threads:[~2013-09-10  8:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-09 12:51 [Qemu-devel] [PATCH] e1000: NetClientInfo.receive_iov implemented Vincenzo Maffione
2013-09-10  8:31 ` Stefan Hajnoczi [this message]

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=20130910083156.GD10477@stefanha-thinkpad.redhat.com \
    --to=stefanha@gmail.com \
    --cc=anthony@codemonkey.ws \
    --cc=jasowang@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    --cc=v.maffione@gmail.com \
    /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).