From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1jh1u4-0001Bk-BS for mharc-grub-devel@gnu.org; Thu, 04 Jun 2020 22:16:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58272) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jh1u3-0001BI-3R for grub-devel@gnu.org; Thu, 04 Jun 2020 22:16:15 -0400 Received: from m9a0013g.houston.softwaregrp.com ([15.124.64.91]:52443) by eggs.gnu.org with esmtps (TLS1.2:DHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jh1u1-0000qr-6w for grub-devel@gnu.org; Thu, 04 Jun 2020 22:16:14 -0400 Received: FROM m9a0013g.houston.softwaregrp.com (15.121.0.190) BY m9a0013g.houston.softwaregrp.com WITH ESMTP FOR grub-devel@gnu.org; Fri, 5 Jun 2020 02:15:13 +0000 Received: from M4W0335.microfocus.com (2002:f78:1193::f78:1193) by M9W0067.microfocus.com (2002:f79:be::f79:be) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1591.10; Fri, 5 Jun 2020 02:16:02 +0000 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (15.124.8.11) by M4W0335.microfocus.com (15.120.17.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1591.10 via Frontend Transport; Fri, 5 Jun 2020 02:16:02 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ao2ky2sK6NxiG4gjx5o2RCisJs3fg1a9Gs3Z0dOEdo/EV2HjGgJsFUhsJPi92osaHAqVf0HzGdMQToEybNUgAIz6ybvnMiWse2rXgowyhVk5yyd4PaDtSyofVPAe7342sb5ujLUM3bEtwPnZ5vakfiTKV0bvLIYJZ5YSEVkUCkm8lxCSJ2Nz+aB+GLvKjHhkajCNKQ68r6ryzMiiTveFTOgia/iL4M1yFxmtGuidA3fAqaJzPs2rtcJstzRrtunn3xlH1VSwvoQM0pG4xSrj/6M6K7+gk07UEyUVt8zFoEcxB3Lqg9tDPDRnByYRWT6qyuicOW7Tx/OOlx6Lk3Vkpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=bIeIq6DneCv2O6SjiL6gDYfeRTZkwbLKfOy/VKSOy4w=; b=d8DylU0MwnjCpSyK4GPec0rTIr+eOrSjb8LMilDevMWjFYi054ki3NmqMe6UO5JliwC00LeDhv1ZMgxAUshkTlT1/pND28SxEUJmcEgjFWltavJ2T9OSuqPiFefFlzZA0PkolUnG3B7KQUxpIesukgF9d01w81CDsYKZB65Pn2R5LZbz/+q5HyL10NhGm2sihywzQdKLqUk5eaQ8ziV/loJDsH4QlBFB2XzzZf8mqKUoRGxzSJ7EmkNuDBbUx5cjtj5CEfecM2VN4fsDirKnl0C+FK1oSwG5P6AtimKY8HvgFSbESkhV7IcGD2SS2o1VuictNLN5+5ZVD6d20OzwlQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none Authentication-Results: gnu.org; dkim=none (message not signed) header.d=none;gnu.org; dmarc=none action=none header.from=suse.com; Received: from BY5SPR01MB0004.namprd18.prod.outlook.com (2603:10b6:a03:1b4::33) by BY5PR18MB3234.namprd18.prod.outlook.com (2603:10b6:a03:1a1::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3066.18; Fri, 5 Jun 2020 02:16:01 +0000 Received: from BY5SPR01MB0004.namprd18.prod.outlook.com ([fe80::d478:c9:4316:29ee]) by BY5SPR01MB0004.namprd18.prod.outlook.com ([fe80::d478:c9:4316:29ee%2]) with mapi id 15.20.3066.018; Fri, 5 Jun 2020 02:16:01 +0000 Date: Fri, 5 Jun 2020 10:15:52 +0800 From: Michael Chang To: The development of GNU GRUB Subject: Re: [PATCH 3/4] efinet: UEFI IPv6 PXE support Message-ID: <20200605021552.GA3688@mercury> References: <20200604073326.3255847-1-javierm@redhat.com> <20200604073326.3255847-4-javierm@redhat.com> Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-ClientProxiedBy: HK2P15301CA0012.APCP153.PROD.OUTLOOK.COM (2603:1096:202:1::22) To BY5SPR01MB0004.namprd18.prod.outlook.com (2603:10b6:a03:1b4::33) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from mercury (2001:b400:e288:36e8:69da:f8df:2d3c:e107) by HK2P15301CA0012.APCP153.PROD.OUTLOOK.COM (2603:1096:202:1::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3088.3 via Frontend Transport; Fri, 5 Jun 2020 02:15:59 +0000 X-Originating-IP: [2001:b400:e288:36e8:69da:f8df:2d3c:e107] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 478fd78c-0c77-4a8a-5640-08d808f663ea X-MS-TrafficTypeDiagnostic: BY5PR18MB3234: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8882; X-Forefront-PRVS: 0425A67DEF X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: gY3qRUo2x6nLBCpbvq4XF/Ovv+TVBiSSdUpeonbHdt9UeW2+YePC9Jih/BfiIJCX5UTonkkmswsPOqXBLYbMezlksTaJOqogBC6k43vIy76ONKP+ZCarJpX25tTO8cwdKBS/otz6tIAObS1491aJFQz1pE3x0/ClsBRu8y2vDvsZG1f2KPriDI+Oya0gPd+Qf9/w53aIrq/it8P+4p++HlQnvUytXqOuH0+AxDlvq17OzwT0o/9dQLuzwupT+9brpHIZ8HE0PTLlZBuZ3r+fb5x08EClTEP1WREdQFtpxC8ymkB/C9/jQdsKCk290HcoTXq8ZDGIfbK40qbgn5r3y8MGarj8i5dtB/b5zSkikb+GhLv306h/3B3Fq2OLHn5Kb/MA2mg9UGpV29Ou6iVf+A== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BY5SPR01MB0004.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(396003)(39860400002)(136003)(376002)(346002)(366004)(66946007)(83380400001)(53546011)(316002)(16526019)(186003)(33716001)(6666004)(966005)(9686003)(52116002)(6496006)(66556008)(9576002)(2906002)(33656002)(86362001)(8936002)(55016002)(66476007)(1076003)(6916009)(5660300002)(8676002)(478600001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: m9QEfi+282F0s3w7ozECiTtajnd5yZSm84f01Z43YG2S6vJTkUmH53M3Q958aHN5g7iuktHMk5GdzvKnhXLMIDrUt2LamyOdZpLp92giFLqZcFrIaG8tYFWmSGItZOXtFuNRmzWYNDgGXdEIjpoxE4f7/NzXbeEAOUy2mz+zprX3uKhp5c5bW10WOoC8zUnsrWtyivEv/R0FCbpFPEn6U3+03q6Q5uA3yNSWcxqfT3fftfDp/X3WwLu0g64pJ6V+L9XN1zxb83xSQqtAqGcWyCnvrHx+fKsfUrgyuT4hr7SmzcIkN1yVnqwZkyZthzJVLrjvqVt+5NRhV0atDn3Bnrtpkqq1iRaeVJMrjzwWMr6qpaztDlEpQC1n3gkJ4+sjBMfR03DGi3ubSQOxHNiRuNjxBVMkh6dibvTAlFy27YLfej/AVMyT6A8esO1r7K3kobvNv/HlZGCOlxhfesKec6vf3QcfLJ9ReX7kU2csY3PjM7LOIyFKDVqsnIwcREPZIwaC/44HrSBykRChSUuG+cHbhzsSI8px/gR3gQbKBmE= X-MS-Exchange-CrossTenant-Network-Message-Id: 478fd78c-0c77-4a8a-5640-08d808f663ea X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jun 2020 02:16:01.4118 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 856b813c-16e5-49a5-85ec-6f081e13b527 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 41dK+QDdNQD2kKoEjbsLZgvb1eE/ijO5mIu6vZHfuacuja5xE9Z/Bu+WT/HSx8fE X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR18MB3234 X-OriginatorOrg: suse.com Received-SPF: pass client-ip=15.124.64.91; envelope-from=MChang@suse.com; helo=m9a0013g.houston.softwaregrp.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/04 22:16:07 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_PASS=-0.001, UNPARSEABLE_RELAY=0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jun 2020 02:16:15 -0000 On Thu, Jun 04, 2020 at 01:37:52PM +0200, Thomas Frauendorfer wrote: > Hi, > > You replace the 'unused[52]' field before dhcp_discover with 51 bytes. > While the UEFI spec also defines the EFI_PXE_BASE_CODE_MODE struct in > this way it also specifies that an EFI_IP_ADDRESS is 16-byte buffer > aligned on a 4-byte boundary. True. > So there should probably be a grub_efi_uint8_t between tos and > station_ip to ensure the correct alignment You're probably right if the data type for `station_ip` is `grub_efi_pxe_ip_address_t`, but here it is `grub_efi_ip_address_t` declared as: typedef grub_uint8_t grub_efi_ip_address_t[8] __attribute__ ((aligned(4))); So the compiler would have been taking care of the alignment already ... By the way, I found the mentioned hunk is different to what was posted on the list[1], which had relevant fields like this: grub_uint8_t using_ipv6; grub_uint8_t unused[16]; grub_efi_pxe_ip_address_t station_ip; grub_efi_pxe_ip_address_t subnet_mask; Maybe Javier could help to shed some light on why the change was made ? Though I'm not against it, I'm still interested to know about it if they have any other concern or in case anything could be missing here. :) [1] https://lists.gnu.org/archive/html/grub-devel/2016-08/msg00003.html Thanks, Michael > > On Thu, Jun 4, 2020 at 9:34 AM Javier Martinez Canillas > wrote: > > > > > typedef struct grub_efi_pxe_mode > > { > > - grub_uint8_t unused[52]; > > + grub_efi_boolean_t started; > > + grub_efi_boolean_t ipv6_available; > > + grub_efi_boolean_t ipv6_supported; > > + grub_efi_boolean_t using_ipv6; > > + grub_efi_boolean_t bis_supported; > > + grub_efi_boolean_t bis_detected; > > + grub_efi_boolean_t auto_arp; > > + grub_efi_boolean_t send_guid; > > + grub_efi_boolean_t dhcp_discover_valid; > > + grub_efi_boolean_t dhcp_ack_received; > > + grub_efi_boolean_t proxy_offer_received; > > + grub_efi_boolean_t pxe_discover_valid; > > + grub_efi_boolean_t pxe_reply_received; > > + grub_efi_boolean_t pxe_bis_reply_received; > > + grub_efi_boolean_t icmp_error_received; > > + grub_efi_boolean_t tftp_error_received; > > + grub_efi_boolean_t make_callbacks; > > + grub_efi_uint8_t ttl; > > + grub_efi_uint8_t tos; > > + grub_efi_ip_address_t station_ip; > > + grub_efi_ip_address_t subnet_mask; > > grub_efi_pxe_packet_t dhcp_discover; > > grub_efi_pxe_packet_t dhcp_ack; > > grub_efi_pxe_packet_t proxy_offer; > > grub_efi_pxe_packet_t pxe_discover; > > grub_efi_pxe_packet_t pxe_reply; > > + grub_efi_pxe_packet_t pxe_bis_reply; > > + grub_efi_pxe_ip_filter_t ip_filter; > > + grub_efi_uint32_t arp_cache_entries; > > + grub_efi_pxe_arp_entry_t arp_cache[GRUB_EFI_PXE_BASE_CODE_MAX_ARP_ENTRIES]; > > + grub_efi_uint32_t route_table_entries; > > + grub_efi_pxe_route_entry_t route_table[GRUB_EFI_PXE_BASE_CODE_MAX_ROUTE_ENTRIES]; > > + grub_efi_pxe_icmp_error_t icmp_error; > > + grub_efi_pxe_tftp_error_t tftp_error; > > } grub_efi_pxe_mode_t; > > > > typedef struct grub_efi_pxe > > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > https://lists.gnu.org/mailman/listinfo/grub-devel