From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4469DC38147 for ; Wed, 18 Jan 2023 17:53:00 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8A6A08453A; Wed, 18 Jan 2023 18:52:58 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="aqoVKVlX"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 646A2855D9; Wed, 18 Jan 2023 18:52:57 +0100 (CET) Received: from mail-wm1-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 44D2F83E5D for ; Wed, 18 Jan 2023 18:52:55 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=saproj@gmail.com Received: by mail-wm1-x331.google.com with SMTP id l8so8176337wms.3 for ; Wed, 18 Jan 2023 09:52:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=AILF8JDN7B69SBmPHCgQMoEU3U5/W7D6FCAmaIf6P8o=; b=aqoVKVlX3DRs86Zhyf1kPbZ4QluKenFEipQgAr+qSAZaPZ/+oPDVqB0SQWnF/potSr uLhY7k1PHIpTu3ZPf1WHPCel8Qpqm2JvLav0nuo2CzUvkEnb/zqDbgXTNaYmOz98I+uD OpbIEH9gwjeS6xMTqTJDo6koV2Lhgu1X5ax/Ay6A9tyNwXaYdgXMEFhOTUFRYyYeN5AX /GHtK75rtfSHOGvvo6oyWGV4XjC5YUlzj/YNPNPa9fefUFFoeZ2LXSYeF8pFxXd2Y79n CUTNj2TlJIlJ9DFUHtfRjiye4djmzlu4L7gjm0DndWA+qvVqiHuf63ulVPoWcpg4mNJF YzcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=AILF8JDN7B69SBmPHCgQMoEU3U5/W7D6FCAmaIf6P8o=; b=ncim5ugIXWRtczuCT3lJM/jnWOrj63+gI/lozEJjD6oiQ419Y/3z5eDdOoltD8AYeM QCB7W/nlVE/4LX4W4iTyuTomhc/OzALmPg9YbVLrncklcEqPA4eW3OrVubJe2oWohAPs kcID0XGc1+DWFQt/Pbk3z1by+Zn8Nbh/B9sej7F8zZouQt21qu1HSDAAGlcoDb8mml63 urN7E5PswJwR1J18XGS/9Hn3opMG7e+Avpb1Wu8a2dN8/S0KFl6KbbyYwzBjw5clafZc jNnVOrxT3fAlHht7Cfx3kHH0ZKWARLmpOWsrf/b0RxgmopJ+zWG6U9X65N4bvLMbseux ysXg== X-Gm-Message-State: AFqh2kp624iLDXSvJE1iBW/K1zAk3GM/Haxk4s0y4ueWHZYOBvE14jzH oaYmT1DosZZrcFoUWco9ZgyFXE0IkgY= X-Google-Smtp-Source: AMrXdXs3zHL8IRXOXxVWqkZ7BGtG7gwopUcG6cCaQ7BEY8gDADUY5GzaglIfJse7rzYwJ2NFtvF3Kw== X-Received: by 2002:a05:600c:4d91:b0:3da:fb96:53d with SMTP id v17-20020a05600c4d9100b003dafb96053dmr7355806wmp.4.1674064374747; Wed, 18 Jan 2023 09:52:54 -0800 (PST) Received: from saproj-Latitude-5501.yandex.net ([2a02:6b8:0:40c:cc7f:451:5465:235a]) by smtp.gmail.com with ESMTPSA id s7-20020a1cf207000000b003db11dfc687sm2502435wmc.36.2023.01.18.09.52.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Jan 2023 09:52:54 -0800 (PST) From: Sergei Antonov To: u-boot@lists.denx.de, v.v.mitrofanov@yadro.com Cc: Sergei Antonov Subject: [PATCH] net: ipv6: fix alignment errors on ARM Date: Wed, 18 Jan 2023 20:52:18 +0300 Message-Id: <20230118175218.31683-1-saproj@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean Commands "ping6" and "tftpboot ... -ipv6" did not work on ARM because machine code expects 4-byte alignment and some structures from net6.h are not aligned in memory. Fix by adding __packed, since it is already used in this file. Signed-off-by: Sergei Antonov --- include/net6.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/net6.h b/include/net6.h index 9b3de028e6dc..2d7c5a096046 100644 --- a/include/net6.h +++ b/include/net6.h @@ -24,7 +24,7 @@ struct in6_addr { #define s6_addr in6_u.u6_addr8 #define s6_addr16 in6_u.u6_addr16 #define s6_addr32 in6_u.u6_addr32 -}; +} __packed; #define IN6ADDRSZ sizeof(struct in6_addr) #define INETHADDRSZ sizeof(net_ethaddr) @@ -62,7 +62,7 @@ struct ip6_hdr { u8 hop_limit; struct in6_addr saddr; struct in6_addr daddr; -}; +} __packed; #define IP6_HDR_SIZE (sizeof(struct ip6_hdr)) /* struct udp_hdr - User Datagram Protocol header */ @@ -164,7 +164,7 @@ struct icmp6hdr { #define icmp6_addrconf_managed icmp6_dataun.u_nd_ra.managed #define icmp6_addrconf_other icmp6_dataun.u_nd_ra.other #define icmp6_rt_lifetime icmp6_dataun.u_nd_ra.rt_lifetime -}; +} __packed; extern struct in6_addr const net_null_addr_ip6; /* NULL IPv6 address */ extern struct in6_addr net_gateway6; /* Our gateways IPv6 address */ -- 2.34.1