When the switch sends an ofp_packet_in message to the controller containing a truncated packet (because the controller set the max_len field in ofp_action_output; see #224), the total_len field contains the truncated length of the packet, not the total length.
This can be reproduced using the port_1_to_controller_12_bytes scenario in of_controller_v4.