mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Laight <David.Laight@ACULAB.COM>
To: 'Sven Van Asbroeck' <thesven73@gmail.com>,
	Heiner Kallweit <hkallweit1@gmail.com>
Cc: George McCollister <george.mccollister@gmail.com>,
	Bryan Whitehead <bryan.whitehead@microchip.com>,
	David S Miller <davem@davemloft.net>,
	"Jakub Kicinski" <kuba@kernel.org>,
	Microchip Linux Driver Support <UNGLinuxDriver@microchip.com>,
	netdev <netdev@vger.kernel.org>,
	open list <linux-kernel@vger.kernel.org>
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	[thread overview]
Message-ID: <55ddacc3b51347ebb439c3f134344a21@AcuMS.aculab.com> (raw)
In-Reply-To: <CAGngYiXH8WsK347ekOZau+oLtKa4RFF8RCc5dAoSsKFvZAFbTw@mail.gmail.com>

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)

  parent reply	other threads:[~2021-04-09 17:24 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-08 17:23 Sven Van Asbroeck
2021-04-08 17:36 ` George McCollister
2021-04-08 17:45   ` Sven Van Asbroeck
2021-04-08 18:00     ` George McCollister
2021-04-08 18:22       ` Heiner Kallweit
2021-04-08 18:26         ` Sven Van Asbroeck
2021-04-08 18:35           ` Sven Van Asbroeck
2021-04-08 19:06             ` Heiner Kallweit
2021-04-08 22:27               ` Sven Van Asbroeck
2021-04-08 19:55             ` George McCollister
2021-04-08 22:24               ` Sven Van Asbroeck
2021-04-09 17:24             ` David Laight [this message]
2021-04-08 17:49 ` Heiner Kallweit
2021-04-08 17:56   ` Sven Van Asbroeck

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=55ddacc3b51347ebb439c3f134344a21@AcuMS.aculab.com \
    --to=david.laight@aculab.com \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=bryan.whitehead@microchip.com \
    --cc=davem@davemloft.net \
    --cc=george.mccollister@gmail.com \
    --cc=hkallweit1@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=thesven73@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®