On Tue, Feb 23, 2021 at 10:35:07AM +0000, Ciara Loftus wrote: > This commit introduces a range of tests to the xsk testsuite > for validating xsk statistics. > > A new test type called 'stats' is added. Within it there are > four sub-tests. Each test configures a scenario which should > trigger the given error statistic. The test passes if the statistic > is successfully incremented. > > The four statistics for which tests have been created are: > 1. rx dropped > Increase the UMEM frame headroom to a value which results in > insufficient space in the rx buffer for both the packet and the headroom. > 2. tx invalid > Set the 'len' field of tx descriptors to an invalid value (umem frame > size + 1). > 3. rx ring full > Reduce the size of the RX ring to a fraction of the fill ring size. > 4. fill queue empty > Do not populate the fill queue and then try to receive pkts. Thanks for adding descriptions! Reviewed-by: Maciej Fijalkowski <maciej.fijalkowski@xxxxxxxxx> > > Signed-off-by: Ciara Loftus <ciara.loftus@xxxxxxxxx> > --- > tools/testing/selftests/bpf/xdpxceiver.c | 137 ++++++++++++++++++++--- > tools/testing/selftests/bpf/xdpxceiver.h | 13 +++ > 2 files changed, 136 insertions(+), 14 deletions(-) >