History

packet: fill the gap of TPACKET_ALIGNMENT with zeros

struct tpacket{2,3}_hdr is aligned to a multiple of TPACKET_ALIGNMENT. Explicitly defining and zeroing the gap of this makes additional changes easier.

Atzm Watanabe committed 12 years ago

Commit e4d26f41 parent 51846352 files · +4 −2Browse files

Showing the changes to include/uapi/linux (1 of 2 files). Show all

Unified · Split

include/uapi/linux/if_packet.h+2−1
@@ -133,7 +133,7 @@ struct tpacket2_hdr { · 132 unmodified lines
133 __u32 tp_sec;133 __u32 tp_sec;
134 __u32 tp_nsec;134 __u32 tp_nsec;
135 __u16 tp_vlan_tci;135 __u16 tp_vlan_tci;
136 __u16 tp_padding;136 __u8 tp_padding[6];
137};137};
138 138
139struct tpacket_hdr_variant1 {139struct tpacket_hdr_variant1 {
@@ -154,6 +154,7 @@ struct tpacket3_hdr { · 14 unmodified lines
154 union {154 union {
155 struct tpacket_hdr_variant1 hv1;155 struct tpacket_hdr_variant1 hv1;
156 };156 };
157 __u8 tp_padding[12];
157};158};
158 159
159struct tpacket_bd_ts {160struct tpacket_bd_ts {