/kernel/linux/common_modules/newip/examples/ |
D | nip_tcp_client_demo.c | 27 int _send(int cfd, int pkt_num) in _send() argument 39 if (send(cfd, buf, PKTLEN, 0) < 0) { in _send() 47 int _recv(int cfd, int pkt_num, int *success) in _recv() argument 55 FD_SET(cfd, &readfds); in _recv() 58 if (select(cfd + 1, &readfds, NULL, NULL, &tv) < 0) { in _recv() 63 if (FD_ISSET(cfd, &readfds)) { in _recv() 67 ret = recv(cfd, buf, PKTLEN, MSG_WAITALL); in _recv() 76 buf, cfd, *success, pkt_num + 1, no); in _recv() 88 int cfd = ((struct thread_args *)args)->cfd; in send_recv() local 92 if (_send(cfd, i) != 0) in send_recv() [all …]
|
D | nip_udp_client_demo.c | 26 int _sendto(int cfd, struct sockaddr_nin *si_server, int pkt_num) in _sendto() argument 39 if (sendto(cfd, buf, BUFLEN, 0, (struct sockaddr *)si_server, slen) < 0) { in _sendto() 47 int _recvfrom(int cfd, struct sockaddr_nin *si_server, int pkt_num, int *success) in _recvfrom() argument 56 FD_SET(cfd, &readfds); in _recvfrom() 59 if (select(cfd + 1, &readfds, NULL, NULL, &tv) < 0) { in _recvfrom() 64 if (FD_ISSET(cfd, &readfds)) { in _recvfrom() 68 ret = recvfrom(cfd, buf, BUFLEN, 0, (struct sockaddr *)si_server, &slen); in _recvfrom() 74 buf, cfd, *success, pkt_num + 1, no); in _recvfrom() 87 int cfd = ((struct thread_args *)args)->cfd; in send_recv() local 91 if (_sendto(cfd, &si_server, i) != 0) in send_recv() [all …]
|
D | nip_tcp_server_demo.c | 27 int cfd, ret; in recv_send() local 30 memcpy(&cfd, args, sizeof(int)); in recv_send() 32 int recv_num = recv(cfd, buf, PKTLEN, MSG_WAITALL); in recv_send() 41 ret = send(cfd, buf, recv_num, 0); in recv_send() 49 END: close(cfd); in recv_send() 56 int fd, cfd, addr_len; in main() local 89 cfd = accept(fd, (struct sockaddr *)&si_remote, (socklen_t *)&addr_len); in main() 90 pthread_create(&th, NULL, recv_send, &cfd); in main()
|
D | nip_uapi.h | 36 int cfd; member
|
/kernel/linux/linux-5.10/tools/testing/selftests/net/ |
D | tls.c | 30 int fd, cfd; in FIXTURE() local 61 self->cfd = accept(sfd, &addr, &len); in FIXTURE_SETUP() 62 ASSERT_GE(self->cfd, 0); in FIXTURE_SETUP() 74 ret = setsockopt(self->cfd, IPPROTO_TCP, TCP_ULP, "tls", sizeof("tls")); in FIXTURE_SETUP() 81 close(self->cfd); in FIXTURE_TEARDOWN() 94 EXPECT_NE(recv(self->cfd, buf, send_len, 0), -1); in TEST_F() 100 int fd, cfd; in FIXTURE() local 163 self->cfd = accept(sfd, &addr, &len); in FIXTURE_SETUP() 164 ASSERT_GE(self->cfd, 0); in FIXTURE_SETUP() 167 ret = setsockopt(self->cfd, IPPROTO_TCP, TCP_ULP, "tls", in FIXTURE_SETUP() [all …]
|
/kernel/linux/linux-5.10/kernel/ |
D | smp.c | 47 struct call_function_data *cfd = &per_cpu(cfd_data, cpu); in smpcfd_prepare_cpu() local 49 if (!zalloc_cpumask_var_node(&cfd->cpumask, GFP_KERNEL, in smpcfd_prepare_cpu() 52 if (!zalloc_cpumask_var_node(&cfd->cpumask_ipi, GFP_KERNEL, in smpcfd_prepare_cpu() 54 free_cpumask_var(cfd->cpumask); in smpcfd_prepare_cpu() 57 cfd->csd = alloc_percpu(call_single_data_t); in smpcfd_prepare_cpu() 58 if (!cfd->csd) { in smpcfd_prepare_cpu() 59 free_cpumask_var(cfd->cpumask); in smpcfd_prepare_cpu() 60 free_cpumask_var(cfd->cpumask_ipi); in smpcfd_prepare_cpu() 69 struct call_function_data *cfd = &per_cpu(cfd_data, cpu); in smpcfd_dead_cpu() local 71 free_cpumask_var(cfd->cpumask); in smpcfd_dead_cpu() [all …]
|
/kernel/linux/linux-5.10/drivers/media/platform/ti-vpe/ |
D | vpdma.c | 603 static void dump_cfd(struct vpdma_cfd *cfd) in dump_cfd() argument 607 class = cfd_get_class(cfd); in dump_cfd() 615 cfd->dest_addr_offset); in dump_cfd() 618 pr_debug("word1: num_data_wrds = %d\n", cfd->block_len); in dump_cfd() 620 pr_debug("word2: payload_addr = 0x%08x\n", cfd->payload_addr); in dump_cfd() 623 cfd_get_pkt_type(cfd), in dump_cfd() 624 cfd_get_direct(cfd), class, cfd_get_dest(cfd), in dump_cfd() 625 cfd_get_payload_len(cfd)); in dump_cfd() 636 struct vpdma_cfd *cfd; in vpdma_add_cfd_block() local 641 cfd = list->next; in vpdma_add_cfd_block() [all …]
|
D | vpdma_priv.h | 484 static inline int cfd_get_pkt_type(struct vpdma_cfd *cfd) in cfd_get_pkt_type() argument 486 return cfd->ctl_payload_len >> CFD_PKT_TYPE_SHFT; in cfd_get_pkt_type() 489 static inline bool cfd_get_direct(struct vpdma_cfd *cfd) in cfd_get_direct() argument 491 return (cfd->ctl_payload_len >> CFD_DIRECT_SHFT) & CFD_DIRECT_MASK; in cfd_get_direct() 494 static inline bool cfd_get_class(struct vpdma_cfd *cfd) in cfd_get_class() argument 496 return (cfd->ctl_payload_len >> CFD_CLASS_SHFT) & CFD_CLASS_MASK; in cfd_get_class() 499 static inline int cfd_get_dest(struct vpdma_cfd *cfd) in cfd_get_dest() argument 501 return (cfd->ctl_payload_len >> CFD_DEST_SHFT) & CFD_DEST_MASK; in cfd_get_dest() 504 static inline int cfd_get_payload_len(struct vpdma_cfd *cfd) in cfd_get_payload_len() argument 506 return cfd->ctl_payload_len & CFD_PAYLOAD_LEN_MASK; in cfd_get_payload_len()
|
/kernel/linux/linux-5.10/tools/cgroup/ |
D | cgroup_event_listener.c | 25 int cfd = -1; in main() local 34 cfd = open(argv[1], O_RDONLY); in main() 35 if (cfd == -1) in main() 51 ret = snprintf(line, LINE_MAX, "%d %d %s", efd, cfd, argv[2]); in main()
|
/kernel/linux/linux-5.10/drivers/net/can/ |
D | vcan.c | 73 struct canfd_frame *cfd = (struct canfd_frame *)skb->data; in vcan_rx() local 77 stats->rx_bytes += cfd->len; in vcan_rx() 88 struct canfd_frame *cfd = (struct canfd_frame *)skb->data; in vcan_tx() local 96 stats->tx_bytes += cfd->len; in vcan_tx() 108 stats->rx_bytes += cfd->len; in vcan_tx()
|
D | flexcan.c | 752 struct canfd_frame *cfd = (struct canfd_frame *)skb->data; in flexcan_start_xmit() local 755 u32 ctrl = FLEXCAN_MB_CODE_TX_DATA | ((can_len2dlc(cfd->len)) << 16); in flexcan_start_xmit() 763 if (cfd->can_id & CAN_EFF_FLAG) { in flexcan_start_xmit() 764 can_id = cfd->can_id & CAN_EFF_MASK; in flexcan_start_xmit() 767 can_id = (cfd->can_id & CAN_SFF_MASK) << 18; in flexcan_start_xmit() 770 if (cfd->can_id & CAN_RTR_FLAG) in flexcan_start_xmit() 776 if (cfd->flags & CANFD_BRS) in flexcan_start_xmit() 780 for (i = 0; i < cfd->len; i += sizeof(u32)) { in flexcan_start_xmit() 781 data = be32_to_cpup((__be32 *)&cfd->data[i]); in flexcan_start_xmit() 953 struct canfd_frame *cfd; in flexcan_mailbox_read() local [all …]
|
D | vxcan.c | 40 struct canfd_frame *cfd = (struct canfd_frame *)skb->data; in vxcan_xmit() local 65 len = cfd->len; in vxcan_xmit()
|
/kernel/linux/linux-5.10/drivers/net/can/usb/peak_usb/ |
D | pcan_usb_fd.c | 473 struct canfd_frame *cfd; in pcan_usb_fd_decode_canmsg() local 485 skb = alloc_canfd_skb(netdev, &cfd); in pcan_usb_fd_decode_canmsg() 490 cfd->flags |= CANFD_BRS; in pcan_usb_fd_decode_canmsg() 493 cfd->flags |= CANFD_ESI; in pcan_usb_fd_decode_canmsg() 495 cfd->len = can_dlc2len(get_canfd_dlc(pucan_msg_get_dlc(rm))); in pcan_usb_fd_decode_canmsg() 498 skb = alloc_can_skb(netdev, (struct can_frame **)&cfd); in pcan_usb_fd_decode_canmsg() 502 cfd->len = get_can_dlc(pucan_msg_get_dlc(rm)); in pcan_usb_fd_decode_canmsg() 505 cfd->can_id = le32_to_cpu(rm->can_id); in pcan_usb_fd_decode_canmsg() 508 cfd->can_id |= CAN_EFF_FLAG; in pcan_usb_fd_decode_canmsg() 511 cfd->can_id |= CAN_RTR_FLAG; in pcan_usb_fd_decode_canmsg() [all …]
|
D | pcan_usb_core.c | 328 struct canfd_frame *cfd = (struct canfd_frame *)skb->data; in peak_usb_ndo_start_xmit() local 363 context->data_len = cfd->len; in peak_usb_ndo_start_xmit()
|
/kernel/linux/linux-5.10/tools/testing/selftests/bpf/ |
D | cgroup_helpers.c | 49 int fd, cfd; in enable_all_controllers() local 73 cfd = open(path, O_RDWR); in enable_all_controllers() 74 if (cfd < 0) { in enable_all_controllers() 80 if (dprintf(cfd, "+%s\n", c) <= 0) { in enable_all_controllers() 82 close(cfd); in enable_all_controllers() 86 close(cfd); in enable_all_controllers()
|
/kernel/linux/linux-5.10/tools/gpio/ |
D | gpio-event-mon.c | 36 int cfd, lfd; in monitor_device() local 44 cfd = open(chrdev_name, 0); in monitor_device() 45 if (cfd == -1) { in monitor_device() 134 if (close(cfd) == -1) in monitor_device()
|
/kernel/linux/linux-5.10/net/can/ |
D | af_can.c | 202 struct canfd_frame *cfd = (struct canfd_frame *)skb->data; in can_send() local 208 if (unlikely(cfd->len > CAN_MAX_DLEN)) in can_send() 212 if (unlikely(cfd->len > CANFD_MAX_DLEN)) in can_send() 222 if (unlikely(skb->len > skb->dev->mtu && cfd->len > CAN_MAX_DLEN)) { in can_send() 681 struct canfd_frame *cfd = (struct canfd_frame *)skb->data; in can_rcv() local 690 if (unlikely(cfd->len > CAN_MAX_DLEN)) { in can_rcv() 692 dev->type, skb->len, cfd->len); in can_rcv() 707 struct canfd_frame *cfd = (struct canfd_frame *)skb->data; in canfd_rcv() local 716 if (unlikely(cfd->len > CANFD_MAX_DLEN)) { in canfd_rcv() 718 dev->type, skb->len, cfd->len); in canfd_rcv()
|
/kernel/linux/linux-5.10/include/linux/can/ |
D | dev.h | 144 const struct canfd_frame *cfd = (struct canfd_frame *)skb->data; in can_dropped_invalid_skb() local 148 cfd->len > CAN_MAX_DLEN)) in can_dropped_invalid_skb() 152 cfd->len > CANFD_MAX_DLEN)) in can_dropped_invalid_skb() 234 struct canfd_frame **cfd);
|
/kernel/linux/linux-5.10/tools/accounting/ |
D | getdelays.c | 283 int cfd = 0; in main() local 434 cfd = open(containerpath, O_RDONLY); in main() 435 if (cfd < 0) { in main() 440 CGROUPSTATS_CMD_ATTR_FD, &cfd, sizeof(__u32)); in main() 554 if (cfd) in main() 555 close(cfd); in main()
|
/kernel/linux/linux-5.10/drivers/net/can/spi/mcp251xfd/ |
D | mcp251xfd-core.c | 1381 struct canfd_frame *cfd = (struct canfd_frame *)skb->data; in mcp251xfd_hw_rx_obj_to_skb() local 1389 cfd->can_id = CAN_EFF_FLAG | in mcp251xfd_hw_rx_obj_to_skb() 1393 cfd->can_id = FIELD_GET(MCP251XFD_OBJ_ID_SID_MASK, in mcp251xfd_hw_rx_obj_to_skb() 1402 cfd->flags |= CANFD_ESI; in mcp251xfd_hw_rx_obj_to_skb() 1405 cfd->flags |= CANFD_BRS; in mcp251xfd_hw_rx_obj_to_skb() 1408 cfd->len = can_dlc2len(get_canfd_dlc(dlc)); in mcp251xfd_hw_rx_obj_to_skb() 1411 cfd->can_id |= CAN_RTR_FLAG; in mcp251xfd_hw_rx_obj_to_skb() 1413 cfd->len = get_can_dlc(FIELD_GET(MCP251XFD_OBJ_FLAGS_DLC, in mcp251xfd_hw_rx_obj_to_skb() 1417 memcpy(cfd->data, hw_rx_obj->data, cfd->len); in mcp251xfd_hw_rx_obj_to_skb() 1427 struct canfd_frame *cfd; in mcp251xfd_handle_rxif_one() local [all …]
|
/kernel/linux/linux-5.10/Documentation/networking/ |
D | phonet.rst | 149 int lfd, cfd; 155 cfd = accept(lfd, NULL, NULL); 159 ssize_t len = read(cfd, buf, sizeof(buf)); 163 write(cfd, msg, msglen);
|
D | can.rst | 604 struct canfd_frame cfd; 606 nbytes = read(s, &cfd, CANFD_MTU); 609 printf("got CAN FD frame with length %d\n", cfd.len); 610 /* cfd.flags contains valid data */ 612 printf("got legacy CAN frame with length %d\n", cfd.len); 613 /* cfd.flags is undefined */ 621 printf("can_id: %X data length: %d data: ", cfd.can_id, cfd.len); 622 for (i = 0; i < cfd.len; i++) 623 printf("%02X ", cfd.data[i]);
|
D | kcm.rst | 185 info.fd = cfd;
|
/kernel/linux/linux-5.10/drivers/usb/class/ |
D | cdc-acm.c | 1455 struct usb_cdc_country_functional_desc * cfd = in acm_probe() local 1458 acm->country_codes = kmalloc(cfd->bLength - 4, GFP_KERNEL); in acm_probe() 1461 acm->country_code_size = cfd->bLength - 4; in acm_probe() 1462 memcpy(acm->country_codes, (u8 *)&cfd->wCountyCode0, in acm_probe() 1463 cfd->bLength - 4); in acm_probe() 1464 acm->country_rel_date = cfd->iCountryCodeRelDate; in acm_probe()
|
/kernel/linux/linux-5.10/drivers/net/can/dev/ |
D | dev.c | 704 struct canfd_frame **cfd) in alloc_canfd_skb() argument 725 *cfd = skb_put_zero(skb, sizeof(struct canfd_frame)); in alloc_canfd_skb()
|