- msg_size = sizeof *header + packet->size;
- msg = ofpbuf_new_with_headroom(msg_size, DPIF_RECV_MSG_PADDING);
- header = ofpbuf_put_uninit(msg, sizeof *header);
- header->type = queue_no;
- header->length = msg_size;
- header->port = port_no;
- header->arg = arg;
- ofpbuf_put(msg, packet->data, packet->size);
- queue_push_tail(q, msg);
-
- return 0;
-}
-
-/* Returns true if 'packet' is an invalid Ethernet+IPv4 ARP packet: one with
- * screwy or truncated header fields or one whose inner and outer Ethernet
- * address differ. */
-static bool
-dp_netdev_is_spoofed_arp(struct ofpbuf *packet, const struct flow *key)
-{
- struct arp_eth_header *arp;
- struct eth_header *eth;
- ptrdiff_t l3_size;
+ buf = ofpbuf_new(ODPUTIL_FLOW_KEY_BYTES + 2 + packet->size);
+ odp_flow_key_from_flow(buf, flow);
+ key_len = buf->size;
+ ofpbuf_pull(buf, key_len);
+ ofpbuf_reserve(buf, 2);
+ ofpbuf_put(buf, packet->data, packet->size);