aboutsummaryrefslogtreecommitdiff
path: root/platform/linux-generic/include/odp_packet_internal.h
diff options
context:
space:
mode:
authorJanne Peltonen <janne.peltonen@nokia.com>2022-04-12 12:27:07 +0300
committerMatias Elo <matias.elo@nokia.com>2022-04-14 09:45:17 +0300
commit11f963aedfcd36f6ba8ace174fbdb13520d714cb (patch)
tree3103603f9c07d140a9fe6887b5d42c282f6bc4b7 /platform/linux-generic/include/odp_packet_internal.h
parente361227ac00851e8720871e927b015c4c0e6a895 (diff)
linux-gen: packet: put crypto and ipsec results in a union in packet hdr
A packet cannot have any two of crypto result, ipsec result and compression result at the same time because each of them correspond to a different packet subtype. When a crypto/ipsec/comp operation is completed, the subtype changes and possible previous result of a different operation becomes inaccessible through the API. Because of this, it is ok to have the different results share the same bytes of the packet header. Compression result was already overlapping with crypto and ipsec results. Make crypto and ipsec results overlap each other too. This saves a few bytes of packet header and removes the impression that there is a reason to keep crypto and ipsec results separate. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
Diffstat (limited to 'platform/linux-generic/include/odp_packet_internal.h')
-rw-r--r--platform/linux-generic/include/odp_packet_internal.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/platform/linux-generic/include/odp_packet_internal.h b/platform/linux-generic/include/odp_packet_internal.h
index a8f58146a..ff09e20c5 100644
--- a/platform/linux-generic/include/odp_packet_internal.h
+++ b/platform/linux-generic/include/odp_packet_internal.h
@@ -151,13 +151,11 @@ typedef struct ODP_ALIGNED_CACHE odp_packet_hdr_t {
uint8_t lso_profile_idx;
union {
- struct {
- /* Result for crypto packet op */
- odp_crypto_packet_result_t crypto_op_result;
+ /* Result for crypto packet op */
+ odp_crypto_packet_result_t crypto_op_result;
- /* Context for IPsec */
- odp_ipsec_packet_result_t ipsec_ctx;
- };
+ /* Context for IPsec */
+ odp_ipsec_packet_result_t ipsec_ctx;
/* Result for comp packet op */
odp_comp_packet_result_t comp_op_result;