Commit Graph

9 Commits

Author SHA1 Message Date
Ed Maste
fc8c856029 Rationalize BSD license on sys/*/include/in_cksum.h
Remove the advertising clause from the Regents of the University of
California's license, per the letter dated July 22, 1999.

Update clause numbering.
2015-08-05 19:05:12 +00:00
Bjoern A. Zeeb
920b965865 MFp4 bz_ipv6_fast:
in_cksum.h required ip.h to be included for struct ip.  To be
  able to use some general checksum functions like in_addword()
  in a non-IPv4 context, limit the (also exported to user space)
  IPv4 specific functions to the times, when the ip.h header is
  present and IPVERSION is defined (to 4).

  We should consider more general checksum (updating) functions
  to also allow easier incremental checksum updates in the L3/4
  stack and firewalls, as well as ponder further requirements by
  certain NIC drivers needing slightly different pseudo values
  in offloading cases.  Thinking in terms of a better "library".

  Sponsored by:	The FreeBSD Foundation
  Sponsored by:	iXsystems

Reviewed by:	gnn (as part of the whole)
MFC After:	3 days
2012-05-24 22:00:48 +00:00
Marius Strobl
bed992dc26 Sync with the other archs and wrapper the prototype of in_cksum_skip(9)
in #ifdef _KERNEL.

Submitted by:	Ulrich Spoerlein
MFC after:	1 month
2009-10-26 22:00:26 +00:00
Marius Strobl
6a92796332 Revert the addition of "__volatile" to "__asm" done in r180011, since
the condition codes where added to the clobber lists in r180073 the
former is unnecessary.
2008-07-05 15:28:30 +00:00
Marius Strobl
e344c57bcb Improve r180011 by explicitly adding the condition codes to the
clobber list.

Suggested by:	Christoph Mallon
2008-06-27 22:17:14 +00:00
Marius Strobl
0d9e99b6ca Use "__asm __volatile" rather than "__asm" for instruction sequences
that modify condition codes (the carry bit, in this case). Without
"__volatile", the compiler might add the inline assembler instructions
between unrelated code which also uses condition codes, modifying the
latter.
This prevents the TCP pseudo header checksum calculation done in
tcp_output() from having effects on other conditions when compiled
with GCC 4.2.1 at "-O2" and "options INET6" left out. [1]

Reported & tested by:	Boris Kochergin [1]
MFC after:		3 days
2008-06-25 21:04:59 +00:00
Marius Strobl
a9f4f750ff - The inline asm in this file uses output operands before all input
operands are consumed so use the appropriate constraint modifier.
  Before this change GCC used one register for both an input and an
  unrelated output operand of in_addword(), causing the input to be
  overwritten before it was consumed and thus breaking in_addword().
  For in_cksum_hdr() and in_pseudo() this change is more or less
  cosmetic.
- Fix a misspelling in a nearby comment.

Reported & tested by:	yongari
MFC after:		1 week
2006-01-12 11:40:39 +00:00
Warner Losh
2fcbca0d85 Remove advertising clause from University of California Regent's
license, per letter dated July 22, 1999 and email from Peter Wemm,
Alan Cox and Robert Watson.

Approved by: core, peter, alc, rwatson
2004-04-07 05:00:01 +00:00
Thomas Moestl
cd785cc1e7 Add optimized implementations of in_cksum_skip() and related functions
for sparc64.
2001-11-06 20:05:01 +00:00