Lines Matching refs:lro
2970 if (ring_data->lro) { in rx_intr_handler()
2973 struct lro *lro = &ring_data->lro0_n[i]; in rx_intr_handler() local
2974 if (lro->in_use) { in rx_intr_handler()
2975 update_L3L4_header(ring_data->nic, lro); in rx_intr_handler()
2976 queue_rx_frame(lro->parent, lro->vlan_tag); in rx_intr_handler()
2977 clear_lro_session(lro); in rx_intr_handler()
7126 ring->lro = !!(dev->features & NETIF_F_LRO); in s2io_card_up()
7294 struct lro *lro; in rx_osm_handler() local
7380 ((!ring_data->lro) || in rx_osm_handler()
7392 if (ring_data->lro) { in rx_osm_handler()
7399 &tcp_len, &lro, in rx_osm_handler()
7403 lro->parent = skb; in rx_osm_handler()
7406 lro_append_pkt(sp, lro, skb, tcp_len); in rx_osm_handler()
7409 lro_append_pkt(sp, lro, skb, tcp_len); in rx_osm_handler()
7410 queue_rx_frame(lro->parent, in rx_osm_handler()
7411 lro->vlan_tag); in rx_osm_handler()
7412 clear_lro_session(lro); in rx_osm_handler()
7416 lro->parent->data_len = lro->frags_len; in rx_osm_handler()
7418 queue_rx_frame(lro->parent, in rx_osm_handler()
7419 lro->vlan_tag); in rx_osm_handler()
7420 clear_lro_session(lro); in rx_osm_handler()
8208 static int check_for_socket_match(struct lro *lro, struct iphdr *ip, in check_for_socket_match() argument
8212 if ((lro->iph->saddr != ip->saddr) || in check_for_socket_match()
8213 (lro->iph->daddr != ip->daddr) || in check_for_socket_match()
8214 (lro->tcph->source != tcp->source) || in check_for_socket_match()
8215 (lro->tcph->dest != tcp->dest)) in check_for_socket_match()
8225 static void initiate_new_session(struct lro *lro, u8 *l2h, in initiate_new_session() argument
8230 lro->l2h = l2h; in initiate_new_session()
8231 lro->iph = ip; in initiate_new_session()
8232 lro->tcph = tcp; in initiate_new_session()
8233 lro->tcp_next_seq = tcp_pyld_len + ntohl(tcp->seq); in initiate_new_session()
8234 lro->tcp_ack = tcp->ack_seq; in initiate_new_session()
8235 lro->sg_num = 1; in initiate_new_session()
8236 lro->total_len = ntohs(ip->tot_len); in initiate_new_session()
8237 lro->frags_len = 0; in initiate_new_session()
8238 lro->vlan_tag = vlan_tag; in initiate_new_session()
8246 lro->saw_ts = 1; in initiate_new_session()
8247 lro->cur_tsval = ntohl(*(ptr+1)); in initiate_new_session()
8248 lro->cur_tsecr = *(ptr+2); in initiate_new_session()
8250 lro->in_use = 1; in initiate_new_session()
8253 static void update_L3L4_header(struct s2io_nic *sp, struct lro *lro) in update_L3L4_header() argument
8255 struct iphdr *ip = lro->iph; in update_L3L4_header()
8256 struct tcphdr *tcp = lro->tcph; in update_L3L4_header()
8262 csum_replace2(&ip->check, ip->tot_len, htons(lro->total_len)); in update_L3L4_header()
8263 ip->tot_len = htons(lro->total_len); in update_L3L4_header()
8266 tcp->ack_seq = lro->tcp_ack; in update_L3L4_header()
8267 tcp->window = lro->window; in update_L3L4_header()
8270 if (lro->saw_ts) { in update_L3L4_header()
8272 *(ptr+2) = lro->cur_tsecr; in update_L3L4_header()
8278 swstats->sum_avg_pkts_aggregated += lro->sg_num; in update_L3L4_header()
8282 static void aggregate_new_rx(struct lro *lro, struct iphdr *ip, in aggregate_new_rx() argument
8286 lro->total_len += l4_pyld; in aggregate_new_rx()
8287 lro->frags_len += l4_pyld; in aggregate_new_rx()
8288 lro->tcp_next_seq += l4_pyld; in aggregate_new_rx()
8289 lro->sg_num++; in aggregate_new_rx()
8292 lro->tcp_ack = tcp->ack_seq; in aggregate_new_rx()
8293 lro->window = tcp->window; in aggregate_new_rx()
8295 if (lro->saw_ts) { in aggregate_new_rx()
8299 lro->cur_tsval = ntohl(*(ptr+1)); in aggregate_new_rx()
8300 lro->cur_tsecr = *(ptr + 2); in aggregate_new_rx()
8304 static int verify_l3_l4_lro_capable(struct lro *l_lro, struct iphdr *ip, in verify_l3_l4_lro_capable()
8363 u8 **tcp, u32 *tcp_len, struct lro **lro, in s2io_club_tcp_session() argument
8383 struct lro *l_lro = &ring_data->lro0_n[i]; in s2io_club_tcp_session()
8388 *lro = l_lro; in s2io_club_tcp_session()
8390 if ((*lro)->tcp_next_seq != ntohl(tcph->seq)) { in s2io_club_tcp_session()
8394 (*lro)->tcp_next_seq, in s2io_club_tcp_session()
8421 struct lro *l_lro = &ring_data->lro0_n[i]; in s2io_club_tcp_session()
8423 *lro = l_lro; in s2io_club_tcp_session()
8433 *lro = NULL; in s2io_club_tcp_session()
8439 initiate_new_session(*lro, buffer, ip, tcph, *tcp_len, in s2io_club_tcp_session()
8443 update_L3L4_header(sp, *lro); in s2io_club_tcp_session()
8446 aggregate_new_rx(*lro, ip, tcph, *tcp_len); in s2io_club_tcp_session()
8447 if ((*lro)->sg_num == sp->lro_max_aggr_per_sess) { in s2io_club_tcp_session()
8448 update_L3L4_header(sp, *lro); in s2io_club_tcp_session()
8460 static void clear_lro_session(struct lro *lro) in clear_lro_session() argument
8462 static u16 lro_struct_size = sizeof(struct lro); in clear_lro_session()
8464 memset(lro, 0, lro_struct_size); in clear_lro_session()
8481 static void lro_append_pkt(struct s2io_nic *sp, struct lro *lro, in lro_append_pkt() argument
8484 struct sk_buff *first = lro->parent; in lro_append_pkt()
8488 first->data_len = lro->frags_len; in lro_append_pkt()
8491 lro->last_frag->next = skb; in lro_append_pkt()
8495 lro->last_frag = skb; in lro_append_pkt()