From: Ben Greear <greearb@candelatech.com>
To: "Michał Mirosław" <mirqus@gmail.com>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH v3 02/16] e100: Support RXFCS feature flag.
Date: Sat, 11 Feb 2012 08:21:48 -0800 [thread overview]
Message-ID: <4F36959C.50902@candelatech.com> (raw)
In-Reply-To: <CAHXqBFJHoFd5W+YRn9bVg6RsqjFsTdaEM-MMdQjSwVVSckwS=A@mail.gmail.com>
On 02/11/2012 08:07 AM, Michał Mirosław wrote:
> 2012/2/11<greearb@candelatech.com>:
>> From: Ben Greear<greearb@candelatech.com>
> [...]
>> @@ -1951,9 +1956,11 @@ static int e100_rx_indicate(struct nic *nic, struct rx *rx,
>> }
>>
>> /* Get actual data size */
>> + if (unlikely(dev->features& NETIF_F_RXFCS))
>> + fcs_pad = 4;
>> actual_size = le16_to_cpu(rfd->actual_size)& 0x3FFF;
>> - if (unlikely(actual_size> RFD_BUF_LEN - sizeof(struct rfd)))
>> - actual_size = RFD_BUF_LEN - sizeof(struct rfd);
>> + if (unlikely(actual_size> RFD_BUF_LEN + fcs_pad - sizeof(struct rfd)))
>> + actual_size = RFD_BUF_LEN + fcs_pad - sizeof(struct rfd);
>
> BTW, Is this even triggered? I looks like this would indicate
> corruption in the descriptor.
No idea, but better safe than sorry unless someone can prove it never happens
in all cases...
Ben
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
next prev parent reply other threads:[~2012-02-11 16:21 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-11 1:04 [PATCH v3 00/16] Low-level Ethernet debugging features greearb
2012-02-11 1:04 ` [PATCH v3 01/16] net: Support RXFCS feature flag greearb
2012-02-11 1:04 ` [PATCH v3 02/16] e100: " greearb
2012-02-11 16:07 ` Michał Mirosław
2012-02-11 16:21 ` Ben Greear [this message]
2012-02-11 17:07 ` Eric Dumazet
2012-02-13 17:19 ` Ben Greear
2012-02-11 1:04 ` [PATCH v3 03/16] e1000e: " greearb
2012-02-11 1:04 ` [PATCH v3 04/16] net: Add framework to allow sending packets with customized CRC greearb
2012-02-11 1:04 ` [PATCH v3 05/16] e100: Support sending custom Ethernet CRC greearb
2012-02-11 1:04 ` [PATCH v3 06/16] e1000e: " greearb
2012-02-11 1:04 ` [PATCH v3 07/16] net: Support RX-ALL feature flag greearb
2012-02-11 1:04 ` [PATCH v3 08/16] e1000e: Support RXALL " greearb
2012-02-11 1:04 ` [PATCH v3 09/16] e100: " greearb
2012-02-11 1:04 ` [PATCH v3 10/16] e1000: Support sending custom Ethernet CRC greearb
2012-02-11 1:04 ` [PATCH v3 11/16] e1000: Support RX-ALL flag greearb
2012-02-11 1:04 ` [PATCH v3 12/16] e1000: Support RX-FCS flag greearb
2012-02-11 1:04 ` [PATCH v3 13/16] 8139too: Support RX-ALL logic greearb
2012-02-11 1:04 ` [PATCH v3 14/16] 8139too: Support RX-FCS flag greearb
2012-02-11 1:04 ` [PATCH v3 15/16] r8169: Support RX-ALL flag greearb
2012-02-11 1:04 ` [PATCH v3 16/16] r8169: Support RX-FCS flag greearb
2012-02-11 7:56 ` [PATCH v3 00/16] Low-level Ethernet debugging features Jeff Kirsher
2012-02-11 10:51 ` Francois Romieu
2012-02-11 16:20 ` Ben Greear
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F36959C.50902@candelatech.com \
--to=greearb@candelatech.com \
--cc=mirqus@gmail.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.