On 8/24/21 10:57 PM, Ilya Maximets wrote: > Implementation of SHA1 in OpenSSL library is much faster and optimized > for all available CPU architectures and instruction sets. OVS should > use it instead of internal implementation if possible. > > Depending on compiler options OpenSSL's version finishes our sha1 > unit tests from 3 to 12 times faster. Performance of OpenSSL's > version is constant, but OVS's implementation highly depends on > compiler. Interestingly, default build with '-g -O2' works faster > than optimized '-march=native -Ofast'. > > Tests with ovsdb-server on big databases shows ~5-10% improvement of > the time needed for database compaction (sha1 is only a part of this > operation), depending on compiler options. > > We still need internal implementation, because OpenSSL can be not > available on some platforms. Tests enhanced to check both versions > of API. > > Signed-off-by: Ilya Maximets <[email protected]> > --- > +void > +sha1_init(struct sha1_ctx *sha_info) > +{ > +#ifdef HAVE_OPENSSL > + if (!SHA1_Init(&sha_info->ctx)) {
These low level APIs are deprecated in OpenSSL 3.0, we need to use high level EVP_Digest* API instead. I'll take a look at them and will update the patch accordingly. Best regards, Ilya Maximets. _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
