Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
net: improve VLAN header type alignment
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 implicitly 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 <mb@smartsharesystems.com> Acked-by: Chengwen Feng <fengchengwen@huawei.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
- Loading branch information