aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/inet_lro.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/inet_lro.c')
-rw-r--r--net/ipv4/inet_lro.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/net/ipv4/inet_lro.c b/net/ipv4/inet_lro.c
index 4545b64e2815..7f22474b52c4 100644
--- a/net/ipv4/inet_lro.c
+++ b/net/ipv4/inet_lro.c
@@ -77,7 +77,7 @@ static int lro_tcp_ip_check(struct iphdr *iph, struct tcphdr *tcph,
77 77
78 /* check tcp options (only timestamp allowed) */ 78 /* check tcp options (only timestamp allowed) */
79 if (tcph->doff == TCPH_LEN_W_TIMESTAMP) { 79 if (tcph->doff == TCPH_LEN_W_TIMESTAMP) {
80 u32 *topt = (u32 *)(tcph + 1); 80 __be32 *topt = (__be32 *)(tcph + 1);
81 81
82 if (*topt != htonl((TCPOPT_NOP << 24) | (TCPOPT_NOP << 16) 82 if (*topt != htonl((TCPOPT_NOP << 24) | (TCPOPT_NOP << 16)
83 | (TCPOPT_TIMESTAMP << 8) 83 | (TCPOPT_TIMESTAMP << 8)
@@ -103,14 +103,14 @@ static void lro_update_tcp_ip_header(struct net_lro_desc *lro_desc)
103{ 103{
104 struct iphdr *iph = lro_desc->iph; 104 struct iphdr *iph = lro_desc->iph;
105 struct tcphdr *tcph = lro_desc->tcph; 105 struct tcphdr *tcph = lro_desc->tcph;
106 u32 *p; 106 __be32 *p;
107 __wsum tcp_hdr_csum; 107 __wsum tcp_hdr_csum;
108 108
109 tcph->ack_seq = lro_desc->tcp_ack; 109 tcph->ack_seq = lro_desc->tcp_ack;
110 tcph->window = lro_desc->tcp_window; 110 tcph->window = lro_desc->tcp_window;
111 111
112 if (lro_desc->tcp_saw_tstamp) { 112 if (lro_desc->tcp_saw_tstamp) {
113 p = (u32 *)(tcph + 1); 113 p = (__be32 *)(tcph + 1);
114 *(p+2) = lro_desc->tcp_rcv_tsecr; 114 *(p+2) = lro_desc->tcp_rcv_tsecr;
115 } 115 }
116 116
@@ -150,7 +150,7 @@ static void lro_init_desc(struct net_lro_desc *lro_desc, struct sk_buff *skb,
150 u16 vlan_tag, struct vlan_group *vgrp) 150 u16 vlan_tag, struct vlan_group *vgrp)
151{ 151{
152 int nr_frags; 152 int nr_frags;
153 u32 *ptr; 153 __be32 *ptr;
154 u32 tcp_data_len = TCP_PAYLOAD_LENGTH(iph, tcph); 154 u32 tcp_data_len = TCP_PAYLOAD_LENGTH(iph, tcph);
155 155
156 nr_frags = skb_shinfo(skb)->nr_frags; 156 nr_frags = skb_shinfo(skb)->nr_frags;
@@ -166,7 +166,7 @@ static void lro_init_desc(struct net_lro_desc *lro_desc, struct sk_buff *skb,
166 lro_desc->ip_tot_len = ntohs(iph->tot_len); 166 lro_desc->ip_tot_len = ntohs(iph->tot_len);
167 167
168 if (tcph->doff == 8) { 168 if (tcph->doff == 8) {
169 ptr = (u32 *)(tcph+1); 169 ptr = (__be32 *)(tcph+1);
170 lro_desc->tcp_saw_tstamp = 1; 170 lro_desc->tcp_saw_tstamp = 1;
171 lro_desc->tcp_rcv_tsval = *(ptr+1); 171 lro_desc->tcp_rcv_tsval = *(ptr+1);
172 lro_desc->tcp_rcv_tsecr = *(ptr+2); 172 lro_desc->tcp_rcv_tsecr = *(ptr+2);
@@ -190,7 +190,7 @@ static void lro_add_common(struct net_lro_desc *lro_desc, struct iphdr *iph,
190 struct tcphdr *tcph, int tcp_data_len) 190 struct tcphdr *tcph, int tcp_data_len)
191{ 191{
192 struct sk_buff *parent = lro_desc->parent; 192 struct sk_buff *parent = lro_desc->parent;
193 u32 *topt; 193 __be32 *topt;
194 194
195 lro_desc->pkt_aggr_cnt++; 195 lro_desc->pkt_aggr_cnt++;
196 lro_desc->ip_tot_len += tcp_data_len; 196 lro_desc->ip_tot_len += tcp_data_len;
@@ -200,7 +200,7 @@ static void lro_add_common(struct net_lro_desc *lro_desc, struct iphdr *iph,
200 200
201 /* don't update tcp_rcv_tsval, would not work with PAWS */ 201 /* don't update tcp_rcv_tsval, would not work with PAWS */
202 if (lro_desc->tcp_saw_tstamp) { 202 if (lro_desc->tcp_saw_tstamp) {
203 topt = (u32 *) (tcph + 1); 203 topt = (__be32 *) (tcph + 1);
204 lro_desc->tcp_rcv_tsecr = *(topt + 2); 204 lro_desc->tcp_rcv_tsecr = *(topt + 2);
205 } 205 }
206 206