diff options
author | Ilya Maximets <i.maximets@ovn.org> | 2022-12-22 01:06:21 +0100 |
---|---|---|
committer | Ilya Maximets <i.maximets@ovn.org> | 2023-01-03 16:06:30 +0100 |
commit | b17cadff1d3d060eb8b19aac8787b894d2e1c89a (patch) | |
tree | 5d8f314972e75df07bc0f49eff4e35bbc5599bcf /lib | |
parent | 1dcc490d44879f33392337dfd9175645fcc4118e (diff) | |
download | openvswitch-b17cadff1d3d060eb8b19aac8787b894d2e1c89a.tar.gz |
netdev-afxdp: Hide too large memset from sparse.
Sparse complains about 64M umem initialization. Hide it from
the checker instead of disabling a warning globally.
SPARSE_FLAGS are kept in the CI script even though they are
empty at the moment.
Acked-by: Eelco Chaudron <echaudro@redhat.com>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/netdev-afxdp.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/netdev-afxdp.c b/lib/netdev-afxdp.c index f8995da1f..16f26bc30 100644 --- a/lib/netdev-afxdp.c +++ b/lib/netdev-afxdp.c @@ -434,7 +434,11 @@ xsk_configure(int ifindex, int xdp_queue_id, enum afxdp_mode mode, /* Umem memory region. */ bufs = xmalloc_pagealign(NUM_FRAMES * FRAME_SIZE); +#ifndef __CHECKER__ + /* Sparse complains about a very large memset, but it is OK in this case. + * So, hiding it from the checker. */ memset(bufs, 0, NUM_FRAMES * FRAME_SIZE); +#endif /* Create AF_XDP socket. */ umem = xsk_configure_umem(bufs, NUM_FRAMES * FRAME_SIZE); |