aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/bpf/xdpxceiver.c
diff options
context:
space:
mode:
authorBjörn Töpel <bjorn.topel@intel.com>2021-01-22 16:47:16 +0100
committerDaniel Borkmann <daniel@iogearbox.net>2021-01-26 00:05:01 +0100
commita86072838b67a3cdbb2ee2abc6c0ab3fb0d60be5 (patch)
treec46606c3c393d497ccfb756b8c5776b50a33424d /tools/testing/selftests/bpf/xdpxceiver.c
parent449f0874fd4ee36c1eb0664432796ddb912936fa (diff)
downloadkernel_replicant_linux-a86072838b67a3cdbb2ee2abc6c0ab3fb0d60be5.tar.gz
kernel_replicant_linux-a86072838b67a3cdbb2ee2abc6c0ab3fb0d60be5.tar.bz2
kernel_replicant_linux-a86072838b67a3cdbb2ee2abc6c0ab3fb0d60be5.zip
selftests/bpf: Fix style warnings
Silence three checkpatch style warnings. Signed-off-by: Björn Töpel <bjorn.topel@intel.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Link: https://lore.kernel.org/bpf/20210122154725.22140-4-bjorn.topel@gmail.com
Diffstat (limited to 'tools/testing/selftests/bpf/xdpxceiver.c')
-rw-r--r--tools/testing/selftests/bpf/xdpxceiver.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/tools/testing/selftests/bpf/xdpxceiver.c b/tools/testing/selftests/bpf/xdpxceiver.c
index cd1dd2b7458f..77d1bda37afa 100644
--- a/tools/testing/selftests/bpf/xdpxceiver.c
+++ b/tools/testing/selftests/bpf/xdpxceiver.c
@@ -734,10 +734,10 @@ static void worker_pkt_validate(void)
break;
/*do not increment pktcounter if !(tos=0x9 and ipv4) */
if ((((struct iphdr *)(pkt_node_rx_q->pkt_frame +
- sizeof(struct ethhdr)))->version == IP_PKT_VER)
- && (((struct iphdr *)(pkt_node_rx_q->pkt_frame + sizeof(struct ethhdr)))->tos ==
+ sizeof(struct ethhdr)))->version == IP_PKT_VER) &&
+ (((struct iphdr *)(pkt_node_rx_q->pkt_frame + sizeof(struct ethhdr)))->tos ==
IP_PKT_TOS)) {
- payloadseqnum = *((uint32_t *) (pkt_node_rx_q->pkt_frame + PKT_HDR_SIZE));
+ payloadseqnum = *((uint32_t *)(pkt_node_rx_q->pkt_frame + PKT_HDR_SIZE));
if (debug_pkt_dump && payloadseqnum != EOT) {
pkt_obj = (struct pkt_frame *)malloc(sizeof(struct pkt_frame));
pkt_obj->payload = (char *)malloc(PKT_SIZE);
@@ -767,10 +767,10 @@ static void worker_pkt_validate(void)
} else {
ksft_print_msg("Invalid frame received: ");
ksft_print_msg("[IP_PKT_VER: %02X], [IP_PKT_TOS: %02X]\n",
- ((struct iphdr *)(pkt_node_rx_q->pkt_frame +
- sizeof(struct ethhdr)))->version,
- ((struct iphdr *)(pkt_node_rx_q->pkt_frame +
- sizeof(struct ethhdr)))->tos);
+ ((struct iphdr *)(pkt_node_rx_q->pkt_frame +
+ sizeof(struct ethhdr)))->version,
+ ((struct iphdr *)(pkt_node_rx_q->pkt_frame +
+ sizeof(struct ethhdr)))->tos);
TAILQ_REMOVE(&head, pkt_node_rx_q, pkt_nodes);
free(pkt_node_rx_q->pkt_frame);
free(pkt_node_rx_q);