Lines Matching refs:ip

199 static void get_inner_l3_l4_type(struct sk_buff *skb, union hinic_l3 *ip,  in get_inner_l3_l4_type()  argument
207 if (ip->v4->version == 4) { in get_inner_l3_l4_type()
211 *l4_proto = ip->v4->protocol; in get_inner_l3_l4_type()
212 } else if (ip->v4->version == 6) { in get_inner_l3_l4_type()
214 exthdr = ip->hdr + sizeof(*ip->v6); in get_inner_l3_l4_type()
215 *l4_proto = ip->v6->nexthdr; in get_inner_l3_l4_type()
266 static __sum16 csum_magic(union hinic_l3 *ip, unsigned short proto) in csum_magic() argument
268 return (ip->v4->version == 4) ? in csum_magic()
269 csum_tcpudp_magic(ip->v4->saddr, ip->v4->daddr, 0, proto, 0) : in csum_magic()
270 csum_ipv6_magic(&ip->v6->saddr, &ip->v6->daddr, 0, proto, 0); in csum_magic()
279 union hinic_l3 ip; in offload_tso() local
294 ip.hdr = skb_network_header(skb); in offload_tso()
298 if (ip.v4->version == 4) { in offload_tso()
299 ip.v4->tot_len = 0; in offload_tso()
301 } else if (ip.v4->version == 6) { in offload_tso()
311 l4.udp->check = ~csum_magic(&ip, IPPROTO_UDP); in offload_tso()
321 ip.hdr = skb_inner_network_header(skb); in offload_tso()
324 ip.hdr = skb_network_header(skb); in offload_tso()
330 if (ip.v4->version == 4) in offload_tso()
331 ip.v4->tot_len = 0; in offload_tso()
333 ip.v6->payload_len = 0; in offload_tso()
335 get_inner_l3_l4_type(skb, &ip, &l4, TX_OFFLOAD_TSO, &l3_offload, in offload_tso()
342 l4.tcp->check = ~csum_magic(&ip, IPPROTO_TCP); in offload_tso()
360 union hinic_l3 ip; in offload_csum() local
371 ip.hdr = skb_network_header(skb); in offload_csum()
373 if (ip.v4->version == 4) { in offload_csum()
375 l4_proto = ip.v4->protocol; in offload_csum()
376 } else if (ip.v4->version == 6) { in offload_csum()
382 exthdr = ip.hdr + sizeof(*ip.v6); in offload_csum()
383 l4_proto = ip.v6->nexthdr; in offload_csum()
400 ip.hdr = skb_inner_network_header(skb); in offload_csum()
409 ip.hdr = skb_inner_network_header(skb); in offload_csum()
421 ip.hdr = skb_network_header(skb); in offload_csum()
426 get_inner_l3_l4_type(skb, &ip, &l4, TX_OFFLOAD_CSUM, &l3_type, in offload_csum()