Computer Science 881 Quiz 4 Name_______________________ 1. Describe where and how the UDP recvfrom path deals with receipt of a datagram that exceeds the length of the user provided buffer. 2. Suppose a process calls recvfrom() and there is no packet ready, provide a list (in order) of the functions called starting from udp_recvmsg() to the point at which the sleep occurs. 3. When a process is sleeping while waiting for a packet, <> packet arrival what can cause the sleep to end and a return to the application to be made. 4. When a packet does arrive, from <> what queue will it be eventually consumed by the caller of recvfrom (give name of structure and queue header element). 5. For each of the following, identify whether it is done in (C) the context of the application receiving the packet (H) the context of the hardware IRQ associated with arrival of the packet. (S) the context of the softirq associated with packet arrival ___ a. Determining the value of skb->protocol ___ b. Copying the data from kernel space to user space ___ c. Enqueuing the sk_buff on the struct sock to which it will eventually be delivered. ___ d. Assuming the packet is deliverable to a single UDP client, the freeing of the sk_buff that results in the actual kfree of the memory. (This is NOT asking about the possible pathologies associated with cloning, pulling, etc.) ___ e. Enqueuing the sk_buff on the per-cpu arrival queue. ___ f. Calling the handler that registered itself via dev_add_pack() 5. When __skb_dequeue() is called and the skb queue specified is empty, the function a. loops until the queue is b. sleeps until the queue non-empty is non-empty c. returns NULL d. calls BUG() to crash the system. 7. The net_rx_action() function processes a. exactly one packet each time b. one or more packets each time the softirq is raised the softirq is raised c. 300 packets each time the soft irq is raised. 8. Under what conditions does net_rx_action() return to do_softirq() a. Two timer ticks have occurred b. Queue is empty c. Counter that was init to 300 goes negative 9. Indicate whether the following each of the following is performed (B) before NF_HOOK processesing of an incoming packet or (A) after ___ a. Routing (setting the skb->dst) ___ b. Processing of source routing options 10. Suppose a strict source route it specified, how is a packet handled depending upon whether the type returned by ip_route_input() is a. RTN_LOCAL - b. RTN_UNICAST -