af-packet: micro optimization

Use a else if instead of two chained if constructs.
pull/3567/head
Eric Leblond 7 years ago
parent 9efa4ace69
commit e98b5e4946

@ -1058,8 +1058,7 @@ static inline int AFPParsePacketV3(AFPThreadVars *ptv, struct tpacket_block_desc
p->afp_v.v4_map_fd = ptv->v4_map_fd;
p->afp_v.v6_map_fd = ptv->v6_map_fd;
#endif
}
if (ptv->flags & AFP_XDPBYPASS) {
} else if (ptv->flags & AFP_XDPBYPASS) {
p->BypassPacketsFlow = AFPXDPBypassCallback;
#ifdef HAVE_PACKET_EBPF
p->afp_v.v4_map_fd = ptv->v4_map_fd;

Loading…
Cancel
Save