[ovs-dev] [PATCH ovn v3] Broadcast DHCPREPLY when BROADCAST flag is set

Ben Pfaff blp at ovn.org
Thu Mar 5 20:18:09 UTC 2020


On Thu, Mar 05, 2020 at 12:22:18PM +0530, Numan Siddique wrote:
> One small comment on the above function. How about doing this way
> 
> static bool
> is_dhcp_flags_broadcast(ovs_be16 flags)
> {
> return ntohs(flags) & DHCP_BROADCAST_FLAG;
> }

The canonical form is:
        return flags & htons(DHCP_BROADCAST_FLAG);
since compilers are generally better about optimizing it.


More information about the dev mailing list