search for: xen_netbk_count_skb_slot

Displaying 5 results from an estimated 5 matches for "xen_netbk_count_skb_slot".

2013 Jul 09
20
[PATCH 1/1] xen/netback: correctly calculate required slots of skb.
...c20935..7ff9333 100644 --- a/drivers/net/xen-netback/netback.c +++ b/drivers/net/xen-netback/netback.c @@ -359,51 +359,88 @@ static bool start_new_rx_buffer(int offset, unsigned long size, int head) * 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 void netbk_get_slots(struct xenvif *vif, struct sk_buff *skb, + struct page *page, int *copy_off, + unsigned long size, unsigned long offset, + int *head, int *count) { - unsigned int count; - int i, copy_off; + unsigned long byte...
2012 Aug 13
9
[PATCH RFC] xen/netback: Count ring slots properly when larger MTU sizes are used
Hi, I ran into an issue where netback driver is crashing with BUG_ON(npo.meta_prod > ARRAY_SIZE(netbk->meta)). It is happening in Intel 10Gbps network when larger mtu values are used. The problem seems to be the way the slots are counted. After applying this patch things ran fine in my environment. I request to validate my changes. Thanks Siva
2013 Jul 10
13
[PATCH v2 1/1] xen/netback: correctly calculate required slots of skb.
...-354,56 +354,84 @@ static bool start_new_rx_buffer(int offset, unsigned long size, 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_RO...
2013 Jul 02
3
[PATCH RFC] xen-netback: remove guest RX path dependence on MAX_SKB_FRAGS
...t xenvif_interrupt(int irq, void *dev_id) static int xenvif_start_xmit(struct sk_buff *skb, struct net_device *dev) { struct xenvif *vif = netdev_priv(dev); + unsigned int ring_slots_required; BUG_ON(skb->dev != dev); if (vif->netbk == NULL) goto drop; + ring_slots_required = xen_netbk_count_skb_slots(vif, skb); + + /* Reserve ring slots for the worst-case number of fragments. */ + vif->rx_req_cons_peek += ring_slots_required; + /* Drop the packet if the target domain has no receive buffers. */ - if (!xenvif_rx_schedulable(vif)) + if (!xenvif_rx_schedulable(vif)) { + vif->rx_req_cons_p...
2013 Feb 06
0
[PATCH 1/4] xen/netback: shutdown the ring if it contains garbage.
...s space to send an skb to the frontend */ void xenvif_notify_tx_completion(struct xenvif *vif); +/* Prevent the device from generating any further traffic. */ +void xenvif_carrier_off(struct xenvif *vif); + /* Returns number of ring slots required to send an skb to the frontend */ unsigned int xen_netbk_count_skb_slots(struct xenvif *vif, struct sk_buff *skb); diff --git a/drivers/net/xen-netback/interface.c b/drivers/net/xen-netback/interface.c index b7d41f8..b8c5193 100644 --- a/drivers/net/xen-netback/interface.c +++ b/drivers/net/xen-netback/interface.c @@ -343,17 +343,22 @@ err: return err; } -void x...