From: David Miller <davem@davemloft.net>
To: david.vrabel@citrix.com
Cc: netdev@vger.kernel.org, xen-devel@lists.xenproject.org,
ian.campbell@citrix.com, wei.liu2@citrix.com
Subject: Re: [PATCHv1 net] xen-netback: use skb to determine number of required guest Rx requests
Date: Thu, 14 Jan 2016 16:54:56 -0500 (EST) [thread overview]
Message-ID: <20160114.165456.1025501284568544813.davem@davemloft.net> (raw)
In-Reply-To: <1452784710-11923-1-git-send-email-david.vrabel@citrix.com>
From: David Vrabel <david.vrabel@citrix.com>
Date: Thu, 14 Jan 2016 15:18:30 +0000
> - needed = xenvif_rx_ring_slots_needed(queue->vif);
> + skb = skb_peek(&queue->rx_queue);
> + if (!skb)
> + return false;
> +
> + needed = DIV_ROUND_UP(skb->len, XEN_PAGE_SIZE);
> + if (skb_is_gso(skb))
> + needed++;
If I am not mistaken, we moved away from this kind of test exactly because
it is inaccurate and may under-estimate the needs.
It is possible for an N byte SKB to require N segments. Therefore, the:
DIV_ROUND_UP(skb->len, XEN_PAGE_SIZE);
calculation doesn't cut it.
next prev parent reply other threads:[~2016-01-14 21:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-14 15:18 [PATCHv1 net] xen-netback: use skb to determine number of required guest Rx requests David Vrabel
2016-01-14 21:54 ` David Miller [this message]
2016-01-15 10:31 ` [Xen-devel] " David Vrabel
2016-01-15 16:34 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160114.165456.1025501284568544813.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=david.vrabel@citrix.com \
--cc=ian.campbell@citrix.com \
--cc=netdev@vger.kernel.org \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).