Lines Matching refs:payload
91 struct efx_loopback_payload payload; member
290 struct efx_loopback_payload *payload; in efx_loopback_rx_packet() local
298 payload = &state->payload; in efx_loopback_rx_packet()
302 received.ip.saddr = payload->ip.saddr; in efx_loopback_rx_packet()
304 received.ip.check = payload->ip.check; in efx_loopback_rx_packet()
315 if (memcmp(&received.header, &payload->header, ETH_HLEN) != 0) { in efx_loopback_rx_packet()
332 if (memcmp(&received.ip, &payload->ip, sizeof(payload->ip)) != 0) { in efx_loopback_rx_packet()
340 if (memcmp(&received.msg, &payload->msg, sizeof(received.msg)) != 0) { in efx_loopback_rx_packet()
348 if (received.iteration != payload->iteration) { in efx_loopback_rx_packet()
352 ntohs(payload->iteration), LOOPBACK_MODE(efx)); in efx_loopback_rx_packet()
371 &state->payload.packet, EFX_LOOPBACK_PAYLOAD_LEN, in efx_loopback_rx_packet()
383 struct efx_loopback_payload *payload = &state->payload; in efx_iterate_state() local
386 ether_addr_copy((u8 *)&payload->header.h_dest, net_dev->dev_addr); in efx_iterate_state()
387 ether_addr_copy((u8 *)&payload->header.h_source, payload_source); in efx_iterate_state()
388 payload->header.h_proto = htons(ETH_P_IP); in efx_iterate_state()
391 payload->ip.daddr = htonl(INADDR_LOOPBACK); in efx_iterate_state()
392 payload->ip.ihl = 5; in efx_iterate_state()
393 payload->ip.check = (__force __sum16) htons(0xdead); in efx_iterate_state()
394 payload->ip.tot_len = htons(sizeof(*payload) - in efx_iterate_state()
396 payload->ip.version = IPVERSION; in efx_iterate_state()
397 payload->ip.protocol = IPPROTO_UDP; in efx_iterate_state()
400 payload->udp.source = 0; in efx_iterate_state()
401 payload->udp.len = htons(sizeof(*payload) - in efx_iterate_state()
403 payload->udp.check = 0; /* checksum ignored */ in efx_iterate_state()
406 payload->iteration = htons(ntohs(payload->iteration) + 1); in efx_iterate_state()
407 memcpy(&payload->msg, payload_msg, sizeof(payload_msg)); in efx_iterate_state()
419 struct efx_loopback_payload *payload; in efx_begin_loopback() local
428 skb = alloc_skb(sizeof(state->payload), GFP_KERNEL); in efx_begin_loopback()
436 payload = skb_put(skb, sizeof(state->payload)); in efx_begin_loopback()
437 memcpy(payload, &state->payload, sizeof(state->payload)); in efx_begin_loopback()
438 payload->ip.saddr = htonl(INADDR_LOOPBACK | (i << 2)); in efx_begin_loopback()