Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
The FDP team is no longer accepting new bugs in Bugzilla. Please report your issues under FDP project in Jira. Thanks.

Bug 1821383

Summary: [OVN SCALE] All OVS/OVN components perform an unnecessary extra copy of all data in SSL xmit
Product: Red Hat Enterprise Linux Fast Datapath Reporter: Anton Ivanov <anivanov>
Component: openvswitch2.17Assignee: Ilya Maximets <i.maximets>
Status: CLOSED ERRATA QA Contact: Jianlin Shi <jishi>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: RHEL 8.0CC: ctrautma, i.maximets, jhsiao, ralongi, tredaelli
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openvswitch2.17-2.17.0-4.el8fdp Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-06-30 17:59:47 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Anton Ivanov 2020-04-06 17:29:19 UTC
SSL xmit in OVS and anything that uses OVS codebase follows the following code path:

1. An ofpbuf with the message to be transmitted is created by jsonrpc_send() and queued
2. The ofpbuf data is given to the underlying stream. If the stream send routine reports success the ofpbuf is discarded
3. In the case of SSL ssl-stream creates a new ofpub with the data given by jsonrpc which is copied into the new ofpbuf
4. The ofpbuf is now "drip-fed" into SSL until it is transmitted.

There is an obvious extra copy - the ofpbuf created in 1 can and should be directly consumed by 3 instead of copying.

This cannot be fixed without changing the stream API so that ofpbufs can be passed and enqueued by the stream in addition to passing and enqueuing raw data.

An example on how it can be fixed is present in the async patch proposal: https://github.com/kot-begemot-uk/ovs/tree/async_io_v4.2

Comment 1 Ilya Maximets 2021-11-10 13:26:18 UTC
There seems to be an easier way to fix that for the vast majority of cases
without re-architecting the stream API.

I need to run some tests before sending a patch, but it may look something
like this:
  https://github.com/igsilya/ovs/commit/bb1b2630ef95182b3ea76063c793311c49e285e2

Comment 6 Jianlin Shi 2022-06-14 00:41:48 UTC
this is improvement in code logic, there is no accurate reproducer. run basic ovn ssl tests,no new issue found. set SanityOnly + Verified

Comment 8 errata-xmlrpc 2022-06-30 17:59:47 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (openvswitch2.17 bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2022:5445