Lines Matching +full:num +full:- +full:tc

1 /* main.c - Application main entry point */
6 * SPDX-License-Identifier: Apache-2.0
114 struct eth_context *context = dev->data; in eth_iface_init()
116 net_if_set_link_addr(iface, context->mac_addr, in eth_iface_init()
117 sizeof(context->mac_addr), in eth_iface_init()
121 static bool check_higher_priority_pkt_sent(int tc, struct net_pkt *pkt) in check_higher_priority_pkt_sent() argument
129 for (j = tc + 1; j < MAX_TC; j++) { in check_higher_priority_pkt_sent()
140 static bool check_higher_priority_pkt_recv(int tc, struct net_pkt *pkt) in check_higher_priority_pkt_recv() argument
148 for (j = tc + 1; j < MAX_TC; j++) { in check_higher_priority_pkt_recv()
164 if (!pkt->buffer) { in eth_tx()
166 return -ENODATA; in eth_tx()
179 net_ipv6_addr_copy_raw((uint8_t *)&addr, NET_IPV6_HDR(pkt)->src); in eth_tx()
180 net_ipv6_addr_copy_raw(NET_IPV6_HDR(pkt)->src, in eth_tx()
181 NET_IPV6_HDR(pkt)->dst); in eth_tx()
182 net_ipv6_addr_copy_raw(NET_IPV6_HDR(pkt)->dst, (uint8_t *)&addr); in eth_tx()
187 port = udp_hdr->src_port; in eth_tx()
188 udp_hdr->src_port = udp_hdr->dst_port; in eth_tx()
189 udp_hdr->dst_port = port; in eth_tx()
213 "pkt %p prio %d tc %d\n", in eth_tx()
219 "Invalid priority sent %d TC %d," in eth_tx()
231 DBG("Received pkt %p from TC %c (thread prio %d)\n", pkt, in eth_tx()
232 *(pkt->frags->data + in eth_tx()
251 /* 00-00-5E-00-53-xx Documentation RFC 7042 */ in generate_mac()
262 struct eth_context *context = dev->data; in eth_init()
264 generate_mac(context->mac_addr); in eth_init()
296 ifaddr->addr_state = NET_ADDR_PREFERRED; in address_setup()
306 ifaddr->addr_state = NET_ADDR_PREFERRED; in address_setup()
316 ifaddr->addr_state = NET_ADDR_PREFERRED; in address_setup()
483 int tc = net_tx_priority2tc(prio); in traffic_class_send_packets_with_prio() local
485 /* Convert num to ascii */ in traffic_class_send_packets_with_prio()
486 data[0] = tc + 0x30; in traffic_class_send_packets_with_prio()
494 DBG("Sending on TC %d priority %d\n", tc, prio); in traffic_class_send_packets_with_prio()
496 send_priorities[net_tx_priority2tc(prio)][pkt_count - 1] = prio + 1; in traffic_class_send_packets_with_prio()
498 ret = net_context_sendto(net_ctxs_tx[tc].ctx, data, len, in traffic_class_send_packets_with_prio()
713 "pkt %p prio %d tc %d\n", in recv_cb()
719 "Invalid priority received %d TC %d," in recv_cb()
761 int tc = net_rx_priority2tc(prio); in traffic_class_recv_packets_with_prio() local
767 /* Convert num to ascii */ in traffic_class_recv_packets_with_prio()
768 data[0] = tc + 0x30; in traffic_class_recv_packets_with_prio()
777 DBG("Receiving on TC %d priority %d\n", tc, prio); in traffic_class_recv_packets_with_prio()
779 recv_priorities[net_rx_priority2tc(prio)][pkt_count - 1] = prio + 1; in traffic_class_recv_packets_with_prio()
791 ret = net_context_sendto(net_ctxs_rx[tc].ctx, data, len, in traffic_class_recv_packets_with_prio()