Lines Matching refs:ip

4044 			struct iphdr *ip;  in s2io_xmit()  local
4046 ip = ip_hdr(skb); in s2io_xmit()
4048 if (!ip_is_fragment(ip)) { in s2io_xmit()
4049 th = (struct tcphdr *)(((unsigned char *)ip) + in s2io_xmit()
4050 ip->ihl*4); in s2io_xmit()
4052 if (ip->protocol == IPPROTO_TCP) { in s2io_xmit()
4059 } else if (ip->protocol == IPPROTO_UDP) { in s2io_xmit()
8164 static int check_L2_lro_capable(u8 *buffer, struct iphdr **ip, in check_L2_lro_capable() argument
8193 *ip = (struct iphdr *)(buffer + ip_off); in check_L2_lro_capable()
8194 ip_len = (u8)((*ip)->ihl); in check_L2_lro_capable()
8196 *tcp = (struct tcphdr *)((unsigned long)*ip + ip_len); in check_L2_lro_capable()
8201 static int check_for_socket_match(struct lro *lro, struct iphdr *ip, in check_for_socket_match() argument
8205 if ((lro->iph->saddr != ip->saddr) || in check_for_socket_match()
8206 (lro->iph->daddr != ip->daddr) || in check_for_socket_match()
8213 static inline int get_l4_pyld_length(struct iphdr *ip, struct tcphdr *tcp) in get_l4_pyld_length() argument
8215 return ntohs(ip->tot_len) - (ip->ihl << 2) - (tcp->doff << 2); in get_l4_pyld_length()
8219 struct iphdr *ip, struct tcphdr *tcp, in initiate_new_session() argument
8224 lro->iph = ip; in initiate_new_session()
8229 lro->total_len = ntohs(ip->tot_len); in initiate_new_session()
8248 struct iphdr *ip = lro->iph; in update_L3L4_header() local
8255 csum_replace2(&ip->check, ip->tot_len, htons(lro->total_len)); in update_L3L4_header()
8256 ip->tot_len = htons(lro->total_len); in update_L3L4_header()
8275 static void aggregate_new_rx(struct lro *lro, struct iphdr *ip, in aggregate_new_rx() argument
8297 static int verify_l3_l4_lro_capable(struct lro *l_lro, struct iphdr *ip, in verify_l3_l4_lro_capable() argument
8309 if (ip->ihl != 5) /* IP has options */ in verify_l3_l4_lro_capable()
8313 if (INET_ECN_is_ce(ipv4_get_dsfield(ip))) in verify_l3_l4_lro_capable()
8359 struct iphdr *ip; in s2io_club_tcp_session() local
8365 ret = check_L2_lro_capable(buffer, &ip, (struct tcphdr **)tcp, in s2io_club_tcp_session()
8370 DBG_PRINT(INFO_DBG, "IP Saddr: %x Daddr: %x\n", ip->saddr, ip->daddr); in s2io_club_tcp_session()
8374 *tcp_len = get_l4_pyld_length(ip, tcph); in s2io_club_tcp_session()
8378 if (check_for_socket_match(l_lro, ip, tcph)) in s2io_club_tcp_session()
8395 if (!verify_l3_l4_lro_capable(l_lro, ip, tcph, in s2io_club_tcp_session()
8410 if (verify_l3_l4_lro_capable(NULL, ip, tcph, *tcp_len)) in s2io_club_tcp_session()
8432 initiate_new_session(*lro, buffer, ip, tcph, *tcp_len, in s2io_club_tcp_session()
8439 aggregate_new_rx(*lro, ip, tcph, *tcp_len); in s2io_club_tcp_session()