Messages in this thread | | | From | David Laight <> | Subject | RE: [PATCH net v1] Revert "lan743x: trim all 4 bytes of the FCS; not just 2" | Date | Fri, 9 Apr 2021 17:24:14 +0000 |
| |
From: Sven Van Asbroeck > Sent: 08 April 2021 19:35 ... > - buffer_length = netdev->mtu + ETH_HLEN + 4 + RX_HEAD_PADDING; > + buffer_length = netdev->mtu + ETH_HLEN + ETH_FCS_LEN + RX_HEAD_PADDING;
I'd try to write the lengths in the order they happen, so: buffer_length = RX_HEAD_PADDING + ETH_HLEN + netdev->mtu + ETH_FCS_LEN;
The compiler should add all the constants together, so the generated code ought to be the same.
David
- Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)
| |