/linux-6.12.1/net/6lowpan/ |
D | nhc_udp.c | 39 struct udphdr uh; in udp_uncompress() local 48 fail |= lowpan_fetch_skb(skb, &uh.source, sizeof(uh.source)); in udp_uncompress() 49 fail |= lowpan_fetch_skb(skb, &uh.dest, sizeof(uh.dest)); in udp_uncompress() 52 fail |= lowpan_fetch_skb(skb, &uh.source, sizeof(uh.source)); in udp_uncompress() 54 uh.dest = htons(val + LOWPAN_NHC_UDP_8BIT_PORT); in udp_uncompress() 58 uh.source = htons(val + LOWPAN_NHC_UDP_8BIT_PORT); in udp_uncompress() 59 fail |= lowpan_fetch_skb(skb, &uh.dest, sizeof(uh.dest)); in udp_uncompress() 63 uh.source = htons(LOWPAN_NHC_UDP_4BIT_PORT + (val >> 4)); in udp_uncompress() 64 uh.dest = htons(LOWPAN_NHC_UDP_4BIT_PORT + (val & 0x0f)); in udp_uncompress() 71 ntohs(uh.source), ntohs(uh.dest)); in udp_uncompress() [all …]
|
/linux-6.12.1/net/ipv4/ |
D | udp_offload.c | 25 struct udphdr *uh = udp_hdr(skb); in __skb_udp_tunnel_segment() local 43 partial = (__force __wsum)uh->len; in __skb_udp_tunnel_segment() 46 partial = csum_sub(csum_unfold(uh->check), partial); in __skb_udp_tunnel_segment() 119 uh = udp_hdr(skb); in __skb_udp_tunnel_segment() 126 uh->len = htons(skb_shinfo(skb)->gso_size + in __skb_udp_tunnel_segment() 128 skb->head - (unsigned char *)uh); in __skb_udp_tunnel_segment() 130 uh->len = htons(len); in __skb_udp_tunnel_segment() 136 uh->check = ~csum_fold(csum_add(partial, in __skb_udp_tunnel_segment() 140 uh->check = gso_make_checksum(skb, ~uh->check); in __skb_udp_tunnel_segment() 141 if (uh->check == 0) in __skb_udp_tunnel_segment() [all …]
|
D | udp.c | 660 struct udphdr *uh, in __udp4_lib_err_encap() argument 688 sk = __udp4_lib_lookup(net, iph->daddr, uh->source, in __udp4_lib_err_encap() 689 iph->saddr, uh->dest, skb->dev->ifindex, 0, in __udp4_lib_err_encap() 724 struct udphdr *uh = (struct udphdr *)(skb->data+(iph->ihl<<2)); in __udp4_lib_err() local 733 sk = __udp4_lib_lookup(net, iph->daddr, uh->dest, in __udp4_lib_err() 734 iph->saddr, uh->source, skb->dev->ifindex, in __udp4_lib_err() 740 sk = __udp4_lib_err_encap(net, iph, uh, udptable, sk, skb, in __udp4_lib_err() 798 udp_sk(sk)->encap_err_rcv(sk, skb, err, uh->dest, info, in __udp4_lib_err() 799 (u8 *)(uh+1)); in __udp4_lib_err() 806 ip_icmp_error(sk, skb, err, uh->dest, info, (u8 *)(uh+1)); in __udp4_lib_err() [all …]
|
/linux-6.12.1/arch/xtensa/lib/ |
D | ashrdi3.S | 7 #define uh a2 macro 10 #define uh a3 macro 19 src ul, uh, ul 20 sra uh, uh 24 sra ul, uh 25 srai uh, uh, 31
|
D | lshrdi3.S | 7 #define uh a2 macro 10 #define uh a3 macro 19 src ul, uh, ul 20 srl uh, uh 24 srl ul, uh 25 movi uh, 0
|
D | ashldi3.S | 7 #define uh a2 macro 10 #define uh a3 macro 19 src uh, uh, ul 24 sll uh, ul
|
/linux-6.12.1/net/ipv6/ |
D | udp_offload.c | 38 struct udphdr *uh; in udp6_ufo_fragment() local 57 uh = udp_hdr(skb); in udp6_ufo_fragment() 60 uh->check = 0; in udp6_ufo_fragment() 62 uh->check = udp_v6_check(skb->len, &ipv6h->saddr, in udp6_ufo_fragment() 64 if (uh->check == 0) in udp6_ufo_fragment() 65 uh->check = CSUM_MANGLED_0; in udp6_ufo_fragment() 133 struct udphdr *uh = udp_gro_udphdr(skb); in udp6_gro_receive() local 137 if (unlikely(!uh)) in udp6_gro_receive() 144 if (skb_gro_checksum_validate_zero_check(skb, IPPROTO_UDP, uh->check, in udp6_gro_receive() 147 else if (uh->check) in udp6_gro_receive() [all …]
|
D | ip6_checksum.c | 65 int udp6_csum_init(struct sk_buff *skb, struct udphdr *uh, int proto) in udp6_csum_init() argument 73 err = udplite_checksum_init(skb, uh); in udp6_csum_init() 91 err = (__force int)skb_checksum_init_zero_check(skb, proto, uh->check, in udp6_csum_init() 119 struct udphdr *uh = udp_hdr(skb); in udp6_set_csum() local 122 uh->check = 0; in udp6_set_csum() 124 uh->check = ~udp_v6_check(len, saddr, daddr, 0); in udp6_set_csum() 126 uh->check = 0; in udp6_set_csum() 127 uh->check = udp_v6_check(len, saddr, daddr, lco_csum(skb)); in udp6_set_csum() 128 if (uh->check == 0) in udp6_set_csum() 129 uh->check = CSUM_MANGLED_0; in udp6_set_csum() [all …]
|
D | udp.c | 514 struct udphdr *uh, in __udp6_lib_err_encap() argument 544 sk = __udp6_lib_lookup(net, &hdr->daddr, uh->source, in __udp6_lib_err_encap() 545 &hdr->saddr, uh->dest, in __udp6_lib_err_encap() 575 struct udphdr *uh = (struct udphdr *)(skb->data+offset); in __udp6_lib_err() local 582 sk = __udp6_lib_lookup(net, daddr, uh->dest, saddr, uh->source, in __udp6_lib_err() 588 sk = __udp6_lib_err_encap(net, hdr, offset, uh, in __udp6_lib_err() 628 udp_sk(sk)->encap_err_rcv(sk, skb, err, uh->dest, in __udp6_lib_err() 629 ntohl(info), (u8 *)(uh+1)); in __udp6_lib_err() 637 ipv6_icmp_error(sk, skb, err, uh->dest, ntohl(info), (u8 *)(uh+1)); in __udp6_lib_err() 847 const struct udphdr *uh = udp_hdr(skb); in __udp6_lib_mcast_deliver() local [all …]
|
D | ip6_udp_tunnel.c | 85 struct udphdr *uh; in udp_tunnel6_xmit_skb() local 88 __skb_push(skb, sizeof(*uh)); in udp_tunnel6_xmit_skb() 90 uh = udp_hdr(skb); in udp_tunnel6_xmit_skb() 92 uh->dest = dst_port; in udp_tunnel6_xmit_skb() 93 uh->source = src_port; in udp_tunnel6_xmit_skb() 95 uh->len = htons(skb->len); in udp_tunnel6_xmit_skb()
|
D | fou6.c | 24 struct udphdr *uh; in fou6_build_udp() local 29 uh = udp_hdr(skb); in fou6_build_udp() 31 uh->dest = e->dport; in fou6_build_udp() 32 uh->source = sport; in fou6_build_udp() 33 uh->len = htons(skb->len); in fou6_build_udp()
|
/linux-6.12.1/drivers/media/platform/mediatek/vcodec/decoder/vdec/ |
D | vdec_av1_req_lat_if.c | 552 struct vdec_av1_slice_uncompressed_header uh; member 904 struct vdec_av1_slice_uncompressed_header *uh = &vsi->frame.uh; in vdec_av1_slice_setup_slot() local 916 cur_frame_info->frame_type = uh->frame_type; in vdec_av1_slice_setup_slot() 917 cur_frame_info->frame_is_intra = ((uh->frame_type == AV1_INTRA_ONLY_FRAME) || in vdec_av1_slice_setup_slot() 918 (uh->frame_type == AV1_KEY_FRAME)); in vdec_av1_slice_setup_slot() 919 cur_frame_info->order_hint = uh->order_hint; in vdec_av1_slice_setup_slot() 920 cur_frame_info->upscaled_width = uh->upscaled_width; in vdec_av1_slice_setup_slot() 922 cur_frame_info->frame_width = uh->frame_width; in vdec_av1_slice_setup_slot() 923 cur_frame_info->frame_height = uh->frame_height; in vdec_av1_slice_setup_slot() 924 cur_frame_info->mi_cols = ((uh->frame_width + 7) >> 3) << 1; in vdec_av1_slice_setup_slot() [all …]
|
D | vdec_vp9_req_lat_if.c | 273 struct vdec_vp9_slice_uncompressed_header uh; member 557 w = vsi->frame.uh.frame_width; in vdec_vp9_slice_alloc_working_buffer() 558 h = vsi->frame.uh.frame_height; in vdec_vp9_slice_alloc_working_buffer() 674 memcpy(&f->uh.dequant, &rf->uh.dequant, sizeof(f->uh.dequant)); in vdec_vp9_slice_vsi_from_remote() 732 struct vdec_vp9_slice_uncompressed_header *uh, in vdec_vp9_slice_setup_hdr() argument 737 uh->profile = hdr->profile; in vdec_vp9_slice_setup_hdr() 738 uh->last_frame_type = instance->frame_type; in vdec_vp9_slice_setup_hdr() 739 uh->frame_type = !HDR_FLAG(KEY_FRAME); in vdec_vp9_slice_setup_hdr() 740 uh->last_show_frame = instance->show_frame; in vdec_vp9_slice_setup_hdr() 741 uh->show_frame = HDR_FLAG(SHOW_FRAME); in vdec_vp9_slice_setup_hdr() [all …]
|
/linux-6.12.1/lib/ |
D | test_blackhole_dev.c | 32 struct udphdr *uh; in test_blackholedev_init() local 49 uh = (struct udphdr *)skb_push(skb, sizeof(struct udphdr)); in test_blackholedev_init() 51 uh->source = uh->dest = htons(UDP_PORT); in test_blackholedev_init() 52 uh->len = htons(data_len); in test_blackholedev_init() 53 uh->check = 0; in test_blackholedev_init()
|
/linux-6.12.1/tools/testing/selftests/net/lib/ |
D | csum.c | 227 struct udphdr *uh = _uh; in build_packet_udp() local 229 uh->source = htons(cfg_port_src); in build_packet_udp() 230 uh->dest = htons(cfg_port_dst); in build_packet_udp() 231 uh->len = htons(sizeof(*uh) + cfg_payload_len); in build_packet_udp() 232 uh->check = 0; in build_packet_udp() 236 uh->source = 0; in build_packet_udp() 237 uh->source = checksum(uh, IPPROTO_UDP, sizeof(*uh) + cfg_payload_len); in build_packet_udp() 240 cfg_port_src, ntohs(uh->source)); in build_packet_udp() 241 cfg_port_src = ntohs(uh->source); in build_packet_udp() 245 uh->check = 0; in build_packet_udp() [all …]
|
/linux-6.12.1/include/trace/events/ |
D | icmp.h | 30 struct udphdr *uh = udp_hdr(skb); 38 if (proto_4 != IPPROTO_UDP || (u8 *)uh < skb->head || 39 (u8 *)uh + sizeof(struct udphdr) 45 __entry->sport = ntohs(uh->source); 46 __entry->dport = ntohs(uh->dest); 47 __entry->ulen = ntohs(uh->len);
|
D | udp.h | 29 const struct udphdr *uh = (const struct udphdr *)udp_hdr(skb); 34 __entry->sport = ntohs(uh->source); 35 __entry->dport = ntohs(uh->dest); 41 TP_STORE_ADDR_PORTS_SKB(skb, uh, __entry->saddr, __entry->daddr);
|
/linux-6.12.1/net/xfrm/ |
D | xfrm_nat_keepalive.c | 69 struct udphdr *uh) in nat_keepalive_send_ipv6() argument 79 uh->check = csum_ipv6_magic(&ka->saddr.in6, &ka->daddr.in6, in nat_keepalive_send_ipv6() 81 if (uh->check == 0) in nat_keepalive_send_ipv6() 82 uh->check = CSUM_MANGLED_0; in nat_keepalive_send_ipv6() 113 struct udphdr *uh; in nat_keepalive_send() local 123 uh = skb_push(skb, sizeof(*uh)); in nat_keepalive_send() 124 uh->source = ka->encap_sport; in nat_keepalive_send() 125 uh->dest = ka->encap_dport; in nat_keepalive_send() 126 uh->len = htons(skb->len); in nat_keepalive_send() 127 uh->check = 0; in nat_keepalive_send() [all …]
|
/linux-6.12.1/net/netfilter/ipset/ |
D | ip_set_getport.c | 56 const struct udphdr *uh; in get_port() local 58 uh = skb_header_pointer(skb, protooff, sizeof(_udph), &_udph); in get_port() 59 if (!uh) in get_port() 63 *port = src ? uh->source : uh->dest; in get_port()
|
/linux-6.12.1/tools/testing/selftests/bpf/progs/ |
D | xdp_features.c | 71 struct udphdr *uh; in xdp_process_echo_packet() local 97 uh = (struct udphdr *)(ih + 1); in xdp_process_echo_packet() 115 uh = (struct udphdr *)(ih6 + 1); in xdp_process_echo_packet() 120 if (uh + 1 > (struct udphdr *)data_end) in xdp_process_echo_packet() 123 port = dut ? uh->dest : uh->source; in xdp_process_echo_packet() 127 tlv = (struct tlv_hdr *)(uh + 1); in xdp_process_echo_packet()
|
D | test_assign_reuse.c | 94 maybe_assign_udp(struct __sk_buff *skb, struct udphdr *uh) in maybe_assign_udp() argument 96 if (uh + 1 > (void *)(long)(skb->data_end)) in maybe_assign_udp() 99 if (uh->dest != bpf_htons(dest_port)) in maybe_assign_udp() 102 __builtin_memcpy(&headers.udp, uh, sizeof(headers.udp)); in maybe_assign_udp()
|
/linux-6.12.1/net/ipv6/ila/ |
D | ila_common.c | 94 struct udphdr *uh = (struct udphdr *) in ila_csum_adjust_transport() local 97 if (uh->check || skb->ip_summed == CHECKSUM_PARTIAL) { in ila_csum_adjust_transport() 99 inet_proto_csum_replace_by_diff(&uh->check, skb, in ila_csum_adjust_transport() 101 if (!uh->check) in ila_csum_adjust_transport() 102 uh->check = CSUM_MANGLED_0; in ila_csum_adjust_transport()
|
/linux-6.12.1/drivers/infiniband/core/ |
D | lag.c | 18 struct udphdr *uh; in rdma_build_skb() local 35 uh = udp_hdr(skb); in rdma_build_skb() 36 uh->source = in rdma_build_skb() 38 uh->dest = htons(ROCE_V2_UDP_DPORT); in rdma_build_skb() 39 uh->len = htons(sizeof(struct udphdr)); in rdma_build_skb()
|
/linux-6.12.1/include/net/ |
D | udplite.h | 31 static inline int udplite_checksum_init(struct sk_buff *skb, struct udphdr *uh) in udplite_checksum_init() argument 38 if (uh->check == 0) { in udplite_checksum_init() 43 cscov = ntohs(uh->len); in udplite_checksum_init()
|
/linux-6.12.1/security/ |
D | lsm_audit.c | 65 struct udphdr *uh = udp_hdr(skb); in ipv4_skb_to_auditdata() local 67 ad->u.net->sport = uh->source; in ipv4_skb_to_auditdata() 68 ad->u.net->dport = uh->dest; in ipv4_skb_to_auditdata() 133 struct udphdr _udph, *uh; in ipv6_skb_to_auditdata() local 135 uh = skb_header_pointer(skb, offset, sizeof(_udph), &_udph); in ipv6_skb_to_auditdata() 136 if (uh == NULL) in ipv6_skb_to_auditdata() 139 ad->u.net->sport = uh->source; in ipv6_skb_to_auditdata() 140 ad->u.net->dport = uh->dest; in ipv6_skb_to_auditdata()
|