numam-dpdk/lib
David Marchand 4414bb6701 vhost/crypto: fix build with GCC 12
GCC 12 raises the following warning:

In file included from ../lib/mempool/rte_mempool.h:46,
                 from ../lib/mbuf/rte_mbuf.h:38,
                 from ../lib/vhost/vhost_crypto.c:7:
../lib/vhost/vhost_crypto.c: In function ‘rte_vhost_crypto_fetch_requests’:
../lib/eal/x86/include/rte_memcpy.h:371:9: warning: array subscript 1 is
     outside array bounds of ‘struct virtio_crypto_op_data_req[1]’
     [-Warray-bounds]
  371 | rte_mov32((uint8_t *)dst + 3 * 32, (const uint8_t *)src + 3 * 32);
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../lib/vhost/vhost_crypto.c:1178:42: note: while referencing ‘req’
 1178 |         struct virtio_crypto_op_data_req req;
      |                                          ^~~

Split this function and separate the per descriptor copy.
This makes the code clearer, and the compiler happier.

Note: logs for errors have been moved to callers to avoid duplicates.

Fixes: 3c79609fda ("vhost/crypto: handle virtually non-contiguous buffers")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-06-21 11:20:58 +02:00
..
acl acl: fix rules with 8-byte field size 2022-05-30 23:30:33 +02:00
bbdev lib: remove unneeded header includes 2022-02-22 13:10:39 +01:00
bitratestats bitrate: promote free function to stable 2021-10-01 15:31:47 +02:00
bpf bpf: fix build with some libpcap version on FreeBSD 2022-03-14 11:41:52 +01:00
cfgfile version: 21.11-rc0 2021-08-17 08:37:52 +02:00
cmdline cmdline: remove unneeded header includes 2022-06-21 16:46:56 +02:00
compressdev compressdev: fix missing space in log macro 2022-03-15 02:13:57 +01:00
cryptodev replace zero-length arrays with flexible ones 2022-06-07 16:44:21 +02:00
distributor distributor: fix potential overflow 2022-02-27 19:06:59 +01:00
dmadev dmadev: add telemetry 2022-06-06 23:31:29 +02:00
eal eal/x86: drop export of internal alignment macro 2022-06-22 11:32:35 +02:00
efd efd: fix uninitialized structure 2022-02-27 18:58:47 +01:00
ethdev ethdev: remove unneeded header includes 2022-06-21 16:46:56 +02:00
eventdev eventdev/eth_tx: fix adapter creation 2022-06-20 20:39:11 +02:00
fib lib: remove unneeded header includes 2022-02-22 13:10:39 +01:00
flow_classify lib: remove unneeded header includes 2022-02-22 13:10:39 +01:00
gpudev gpudev: remove unneeded header includes 2022-06-21 16:46:56 +02:00
graph graph: remove useless duplicate name check 2022-03-07 20:31:14 +01:00
gro lib: remove unneeded header includes 2022-02-22 13:10:39 +01:00
gso gso: remove unneeded header includes 2022-06-21 16:46:56 +02:00
hash hash: remove unneeded header includes 2022-06-21 16:46:56 +02:00
ip_frag replace zero-length arrays with flexible ones 2022-06-07 16:44:21 +02:00
ipsec ipsec: fix NAT-T ports and length 2022-06-21 20:04:49 +02:00
jobstats jobstats: remove unneeded header includes 2022-06-21 16:46:56 +02:00
kni kni: add missing C++ guards 2022-02-22 14:47:49 +01:00
kvargs lib: remove unneeded header includes 2022-02-22 13:10:39 +01:00
latencystats lib: remove unneeded header includes 2022-02-22 13:10:39 +01:00
lpm lpm: fix scalar version header for C++ 2022-06-15 09:12:19 +02:00
mbuf mbuf: dump outer VLAN 2022-06-01 11:15:37 +02:00
member lib: remove unneeded header includes 2022-02-22 13:10:39 +01:00
mempool lib: remove unneeded header includes 2022-02-22 13:10:39 +01:00
meter meter: remove unneeded header includes 2022-06-21 16:46:56 +02:00
metrics metrics: add missing C++ guards 2022-02-22 14:47:49 +01:00
net net: remove unneeded header includes 2022-06-21 16:46:56 +02:00
node lib: remove unneeded header includes 2022-02-22 13:10:39 +01:00
pcapng pcapng: fix timestamp wrapping in output files 2022-06-01 16:39:25 +02:00
pci lib: remove unneeded header includes 2022-02-22 13:10:39 +01:00
pdump lib: remove unneeded header includes 2022-02-22 13:10:39 +01:00
pipeline pipeline: rework optimization pattern for header generation 2022-06-20 16:14:50 +02:00
port port: support packet mirroring 2022-06-01 15:04:34 +02:00
power power: remove unneeded header includes 2022-06-21 16:46:56 +02:00
rawdev rawdev: remove unneeded header includes 2022-06-21 16:46:56 +02:00
rcu lib: remove unneeded header includes 2022-02-22 13:10:39 +01:00
regexdev build: hide local symbols in shared libraries 2022-03-08 15:22:33 +01:00
reorder lib: remove unneeded header includes 2022-02-22 13:10:39 +01:00
rib replace zero-length arrays with flexible ones 2022-06-07 16:44:21 +02:00
ring lib: remove unneeded header includes 2022-02-22 13:10:39 +01:00
sched sched: fix floating point math 2022-06-22 11:11:48 +02:00
security security: fix SA lifetime comments 2022-04-28 09:26:48 +02:00
stack lib: remove unneeded header includes 2022-02-22 13:10:39 +01:00
table replace zero-length arrays with flexible ones 2022-06-07 16:44:21 +02:00
telemetry telemetry: add missing C++ guards 2022-02-22 14:47:49 +01:00
timer timer: remove unneeded header includes 2022-06-21 16:46:57 +02:00
vhost vhost/crypto: fix build with GCC 12 2022-06-21 11:20:58 +02:00
meson.build build: add definitions for use as Meson subproject 2022-06-07 20:49:20 +02:00