diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2002-10-04 14:47:11 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2002-10-04 14:47:11 +0000 |
commit | 3fb76805139ef1cc04a8ed234febf335c50f5a02 (patch) | |
tree | b3d82e925ff5c475ec1d53f42478a591399ce559 /cpukit/libnetworking/netinet/tcp_input.c | |
parent | 2002-10-02 Chris Johns <cjohns@cybertec.com.au> (diff) | |
download | rtems-3fb76805139ef1cc04a8ed234febf335c50f5a02.tar.bz2 |
2002-10-04 Jay Monkman <jtm@smoothsmoothie.com>
* netinet/in_cksum.c, netinet/ip_icmp.h, netinet/ip_input.c,
netinet/tcp_input.c, netinet/tcp_subr.c, netinet/tcp_var.h,
sys/queue.h: Address alignment requirements for the ARM.
Diffstat (limited to 'cpukit/libnetworking/netinet/tcp_input.c')
-rw-r--r-- | cpukit/libnetworking/netinet/tcp_input.c | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/cpukit/libnetworking/netinet/tcp_input.c b/cpukit/libnetworking/netinet/tcp_input.c index 183b976f89..a33f9593c4 100644 --- a/cpukit/libnetworking/netinet/tcp_input.c +++ b/cpukit/libnetworking/netinet/tcp_input.c @@ -155,7 +155,6 @@ tcp_reass(tp, ti, m) register struct tcpiphdr *q; struct socket *so = tp->t_inpcb->inp_socket; int flags; - /* * Call with ti==0 after become established to * force pre-ESTABLISHED data up to user socket. @@ -202,8 +201,11 @@ tcp_reass(tp, ti, m) } tcpstat.tcps_rcvoopack++; tcpstat.tcps_rcvoobyte += ti->ti_len; +#if (defined(__GNUC__) && defined(__arm__)) + STR32_UNALGN(ti,m); +#else REASS_MBUF(ti) = m; /* XXX */ - +#endif /* * While we overlap succeeding segments trim them or, * if they are completely covered, dequeue them. @@ -215,13 +217,22 @@ tcp_reass(tp, ti, m) if (i < q->ti_len) { q->ti_seq += i; q->ti_len -= i; +#if (defined(__GNUC__) && defined(__arm__)) + LD32_UNALGN(q,m); + m_adj(m, i); +#else m_adj(REASS_MBUF(q), i); +#endif break; } q = (struct tcpiphdr *)q->ti_next; +#if (defined(__GNUC__) && defined(__arm__)) + LD32_UNALGN((struct tcpiphdr *)q->ti_prev,m); +#else m = REASS_MBUF((struct tcpiphdr *)q->ti_prev); +#endif remque(q->ti_prev); - m_freem(m); + m_freem(m); } /* @@ -243,7 +254,11 @@ present: tp->rcv_nxt += ti->ti_len; flags = ti->ti_flags & TH_FIN; remque(ti); +#if (defined(__GNUC__) && defined(__arm__)) + LD32_UNALGN(ti,m); +#else m = REASS_MBUF(ti); +#endif ti = (struct tcpiphdr *)ti->ti_next; if (so->so_state & SS_CANTRCVMORE) m_freem(m); |