search for: max_skb_frags

Displaying 20 results from an estimated 387 matches for "max_skb_frags".

2013 Jan 04
31
xennet: skb rides the rocket: 20 slots
...the rocket: xx slots" and this results in some dropped packets in domU, I don''t see any warnings in dom0. I have added some extra info, but i don''t have enough knowledge if this could/should be prevented from happening ? [16798.629141] xennet: skb rides the rocket: 19 slots MAX_SKB_FRAGS: 17 div_roundup:1 xennet_count_skb_frag_slots:18 offset:106 skb_headlen:1622 skb->len:64294, skb->data_len:62672 skb->truesize:64976 nr_frags:4 page_size:4096 prot:0800 [16800.575182] xennet: skb rides the rocket: 19 slots MAX_SKB_FRAGS: 17 div_roundup:1 xennet_count_skb_frag_slots:18 offs...
2023 Apr 30
1
[RFC PATCH net 2/3] virtio-net: allow usage of vrings smaller than MAX_SKB_FRAGS + 2
At the moment, if a network device uses vrings with less than MAX_SKB_FRAGS + 2 entries, the device won't be functional. The following condition vq->num_free >= 2 + MAX_SKB_FRAGS will always evaluate to false, leading to TX timeouts. This patch introduces a new variable, single_pkt_max_descs, that holds the max number of descriptors we may need to handle a sing...
2015 Mar 15
2
virtio-net: tx queue was stopped
...file MAINTAINERS for the full list. I added Cc for now. > > static netdev_tx_t start_xmit(struct sk_buff *skb, struct net_device *dev) > { > ... ... > > > capacity = 10; //########## test code : force to call netif_stop_queue > > if (capacity < 2+MAX_SKB_FRAGS) { > netif_stop_queue(dev); So you changed code to make it think we are out of capacity, now it stops the queue. > > if (unlikely(!virtqueue_enable_cb_delayed(vi->svq))) { > /* More just got used, free them then recheck. */ &...
2015 Mar 15
2
virtio-net: tx queue was stopped
...file MAINTAINERS for the full list. I added Cc for now. > > static netdev_tx_t start_xmit(struct sk_buff *skb, struct net_device *dev) > { > ... ... > > > capacity = 10; //########## test code : force to call netif_stop_queue > > if (capacity < 2+MAX_SKB_FRAGS) { > netif_stop_queue(dev); So you changed code to make it think we are out of capacity, now it stops the queue. > > if (unlikely(!virtqueue_enable_cb_delayed(vi->svq))) { > /* More just got used, free them then recheck. */ &...
2013 Jul 02
3
[PATCH RFC] xen-netback: remove guest RX path dependence on MAX_SKB_FRAGS
...ers/net/xen-netback/netback.c @@ -289,24 +289,12 @@ static void xen_netbk_kick_thread(struct xen_netbk *netbk) wake_up(&netbk->wq); } -static int max_required_rx_slots(struct xenvif *vif) -{ - int max = DIV_ROUND_UP(vif->dev->mtu, PAGE_SIZE); - - /* XXX FIXME: RX path dependent on MAX_SKB_FRAGS */ - if (vif->can_sg || vif->gso || vif->gso_prefix) - max += MAX_SKB_FRAGS + 1; /* extra_info + frags */ - - return max; -} - int xen_netbk_rx_ring_full(struct xenvif *vif) { - RING_IDX peek = vif->rx_req_cons_peek; - RING_IDX needed = max_required_rx_slots(vif); + RING_IDX peek =...
2023 Apr 30
1
[RFC PATCH net 2/3] virtio-net: allow usage of vrings smaller than MAX_SKB_FRAGS + 2
On Sun, Apr 30, 2023 at 04:15:17PM +0300, Alvaro Karsz wrote: > At the moment, if a network device uses vrings with less than > MAX_SKB_FRAGS + 2 entries, the device won't be functional. > > The following condition vq->num_free >= 2 + MAX_SKB_FRAGS will always > evaluate to false, leading to TX timeouts. > > This patch introduces a new variable, single_pkt_max_descs, that holds > the max number of descriptor...
2023 Apr 16
4
[PATCH net] virtio-net: reject small vring sizes
Check vring size and fail probe if a transmit/receive vring size is smaller than MAX_SKB_FRAGS + 2. At the moment, any vring size is accepted. This is problematic because it may result in attempting to transmit a packet with more fragments than there are descriptors in the ring. Furthermore, it leads to an immediate bug: The condition: (sq->vq->num_free >= 2 + MAX_SKB_FRAGS) in v...
2023 Apr 30
5
[RFC PATCH net 0/3] virtio-net: allow usage of small vrings
At the moment, if a virtio network device uses vrings with less than MAX_SKB_FRAGS + 2 entries, the device won't be functional. The following condition vq->num_free >= 2 + MAX_SKB_FRAGS will always evaluate to false, leading to TX timeouts. This patchset attempts this fix this bug, and to allow small rings down to 4 entries. The first patch introduces a new mechanism...
2023 Apr 30
1
[RFC PATCH net 2/3] virtio-net: allow usage of vrings smaller than MAX_SKB_FRAGS + 2
> > At the moment, if a network device uses vrings with less than > > MAX_SKB_FRAGS + 2 entries, the device won't be functional. > > > > The following condition vq->num_free >= 2 + MAX_SKB_FRAGS will always > > evaluate to false, leading to TX timeouts. > > > > This patch introduces a new variable, single_pkt_max_descs, that holds > >...
2023 May 01
1
[RFC PATCH net 2/3] virtio-net: allow usage of vrings smaller than MAX_SKB_FRAGS + 2
On Sun, Apr 30, 2023 at 06:54:08PM +0000, Alvaro Karsz wrote: > > > At the moment, if a network device uses vrings with less than > > > MAX_SKB_FRAGS + 2 entries, the device won't be functional. > > > > > > The following condition vq->num_free >= 2 + MAX_SKB_FRAGS will always > > > evaluate to false, leading to TX timeouts. > > > > > > This patch introduces a new variable, single_pkt_max_des...
2015 Mar 16
1
virtio-net: tx queue was stopped
...r now. > Thank you. >> >> static netdev_tx_t start_xmit(struct sk_buff *skb, struct net_device *dev) >> { >> ... ... >> >> >> capacity = 10; //########## test code : force to call netif_stop_queue >> >> if (capacity < 2+MAX_SKB_FRAGS) { >> netif_stop_queue(dev); > > So you changed code to make it think we are out of capacity, now it > stops the queue. > >> >> if (unlikely(!virtqueue_enable_cb_delayed(vi->svq))) { >> /* More just got...
2015 Mar 16
1
virtio-net: tx queue was stopped
...r now. > Thank you. >> >> static netdev_tx_t start_xmit(struct sk_buff *skb, struct net_device *dev) >> { >> ... ... >> >> >> capacity = 10; //########## test code : force to call netif_stop_queue >> >> if (capacity < 2+MAX_SKB_FRAGS) { >> netif_stop_queue(dev); > > So you changed code to make it think we are out of capacity, now it > stops the queue. > >> >> if (unlikely(!virtqueue_enable_cb_delayed(vi->svq))) { >> /* More just got...
2015 Mar 16
0
virtio-net: tx queue was stopped
...>> static netdev_tx_t start_xmit(struct sk_buff *skb, struct net_device *dev) > >> { > >> ... ... > >> > >> > >> capacity = 10; //########## test code : force to call netif_stop_queue > >> > >> if (capacity < 2+MAX_SKB_FRAGS) { > >> netif_stop_queue(dev); > > > > So you changed code to make it think we are out of capacity, now it > > stops the queue. > > > >> > >> if (unlikely(!virtqueue_enable_cb_delayed(vi->svq))) { > >>...
2015 Mar 16
0
virtio-net: tx queue was stopped
...>> static netdev_tx_t start_xmit(struct sk_buff *skb, struct net_device *dev) > >> { > >> ... ... > >> > >> > >> capacity = 10; //########## test code : force to call netif_stop_queue > >> > >> if (capacity < 2+MAX_SKB_FRAGS) { > >> netif_stop_queue(dev); > > > > So you changed code to make it think we are out of capacity, now it > > stops the queue. > > > >> > >> if (unlikely(!virtqueue_enable_cb_delayed(vi->svq))) { > >>...
2014 Sep 03
0
[PATCH 1/3] virtio_net: pass well-formed sgs to virtqueue_add_*()
...ivers/net/virtio_net.c index 59caa06f34a6..31cac511b3c3 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -546,8 +546,8 @@ static int add_recvbuf_small(struct receive_queue *rq, gfp_t gfp) skb_put(skb, GOOD_PACKET_LEN); hdr = skb_vnet_hdr(skb); + sg_init_table(rq->sg, MAX_SKB_FRAGS + 2); sg_set_buf(rq->sg, &hdr->hdr, sizeof hdr->hdr); - skb_to_sgvec(skb, rq->sg + 1, 0, skb->len); err = virtqueue_add_inbuf(rq->vq, rq->sg, 2, skb, gfp); @@ -563,6 +563,8 @@ static int add_recvbuf_big(struct receive_queue *rq, gfp_t gfp) char *p; int i, err, o...
2014 Dec 19
1
[PATCH RFC v4 net-next 1/5] virtio_net: enable tx interrupt
...* Don't wait up for transmitted skbs to be freed. */ > - skb_orphan(skb); > - nf_reset(skb); > - > /* Apparently nice girls don't return TX_BUSY; stop the queue > * before it gets out of hand. Naturally, this wastes entries. */ > - if (sq->vq->num_free < 2+MAX_SKB_FRAGS) { > + if (sq->vq->num_free < 2+MAX_SKB_FRAGS) > netif_stop_subqueue(dev, qnum); > - if (unlikely(!virtqueue_enable_cb_delayed(sq->vq))) { > - /* More just got used, free them then recheck. */ > - free_old_xmit_skbs(sq); > - if (sq->vq->num_free >=...
2014 Dec 19
1
[PATCH RFC v4 net-next 1/5] virtio_net: enable tx interrupt
...* Don't wait up for transmitted skbs to be freed. */ > - skb_orphan(skb); > - nf_reset(skb); > - > /* Apparently nice girls don't return TX_BUSY; stop the queue > * before it gets out of hand. Naturally, this wastes entries. */ > - if (sq->vq->num_free < 2+MAX_SKB_FRAGS) { > + if (sq->vq->num_free < 2+MAX_SKB_FRAGS) > netif_stop_subqueue(dev, qnum); > - if (unlikely(!virtqueue_enable_cb_delayed(sq->vq))) { > - /* More just got used, free them then recheck. */ > - free_old_xmit_skbs(sq); > - if (sq->vq->num_free >=...
2015 Aug 05
4
[PATCH net V2] virtio-net: drop NETIF_F_FRAGLIST
virtio declares support for NETIF_F_FRAGLIST, but assumes that there are at most MAX_SKB_FRAGS + 2 fragments which isn't always true with a fraglist. A longer fraglist in the skb will make the call to skb_to_sgvec overflow the sg array, leading to memory corruption. Drop NETIF_F_FRAGLIST so we only get what we can handle. Cc: Michael S. Tsirkin <mst at redhat.com> Signed-off-by:...
2015 Aug 05
4
[PATCH net V2] virtio-net: drop NETIF_F_FRAGLIST
virtio declares support for NETIF_F_FRAGLIST, but assumes that there are at most MAX_SKB_FRAGS + 2 fragments which isn't always true with a fraglist. A longer fraglist in the skb will make the call to skb_to_sgvec overflow the sg array, leading to memory corruption. Drop NETIF_F_FRAGLIST so we only get what we can handle. Cc: Michael S. Tsirkin <mst at redhat.com> Signed-off-by:...
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