Lines 186-191
Link Here
|
186 |
int hlen, ip_len, tcp_hdr_len, tcp_data_len, tot_len; |
186 |
int hlen, ip_len, tcp_hdr_len, tcp_data_len, tot_len; |
187 |
int opt_bytes, trim; |
187 |
int opt_bytes, trim; |
188 |
uint32_t seq, tmp_csum, device_mtu; |
188 |
uint32_t seq, tmp_csum, device_mtu; |
|
|
189 |
int csum_flags; |
189 |
|
190 |
|
190 |
|
191 |
|
191 |
eh = mtod(m_head, struct ether_header *); |
192 |
eh = mtod(m_head, struct ether_header *); |
Lines 204-213
Link Here
|
204 |
return -1; |
205 |
return -1; |
205 |
|
206 |
|
206 |
/* verify that the IP header checksum is correct */ |
207 |
/* verify that the IP header checksum is correct */ |
207 |
tmp_csum = do_csum_data((uint16_t *)ip, sizeof (*ip)); |
208 |
csum_flags = m_head->m_pkthdr.csum_flags; |
208 |
if (__predict_false((tmp_csum ^ 0xffff) != 0)) { |
209 |
if (csum_flags & CSUM_IP_CHECKED) { |
209 |
cntl->lro_bad_csum++; |
210 |
if (__predict_false((csum_flags & CSUM_IP_VALID) == 0)) { |
210 |
return -1; |
211 |
cntl->lro_bad_csum++; |
|
|
212 |
return -1; |
213 |
} |
214 |
} else { |
215 |
tmp_csum = do_csum_data((uint16_t *)ip, sizeof (*ip)); |
216 |
if (__predict_false((tmp_csum ^ 0xffff) != 0)) { |
217 |
cntl->lro_bad_csum++; |
218 |
return -1; |
219 |
} |
211 |
} |
220 |
} |
212 |
|
221 |
|
213 |
/* find the TCP header */ |
222 |
/* find the TCP header */ |