|author||Konstantin Ananyev <email@example.com>||2019-03-07 14:13:14 +0000|
|committer||Akhil Goyal <firstname.lastname@example.org>||2019-03-22 14:27:46 +0100|
cryptodev: restore crypto op alignment and layout
in 18.08 new cache-aligned structure rte_crypto_asym_op was introduced. As it also was included into rte_crypto_op, it caused implicit change in rte_crypto_op layout and alignment: now rte_crypto_op is cache-line aligned has a hole of 40/104 bytes between phys_addr and sym/asym op. It looks like unintended ABI breakage, plus such change can cause negative performance effects: - now status and sym.m_src lies on different cache-lines, so post-process code would need extra cache-line read. - new alignment causes grow of the space requirements and cache-line reads/updates for structures that contain rte_crypto_op inside. As there seems no actual need to have rte_crypto_asym_op cache-line aligned, and rte_crypto_asym_op is not intended to be used on it's own - the simplest fix is just to remove cache-line alignment for it. As the immediate positive effect: on IA ipsec-secgw performance increased by 5-10% (depending on the crypto-dev and algo used). My guess that on machines with 128B cache-line and lookaside-protocol capable crypto devices the impact will be even more noticeable. Fixes: 26008aaed14c ("cryptodev: add asymmetric xform and op definitions") Cc: email@example.com Signed-off-by: Konstantin Ananyev <firstname.lastname@example.org> Acked-by: Fiona Trahe <email@example.com> Acked-by: Shally Verma <firstname.lastname@example.org> Acked-by: Akhil Goyal <email@example.com>
Diffstat (limited to 'doc')
1 files changed, 8 insertions, 1 deletions
diff --git a/doc/guides/rel_notes/release_19_05.rst b/doc/guides/rel_notes/release_19_05.rst
index 6f76de3..c4d32fe 100644
@@ -141,6 +141,13 @@ ABI Changes
Also, make sure to start the actual text at the margin.
+* cryptodev: in 18.08 new structure ``rte_crypto_asym_op`` was introduced and
+ included into ``rte_crypto_op``. As ``rte_crypto_asym_op`` structure was
+ defined as cache-line aligned that caused unintended changes in
+ ``rte_crypto_op`` structure layout and alignment. Remove cache-line
+ alignment for ``rte_crypto_asym_op`` to restore expected ``rte_crypto_op``
+ layout and alignment.
Shared Library Versions
@@ -172,7 +179,7 @@ The libraries prepended with a plus sign were incremented in this version.
+ + librte_cryptodev.so.7