RE: [EXTERNAL] [PATCH] app/test-crypto-perf: reset mbuf state for IPsec outbound iterations

Nithinsen Kaithakadan <[email protected]>
Newsgroups org.dpdk.dev
Message-ID <IA0PPF0A466555AC4AD40E85F8FC1BA7CC8C9C32@IA0PPF0A466555A.namprd18.prod.outlook.com>

> In cperf_set_ops_security_ipsec(), the same mbuf is reused across multiple
> throughput iterations.  For outbound (encap) IPsec the PMD may modify
> mbuf metadata such as data_off, data_len and pkt_len as part of in-place
> protocol processing.  When the mbuf is recycled for the next burst those
> modifications must be undone so the PMD always sees a clean, freshly-
> allocated-like buffer.
> 
> Use rte_pktmbuf_reset() to restore the mbuf to its post-alloc state in a PMD-
> agnostic manner, rather than patching individual fields with driver-specific
> knowledge of the expected offset values.
> 
> Without this reset, drivers that back-adjust data_off after encap (e.g. DPAA2
> SEC, which advances data_off by SEC_FLC_DHR_OUTBOUND on each
> dequeue) will receive a buffer with insufficient headroom on the second and
> subsequent enqueues, causing hardware errors such as:
> 
>   DPAA2_SEC: SEC encap returned Error - 50000045
>     (QI error 0x45: DHR correction underflow, reuse mode)
>   DPAA2_SEC: SEC returned Error - 50000020
>     (QI error 0x20: FD format error)
> 
> Fixes: 3b7d9f2bc6 ("app/test-crypto-perf: add ipsec lookaside support")
> Cc: [email protected]
> 
> Signed-off-by: Gagandeep Singh <[email protected]>
> ---


Acked-by: Nithinsen Kaithakadan <[email protected]>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.