All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yuanhan Liu <yuanhan.liu@linux.intel.com>
To: "Stojaczyk, DariuszX" <dariuszx.stojaczyk@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	"Verkamp, Daniel" <daniel.verkamp@intel.com>
Subject: Re: [PATCH v3 3/3] vhost: access VhostUsrMsg via packed struct
Date: Fri, 26 May 2017 13:58:40 +0800	[thread overview]
Message-ID: <20170526055840.GB2276@yliu-dev> (raw)
In-Reply-To: <FBE7E039FA50BF47A673AD0BD3CD56A8A75106@HASMSX105.ger.corp.intel.com>

On Wed, May 24, 2017 at 01:12:07PM +0000, Stojaczyk, DariuszX wrote:
> > This is for fixing compile warnings with new clang 4.0?
> > 
> >     http://dpdk.org/ml/archives/dev/2017-April/064089.html
> > 
> > If so, please show the exact warning in the commit log.
> > 
> 
> Everything compiles, but is undefined behavior.

Would you be a bit more informative about the "undefined behavior"? This
patch set (including this one) looks good to me. I just want the commit
log be more informative. Something like "Fixes unaligned access to fields"
is a bit too vague.

Thanks.

	--yliu

>  Accessing packed struct's fields through pointers would have to be done as following:
> e.g vhost_user_set_vring_addr(struct virtio_net *dev, struct vhost_vring_addr *addr __attribute__((aligned(1)))
> Since the code above is unacceptable, this patch makes all functions take pointer to the parent struct (VhostUserMsg)
> 
> > >
> > > Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
> > > Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
> > > ---
> > > Fixed checkpatch warnings
> > 
> > It's likely it will be easily missed while review. We normally do that:
> > 
> > ---
> > 
> > v3: fix checkpatch warnings
> > 
> > v2: remove gerrit id
> > 
> > 	--yliu
> 
> Thanks, I'll stick with it from now on

  reply	other threads:[~2017-05-26  5:58 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-11 10:23 [PATCH 1/3] vhost: fix malloc in rte_vhost_get_mem_table Dariusz Stojaczyk
2017-05-11 10:23 ` [PATCH 2/3] vhost: free virtio_net::guest_pages in vhost_backend_cleanup() Dariusz Stojaczyk
2017-05-11 10:23 ` [PATCH 3/3] vhost: access VhostUsrMsg via packed struct Dariusz Stojaczyk
2017-05-11 10:56 ` [PATCH v2 1/3] vhost: fix malloc in rte_vhost_get_mem_table Dariusz Stojaczyk
2017-05-11 10:56   ` [PATCH v2 2/3] vhost: free virtio_net::guest_pages in vhost_backend_cleanup() Dariusz Stojaczyk
2017-05-11 10:56   ` [PATCH v2 3/3] vhost: access VhostUsrMsg via packed struct Dariusz Stojaczyk
2017-05-11 11:42   ` [PATCH v2 1/3] vhost: fix malloc in rte_vhost_get_mem_table Jens Freimann
2017-05-11 12:32     ` Stojaczyk, DariuszX
2017-05-11 14:33   ` [PATCH v3 0/3] vhost undefined behavior fixes Dariusz Stojaczyk
2017-05-11 14:33     ` [PATCH v3 1/3] vhost: fix malloc in rte_vhost_get_mem_table() Dariusz Stojaczyk
2017-05-11 13:56       ` Jens Freimann
2017-05-11 14:33     ` [PATCH v3 2/3] vhost: free guest_pages in vhost_backend_cleanup() Dariusz Stojaczyk
2017-05-11 14:31       ` Jens Freimann
2017-05-11 14:33     ` [PATCH v3 3/3] vhost: access VhostUsrMsg via packed struct Dariusz Stojaczyk
2017-05-22  7:01       ` Yuanhan Liu
2017-05-24 13:12         ` Stojaczyk, DariuszX
2017-05-26  5:58           ` Yuanhan Liu [this message]
2017-05-26 11:59     ` [PATCH v4 0/3] vhost: undefined behavior fixes Dariusz Stojaczyk
2017-05-26  8:40       ` Yuanhan Liu
2017-05-26 11:59       ` [PATCH v4 1/3] vhost: fix malloc in rte_vhost_get_mem_table() Dariusz Stojaczyk
2017-05-26 11:59       ` [PATCH v4 2/3] vhost: free guest_pages in vhost_backend_cleanup() Dariusz Stojaczyk
2017-05-26 11:59       ` [PATCH v4 3/3] vhost: access VhostUsrMsg via packed struct Dariusz Stojaczyk

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=20170526055840.GB2276@yliu-dev \
    --to=yuanhan.liu@linux.intel.com \
    --cc=daniel.verkamp@intel.com \
    --cc=dariuszx.stojaczyk@intel.com \
    --cc=dev@dpdk.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.