From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg1-f196.google.com (mail-pg1-f196.google.com [209.85.215.196]) by dpdk.org (Postfix) with ESMTP id 937DAD0B2 for ; Thu, 2 May 2019 20:54:14 +0200 (CEST) Received: by mail-pg1-f196.google.com with SMTP id 85so1472453pgc.3 for ; Thu, 02 May 2019 11:54:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=9wqenf7IKEzABjyUj2vZcN8hnuGOYKWwyOdmRquZ6Gw=; b=ZtHTGz+oz47Ot9b3rbQ9EZxVjRa6JommtkPt3dxqFcfaq6mkKA8hdAnjo+knD8Xd6z g8gvXPIghzOoLgGx+BUB664pxLlmvHZVWeyjAnrrxhW7cFkbgzev92xNPI9C3giL6SGV /5RRi/F3i6Z6szAJ7tNQrIv29lrVLU8hoT/sm01aAFRlDEaRXZELPtxiiX2stWl/7p8Y O833Vr5bSNMTSoNeqe+8TmC0XA51bUV9q/BhGo8rb3Nz5WX4ZoK3caO8adGpB5dTQGsD 15gWCF4/VxkryHaW9iUagLh8qIE8scxDKO5CS6MQkDXcCS5IvWuttfB8rw9WNEngq74X ho1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=9wqenf7IKEzABjyUj2vZcN8hnuGOYKWwyOdmRquZ6Gw=; b=JGl5CsweStvn4wKpXS+0DN8hj/9NcD/7hibcuXh8FjQuwIoyK/pNZwzk0buWXJt8Ch iyYLM5hOFFSP96CCdzpVgWNEc7mikawHJCR3XARD3p1pQzxaCaye3sVrvJ/8Ks73+OqQ 5yUnV3dQovKugMneoLiM2ERwqmhXc3C0yMGGhpGVDu6f8qAc+KjTNcPdQCKDQXNVyFZj y0tfOOuei324sYrmMM0FywxbRSq0xabKZwQV0gf7zeJX289b8yEHDGl9dl73TC12nMBl U+sTKlX2rzfgDMpBY81ttfwSVfYa2U689iv+P7nUMlrZ93cIno3o07oQMDOq1qndb01h 6QWw== X-Gm-Message-State: APjAAAUK5BcQ8CCj+/wnBMMf+xEt5aMx3a8tNul3QDyF46XqVfP/+zuy xrUDcllO790ylV2okc31anl/Dw== X-Google-Smtp-Source: APXvYqzKDts/rEnVw6CJdgm55SVXlgAlvdGyZSN0ngdJnQNNlUnE52IQtIU1Gb1daBFrANiwUtMM3A== X-Received: by 2002:aa7:80d1:: with SMTP id a17mr5776787pfn.156.1556823253905; Thu, 02 May 2019 11:54:13 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id f7sm62474560pga.56.2019.05.02.11.54.13 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 02 May 2019 11:54:13 -0700 (PDT) Date: Thu, 2 May 2019 11:54:06 -0700 From: Stephen Hemminger To: "Burakov, Anatoly" Cc: Reshma Pattan , dev@dpdk.org, david.marchand@redhat.com, bruce.richardson@intel.com Message-ID: <20190502115406.783df5b0@hermes.lan> In-Reply-To: <276195ae-1dcc-cfff-09af-b5c904fccce0@intel.com> References: <20190502093334.7546-1-reshma.pattan@intel.com> <20190502141316.25907-1-reshma.pattan@intel.com> <276195ae-1dcc-cfff-09af-b5c904fccce0@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-dev] [PATCH v2] mk: report address of packed member as warning 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: Thu, 02 May 2019 18:54:15 -0000 On Thu, 2 May 2019 16:53:50 +0100 "Burakov, Anatoly" wrote: > On 02-May-19 3:13 PM, Reshma Pattan wrote: > > gcc 9 on Fedora 30 gives an error > > "taking address of packed member may result in an > > unaligned pointer value" for -Waddress-of-packed-member. > >=20 > > Report it as warning instead of error to fix the build. > >=20 > > Snippet of build before fix > > ...lib/librte_eal/linux/eal/eal_memalloc.c: In function =E2=80=98alloc_= seg_walk=E2=80=99: > > ...lib/librte_eal/linux/eal/eal_memalloc.c:768:12: error: taking address > > of packed member of =E2=80=98struct rte_mem_config=E2=80=99 may result = in an unaligned > > pointer value [-Werror=3Daddress-of-packed-member] > > 768 | cur_msl =3D &mcfg->memsegs[msl_idx]; > > | ^~~~~~~~~~~~~~~~~~~~~~~ > >=20 > > Snippet of build after fix > > ..lib/librte_eal/linux/eal/eal_memory.c: In function =E2=80=98remap_seg= ment=E2=80=99: > > ..lib/librte_eal/linux/eal/eal_memory.c:685:9: warning: taking address > > of packed member of =E2=80=98struct rte_mem_config=E2=80=99 may result = in an unaligned > > pointer value [-Waddress-of-packed-member] > > 685 | msl =3D &mcfg->memsegs[msl_idx]; > > =20 >=20 > Fixing these would require an ABI break, because these are exposed=20 > externally. Should we submit a deprecation notice for EAL? Ideally mem config and related structures would not be exposed in the API. Like lcore_config and eal_config it should be eal_private From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 858DEA0AC5 for ; Thu, 2 May 2019 20:54:17 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 90F601B0FB; Thu, 2 May 2019 20:54:16 +0200 (CEST) Received: from mail-pg1-f196.google.com (mail-pg1-f196.google.com [209.85.215.196]) by dpdk.org (Postfix) with ESMTP id 937DAD0B2 for ; Thu, 2 May 2019 20:54:14 +0200 (CEST) Received: by mail-pg1-f196.google.com with SMTP id 85so1472453pgc.3 for ; Thu, 02 May 2019 11:54:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=9wqenf7IKEzABjyUj2vZcN8hnuGOYKWwyOdmRquZ6Gw=; b=ZtHTGz+oz47Ot9b3rbQ9EZxVjRa6JommtkPt3dxqFcfaq6mkKA8hdAnjo+knD8Xd6z g8gvXPIghzOoLgGx+BUB664pxLlmvHZVWeyjAnrrxhW7cFkbgzev92xNPI9C3giL6SGV /5RRi/F3i6Z6szAJ7tNQrIv29lrVLU8hoT/sm01aAFRlDEaRXZELPtxiiX2stWl/7p8Y O833Vr5bSNMTSoNeqe+8TmC0XA51bUV9q/BhGo8rb3Nz5WX4ZoK3caO8adGpB5dTQGsD 15gWCF4/VxkryHaW9iUagLh8qIE8scxDKO5CS6MQkDXcCS5IvWuttfB8rw9WNEngq74X ho1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=9wqenf7IKEzABjyUj2vZcN8hnuGOYKWwyOdmRquZ6Gw=; b=JGl5CsweStvn4wKpXS+0DN8hj/9NcD/7hibcuXh8FjQuwIoyK/pNZwzk0buWXJt8Ch iyYLM5hOFFSP96CCdzpVgWNEc7mikawHJCR3XARD3p1pQzxaCaye3sVrvJ/8Ks73+OqQ 5yUnV3dQovKugMneoLiM2ERwqmhXc3C0yMGGhpGVDu6f8qAc+KjTNcPdQCKDQXNVyFZj y0tfOOuei324sYrmMM0FywxbRSq0xabKZwQV0gf7zeJX289b8yEHDGl9dl73TC12nMBl U+sTKlX2rzfgDMpBY81ttfwSVfYa2U689iv+P7nUMlrZ93cIno3o07oQMDOq1qndb01h 6QWw== X-Gm-Message-State: APjAAAUK5BcQ8CCj+/wnBMMf+xEt5aMx3a8tNul3QDyF46XqVfP/+zuy xrUDcllO790ylV2okc31anl/Dw== X-Google-Smtp-Source: APXvYqzKDts/rEnVw6CJdgm55SVXlgAlvdGyZSN0ngdJnQNNlUnE52IQtIU1Gb1daBFrANiwUtMM3A== X-Received: by 2002:aa7:80d1:: with SMTP id a17mr5776787pfn.156.1556823253905; Thu, 02 May 2019 11:54:13 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id f7sm62474560pga.56.2019.05.02.11.54.13 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 02 May 2019 11:54:13 -0700 (PDT) Date: Thu, 2 May 2019 11:54:06 -0700 From: Stephen Hemminger To: "Burakov, Anatoly" Cc: Reshma Pattan , dev@dpdk.org, david.marchand@redhat.com, bruce.richardson@intel.com Message-ID: <20190502115406.783df5b0@hermes.lan> In-Reply-To: <276195ae-1dcc-cfff-09af-b5c904fccce0@intel.com> References: <20190502093334.7546-1-reshma.pattan@intel.com> <20190502141316.25907-1-reshma.pattan@intel.com> <276195ae-1dcc-cfff-09af-b5c904fccce0@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-dev] [PATCH v2] mk: report address of packed member as warning 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Message-ID: <20190502185406.RQilmxl1gn046URvRXIQRNLy2tn37lgh97K9mXRY0dA@z> On Thu, 2 May 2019 16:53:50 +0100 "Burakov, Anatoly" wrote: > On 02-May-19 3:13 PM, Reshma Pattan wrote: > > gcc 9 on Fedora 30 gives an error > > "taking address of packed member may result in an > > unaligned pointer value" for -Waddress-of-packed-member. > >=20 > > Report it as warning instead of error to fix the build. > >=20 > > Snippet of build before fix > > ...lib/librte_eal/linux/eal/eal_memalloc.c: In function =E2=80=98alloc_= seg_walk=E2=80=99: > > ...lib/librte_eal/linux/eal/eal_memalloc.c:768:12: error: taking address > > of packed member of =E2=80=98struct rte_mem_config=E2=80=99 may result = in an unaligned > > pointer value [-Werror=3Daddress-of-packed-member] > > 768 | cur_msl =3D &mcfg->memsegs[msl_idx]; > > | ^~~~~~~~~~~~~~~~~~~~~~~ > >=20 > > Snippet of build after fix > > ..lib/librte_eal/linux/eal/eal_memory.c: In function =E2=80=98remap_seg= ment=E2=80=99: > > ..lib/librte_eal/linux/eal/eal_memory.c:685:9: warning: taking address > > of packed member of =E2=80=98struct rte_mem_config=E2=80=99 may result = in an unaligned > > pointer value [-Waddress-of-packed-member] > > 685 | msl =3D &mcfg->memsegs[msl_idx]; > > =20 >=20 > Fixing these would require an ABI break, because these are exposed=20 > externally. Should we submit a deprecation notice for EAL? Ideally mem config and related structures would not be exposed in the API. Like lcore_config and eal_config it should be eal_private