mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "David S. Miller" <davem@davemloft.net>
To: greearb@candelatech.com
Cc: ioe-lkml@rameria.de, netdev@axxeo.de, vda@ilport.com.ua,
	dave@thedillows.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, jgarzik@pobox.com
Subject: Re: [RFD][PATCH] typhoon and core sample for folding away VLAN stuff
Date: Wed, 12 Apr 2006 13:51:43 -0700 (PDT)	[thread overview]
Message-ID: <20060412.135143.29962858.davem@davemloft.net> (raw)
In-Reply-To: <443D5E9E.80002@candelatech.com>

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.

  parent reply	other threads:[~2006-04-12 20:52 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-07 13:28 [PATCH] deinline a few large functions in vlan code Denis Vlasenko
2006-04-07 20:25 ` David S. Miller
2006-04-10  5:28   ` Denis Vlasenko
2006-04-10  5:45     ` David S. Miller
2006-04-10 14:16       ` [PATCH] deinline a few large functions in vlan code v2 Denis Vlasenko
2006-04-10 14:31         ` Auke Kok
2006-04-10 15:26         ` Dave Dillow
2006-04-11  7:28           ` Denis Vlasenko
2006-04-11  8:02             ` David S. Miller
2006-04-11  9:49             ` Ingo Oeser
     [not found]               ` <200604111502.52302.vda@ilport.com.ua>
2006-04-11 13:17                 ` Ingo Oeser
2006-04-12 19:32                   ` [RFD][PATCH] typhoon and core sample for folding away VLAN stuff (was: Re: [PATCH] deinline a few large functions in vlan code v2) Ingo Oeser
2006-04-12 20:10                     ` [RFD][PATCH] typhoon and core sample for folding away VLAN stuff Ben Greear
2006-04-12 20:23                       ` Stephen Hemminger
2006-04-12 20:51                       ` David S. Miller [this message]
2006-04-13  1:24                     ` Dave Dillow
2006-04-13  8:38                       ` Denis Vlasenko
2006-04-13 15:00                         ` Dave Dillow
2006-04-11 13:59             ` [PATCH] deinline a few large functions in vlan code v2 Dave Dillow
2006-04-12  8:55               ` Denis Vlasenko
2006-04-12 17:18                 ` Dave Dillow
2006-04-13  6:04                   ` Denis Vlasenko
2006-04-13 14:59                     ` Dave Dillow
2006-04-13 11:32                   ` Ingo Oeser

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060412.135143.29962858.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=dave@thedillows.org \
    --cc=greearb@candelatech.com \
    --cc=ioe-lkml@rameria.de \
    --cc=jgarzik@pobox.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@axxeo.de \
    --cc=netdev@vger.kernel.org \
    --cc=vda@ilport.com.ua \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome