Lines Matching refs:payload
89 struct ef4_loopback_payload payload; member
293 struct ef4_loopback_payload *payload; in ef4_loopback_rx_packet() local
301 payload = &state->payload; in ef4_loopback_rx_packet()
305 received.ip.saddr = payload->ip.saddr; in ef4_loopback_rx_packet()
307 received.ip.check = payload->ip.check; in ef4_loopback_rx_packet()
318 if (memcmp(&received.header, &payload->header, ETH_HLEN) != 0) { in ef4_loopback_rx_packet()
335 if (memcmp(&received.ip, &payload->ip, sizeof(payload->ip)) != 0) { in ef4_loopback_rx_packet()
343 if (memcmp(&received.msg, &payload->msg, sizeof(received.msg)) != 0) { in ef4_loopback_rx_packet()
351 if (received.iteration != payload->iteration) { in ef4_loopback_rx_packet()
355 ntohs(payload->iteration), LOOPBACK_MODE(efx)); in ef4_loopback_rx_packet()
374 &state->payload.packet, EF4_LOOPBACK_PAYLOAD_LEN, in ef4_loopback_rx_packet()
386 struct ef4_loopback_payload *payload = &state->payload; in ef4_iterate_state() local
389 ether_addr_copy((u8 *)&payload->header.h_dest, net_dev->dev_addr); in ef4_iterate_state()
390 ether_addr_copy((u8 *)&payload->header.h_source, payload_source); in ef4_iterate_state()
391 payload->header.h_proto = htons(ETH_P_IP); in ef4_iterate_state()
394 payload->ip.daddr = htonl(INADDR_LOOPBACK); in ef4_iterate_state()
395 payload->ip.ihl = 5; in ef4_iterate_state()
396 payload->ip.check = (__force __sum16) htons(0xdead); in ef4_iterate_state()
397 payload->ip.tot_len = htons(sizeof(*payload) - in ef4_iterate_state()
399 payload->ip.version = IPVERSION; in ef4_iterate_state()
400 payload->ip.protocol = IPPROTO_UDP; in ef4_iterate_state()
403 payload->udp.source = 0; in ef4_iterate_state()
404 payload->udp.len = htons(sizeof(*payload) - in ef4_iterate_state()
406 payload->udp.check = 0; /* checksum ignored */ in ef4_iterate_state()
409 payload->iteration = htons(ntohs(payload->iteration) + 1); in ef4_iterate_state()
410 memcpy(&payload->msg, payload_msg, sizeof(payload_msg)); in ef4_iterate_state()
422 struct ef4_loopback_payload *payload; in ef4_begin_loopback() local
431 skb = alloc_skb(sizeof(state->payload), GFP_KERNEL); in ef4_begin_loopback()
439 payload = skb_put(skb, sizeof(state->payload)); in ef4_begin_loopback()
440 memcpy(payload, &state->payload, sizeof(state->payload)); in ef4_begin_loopback()
441 payload->ip.saddr = htonl(INADDR_LOOPBACK | (i << 2)); in ef4_begin_loopback()