]> The Tcpdump Group git mirrors - libpcap/commit
Use fewer EtherType comparisons for DECnet.
authorDenis Ovsienko <[email protected]>
Mon, 27 Jan 2025 16:13:37 +0000 (16:13 +0000)
committerDenis Ovsienko <[email protected]>
Thu, 30 Jan 2025 19:45:58 +0000 (19:45 +0000)
commit6f8a28c1587bd8993a0dc2d9e04ada5cc062fd4b
tree1976c0f71b829dd0e954e638d9c230344a50d49b
parent67a3392e30d70b9b328632bfe50824662e357134
Use fewer EtherType comparisons for DECnet.

gen_dnhostop() either generates a comparison for EtherType or recurses,
in which case it either generates... and so on.  Although the optimizer
deduplicates this later, it is better to avoid the unnecessary work in
the first place.  Move the EtherType comparison to gen_host(), which is
the only caller of gen_dnhostop().

For "decnet host" the resulting unoptimized bytecode is now two
instructions shorter (thus the corresponding accept test changes) and
identical to the optimized bytecode, the behaviour remains exactly the
same (thus no apply tests change).
gencode.c
testprogs/TESTrun