From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 444F145AEA; Mon, 14 Oct 2024 07:42:46 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 03D5840273; Mon, 14 Oct 2024 07:42:46 +0200 (CEST) Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by mails.dpdk.org (Postfix) with ESMTP id 9212740151 for ; Mon, 14 Oct 2024 07:42:44 +0200 (CEST) Received: from mail.maildlp.com (unknown [172.19.163.174]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4XRmKl2fwJzpWs6; Mon, 14 Oct 2024 13:40:43 +0800 (CST) Received: from dggpeml500024.china.huawei.com (unknown [7.185.36.10]) by mail.maildlp.com (Postfix) with ESMTPS id 373511400D8; Mon, 14 Oct 2024 13:42:42 +0800 (CST) Received: from [10.67.121.161] (10.67.121.161) by dggpeml500024.china.huawei.com (7.185.36.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Mon, 14 Oct 2024 13:42:41 +0800 Message-ID: <30fa9ea2-d80d-4690-b5f2-9ac28d6e5fff@huawei.com> Date: Mon, 14 Oct 2024 13:42:41 +0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] net: improve vlan header type alignment To: =?UTF-8?Q?Morten_Br=C3=B8rup?= , References: <20241013083554.97489-1-mb@smartsharesystems.com> Content-Language: en-US From: fengchengwen In-Reply-To: <20241013083554.97489-1-mb@smartsharesystems.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.121.161] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To dggpeml500024.china.huawei.com (7.185.36.10) X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Acked-by: Chengwen Feng On 2024/10/13 16:35, Morten Brørup wrote: > Ethernet packets can be VLAN tagged, i.e. an Ethernet header can have a > VLAN tag (a.k.a. VLAN header) embedded. > Since the Ethernet header is 2 byte aligned, and the VLAN tag is directly > related to the Ethernet header, the VLAN tag is also 2 byte aligned, so > packing the VLAN tag structure is not necessary. > > Furthermore, the Ethernet header type is implictly 2 byte aligned, so > removed the superfluous explicit 2 byte alignment. > > Added static_asserts to verify the size and alignment of the various > Ethernet types. > > Signed-off-by: Morten Brørup