Message ID | 20221219122020.3778161-4-i.maximets@ovn.org |
---|---|
State | Superseded |
Headers | show |
Series | AF_XDP build fixes and enhancements. | expand |
Context | Check | Description |
---|---|---|
ovsrobot/apply-robot | success | apply and check: success |
ovsrobot/github-robot-_Build_and_Test | success | github build: passed |
ovsrobot/intel-ovs-compilation | success | test: success |
On 19 Dec 2022, at 13:20, Ilya Maximets wrote: > 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. > > Signed-off-by: Ilya Maximets <i.maximets@ovn.org> Looks good to me. Acked-by: Eelco Chaudron <echaudro@redhat.com>
diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh index 1f8896423..6d2b90ccf 100755 --- a/.ci/linux-build.sh +++ b/.ci/linux-build.sh @@ -247,10 +247,6 @@ elif [ "$M32" ]; then export CC="$CC -m32" elif [ "$TRAVIS_ARCH" != "aarch64" ]; then EXTRA_OPTS="$EXTRA_OPTS --enable-sparse" - if [ "$AFXDP" ]; then - # netdev-afxdp uses memset for 64M for umem initialization. - SPARSE_FLAGS="${SPARSE_FLAGS} -Wno-memcpy-max-count" - fi CFLAGS_FOR_OVS="${CFLAGS_FOR_OVS} ${SPARSE_FLAGS}" fi diff --git a/lib/netdev-afxdp.c b/lib/netdev-afxdp.c index 6ced8a2b6..cbb9046db 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);
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. Signed-off-by: Ilya Maximets <i.maximets@ovn.org> --- .ci/linux-build.sh | 4 ---- lib/netdev-afxdp.c | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-)