*
* This routine is very heavily used in the network
* code and should be modified for each CPU to be as fast as possible.
- *
+ *
* XXX Since we will never span more than 1 mbuf, we can optimise this
*/
u_int16_t s[2];
u_int32_t l;
} l_util;
-
+
if (m->m_len == 0)
goto cont;
w = mtod(m, u_int16_t *);
-
+
mlen = m->m_len;
-
+
if (len < mlen)
mlen = len;
len -= mlen;
while ((mlen -= 2) >= 0) {
sum += *w++;
}
-
+
if (byte_swapped) {
REDUCE;
sum <<= 8;
sum += s_util.s;
mlen = 0;
} else
-
+
mlen = -1;
} else if (mlen == -1)
s_util.c[0] = *(u_int8_t *)w;
-
+
cont:
#ifdef DEBUG
if (len) {