netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Dumazet <dada1@cosmosbay.com>
To: Andi Kleen <ak@suse.de>
Cc: netdev@vger.kernel.org, davem@davemloft.net
Subject: Re: [PATCH] Shrink struct dst_entry a bit
Date: Tue, 13 Mar 2007 15:44:57 +0100	[thread overview]
Message-ID: <200703131544.57757.dada1@cosmosbay.com> (raw)
In-Reply-To: <200703131531.14548.ak@suse.de>

On Tuesday 13 March 2007 15:31, Andi Kleen wrote:

> Ok.  When you do such changes you should always add a comment, otherwise
> it will be always destroyed with the next change.
>
> But it seems highly fragile to me anyways because it depends on the exact
> value of RTAX_MAX which tends to change regularly when someone invents
> a new attribute. You should probably have moved next out of the dst entry.

Not an option, unfortunately. But yes, a comment is needed.
(Before my february patches, the 'next' pointer was forced to be the first 
field of dst).

>
> Anyways here's a new patch with next still at the end and a comment.
>

Andi, did you actually test your patch ?

Unless I really miss something obvious, rate_last is supposed to store 
jiffies.

net/ipv4/route.c:1313:  if (time_after(jiffies, rt->u.dst.rate_last + 
ip_rt_redirect_silence))

So you *cannot* convert it to 'unsigned short'. Really.


However, you could convert it to a u32, and use a helper function :

static inline u32 get_jiffies_32()
{
return (u32)jiffies;
}

and change appropriate code using rate_last

Also, 'lastuse' could use a u32 too, I even had a patch for this one...


  reply	other threads:[~2007-03-13 14:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-13 13:48 [PATCH] Shrink struct dst_entry a bit Andi Kleen
2007-03-13 14:10 ` Eric Dumazet
2007-03-13 14:31   ` Andi Kleen
2007-03-13 14:44     ` Eric Dumazet [this message]
2007-03-13 14:58       ` Eric Dumazet

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=200703131544.57757.dada1@cosmosbay.com \
    --to=dada1@cosmosbay.com \
    --cc=ak@suse.de \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).