[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-users] SG off drops packets



I found a possible solution and posted it to Xen-devel. Whoever is interested, here is the post:
http://lists.xen.org/archives/html/xen-devel/2015-05/msg03303.html

Lennart


On 05/25/2015 11:00 AM, Lennart Schulte wrote:
Here is an update:
the slots variable is calculated like this
599         slots = DIV_ROUND_UP(offset + len, PAGE_SIZE) +
600                 xennet_count_skb_frag_slots(skb);

printk shows, that xennet_count_skb_frag_slots(skb) = 0. The length is also correct (something small, e.g. 66). Interestingly, with all the problematic packets the offset is 4032 (always the same). So with a PAGE_SIZE of 4096 this causes the DIV_ROUND_UP to return 2, which results in the packet being dropped (without notice).

Any help and/or pointer to help is highly appreciated :)
Lennart


On 21.05.2015 14:33, Lennart Schulte wrote:
Hi,
I'm running Debian Sid as dom0 (Debian 3.16.7-ckt7-1 (2015-03-01) x86_64 with Xen 4.4.1-7). I also bootstrapped Debian Sid for the domUs, but booting vanilla Linux kernel 3.19 (which is where the problem seems to be).
I have set up a virtual network with 3 nodes: sender router and receiver. Routes are statically set via ip route and scatter-gather (SG) is switched off on every node via ethtool.

I noticed that some small packets (pings as well as small TCP packets (< 200 bytes)) are being dropped apparently at random by the eth interface of the domU router (TX drop). Neither the tc queues on the node nor the corresponding vif interface on the dom0 show any abnormal packet drops.

Since xen-netfront is responsible for the sending of packets without offloading, I checked that part of the code and found the problem being caused by line 614 (sg is off, a printk showed slots = 2):

563 static int xennet_start_xmit(struct sk_buff *skb, struct net_device *dev)
564 {
        ..
613         if (unlikely(!netif_carrier_ok(dev) ||
614                      (slots > 1 && !xennet_can_sg(dev)) ||
615                      netif_needs_gso(dev, skb, netif_skb_features(skb)))) {
616                 spin_unlock_irqrestore(&queue->tx_lock, flags);
617                 goto drop;
618         }
        ..
693 }

I'm not too familiar with the xen code, therefore could someone explain what the slots variable is and maybe even why this line causes only some small packets to be dropped?

Thanks,
Lennart


_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxx
http://lists.xen.org/xen-users

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxx
http://lists.xen.org/xen-users

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.