Searched refs:lro_desc (Results 1 - 5 of 5) sorted by relevance

/linux-4.1.27/net/ipv4/
H A Dinet_lro.c56 int len, const struct net_lro_desc *lro_desc) lro_tcp_ip_check()
90 if (lro_desc && after(ntohl(lro_desc->tcp_rcv_tsval), lro_tcp_ip_check()
103 static void lro_update_tcp_ip_header(struct net_lro_desc *lro_desc) lro_update_tcp_ip_header() argument
105 struct iphdr *iph = lro_desc->iph; lro_update_tcp_ip_header()
106 struct tcphdr *tcph = lro_desc->tcph; lro_update_tcp_ip_header()
110 tcph->ack_seq = lro_desc->tcp_ack; lro_update_tcp_ip_header()
111 tcph->window = lro_desc->tcp_window; lro_update_tcp_ip_header()
113 if (lro_desc->tcp_saw_tstamp) { lro_update_tcp_ip_header()
115 *(p+2) = lro_desc->tcp_rcv_tsecr; lro_update_tcp_ip_header()
118 csum_replace2(&iph->check, iph->tot_len, htons(lro_desc->ip_tot_len)); lro_update_tcp_ip_header()
119 iph->tot_len = htons(lro_desc->ip_tot_len); lro_update_tcp_ip_header()
123 lro_desc->data_csum = csum_add(lro_desc->data_csum, tcp_hdr_csum); lro_update_tcp_ip_header()
125 lro_desc->ip_tot_len - lro_update_tcp_ip_header()
127 lro_desc->data_csum); lro_update_tcp_ip_header()
147 static void lro_init_desc(struct net_lro_desc *lro_desc, struct sk_buff *skb, lro_init_desc() argument
155 lro_desc->parent = skb; lro_init_desc()
156 lro_desc->next_frag = &(skb_shinfo(skb)->frags[nr_frags]); lro_init_desc()
157 lro_desc->iph = iph; lro_init_desc()
158 lro_desc->tcph = tcph; lro_init_desc()
159 lro_desc->tcp_next_seq = ntohl(tcph->seq) + tcp_data_len; lro_init_desc()
160 lro_desc->tcp_ack = tcph->ack_seq; lro_init_desc()
161 lro_desc->tcp_window = tcph->window; lro_init_desc()
163 lro_desc->pkt_aggr_cnt = 1; lro_init_desc()
164 lro_desc->ip_tot_len = ntohs(iph->tot_len); lro_init_desc()
168 lro_desc->tcp_saw_tstamp = 1; lro_init_desc()
169 lro_desc->tcp_rcv_tsval = *(ptr+1); lro_init_desc()
170 lro_desc->tcp_rcv_tsecr = *(ptr+2); lro_init_desc()
173 lro_desc->mss = tcp_data_len; lro_init_desc()
174 lro_desc->active = 1; lro_init_desc()
176 lro_desc->data_csum = lro_tcp_data_csum(iph, tcph, lro_init_desc()
180 static inline void lro_clear_desc(struct net_lro_desc *lro_desc) lro_clear_desc() argument
182 memset(lro_desc, 0, sizeof(struct net_lro_desc)); lro_clear_desc()
185 static void lro_add_common(struct net_lro_desc *lro_desc, struct iphdr *iph, lro_add_common() argument
188 struct sk_buff *parent = lro_desc->parent; lro_add_common()
191 lro_desc->pkt_aggr_cnt++; lro_add_common()
192 lro_desc->ip_tot_len += tcp_data_len; lro_add_common()
193 lro_desc->tcp_next_seq += tcp_data_len; lro_add_common()
194 lro_desc->tcp_window = tcph->window; lro_add_common()
195 lro_desc->tcp_ack = tcph->ack_seq; lro_add_common()
198 if (lro_desc->tcp_saw_tstamp) { lro_add_common()
200 lro_desc->tcp_rcv_tsecr = *(topt + 2); lro_add_common()
203 lro_desc->data_csum = csum_block_add(lro_desc->data_csum, lro_add_common()
210 if (tcp_data_len > lro_desc->mss) lro_add_common()
211 lro_desc->mss = tcp_data_len; lro_add_common()
214 static void lro_add_packet(struct net_lro_desc *lro_desc, struct sk_buff *skb, lro_add_packet() argument
217 struct sk_buff *parent = lro_desc->parent; lro_add_packet()
220 lro_add_common(lro_desc, iph, tcph, tcp_data_len); lro_add_packet()
225 if (lro_desc->last_skb) lro_add_packet()
226 lro_desc->last_skb->next = skb; lro_add_packet()
230 lro_desc->last_skb = skb; lro_add_packet()
234 static int lro_check_tcp_conn(struct net_lro_desc *lro_desc, lro_check_tcp_conn() argument
238 if ((lro_desc->iph->saddr != iph->saddr) || lro_check_tcp_conn()
239 (lro_desc->iph->daddr != iph->daddr) || lro_check_tcp_conn()
240 (lro_desc->tcph->source != tcph->source) || lro_check_tcp_conn()
241 (lro_desc->tcph->dest != tcph->dest)) lro_check_tcp_conn()
251 struct net_lro_desc *lro_desc = NULL; lro_get_desc() local
260 lro_desc = tmp; lro_get_desc()
267 lro_desc = &lro_arr[i]; lro_get_desc()
274 return lro_desc; lro_get_desc()
278 struct net_lro_desc *lro_desc) lro_flush()
280 if (lro_desc->pkt_aggr_cnt > 1) lro_flush()
281 lro_update_tcp_ip_header(lro_desc); lro_flush()
283 skb_shinfo(lro_desc->parent)->gso_size = lro_desc->mss; lro_flush()
286 netif_receive_skb(lro_desc->parent); lro_flush()
288 netif_rx(lro_desc->parent); lro_flush()
291 lro_clear_desc(lro_desc); lro_flush()
297 struct net_lro_desc *lro_desc; __lro_proc_skb() local
311 lro_desc = lro_get_desc(lro_mgr, lro_mgr->lro_arr, iph, tcph); __lro_proc_skb()
312 if (!lro_desc) __lro_proc_skb()
319 if (!lro_desc->active) { /* start new lro session */ __lro_proc_skb()
324 lro_init_desc(lro_desc, skb, iph, tcph); __lro_proc_skb()
329 if (lro_desc->tcp_next_seq != ntohl(tcph->seq)) __lro_proc_skb()
332 if (lro_tcp_ip_check(iph, tcph, skb->len, lro_desc)) __lro_proc_skb()
335 lro_add_packet(lro_desc, skb, iph, tcph); __lro_proc_skb()
338 if ((lro_desc->pkt_aggr_cnt >= lro_mgr->max_aggr) || __lro_proc_skb()
339 lro_desc->parent->len > (0xFFFF - lro_mgr->dev->mtu)) __lro_proc_skb()
340 lro_flush(lro_mgr, lro_desc); __lro_proc_skb()
345 lro_flush(lro_mgr, lro_desc); __lro_proc_skb()
367 struct net_lro_desc *lro_desc = lro_mgr->lro_arr; lro_flush_all() local
370 if (lro_desc[i].active) lro_flush_all()
371 lro_flush(lro_mgr, &lro_desc[i]); lro_flush_all()
55 lro_tcp_ip_check(const struct iphdr *iph, const struct tcphdr *tcph, int len, const struct net_lro_desc *lro_desc) lro_tcp_ip_check() argument
277 lro_flush(struct net_lro_mgr *lro_mgr, struct net_lro_desc *lro_desc) lro_flush() argument
/linux-4.1.27/drivers/net/ethernet/pasemi/
H A Dpasemi_mac.h88 struct net_lro_desc lro_desc[MAX_LRO_DESCRIPTORS]; member in struct:pasemi_mac
H A Dpasemi_mac.c1759 mac->lro_mgr.lro_arr = mac->lro_desc; pasemi_mac_probe()
/linux-4.1.27/drivers/infiniband/hw/nes/
H A Dnes_hw.h1274 struct net_lro_desc lro_desc[NES_MAX_LRO_DESCRIPTORS]; member in struct:nes_vnic
H A Dnes_hw.c1900 nesvnic->lro_mgr.lro_arr = nesvnic->lro_desc; nes_init_nic_qp()

Completed in 212 milliseconds