From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 47CFF1CF6A for ; Fri, 6 Apr 2018 13:50:38 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Apr 2018 04:50:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,415,1517904000"; d="scan'208";a="43973438" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga004.fm.intel.com with ESMTP; 06 Apr 2018 04:50:36 -0700 Received: from fmsmsx113.amr.corp.intel.com (10.18.116.7) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 6 Apr 2018 04:50:36 -0700 Received: from BGSMSX108.gar.corp.intel.com (10.223.4.192) by FMSMSX113.amr.corp.intel.com (10.18.116.7) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 6 Apr 2018 04:50:35 -0700 Received: from bgsmsx101.gar.corp.intel.com ([169.254.1.52]) by BGSMSX108.gar.corp.intel.com ([169.254.8.7]) with mapi id 14.03.0319.002; Fri, 6 Apr 2018 17:20:33 +0530 From: "Yang, Zhiyong" To: Pavan Nikhilesh , "jerin.jacob@caviumnetworks.com" , "Yigit, Ferruh" , "pascal.mazon@6wind.com" , "Varghese, Vipin" , "thomas@monjalon.net" CC: "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] net/tap: fix memcpy with incorrect size Thread-Index: AQHTzZrTbB0AbbIbiEiz8fZXuMDoI6PznvHQ Date: Fri, 6 Apr 2018 11:50:32 +0000 Message-ID: References: <20180406113031.30340-1-pbhagavatula@caviumnetworks.com> In-Reply-To: <20180406113031.30340-1-pbhagavatula@caviumnetworks.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [10.223.10.10] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] net/tap: fix memcpy with incorrect size 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, 06 Apr 2018 11:50:39 -0000 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Pavan Nikhilesh > Sent: Friday, April 6, 2018 7:31 PM > To: jerin.jacob@caviumnetworks.com; Yigit, Ferruh ; > pascal.mazon@6wind.com; Varghese, Vipin ; > thomas@monjalon.net > Cc: dev@dpdk.org; Pavan Nikhilesh > Subject: [dpdk-dev] [PATCH] net/tap: fix memcpy with incorrect size >=20 > Fix incorrect sizeof operation being used for getting mac addr size. >=20 > Found while compiling with arm64 clang. > drivers/net/tap/rte_eth_tap.c:1410:40: error: argument to 'sizeof' in > 'memcpy' call is the same pointer type 'struct ether_addr *' as the > destination; expected 'struct ether_addr' or an explicit length > [-Werror,-Wsizeof-pointer-memaccess] > rte_memcpy(&pmd->eth_addr, mac_addr, sizeof(mac_addr)); > ~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~ >=20 > Fixes: bcab6c1d27fa ("net/tap: allow user MAC to be passed as args") >=20 > Signed-off-by: Pavan Nikhilesh > --- Good catch! Acked-by: Zhiyong Yang