mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "David S. Miller" <davem@redhat.com>
To: Arcady Stepanov <penguin@mol.ru>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] net/ipv4/route.c, kernel 2.4.20
Date: 03 May 2003 00:29:01 -0700	[thread overview]
Message-ID: <1051946941.14276.9.camel@rth.ninka.net> (raw)
In-Reply-To: <Pine.LNX.4.33.0304181500140.7345-100000@penguin-hole.mol.ru>

On Fri, 2003-04-18 at 04:22, Arcady Stepanov wrote:
> The patch is trivial:

This patch is wrong.

>  /* IP route accounting ptr for this logical cpu number. */
> -#define IP_RT_ACCT_CPU(i) (ip_rt_acct + cpu_logical_map(i) * 256)
> +#define IP_RT_ACCT_CPU(i) ((u8*)ip_rt_acct + cpu_logical_map(i) * 256)

There is no way this can be correct.  Look at the formula used
by ip_input.c, which is:

  struct ip_rt_acct *st = ip_rt_acct + 256*smp_processor_id();

So there is only two possibilities, either your patch is wrong
or this code in ip_input.c is wrong.

You probably want to keep IP_RT_ACCT_CPU() how it is, cast _THAT_
to "u8 *" then add in the offset.

Also, you'd get a response more quickly if you had sent this to
the networking development lists (linux-net and netdev@oss.sgi.com)
CC:'ing the networking maintainers (myself and Alexey Kuznetsov).
I came across this posting by pure luck.

linux-kernel is effectively /dev/null for some of us on many days.
Just like ipv4 and ipv6, linux kernel is an unreliable transport.

-- 
David S. Miller <davem@redhat.com>

      reply	other threads:[~2003-05-03 18:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-18 11:22 Arcady Stepanov
2003-05-03  7:29 ` David S. Miller [this message]

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=1051946941.14276.9.camel@rth.ninka.net \
    --to=davem@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=penguin@mol.ru \
    /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

all inboxes | Powered by JetHome®