lkml.org 
[lkml]   [2014]   [Mar]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: [PATCH net-next 07/12] r8152: support rx checksum
    From
    From: Hayes Wang <hayeswang@realtek.com>
    Date: Tue, 4 Mar 2014 20:00:59 +0800

    > @@ -1453,11 +1491,19 @@ static void rx_bottom(struct r8152 *tp)
    > pkt_len -= CRC_SIZE;
    > rx_data += sizeof(struct rx_desc);
    >
    > + checksum = r8152_rx_csum(tp, rx_desc);
    > + if (checksum == RTL_CHECKSUM_FAIL) {
    > + stats->rx_errors++;
    > + goto find_next_rx;
    > + }
    > +

    It is not for the driver to make this policy decision and drop the
    packet. It is not a device RX error event.

    In fact you do not know what corrupted the checksum, or even if
    the device verified it correctly. Anything is possible.

    You must therefore still pass the packet up into the networking
    stack using CHECKSUM_NONE, and let the protocols double-check
    the checksum(s) in software and bump the appropriate statistic
    counter if the checksum is really bad.

    This allows allows network taps to see the packet, so that the
    administrator can analyze the situation.


    \
     
     \ /
      Last update: 2014-03-05 00:42    [W:6.122 / U:1.048 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site