Lines Matching refs:payload
84 struct ef4_loopback_payload payload; member
288 struct ef4_loopback_payload *payload; in ef4_loopback_rx_packet() local
296 payload = &state->payload; in ef4_loopback_rx_packet()
299 received->ip.saddr = payload->ip.saddr; in ef4_loopback_rx_packet()
301 received->ip.check = payload->ip.check; in ef4_loopback_rx_packet()
312 if (memcmp(&received->header, &payload->header, ETH_HLEN) != 0) { in ef4_loopback_rx_packet()
320 if (pkt_len != sizeof(*payload)) { in ef4_loopback_rx_packet()
323 "%s loopback test\n", pkt_len, (int)sizeof(*payload), in ef4_loopback_rx_packet()
329 if (memcmp(&received->ip, &payload->ip, sizeof(payload->ip)) != 0) { in ef4_loopback_rx_packet()
337 if (memcmp(&received->msg, &payload->msg, sizeof(received->msg)) != 0) { in ef4_loopback_rx_packet()
345 if (received->iteration != payload->iteration) { in ef4_loopback_rx_packet()
349 ntohs(payload->iteration), LOOPBACK_MODE(efx)); in ef4_loopback_rx_packet()
368 &state->payload, sizeof(state->payload), 0); in ef4_loopback_rx_packet()
379 struct ef4_loopback_payload *payload = &state->payload; in ef4_iterate_state() local
382 ether_addr_copy((u8 *)&payload->header.h_dest, net_dev->dev_addr); in ef4_iterate_state()
383 ether_addr_copy((u8 *)&payload->header.h_source, payload_source); in ef4_iterate_state()
384 payload->header.h_proto = htons(ETH_P_IP); in ef4_iterate_state()
387 payload->ip.daddr = htonl(INADDR_LOOPBACK); in ef4_iterate_state()
388 payload->ip.ihl = 5; in ef4_iterate_state()
389 payload->ip.check = (__force __sum16) htons(0xdead); in ef4_iterate_state()
390 payload->ip.tot_len = htons(sizeof(*payload) - sizeof(struct ethhdr)); in ef4_iterate_state()
391 payload->ip.version = IPVERSION; in ef4_iterate_state()
392 payload->ip.protocol = IPPROTO_UDP; in ef4_iterate_state()
395 payload->udp.source = 0; in ef4_iterate_state()
396 payload->udp.len = htons(sizeof(*payload) - sizeof(struct ethhdr) - in ef4_iterate_state()
398 payload->udp.check = 0; /* checksum ignored */ in ef4_iterate_state()
401 payload->iteration = htons(ntohs(payload->iteration) + 1); in ef4_iterate_state()
402 memcpy(&payload->msg, payload_msg, sizeof(payload_msg)); in ef4_iterate_state()
414 struct ef4_loopback_payload *payload; in ef4_begin_loopback() local
423 skb = alloc_skb(sizeof(state->payload), GFP_KERNEL); in ef4_begin_loopback()
431 payload = skb_put(skb, sizeof(state->payload)); in ef4_begin_loopback()
432 memcpy(payload, &state->payload, sizeof(state->payload)); in ef4_begin_loopback()
433 payload->ip.saddr = htonl(INADDR_LOOPBACK | (i << 2)); in ef4_begin_loopback()