netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: david.vrabel@citrix.com
Cc: netdev@vger.kernel.org, wei.liu2@citrix.com,
	ian.campbell@citrix.com, xen-devel@lists.xenproject.org
Subject: Re: [Xen-devel] [PATCHv1 net] xen-netback: use skb to determine number of required guest Rx requests
Date: Fri, 15 Jan 2016 11:34:30 -0500 (EST)	[thread overview]
Message-ID: <20160115.113430.2270570646723842525.davem@davemloft.net> (raw)
In-Reply-To: <5698CA9D.5040707@citrix.com>

From: David Vrabel <david.vrabel@citrix.com>
Date: Fri, 15 Jan 2016 10:31:57 +0000

> On 14/01/16 21:54, David Miller wrote:
>> 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.
> 
> After 1650d5455bd2dc6b5ee134bd6fc1a3236c266b5b (xen-netback: always
> fully coalesce guest Rx packets) we always fully pack a packet into its
> guest Rx slots.  Each slot has space for XEN_PAGE_SIZE bytes so this
> calculation for the number of slots is correct.
> 
> Shall I resend with a more description changelog?

Yeah that would help a lot.

      reply	other threads:[~2016-01-15 16:34 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
2016-01-15 10:31   ` [Xen-devel] " David Vrabel
2016-01-15 16:34     ` David Miller [this message]

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=20160115.113430.2270570646723842525.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).