Thanks Michael,

On Tue, 02 Dec 2014 23:56:32 -0500 Michael Altizer <[email protected]> wrote:
> I didn't get around to reporting it, but I did run into that same crash 
> when I did not disable GRO (Generic Receive Offload) on the interfaces 
> being used with linux-generic (e.g., ethtool -K eth1 gro off) .

I couldn't manage to work-around it by disabling GRO.

>  I had this patch sitting in my tree, but I don't know 
> whether the desired behavior would be to drop those frames or truncate them:
> 
> diff --git a/platform/linux-generic/odp_packet_socket.c 
> b/platform/linux-generic/odp_packet_socket.c
> index 68983eb..c17aff9 100644
> --- a/platform/linux-generic/odp_packet_socket.c
> +++ b/platform/linux-generic/odp_packet_socket.c
> @@ -606,6 +606,13 @@ static inline unsigned pkt_mmap_v2_rx(int sock, 
> struct ring *ring,
>                          if (odp_unlikely(pkt_table[i] == 
> ODP_PACKET_INVALID))
>                                  break;
> 
> +                       if (odp_unlikely(pkt_len + frame_offset > 
> odp_buffer_size(pkt_table[i])))
> +                       {
> +                               printf("Truncating %u-byte packet to fit 
> into a %zu-byte buffer (frame offset = %zu)\n",
> +                                               pkt_len, 
> odp_buffer_size(pkt_table[i]), frame_offset);
> +                               pkt_len = odp_buffer_size(pkt_table[i]) 
> - frame_offset;
> +                       }

This needs to be addressed more systematically.
I think truncation is out of the question, and dropping might also lead
to undesirable outcome.

_______________________________________________
lng-odp mailing list
[email protected]
http://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to