Thread (104 messages) 104 messages, 19 authors, 2020-03-17

Re: [dpdk-dev] [PATCH v2 4/4] add ABI checks

From: Thomas Monjalon <hidden>
Date: 2020-03-17 15:10:36

17/03/2020 14:27, Kusztal, ArkadiuszX:
Hi Thomas,
quoted
-----Original Message-----
From: Thomas Monjalon <redacted>
Sent: Monday, March 16, 2020 2:09 PM
To: Trahe, Fiona <redacted>
Cc: Kusztal, ArkadiuszX <redacted>; David Marchand
[off-list ref]; nhorman@tuxdriver.com;
bluca@debian.org; ktraynor@redhat.com; Ray Kinsella [off-list ref];
dev@dpdk.org; Akhil Goyal [off-list ref]; Yigit, Ferruh
[off-list ref]; Ananyev, Konstantin
[off-list ref]; dev@dpdk.org; Anoob Joseph
[off-list ref]; Richardson, Bruce [off-list ref];
Mcnamara, John [off-list ref]; dodji@seketeli.net; Andrew
Rybchenko [off-list ref]; aconole@redhat.com; Trahe,
Fiona [off-list ref]
Subject: Re: [dpdk-dev] [PATCH v2 4/4] add ABI checks

16/03/2020 13:57, Trahe, Fiona:
quoted
From: Kusztal, ArkadiuszX <redacted>
quoted
quoted
quoted
quoted
The patch we're working on will provide two versions of
rte_cryptodev_info_get(), both call the same PMD function from
the
dev_ops info_get fn ptr.
quoted
quoted
The default version operates s as normal, the 19.11 version
searches through the list returned by the PMD, looking for
sym.aead.algo = ChaChaPoly, it needs to strip it from
the list.
quoted
As PMDs just pass a ptr to their capabilities list ( it isn't
a linked list, but an array with an end marker  =
RTE_CRYPTODEV_END_OF_CAPABILITIES_LIST) if the API layer
detects Chacha it must allocate some space and store a local
copy of the trimmed
list. This must be stored only once per device.
[Arek] The problem with this solution is that we need to allocate memory.
So the question is how to handle unlikely case of malloc error when
we operate inside void function rte_cryptodev_info_get?
And even if we would pass somehow error condition to the caller then
what to do is another question.
quoted
[Fiona] Quick recap: To avoid breaking ABI, we must return a set of
capabilities with/without ChaChaPoly depending on the appl version. To
resolve this, within the rte_cryptodev layer, we propose to inspect the
capabilities returned by PMD and strip ChaCha if it exists.
quoted
In that case memory for the new trimmed capabilities array has to be
malloced by the lib.

What happens if the capability is removed from the original capabilities
input?
quoted
All good, except how to handle a malloc fail is yet another API breakage as
rte_cryptodev_get_info() returns void.
quoted
We propose to return an empty capability list, i.e. a list with only
the END element (which can be done without malloc) in this corner case of
a corner case.
quoted
Anyone see any issue with this?
How can we use the feature if it is not advertised in capabilities?
What Fiona meant is that empty capability would indicate error condition in this case. That's why she asked if you ok with this API breakage.
Sorry I'm lost.
Please could you show what would be the usage?

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help