Home
last modified time | relevance | path

Searched refs:htons (Results 1 – 25 of 308) sorted by relevance

12345678910>>...13

/drivers/infiniband/sw/rxe/
Drxe_net.c291 udph->len = htons(skb->len); in prepare_udp_hdr()
322 iph->tot_len = htons(skb->len); in prepare_ipv4_hdr()
341 ip6h->payload_len = htons(skb->len); in prepare_ipv6_hdr()
346 ip6h->payload_len = htons(skb->len - sizeof(*ip6h)); in prepare_ipv6_hdr()
354 __be16 df = htons(IP_DF); in prepare4()
367 prepare_udp_hdr(skb, htons(RXE_ROCE_V2_SPORT), in prepare4()
368 htons(ROCE_V2_UDP_DPORT)); in prepare4()
391 prepare_udp_hdr(skb, htons(RXE_ROCE_V2_SPORT), in prepare6()
392 htons(ROCE_V2_UDP_DPORT)); in prepare6()
495 skb->protocol = htons(ETH_P_IP); in init_packet()
[all …]
Drxe_recv.c168 if (skb->protocol == htons(ETH_P_IP)) { in check_addr()
188 } else if (skb->protocol == htons(ETH_P_IPV6)) { in check_addr()
285 if (skb->protocol == htons(ETH_P_IP)) in rxe_rcv_mcast_pkt()
288 else if (skb->protocol == htons(ETH_P_IPV6)) in rxe_rcv_mcast_pkt()
341 if (skb->protocol == htons(ETH_P_IP)) { in rxe_match_dgid()
396 if (skb->protocol == htons(ETH_P_IPV6)) in rxe_rcv()
398 else if (skb->protocol == htons(ETH_P_IP)) in rxe_rcv()
Drxe_icrc.c48 (skb->protocol == htons(ETH_P_IP) ? in rxe_icrc_hdr()
62 if (skb->protocol == htons(ETH_P_IP)) { /* IPv4 */ in rxe_icrc_hdr()
/drivers/net/ethernet/mellanox/mlx4/
Dfw_qos.c134 htons(MLX4_RATELIMIT_100M_UNITS); in mlx4_SET_PORT_SCHEDULER()
138 htons(MLX4_RATELIMIT_1G_UNITS); in mlx4_SET_PORT_SCHEDULER()
140 tc->max_bw_value = htons(r); in mlx4_SET_PORT_SCHEDULER()
142 tc->max_bw_value = htons(MLX4_RATELIMIT_DEFAULT); in mlx4_SET_PORT_SCHEDULER()
143 tc->max_bw_units = htons(MLX4_RATELIMIT_1G_UNITS); in mlx4_SET_PORT_SCHEDULER()
146 tc->pg = htons(pg[i]); in mlx4_SET_PORT_SCHEDULER()
147 tc->bw_precentage = htons(tc_tx_bw[i]); in mlx4_SET_PORT_SCHEDULER()
/drivers/net/wan/lmc/
Dlmc_proto.c108 return htons(ETH_P_802_2); in lmc_proto_type()
111 return htons(ETH_P_802_2); in lmc_proto_type()
115 return htons(ETH_P_802_2); in lmc_proto_type()
/drivers/net/ethernet/chelsio/cxgb4/
Dcxgb4_filter.c269 fwr->ethtype = htons(f->fs.val.ethtype); in set_filter_wr()
270 fwr->ethtypem = htons(f->fs.mask.ethtype); in set_filter_wr()
280 htons(FW_FILTER_WR_RX_CHAN_V(0) | in set_filter_wr()
295 fwr->ivlan = htons(f->fs.val.ivlan); in set_filter_wr()
296 fwr->ivlanm = htons(f->fs.mask.ivlan); in set_filter_wr()
297 fwr->ovlan = htons(f->fs.val.ovlan); in set_filter_wr()
298 fwr->ovlanm = htons(f->fs.mask.ovlan); in set_filter_wr()
303 fwr->lp = htons(f->fs.val.lport); in set_filter_wr()
304 fwr->lpm = htons(f->fs.mask.lport); in set_filter_wr()
305 fwr->fp = htons(f->fs.val.fport); in set_filter_wr()
[all …]
/drivers/net/arcnet/
Drfc1201.c111 return htons(ETH_P_IP); in type_trans()
113 return htons(ETH_P_IPV6); in type_trans()
115 return htons(ETH_P_ARP); in type_trans()
117 return htons(ETH_P_RARP); in type_trans()
121 return htons(ETH_P_802_3); in type_trans()
128 return htons(ETH_P_IP); in type_trans()
423 soft->sequence = htons(lp->rfc1201.sequence++); in build_header()
458 excsoft.sequence = htons(0xffff); in load_pkt()
Drfc1051.c107 return htons(ETH_P_IP); in type_trans()
109 return htons(ETH_P_ARP); in type_trans()
117 return htons(ETH_P_IP); in type_trans()
/drivers/net/ethernet/mellanox/mlx5/core/
Den_arfs.c446 return (skb->protocol == htons(ETH_P_IP)) ? in arfs_get_ip_proto()
453 if (etype == htons(ETH_P_IP) && ip_proto == IPPROTO_TCP) in arfs_get_table()
455 if (etype == htons(ETH_P_IP) && ip_proto == IPPROTO_UDP) in arfs_get_table()
457 if (etype == htons(ETH_P_IPV6) && ip_proto == IPPROTO_TCP) in arfs_get_table()
459 if (etype == htons(ETH_P_IPV6) && ip_proto == IPPROTO_UDP) in arfs_get_table()
514 if (tuple->etype == htons(ETH_P_IP)) { in arfs_add_rule()
648 if (tuple->etype == htons(ETH_P_IP)) { in arfs_alloc_rule()
673 if (tuple->etype == htons(ETH_P_IP) && in arfs_cmp_ips()
677 if (tuple->etype == htons(ETH_P_IPV6) && in arfs_cmp_ips()
714 if (skb->protocol != htons(ETH_P_IP) && in mlx5e_rx_flow_steer()
[all …]
/drivers/scsi/csiostor/
Dcsio_mb.c322 cmdp->fcoecaps |= htons(FW_CAPS_CONFIG_FCOE_CTRL_OFLD); in csio_mb_caps_config()
324 cmdp->fcoecaps |= htons(FW_CAPS_CONFIG_FCOE_INITIATOR); in csio_mb_caps_config()
326 cmdp->fcoecaps |= htons(FW_CAPS_CONFIG_FCOE_TARGET); in csio_mb_caps_config()
460 cmdp->fl0size = htons(iq_params->fl0size); in csio_mb_iq_alloc()
461 cmdp->fl0size = htons(iq_params->fl1size); in csio_mb_iq_alloc()
509 cmdp->iqid |= htons(iq_params->iqid); in csio_mb_iq_write()
510 cmdp->fl0id |= htons(iq_params->fl0id); in csio_mb_iq_write()
511 cmdp->fl1id |= htons(iq_params->fl1id); in csio_mb_iq_write()
517 cmdp->iqdroprss_to_iqesize |= htons( in csio_mb_iq_write()
525 cmdp->iqsize |= htons(iq_params->iqsize); in csio_mb_iq_write()
[all …]
/drivers/net/ethernet/sfc/
Dfilter.h190 spec->ether_type = htons(ETH_P_IP); in efx_filter_set_ipv4_local()
215 spec->ether_type = htons(ETH_P_IP); in efx_filter_set_ipv4_full()
242 spec->outer_vid = htons(vid); in efx_filter_set_eth_local()
/drivers/net/ppp/
Dpppopns.c41 #define PPTP_GRE_BITS htons(0x2001)
42 #define PPTP_GRE_BITS_MASK htons(0xEF7F)
43 #define PPTP_GRE_SEQ_BIT htons(0x1000)
44 #define PPTP_GRE_ACK_BIT htons(0x0080)
45 #define PPTP_GRE_TYPE htons(0x880B)
223 hdr->length = htons(length); in pppopns_xmit()
/drivers/staging/gdm724x/
Dgdm_lte.c143 arp_out->ar_op = htons(ARPOP_REPLY); in gdm_lte_emulate_arp()
304 ipv6_out.payload_len = htons(sizeof(struct icmp6hdr) + in gdm_lte_emulate_ndp()
646 vlan_eth.h_vlan_TCI = htons(nic->vlan_id); in gdm_lte_netif_rx()
647 vlan_eth.h_vlan_proto = htons(ETH_P_8021Q); in gdm_lte_netif_rx()
653 eth.h_proto = htons(ETH_P_ARP); in gdm_lte_netif_rx()
654 vlan_eth.h_vlan_encapsulated_proto = htons(ETH_P_ARP); in gdm_lte_netif_rx()
658 eth.h_proto = htons(ETH_P_IP); in gdm_lte_netif_rx()
659 vlan_eth.h_vlan_encapsulated_proto = htons(ETH_P_IP); in gdm_lte_netif_rx()
661 eth.h_proto = htons(ETH_P_IPV6); in gdm_lte_netif_rx()
662 vlan_eth.h_vlan_encapsulated_proto = htons(ETH_P_IPV6); in gdm_lte_netif_rx()
/drivers/net/slip/
Dslhc.c349 || (ip->frag_off & htons(0x4000)) != (cs->cs_ip.frag_off & htons(0x4000)) in slhc_compress()
564 thp->urg_ptr = htons(x); in slhc_uncompress()
571 thp->window = htons( ntohs(thp->window) + x); in slhc_uncompress()
591 ip->id = htons (ntohs (ip->id) + x); in slhc_uncompress()
593 ip->id = htons (ntohs (ip->id) + 1); in slhc_uncompress()
605 ip->tot_len = htons(len); in slhc_uncompress()
/drivers/net/usb/
Dcdc_mbim.c213 case htons(ETH_P_IP): in is_ip_proto()
214 case htons(ETH_P_IPV6): in is_ip_proto()
326 netdev = __vlan_find_dev_deep_rcu(dev->net, htons(ETH_P_8021Q), in do_neigh_solicit()
368 __be16 proto = htons(ETH_P_802_3); in cdc_mbim_process_dgram()
377 proto = htons(ETH_P_IP); in cdc_mbim_process_dgram()
382 proto = htons(ETH_P_IPV6); in cdc_mbim_process_dgram()
405 __vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), tci); in cdc_mbim_process_dgram()
/drivers/net/wan/
Dhdlc_ppp.c147 return htons(ETH_P_HDLC); in ppp_type_trans()
150 return htons(ETH_P_HDLC); in ppp_type_trans()
155 return htons(ETH_P_IP); in ppp_type_trans()
159 return htons(ETH_P_IPV6); in ppp_type_trans()
162 return htons(ETH_P_HDLC); in ppp_type_trans()
183 data->protocol = htons(PID_IP); in ppp_hard_header()
186 data->protocol = htons(PID_IPV6); in ppp_hard_header()
191 data->protocol = htons(type); in ppp_hard_header()
234 cp->len = htons(sizeof(struct cp_header) + magic_len + len); in ppp_tx_cp()
/drivers/scsi/fcoe/
Dfcoe_ctlr.c410 sol->eth.h_proto = htons(ETH_P_FIP); in fcoe_ctlr_solicit()
413 sol->fip.fip_op = htons(FIP_OP_DISC); in fcoe_ctlr_solicit()
415 sol->fip.fip_dl_len = htons(sizeof(sol->desc) / FIP_BPW); in fcoe_ctlr_solicit()
416 sol->fip.fip_flags = htons(FIP_FL_FPMA); in fcoe_ctlr_solicit()
418 sol->fip.fip_flags |= htons(FIP_FL_SPMA); in fcoe_ctlr_solicit()
431 sol->desc.size.fd_size = htons(fcoe_size); in fcoe_ctlr_solicit()
434 skb->protocol = htons(ETH_P_FIP); in fcoe_ctlr_solicit()
566 kal->eth.h_proto = htons(ETH_P_FIP); in fcoe_ctlr_send_keep_alive()
569 kal->fip.fip_op = htons(FIP_OP_CTRL); in fcoe_ctlr_send_keep_alive()
571 kal->fip.fip_dl_len = htons((sizeof(kal->mac) + in fcoe_ctlr_send_keep_alive()
[all …]
/drivers/scsi/fnic/
Dfnic_fcs.c358 vlan->eth.h_proto = htons(ETH_P_FIP); in fnic_fcoe_send_vlan_req()
361 vlan->fip.fip_op = htons(FIP_OP_VLAN); in fnic_fcoe_send_vlan_req()
363 vlan->fip.fip_dl_len = htons(sizeof(vlan->desc) / FIP_BPW); in fnic_fcoe_send_vlan_req()
375 skb->protocol = htons(ETH_P_FIP); in fnic_fcoe_send_vlan_req()
595 if (eh->h_proto == htons(ETH_P_FIP)) { in fnic_handle_fip_frame()
638 if (eh->h_proto == htons(ETH_P_8021Q)) { in fnic_import_rq_eth_pkt()
643 if (eh->h_proto == htons(ETH_P_FIP)) { in fnic_import_rq_eth_pkt()
658 if (eh->h_proto != htons(ETH_P_FCOE)) in fnic_import_rq_eth_pkt()
1003 vlan_hdr->h_vlan_proto = htons(ETH_P_8021Q); in fnic_eth_send()
1005 vlan_hdr->h_vlan_TCI = htons(fnic->vlan_id); in fnic_eth_send()
[all …]
/drivers/net/wireless/intel/ipw2x00/
Dlibipw_tx.c139 if (h_proto == htons(ETH_P_AARP) || h_proto == htons(ETH_P_IPX)) in libipw_copy_snap()
229 if (eth->h_proto != htons(ETH_P_IP)) in libipw_classify()
299 encrypt = !(ether_type == htons(ETH_P_PAE) && ieee->ieee802_1x) && in libipw_xmit()
306 ieee->drop_unencrypted && ether_type != htons(ETH_P_PAE)) { in libipw_xmit()
/drivers/net/ethernet/cisco/enic/
Dvnic_vic.c65 tlv->type = htons(type); in vic_provinfo_add_tlv()
66 tlv->length = htons(length); in vic_provinfo_add_tlv()
/drivers/net/ethernet/fujitsu/
Dfmvj18x_cs.c779 htons(inw(ioaddr + TX_STATUS)), in fjn_tx_timeout()
784 htons(inw(ioaddr + 0)), htons(inw(ioaddr + 2)), in fjn_tx_timeout()
785 htons(inw(ioaddr + 4)), htons(inw(ioaddr + 6)), in fjn_tx_timeout()
786 htons(inw(ioaddr + 8)), htons(inw(ioaddr + 10)), in fjn_tx_timeout()
787 htons(inw(ioaddr + 12)), htons(inw(ioaddr + 14))); in fjn_tx_timeout()
/drivers/infiniband/hw/qedr/
Dqedr_cm.c322 udh->eth.type = htons(ETH_P_8021Q); in qedr_gsi_build_header()
323 udh->vlan.tag = htons(vlan_id); in qedr_gsi_build_header()
324 udh->vlan.type = htons(ether_type); in qedr_gsi_build_header()
326 udh->eth.type = htons(ether_type); in qedr_gsi_build_header()
354 udh->ip4.frag_off = htons(IP_DF); in qedr_gsi_build_header()
366 udh->udp.sport = htons(QEDR_ROCE_V2_UDP_SPORT); in qedr_gsi_build_header()
367 udh->udp.dport = htons(ROCE_V2_UDP_DPORT); in qedr_gsi_build_header()
/drivers/net/ethernet/intel/fm10k/
Dfm10k_main.c486 __vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), vid); in fm10k_process_skb_fields()
488 __vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), in fm10k_process_skb_fields()
670 #define FM10K_NVGRE_RESERVED0_FLAGS htons(0x9FFF)
671 #define NVGRE_TNI htons(0x2000)
684 if (vlan_get_protocol(skb) != htons(ETH_P_IP)) in fm10k_gre_is_nvgre()
707 skb->inner_protocol != htons(ETH_P_TEB)) in fm10k_tx_encap_offload()
711 case htons(ETH_P_IP): in fm10k_tx_encap_offload()
714 case htons(ETH_P_IPV6): in fm10k_tx_encap_offload()
736 case htons(ETH_P_IP): in fm10k_tx_encap_offload()
739 case htons(ETH_P_IPV6): in fm10k_tx_encap_offload()
[all …]
/drivers/net/xen-netback/
Dhash.c162 case htons(ETH_P_IP): in xenvif_set_skb_hash()
169 case htons(ETH_P_IPV6): in xenvif_set_skb_hash()
188 case htons(ETH_P_IP): in xenvif_set_skb_hash()
212 case htons(ETH_P_IPV6): in xenvif_set_skb_hash()
/drivers/infiniband/hw/i40iw/
Di40iw_cm.c180 laddr->sin_port = htons(cm_node->loc_port); in i40iw_fill_sockaddr4()
181 raddr->sin_port = htons(cm_node->rem_port); in i40iw_fill_sockaddr4()
201 laddr6->sin6_port = htons(cm_node->loc_port); in i40iw_fill_sockaddr6()
202 raddr6->sin6_port = htons(cm_node->rem_port); in i40iw_fill_sockaddr6()
447 ((struct vlan_ethhdr *)ethh)->h_vlan_proto = htons(ETH_P_8021Q); in i40iw_form_cm_frame()
448 ((struct vlan_ethhdr *)ethh)->h_vlan_TCI = htons(cm_node->vlan_id); in i40iw_form_cm_frame()
450 ((struct vlan_ethhdr *)ethh)->h_vlan_encapsulated_proto = htons(ETH_P_IP); in i40iw_form_cm_frame()
452 ethh->h_proto = htons(ETH_P_IP); in i40iw_form_cm_frame()
458 iph->tot_len = htons(packetsize); in i40iw_form_cm_frame()
459 iph->id = htons(++cm_node->tcp_cntxt.loc_id); in i40iw_form_cm_frame()
[all …]

12345678910>>...13