From: Jesse Brandeburg <jesse.brandeburg@intel.com>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] [next PATCH v2] i40e/i40evf: Allow up to 12K bytes of data per Tx descriptor instead of 8K
Date: Tue, 8 Mar 2016 11:47:17 -0800 [thread overview]
Message-ID: <20160308114717.000053d3@unknown> (raw)
In-Reply-To: <20160219201130.16927.24329.stgit@localhost.localdomain>
Thanks Alex, a couple minor comments.
As an aside, it would be interesting to know if there is a way to get
25us tx-ITR single stream performance while not using so much CPU when
multiple threads get involved.
On Fri, 19 Feb 2016 12:17:08 -0800
Alexander Duyck <aduyck@mirantis.com> wrote:
> >From what I can tell the practical limitation on the size of the Tx data
extra >
> buffer is the fact that the Tx descriptor is limited to 14 bits. As such
> we cannot use 16K as is typically used on the other Intel drivers. However
> artificially limiting ourselves to 8K can be expensive as this means that
> we will consume up to 10 descriptors (1 context, 1 for header, and 9 for
> payload, non-8K aligned) in a single send.
...
> +static inline unsigned int i40e_txd_use_count(unsigned int size)
> +{
> + const unsigned int max = I40E_MAX_DATA_PER_TXD_ALIGNED;
> + const unsigned int reciprocal = ((1ull << 32) - 1 + (max / 2)) / max;
> + unsigned int adjust = ~(u32)0;
> +
> + /* if we rounded up on the reciprprocal pull down the adjustment */
spelling of reciprocal...
> + if ((max * reciprocal) > adjust)
> + adjust = ~(u32)(reciprocal - 1);
> +
> + return (u32)((((u64)size * reciprocal) + adjust) >> 32);
> +}
...
> +static inline unsigned int i40e_txd_use_count(unsigned int size)
> +{
> + const unsigned int max = I40E_MAX_DATA_PER_TXD_ALIGNED;
> + const unsigned int reciprocal = ((1ull << 32) - 1 + (max / 2)) / max;
> + unsigned int adjust = ~(u32)0;
> +
> + /* if we rounded up on the reciprprocal pull down the adjustment */
Spelling of reciprocal
> + if ((max * reciprocal) > adjust)
> + adjust = ~(u32)(reciprocal - 1);
> +
> + return (u32)((((u64)size * reciprocal) + adjust) >> 32);
> +}
next prev parent reply other threads:[~2016-03-08 19:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-19 20:17 [Intel-wired-lan] [next PATCH v2] i40e/i40evf: Allow up to 12K bytes of data per Tx descriptor instead of 8K Alexander Duyck
2016-02-22 18:32 ` Bowers, AndrewX
2016-03-08 19:47 ` Jesse Brandeburg [this message]
2016-03-08 20:38 ` Alexander Duyck
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=20160308114717.000053d3@unknown \
--to=jesse.brandeburg@intel.com \
--cc=intel-wired-lan@osuosl.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