checksum_64.h 361 B

12345678910111213141516171819
  1. /*
  2. * Licensed under the GPL
  3. */
  4. #ifndef __UM_SYSDEP_CHECKSUM_H
  5. #define __UM_SYSDEP_CHECKSUM_H
  6. static inline unsigned add32_with_carry(unsigned a, unsigned b)
  7. {
  8. asm("addl %2,%0\n\t"
  9. "adcl $0,%0"
  10. : "=r" (a)
  11. : "0" (a), "r" (b));
  12. return a;
  13. }
  14. extern __sum16 ip_compute_csum(const void *buff, int len);
  15. #endif