/drivers/net/ethernet/mellanox/mlx5/core/ |
D | en_selftest.c | 119 struct iphdr *iph; in mlx5e_test_get_udp_skb() local 123 (sizeof(*ethh) + sizeof(*iph) + sizeof(*udph)); in mlx5e_test_get_udp_skb() 139 iph = skb_put(skb, sizeof(struct iphdr)); in mlx5e_test_get_udp_skb() 156 iph->ihl = 5; in mlx5e_test_get_udp_skb() 157 iph->ttl = 32; in mlx5e_test_get_udp_skb() 158 iph->version = 4; in mlx5e_test_get_udp_skb() 159 iph->protocol = IPPROTO_UDP; in mlx5e_test_get_udp_skb() 161 iph->tot_len = htons(iplen); in mlx5e_test_get_udp_skb() 162 iph->frag_off = 0; in mlx5e_test_get_udp_skb() 163 iph->saddr = 0; in mlx5e_test_get_udp_skb() [all …]
|
/drivers/infiniband/core/ |
D | ud_header.c | 285 struct iphdr iph; in ib_ud_ip4_csum() local 287 iph.ihl = 5; in ib_ud_ip4_csum() 288 iph.version = 4; in ib_ud_ip4_csum() 289 iph.tos = header->ip4.tos; in ib_ud_ip4_csum() 290 iph.tot_len = header->ip4.tot_len; in ib_ud_ip4_csum() 291 iph.id = header->ip4.id; in ib_ud_ip4_csum() 292 iph.frag_off = header->ip4.frag_off; in ib_ud_ip4_csum() 293 iph.ttl = header->ip4.ttl; in ib_ud_ip4_csum() 294 iph.protocol = header->ip4.protocol; in ib_ud_ip4_csum() 295 iph.check = 0; in ib_ud_ip4_csum() [all …]
|
/drivers/net/ppp/ |
D | pptp.c | 153 struct iphdr *iph; in pptp_xmit() local 169 max_headroom = LL_RESERVED_SPACE(tdev) + sizeof(*iph) + sizeof(*hdr) + 2; in pptp_xmit() 224 skb_push(skb, sizeof(*iph)); in pptp_xmit() 229 iph = ip_hdr(skb); in pptp_xmit() 230 iph->version = 4; in pptp_xmit() 231 iph->ihl = sizeof(struct iphdr) >> 2; in pptp_xmit() 233 iph->frag_off = htons(IP_DF); in pptp_xmit() 235 iph->frag_off = 0; in pptp_xmit() 236 iph->protocol = IPPROTO_GRE; in pptp_xmit() 237 iph->tos = 0; in pptp_xmit() [all …]
|
/drivers/infiniband/sw/rxe/ |
D | rxe_net.c | 309 struct iphdr *iph; in prepare_ipv4_hdr() local 320 iph = ip_hdr(skb); in prepare_ipv4_hdr() 322 iph->version = IPVERSION; in prepare_ipv4_hdr() 323 iph->ihl = sizeof(struct iphdr) >> 2; in prepare_ipv4_hdr() 324 iph->frag_off = df; in prepare_ipv4_hdr() 325 iph->protocol = proto; in prepare_ipv4_hdr() 326 iph->tos = tos; in prepare_ipv4_hdr() 327 iph->daddr = daddr; in prepare_ipv4_hdr() 328 iph->saddr = saddr; in prepare_ipv4_hdr() 329 iph->ttl = ttl; in prepare_ipv4_hdr() [all …]
|
/drivers/net/ |
D | gtp.c | 160 struct iphdr *iph; in gtp_check_ms_ipv4() local 165 iph = (struct iphdr *)(skb->data + hdrlen); in gtp_check_ms_ipv4() 168 return iph->daddr == pctx->ms_addr_ip4.s_addr; in gtp_check_ms_ipv4() 170 return iph->saddr == pctx->ms_addr_ip4.s_addr; in gtp_check_ms_ipv4() 450 struct iphdr *iph; member 473 struct sock *sk, struct iphdr *iph, in gtp_set_pktinfo_ipv4() argument 479 pktinfo->iph = iph; in gtp_set_pktinfo_ipv4() 493 struct iphdr *iph; in gtp_build_skb_ip4() local 500 iph = ip_hdr(skb); in gtp_build_skb_ip4() 502 pctx = ipv4_pdp_find(gtp, iph->saddr); in gtp_build_skb_ip4() [all …]
|
D | vrf.c | 170 const struct ipv6hdr *iph; in vrf_process_v6_outbound() local 180 iph = ipv6_hdr(skb); in vrf_process_v6_outbound() 186 fl6.daddr = iph->daddr; in vrf_process_v6_outbound() 187 fl6.saddr = iph->saddr; in vrf_process_v6_outbound() 188 fl6.flowlabel = ip6_flowinfo(iph); in vrf_process_v6_outbound() 190 fl6.flowi6_proto = iph->nexthdr; in vrf_process_v6_outbound() 917 const struct ipv6hdr *iph = ipv6_hdr(skb); in ipv6_ndisc_frame() local 920 if (iph->nexthdr == NEXTHDR_ICMP) { in ipv6_ndisc_frame() 924 icmph = skb_header_pointer(skb, sizeof(*iph), in ipv6_ndisc_frame() 972 const struct ipv6hdr *iph = ipv6_hdr(skb); in vrf_ip6_input_dst() local [all …]
|
/drivers/infiniband/hw/nes/ |
D | nes_mgt.c | 177 struct iphdr *iph = (struct iphdr *)(cb->data_start + ETH_HLEN); in nes_get_seq() local 178 struct tcphdr *tcph = (struct tcphdr *)(((char *)iph) + (4 * iph->ihl)); in nes_get_seq() 245 struct iphdr *iph; in get_fpdu_info() local 336 iph = (struct iphdr *)(cb->data_start + ETH_HLEN); in get_fpdu_info() 337 tcph = (struct tcphdr *)(((char *)iph) + (4 * iph->ihl)); in get_fpdu_info() 356 iph = (struct iphdr *)(fpdu_info->hdr_vbase + ETH_HLEN); in get_fpdu_info() 357 tcph = (struct tcphdr *)(((char *)iph) + (4 * iph->ihl)); in get_fpdu_info() 360 iph->tot_len = cpu_to_be16(tot_len); in get_fpdu_info() 361 iph->saddr = cpu_to_be32(0x7f000001); in get_fpdu_info() 385 iph = (struct iphdr *)(cb->data_start + ETH_HLEN); in get_fpdu_info() [all …]
|
D | nes_cm.c | 440 struct iphdr *iph; in form_cm_frame() local 443 u16 packetsize = sizeof(*iph); in form_cm_frame() 449 memset(skb->data, 0x00, ETH_HLEN + sizeof(*iph) + sizeof(*tcph)); in form_cm_frame() 456 iph = (struct iphdr *)buf; in form_cm_frame() 457 buf += sizeof(*iph); in form_cm_frame() 461 skb_set_transport_header(skb, ETH_HLEN + sizeof(*iph)); in form_cm_frame() 475 iph->version = IPVERSION; in form_cm_frame() 476 iph->ihl = 5; /* 5 * 4Byte words, IP headr len */ in form_cm_frame() 477 iph->tos = 0; in form_cm_frame() 478 iph->tot_len = htons(packetsize); in form_cm_frame() [all …]
|
/drivers/net/usb/ |
D | cdc_mbim.c | 311 struct ipv6hdr *iph = (void *)buf; in do_neigh_solicit() local 312 struct nd_msg *msg = (void *)(iph + 1); in do_neigh_solicit() 320 if (!ipv6_addr_is_solict_mult(&iph->daddr) || in do_neigh_solicit() 321 !(ipv6_addr_type(&iph->saddr) & IPV6_ADDR_UNICAST)) in do_neigh_solicit() 346 ipv6_stub->ndisc_send_na(netdev, &iph->saddr, &msg->target, in do_neigh_solicit() 357 struct ipv6hdr *iph = (void *)buf; in is_neigh_solicit() local 358 struct nd_msg *msg = (void *)(iph + 1); in is_neigh_solicit() 361 iph->nexthdr == IPPROTO_ICMPV6 && in is_neigh_solicit()
|
/drivers/infiniband/hw/i40iw/ |
D | i40iw_utils.c | 1345 struct iphdr *iph = (struct iphdr *)buf->iph; in i40iw_ieq_get_qp() local 1348 if (iph->version == 4) { in i40iw_ieq_get_qp() 1350 loc_addr[0] = ntohl(iph->daddr); in i40iw_ieq_get_qp() 1352 rem_addr[0] = ntohl(iph->saddr); in i40iw_ieq_get_qp() 1354 ip6h = (struct ipv6hdr *)buf->iph; in i40iw_ieq_get_qp() 1378 struct iphdr *iph; in i40iw_ieq_update_tcpip_info() local 1384 iph = (struct iphdr *)(addr + buf->maclen); in i40iw_ieq_update_tcpip_info() 1388 iph->tot_len = htons(packetsize); in i40iw_ieq_update_tcpip_info() 1400 struct iphdr *iph; in i40iw_puda_get_tcpip_info() local 1415 buf->iph = mem + buf->maclen; in i40iw_puda_get_tcpip_info() [all …]
|
D | i40iw_cm.c | 385 struct iphdr *iph; in i40iw_form_cm_frame() local 413 packetsize = sizeof(*iph) + sizeof(*tcph); in i40iw_form_cm_frame() 431 iph = (struct iphdr *)buf; in i40iw_form_cm_frame() 432 buf += sizeof(*iph); in i40iw_form_cm_frame() 448 iph->version = IPVERSION; in i40iw_form_cm_frame() 449 iph->ihl = 5; /* 5 * 4Byte words, IP headr len */ in i40iw_form_cm_frame() 450 iph->tos = cm_node->tos; in i40iw_form_cm_frame() 451 iph->tot_len = htons(packetsize); in i40iw_form_cm_frame() 452 iph->id = htons(++cm_node->tcp_cntxt.loc_id); in i40iw_form_cm_frame() 454 iph->frag_off = htons(0x4000); in i40iw_form_cm_frame() [all …]
|
/drivers/net/ethernet/sun/ |
D | sunvnet_common.c | 308 struct iphdr *iph = ip_hdr(skb); in vnet_fullcsum_ipv4() local 313 if (iph->protocol != IPPROTO_TCP && in vnet_fullcsum_ipv4() 314 iph->protocol != IPPROTO_UDP) in vnet_fullcsum_ipv4() 319 if (iph->protocol == IPPROTO_TCP) { in vnet_fullcsum_ipv4() 324 ptcp->check = csum_tcpudp_magic(iph->saddr, iph->daddr, in vnet_fullcsum_ipv4() 327 } else if (iph->protocol == IPPROTO_UDP) { in vnet_fullcsum_ipv4() 332 pudp->check = csum_tcpudp_magic(iph->saddr, iph->daddr, in vnet_fullcsum_ipv4() 419 struct iphdr *iph = ip_hdr(skb); in vnet_rx_one() local 421 iph->check = 0; in vnet_rx_one() 422 ip_send_check(iph); in vnet_rx_one() [all …]
|
/drivers/infiniband/hw/qib/ |
D | qib_user_sdma.c | 457 hdr->iph.pkt_flags = in qib_user_sdma_page_to_frags() 458 cpu_to_le16(le16_to_cpu(hdr->iph.pkt_flags)|0x2); in qib_user_sdma_page_to_frags() 469 vcto = le32_to_cpu(hdr->iph.ver_ctxt_tid_offset); in qib_user_sdma_page_to_frags() 470 hdr->iph.chksum = cpu_to_le16(QIB_LRH_BTH + in qib_user_sdma_page_to_frags() 473 le16_to_cpu(hdr->iph.pkt_flags)); in qib_user_sdma_page_to_frags() 503 hdr->iph.ver_ctxt_tid_offset = cpu_to_le32( in qib_user_sdma_page_to_frags() 504 (le32_to_cpu(hdr->iph.ver_ctxt_tid_offset)&0xFF000000) + in qib_user_sdma_page_to_frags() 513 vcto = le32_to_cpu(hdr->iph.ver_ctxt_tid_offset); in qib_user_sdma_page_to_frags() 514 hdr->iph.chksum = cpu_to_le16(QIB_LRH_BTH + in qib_user_sdma_page_to_frags() 517 le16_to_cpu(hdr->iph.pkt_flags)); in qib_user_sdma_page_to_frags()
|
/drivers/net/ethernet/ibm/ |
D | ibmveth.c | 1204 struct iphdr *iph = (struct iphdr *)skb->data; in ibmveth_rx_mss_helper() local 1206 if (iph->protocol == IPPROTO_TCP) { in ibmveth_rx_mss_helper() 1207 offset = iph->ihl * 4; in ibmveth_rx_mss_helper() 1246 struct iphdr *iph = NULL; in ibmveth_rx_csum_helper() local 1256 iph = (struct iphdr *)skb->data; in ibmveth_rx_csum_helper() 1261 if (iph->check == 0xffff) { in ibmveth_rx_csum_helper() 1262 iph->check = 0; in ibmveth_rx_csum_helper() 1263 iph->check = ip_fast_csum((unsigned char *)iph, in ibmveth_rx_csum_helper() 1264 iph->ihl); in ibmveth_rx_csum_helper() 1267 iphlen = iph->ihl * 4; in ibmveth_rx_csum_helper() [all …]
|
/drivers/net/ethernet/mellanox/mlxsw/ |
D | spectrum_ipip.c | 176 bool inherit_ttl = tunnel->parms.iph.ttl == 0; in mlxsw_sp_ipip_can_offload_gre4() 177 bool inherit_tos = tunnel->parms.iph.tos & 0x1; in mlxsw_sp_ipip_can_offload_gre4()
|
/drivers/net/ethernet/qlogic/qlcnic/ |
D | qlcnic_io.c | 1268 struct iphdr *iph; in qlcnic_process_lro() local 1326 iph = (struct iphdr *)skb->data; in qlcnic_process_lro() 1327 th = (struct tcphdr *)(skb->data + (iph->ihl << 2)); in qlcnic_process_lro() 1328 length = (iph->ihl << 2) + (th->doff << 2) + lro_length; in qlcnic_process_lro() 1329 csum_replace2(&iph->check, iph->tot_len, htons(length)); in qlcnic_process_lro() 1330 iph->tot_len = htons(length); in qlcnic_process_lro() 1790 struct iphdr *iph; in qlcnic_83xx_process_lro() local 1849 iph = (struct iphdr *)skb->data; in qlcnic_83xx_process_lro() 1850 th = (struct tcphdr *)(skb->data + (iph->ihl << 2)); in qlcnic_83xx_process_lro() 1851 length = (iph->ihl << 2) + (th->doff << 2) + lro_length; in qlcnic_83xx_process_lro() [all …]
|
/drivers/net/ethernet/qlogic/qed/ |
D | qed_iwarp.c | 1640 struct iphdr *iph; in qed_iwarp_parse_rx_pkt() local 1675 iph = (struct iphdr *)((u8 *)(ethh) + eth_hlen); in qed_iwarp_parse_rx_pkt() 1678 if (iph->protocol != IPPROTO_TCP) { in qed_iwarp_parse_rx_pkt() 1681 iph->protocol); in qed_iwarp_parse_rx_pkt() 1685 cm_info->local_ip[0] = ntohl(iph->daddr); in qed_iwarp_parse_rx_pkt() 1686 cm_info->remote_ip[0] = ntohl(iph->saddr); in qed_iwarp_parse_rx_pkt() 1689 ip_hlen = (iph->ihl) * sizeof(u32); in qed_iwarp_parse_rx_pkt() 1690 *payload_len = ntohs(iph->tot_len) - ip_hlen; in qed_iwarp_parse_rx_pkt() 1692 ip6h = (struct ipv6hdr *)iph; in qed_iwarp_parse_rx_pkt() 1697 iph->protocol); in qed_iwarp_parse_rx_pkt() [all …]
|
/drivers/net/bonding/ |
D | bond_alb.c | 1412 const struct iphdr *iph; in bond_alb_xmit() local 1415 (!pskb_network_may_pull(skb, sizeof(*iph)))) { in bond_alb_xmit() 1419 iph = ip_hdr(skb); in bond_alb_xmit() 1420 if (iph->daddr == ip_bcast || iph->protocol == IPPROTO_IGMP) { in bond_alb_xmit() 1424 hash_start = (char *)&(iph->daddr); in bond_alb_xmit() 1425 hash_size = sizeof(iph->daddr); in bond_alb_xmit()
|
/drivers/net/ethernet/mellanox/mlx4/ |
D | en_rx.c | 582 struct iphdr *iph) in get_fixed_ipv4_csum() argument 586 __u8 ipproto = iph->protocol; in get_fixed_ipv4_csum() 591 length_for_csum = (be16_to_cpu(iph->tot_len) - (iph->ihl << 2)); in get_fixed_ipv4_csum() 592 csum_pseudo_header = csum_tcpudp_nofold(iph->saddr, iph->daddr, in get_fixed_ipv4_csum()
|
/drivers/net/ethernet/apm/xgene/ |
D | xgene_enet_main.c | 322 struct iphdr *iph; in xgene_enet_work_msg() local 338 iph = ip_hdr(skb); in xgene_enet_work_msg() 339 if (unlikely(ip_is_fragment(iph))) in xgene_enet_work_msg() 342 if (likely(iph->protocol == IPPROTO_TCP)) { in xgene_enet_work_msg() 373 } else if (iph->protocol == IPPROTO_UDP) { in xgene_enet_work_msg() 602 struct iphdr *iph = ip_hdr(skb); in xgene_enet_rx_csum() local 610 if (ip_is_fragment(iph)) in xgene_enet_rx_csum() 613 if (iph->protocol != IPPROTO_TCP && iph->protocol != IPPROTO_UDP) in xgene_enet_rx_csum()
|
/drivers/net/ethernet/qlogic/qede/ |
D | qede_fp.c | 809 const struct iphdr *iph = ip_hdr(skb); in qede_gro_ip_csum() local 816 iph->saddr, iph->daddr, 0); in qede_gro_ip_csum() 823 struct ipv6hdr *iph = ipv6_hdr(skb); in qede_gro_ipv6_csum() local 830 &iph->saddr, &iph->daddr, 0); in qede_gro_ipv6_csum()
|
/drivers/net/ethernet/qlogic/netxen/ |
D | netxen_nic_init.c | 1594 struct iphdr *iph; in netxen_process_lro() local 1637 iph = (struct iphdr *)(skb->data + vhdr_len); in netxen_process_lro() 1638 th = (struct tcphdr *)((skb->data + vhdr_len) + (iph->ihl << 2)); in netxen_process_lro() 1640 length = (iph->ihl << 2) + (th->doff << 2) + lro_length; in netxen_process_lro() 1641 csum_replace2(&iph->check, iph->tot_len, htons(length)); in netxen_process_lro() 1642 iph->tot_len = htons(length); in netxen_process_lro()
|
/drivers/net/ethernet/atheros/atlx/ |
D | atl1.c | 2133 struct iphdr *iph = ip_hdr(skb); in atl1_tso() local 2135 real_len = (((unsigned char *)iph - skb->data) + in atl1_tso() 2136 ntohs(iph->tot_len)); in atl1_tso() 2141 iph->check = 0; in atl1_tso() 2143 ~csum_tcpudp_magic(iph->saddr, in atl1_tso() 2144 iph->daddr, tcp_hdrlen(skb), in atl1_tso() 2146 ptpd->word3 |= (iph->ihl & TPD_IPHL_MASK) << in atl1_tso() 2156 iph->check = 0; in atl1_tso() 2157 tcp_hdr(skb)->check = ~csum_tcpudp_magic(iph->saddr, in atl1_tso() 2158 iph->daddr, 0, IPPROTO_TCP, 0); in atl1_tso() [all …]
|
/drivers/net/ethernet/qlogic/qlge/ |
D | qlge_main.c | 1606 struct iphdr *iph = in ql_process_mac_rx_page() local 1608 if (!(iph->frag_off & in ql_process_mac_rx_page() 1721 struct iphdr *iph = (struct iphdr *) skb->data; in ql_process_mac_rx_skb() local 1722 if (!(iph->frag_off & in ql_process_mac_rx_skb() 2033 struct iphdr *iph = (struct iphdr *) skb->data; in ql_process_mac_split_rx_intr() local 2034 if (!(iph->frag_off & in ql_process_mac_split_rx_intr() 2586 struct iphdr *iph = ip_hdr(skb); in ql_tso() local 2587 iph->check = 0; in ql_tso() 2589 tcp_hdr(skb)->check = ~csum_tcpudp_magic(iph->saddr, in ql_tso() 2590 iph->daddr, 0, in ql_tso() [all …]
|
/drivers/infiniband/hw/cxgb4/ |
D | cm.c | 3869 struct iphdr *iph; in rx_pkt() local 3926 iph = (struct iphdr *)(eh + 1); in rx_pkt() 3929 iph = (struct iphdr *)(vlan_eh + 1); in rx_pkt() 3933 if (iph->version != 0x4) in rx_pkt() 3936 tcph = (struct tcphdr *)(iph + 1); in rx_pkt() 3937 skb_set_network_header(skb, (void *)iph - (void *)rss); in rx_pkt() 3942 ntohl(iph->daddr), ntohs(tcph->dest), ntohl(iph->saddr), in rx_pkt() 3943 ntohs(tcph->source), iph->tos); in rx_pkt() 3946 iph->daddr, iph->saddr, tcph->dest, in rx_pkt() 3947 tcph->source, iph->tos); in rx_pkt() [all …]
|