Changeset f4cf022 in rtems-libbsd


Ignore:
Timestamp:
12/15/21 15:11:22 (5 months ago)
Author:
Kinsey Moore <kinsey.moore@…>
Branches:
6-freebsd-12
Children:
17ac5a8
Parents:
25a8832
git-author:
Kinsey Moore <kinsey.moore@…> (12/15/21 15:11:22)
git-committer:
Joel Sherrill <joel@…> (12/16/21 14:53:10)
Message:

Import arm64 in_cksum.h correctly

When this file was brought in, it came from the wrong location or
freebsd-org hash. This corrects the file such that freebsd-to-rtems.py
runs cleanly.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • freebsd/sys/arm64/include/machine/in_cksum.h

    r25a8832 rf4cf022  
    11/*-
    2  * SPDX-License-Identifier: BSD-3-Clause
    3  *
    42 * Copyright (c) 1990 The Regents of the University of California.
    53 * All rights reserved.
     
    3230 *      from:           @(#)in_cksum.c  1.3 (Berkeley) 1/19/91
    3331 *      from: Id: in_cksum.c,v 1.8 1995/12/03 18:35:19 bde Exp
    34  *      from: src/sys/alpha/include/in_cksum.h,v 1.7 2005/03/02 21:33:20 joerg
    3532 * $FreeBSD$
    3633 */
     
    4138#include <sys/cdefs.h>
    4239
     40#ifdef _KERNEL
    4341#define in_cksum(m, len)        in_cksum_skip(m, len, 0)
    44 
     42u_short in_addword(u_short sum, u_short b);
     43u_short in_cksum_skip(struct mbuf *m, int len, int skip);
     44u_int do_cksum(const void *, int);
    4545#if defined(IPVERSION) && (IPVERSION == 4)
    46 /*
    47  * It it useful to have an Internet checksum routine which is inlineable
    48  * and optimized specifically for the task of computing IP header checksums
    49  * in the normal case (where there are no options and the header length is
    50  * therefore always exactly five 32-bit words.
    51  */
    52 #ifdef __CC_SUPPORTS___INLINE
    53 
    54 static __inline void
    55 in_cksum_update(struct ip *ip)
    56 {
    57         int __tmpsum;
    58         __tmpsum = (int)ntohs(ip->ip_sum) + 256;
    59         ip->ip_sum = htons(__tmpsum + (__tmpsum >> 16));
    60 }
    61 
    62 #else
    63 
    64 #define in_cksum_update(ip)                                             \
    65         do {                                                            \
    66                 int __tmpsum;                                           \
    67                 __tmpsum = (int)ntohs(ip->ip_sum) + 256;                \
    68                 ip->ip_sum = htons(__tmpsum + (__tmpsum >> 16));        \
    69         } while(0)
    70 
    71 #endif
     46u_int in_cksum_hdr(const struct ip *);
    7247#endif
    7348
    74 #ifdef _KERNEL
    75 #if defined(IPVERSION) && (IPVERSION == 4)
    76 u_int in_cksum_hdr(const struct ip *ip);
    77 #endif
    78 u_short in_addword(u_short sum, u_short b);
    7949u_short in_pseudo(u_int sum, u_int b, u_int c);
    80 u_short in_cksum_skip(struct mbuf *m, int len, int skip);
    81 #endif
    8250
     51#endif /* _KERNEL */
    8352#endif /* _MACHINE_IN_CKSUM_H_ */
Note: See TracChangeset for help on using the changeset viewer.