selftests: xsk: Remove unused function
authorMaciej Fijalkowski <maciej.fijalkowski@intel.com>
Mon, 29 Mar 2021 22:43:02 +0000 (00:43 +0200)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 30 Mar 2021 16:24:38 +0000 (09:24 -0700)
Probably it was ported from xdpsock but is not used anywhere.

Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20210329224316.17793-4-maciej.fijalkowski@intel.com
tools/testing/selftests/bpf/xdpxceiver.c

index e2ff3cd48ccf03701a2d5a5455168c3e3f02f723..593e8be41fcecdef57925889c807b2870ea929c5 100644 (file)
@@ -153,19 +153,6 @@ static void *memset32_htonl(void *dest, u32 val, u32 size)
        return dest;
 }
 
-/*
- * This function code has been taken from
- * Linux kernel lib/checksum.c
- */
-static inline unsigned short from32to16(unsigned int x)
-{
-       /* add up 16-bit and 16-bit for 16+c bit */
-       x = (x & 0xffff) + (x >> 16);
-       /* add up carry.. */
-       x = (x & 0xffff) + (x >> 16);
-       return x;
-}
-
 /*
  * Fold a partial checksum
  * This function code has been taken from