From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id CC1C399C9 for ; Fri, 26 May 2017 07:58:40 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga104.jf.intel.com with ESMTP; 25 May 2017 22:58:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.38,395,1491289200"; d="scan'208";a="1153030339" Received: from yliu-dev.sh.intel.com (HELO yliu-dev) ([10.239.67.162]) by fmsmga001.fm.intel.com with ESMTP; 25 May 2017 22:58:38 -0700 Date: Fri, 26 May 2017 13:58:40 +0800 From: Yuanhan Liu To: "Stojaczyk, DariuszX" Cc: "dev@dpdk.org" , "Verkamp, Daniel" Message-ID: <20170526055840.GB2276@yliu-dev> References: <1494500208-78788-1-git-send-email-dariuszx.stojaczyk@intel.com> <1494513192-85863-1-git-send-email-dariuszx.stojaczyk@intel.com> <1494513192-85863-4-git-send-email-dariuszx.stojaczyk@intel.com> <20170522070130.GP2276@yliu-dev> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [dpdk-dev] [PATCH v3 3/3] vhost: access VhostUsrMsg via packed struct X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 May 2017 05:58:41 -0000 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 > > > Signed-off-by: Dariusz Stojaczyk > > > --- > > > 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