lkml.org 
[lkml]   [2006]   [Apr]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [RFD][PATCH] typhoon and core sample for folding away VLAN stuff
From
From: Ben Greear <greearb@candelatech.com>
Date: Wed, 12 Apr 2006 13:10:06 -0700

> What is the reasoning for this change? Is the compiler
> able to optomize the right-hand-side to a constant with your
> change in place?
>
> > - if (veth->h_vlan_proto != __constant_htons(ETH_P_8021Q)) {
> > + if (veth->h_vlan_proto != htons(ETH_P_8021Q)) {
> > return -EINVAL;
> > }

As a policy, Ben, we only use __constant_htons() in compile
time initializers of data structures. Otherwise we use the
normal htons().

That's why.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-04-12 22:55    [W:0.078 / U:0.468 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site