Computer Science 853 Quiz 2 Name _________________ 1. Which of the following best characterizes a "shared" sk_buff. a. Multiple struct sk_buff's b. A single struct sk_buff point to a single kmalloc'd points to multiple kmalloc'd buffer area buffer areas c. Multiple entities hold valid pointers to a single struct sk_buff 2. Which of the following best characterizes a "cloned" sk_buff. a. Multiple struct sk_buff's b. A single struct sk_buff point to a single kmalloc'd points to multiple kmalloc'd buffer area buffer areas c. Multiple entities hold valid pointers to a single struct sk_buff 3. Describe consisely and precisely how "sharing" and "cloning" of an sk_buff affect the "users" and the "dataref" elements. (No effect is a legal but not necessarily correct answer). a new entity shares an sk_buff users - dataref - an sk_buff is cloned users - dataref - 4. Identify the proper skb_* utility function that would be used to update appropriate buffer pointers and length fields when... a. Appending user data to the buffer. b. Inserting a new protocol header in an outgoing packet c. Removing a protocol header from a incoming packet. 5. The value of skb->len should always be equal to: a. skb->end - skb->head b. skb->end - skb->data c. skb->tail - skb->head d. skb->tail - skb->data 6. Pointers to the fragment list and unmapped page buffers are kept in a. the struct sk_buff b. the kmalloc'd area that is also used to hold header and application data. c. in an extra area that is also kmalloc'd. 7. Sleeping may occur in a. sock_alloc_send_skb() but b. dev_alloc_skb() but not not dev_alloc_skb() sock_alloc_send_skb() c. neither d. both 8. When a Tx buffer is allocated the amount charged to the sock's wmem_alloc is: a. len b. data_len c. truesize 9. wmem_alloc is decremented a. as soon a the buffer is b. as soon as the buffer is passed to the dev layer added to the device's Tx ring c. only after the Tx complete interrupt associated with the transmission of the buffer 10. If two entities need for a buffer to reside on two different buffer lists the most efficient SAFE approach for doing this is: a. share the buffer b. clone the buffer c. make a complete copy of both header and data