From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 9C2927CC8 for ; Wed, 24 May 2017 15:12:13 +0200 (CEST) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 May 2017 06:12:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.38,386,1491289200"; d="scan'208";a="104842969" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga005.jf.intel.com with ESMTP; 24 May 2017 06:12:11 -0700 Received: from fmsmsx122.amr.corp.intel.com (10.18.125.37) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 24 May 2017 06:12:11 -0700 Received: from hasmsx112.ger.corp.intel.com (10.184.198.40) by fmsmsx122.amr.corp.intel.com (10.18.125.37) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 24 May 2017 06:12:11 -0700 Received: from hasmsx105.ger.corp.intel.com ([169.254.1.156]) by HASMSX112.ger.corp.intel.com ([169.254.10.78]) with mapi id 14.03.0319.002; Wed, 24 May 2017 16:12:08 +0300 From: "Stojaczyk, DariuszX" To: Yuanhan Liu CC: "dev@dpdk.org" , "Verkamp, Daniel" Thread-Topic: [dpdk-dev] [PATCH v3 3/3] vhost: access VhostUsrMsg via packed struct Thread-Index: AQHSykYzOrnjOCCWmkuC5rF2pFCs+qH/y6IAgAOuR4A= Date: Wed, 24 May 2017 13:12:07 +0000 Message-ID: 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> In-Reply-To: <20170522070130.GP2276@yliu-dev> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 10.0.102.7 dlp-reaction: no-action x-originating-ip: [10.184.70.11] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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: Wed, 24 May 2017 13:12:14 -0000 > This is for fixing compile warnings with new clang 4.0? >=20 > http://dpdk.org/ml/archives/dev/2017-April/064089.html >=20 > If so, please show the exact warning in the commit log. >=20 Everything compiles, but is undefined behavior. 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_ad= dr *addr __attribute__((aligned(1))) Since the code above is unacceptable, this patch makes all functions take p= ointer to the parent struct (VhostUserMsg) > > > > Signed-off-by: Daniel Verkamp > > Signed-off-by: Dariusz Stojaczyk > > --- > > Fixed checkpatch warnings >=20 > It's likely it will be easily missed while review. We normally do that: >=20 > --- >=20 > v3: fix checkpatch warnings >=20 > v2: remove gerrit id >=20 > --yliu Thanks, I'll stick with it from now on