search for: netbk_count_slots

Displaying 2 results from an estimated 2 matches for "netbk_count_slots".

2013 Jul 10
13
[PATCH v2 1/1] xen/netback: correctly calculate required slots of skb.
...ize, int head) return false; } -/* - * Figure out how many ring slots we''re going to need to send @skb to - * the guest. This function is essentially a dry run of - * netbk_gop_frag_copy. - */ -unsigned int xen_netbk_count_skb_slots(struct xenvif *vif, struct sk_buff *skb) +static int netbk_count_slots(struct xenvif *vif, struct sk_buff *skb, + int *copy_off, unsigned long size, + unsigned long offset, int *head) { - unsigned int count; - int i, copy_off; + unsigned long bytes; + int count = 0; - count = DIV_ROUND_UP(skb_headlen(skb), PAGE_SIZE); + offset &= ~PAGE_MASK; - cop...
2013 Jul 09
20
[PATCH 1/1] xen/netback: correctly calculate required slots of skb.
When counting required slots for skb, netback directly uses DIV_ROUND_UP to get slots required by header data. This is wrong when offset in the page of header data is not zero, and is also inconsistent with following calculation for required slot in netbk_gop_skb. In netbk_gop_skb, required slots are calculated based on offset and len in page of header data. It is possible that required slots