[Intel-wired-lan] [next PATCH v2] i40e/i40evf: Allow up to 12K bytes of data per Tx descriptor instead of 8K
Jesse Brandeburg
jesse.brandeburg at intel.com
Tue Mar 8 19:47:17 UTC 2016
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 at 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);
> +}
More information about the Intel-wired-lan
mailing list