public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: Eric Weigle <ehw@lanl.gov>
To: Marcelo Tosatti <marcelo@conectiva.com.br>
Cc: Linux kernel mailing list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH][TRIVIAL] checksum.h header fixes for 2.4
Date: Fri, 10 Jan 2003 18:47:50 +1100	[thread overview]
Message-ID: <20030110091014.9B5252C40A@lists.samba.org> (raw)
In-Reply-To: Your message of "Thu, 09 Jan 2003 13:06:46 PDT." <20030109200646.GG3329@lanl.gov>

In message <20030109200646.GG3329@lanl.gov> you write:
> All-
> 
> I'm making a loadable module that will send IP packets; and need to do IP
> checksums. Unfortunately a simple #include of checksum.h fails because that
> file does not itself include the headers required to compile correctly.
> Several of the arch-specific files are this way.
> 
> * Some files use VERIFY_READ, VERIFY_WRITE, access_ok from uaccess.h but do
> not include uaccess.h
> 
> * Some files have an IPv6 checksum with struct in6_addr, but do not include
> linux/in6.h. x86_64 just defines the structure instead of including the
> file. Either way works, but it's inconsistent. I've moved them all to the
> #include, but they could all go to the struct in6_addr way too.

Two general rules I like:
1) Never include asm/xxx when there is a linux/xxx.
2) asm/ headers shouldn't include linux/ headers.  It's
   too easy to cause insoluble loops.

I this case, I suspect #include <net/checksum.h> is what you really
want.

Rusty.
--
  Anyone who quotes me in their sig is an idiot. -- Rusty Russell.

      parent reply	other threads:[~2003-01-10  9:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-09 20:06 [PATCH][TRIVIAL] checksum.h header fixes for 2.4 Eric Weigle
2003-01-09 23:01 ` Alan Cox
2003-01-09 22:52   ` Eric Weigle
2003-01-10  7:47 ` Rusty Russell [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=20030110091014.9B5252C40A@lists.samba.org \
    --to=rusty@rustcorp.com.au \
    --cc=ehw@lanl.gov \
    --cc=linux-kernel@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