From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: "Jacob Keller" <jacob.e.keller@intel.com>,
"Mitch Williams" <mitch.a.williams@intel.com>,
"Alexander Duyck" <alexander.h.duyck@intel.com>,
"Amritha Nambiar" <amritha.nambiar@intel.com>,
"Filip Sadowski" <filip.sadowski@intel.com>,
"David S. Miller" <davem@davemloft.net>,
"Björn Töpel" <bjorn.topel@intel.com>,
intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH, net-next] i40e: avoid 64-bit division where possible
Date: Tue, 17 Oct 2017 08:14:54 -0700 [thread overview]
Message-ID: <1508253294.2928.2.camel@intel.com> (raw)
In-Reply-To: <20171017102351.492492-1-arnd@arndb.de>
[-- Attachment #1: Type: text/plain, Size: 1208 bytes --]
On Tue, 2017-10-17 at 12:23 +0200, Arnd Bergmann wrote:
> The new bandwidth calculation causes a link error on 32-bit
> architectures, like
>
> ERROR: "__aeabi_uldivmod" [drivers/net/ethernet/intel/i40e/i40e.ko]
> undefined!
>
> The problem is the max_tx_rate calculation that uses 64-bit integers.
> This is not really necessary since the numbers are in MBit/s so
> they won't be higher than 40000 for the highest support rate, and
> are guaranteed to not exceed 2^32 in future generations either.
>
> This changes the representation to 'u32' when dealing with MBit/s
> and uses div_u64() to convert from u64 numbers in byte/s.
>
> Fixes: 2027d4deacb1 ("i40e: Add support setting TC max bandwidth
> rates")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> drivers/net/ethernet/intel/i40e/i40e.h | 4 ++--
> drivers/net/ethernet/intel/i40e/i40e_main.c | 27 ++++++++++++++-----
> --------
> 2 files changed, 16 insertions(+), 15 deletions(-)
Unfortunately your patch does not apply cleanly to my tree. Arnd,
could you please rebase your patch based my next-queue tree (dev-queue
branch)? I already have several i40e patches queued up and applied to
that branch.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2017-10-17 15:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-17 10:23 [PATCH, net-next] i40e: avoid 64-bit division where possible Arnd Bergmann
2017-10-17 15:14 ` Jeff Kirsher [this message]
2017-10-17 15:46 ` Arnd Bergmann
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=1508253294.2928.2.camel@intel.com \
--to=jeffrey.t.kirsher@intel.com \
--cc=alexander.h.duyck@intel.com \
--cc=amritha.nambiar@intel.com \
--cc=arnd@arndb.de \
--cc=bjorn.topel@intel.com \
--cc=davem@davemloft.net \
--cc=filip.sadowski@intel.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=jacob.e.keller@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mitch.a.williams@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox