From: David Miller <davem@davemloft.net>
To: linyunsheng@huawei.com
Cc: huangdaode@hisilicon.com, xuwei5@hisilicon.com,
liguozhu@hisilicon.com, Yisen.Zhuang@huawei.com,
john.garry@huawei.com, linuxarm@huawei.com,
salil.mehta@huawei.com, lipeng321@huawei.com,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net] net: hns3: fix for not calculating tx bd num correctly
Date: Thu, 21 Mar 2019 13:59:55 -0700 (PDT) [thread overview]
Message-ID: <20190321.135955.1938105690350887430.davem@davemloft.net> (raw)
In-Reply-To: <1553138923-122549-1-git-send-email-linyunsheng@huawei.com>
From: l00371289 <linyunsheng@huawei.com>
Date: Thu, 21 Mar 2019 11:28:43 +0800
> From: Yunsheng Lin <linyunsheng@huawei.com>
>
> When there is only one byte in a frag, the current calculation
> using "(size + HNS3_MAX_BD_SIZE - 1) >> HNS3_MAX_BD_SIZE_OFFSET"
> will return zero, because HNS3_MAX_BD_SIZE is 65535 and
> HNS3_MAX_BD_SIZE_OFFSET is 16. So it will cause tx error when
> a frag's size is one byte.
>
> This patch fixes it by using DIV_ROUND_UP.
>
> Fixes: 3fe13ed95dd3 ("net: hns3: avoid mult + div op in critical data path")
> Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
Applied.
prev parent reply other threads:[~2019-03-21 21:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-21 3:28 [PATCH net] net: hns3: fix for not calculating tx bd num correctly l00371289
2019-03-21 20:59 ` David Miller [this message]
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=20190321.135955.1938105690350887430.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=Yisen.Zhuang@huawei.com \
--cc=huangdaode@hisilicon.com \
--cc=john.garry@huawei.com \
--cc=liguozhu@hisilicon.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=linyunsheng@huawei.com \
--cc=lipeng321@huawei.com \
--cc=netdev@vger.kernel.org \
--cc=salil.mehta@huawei.com \
--cc=xuwei5@hisilicon.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;
as well as URLs for NNTP newsgroup(s).