]> www.infradead.org Git - users/jedix/linux-maple.git/commit
bnx2x: Correct ringparam estimate when DOWN
authorMintz, Yuval <Yuval.Mintz@cavium.com>
Sun, 4 Dec 2016 13:30:17 +0000 (15:30 +0200)
committerChuck Anderson <chuck.anderson@oracle.com>
Mon, 27 Feb 2017 02:03:31 +0000 (18:03 -0800)
commit1607b491764f9dbfd23e6ea891a2286988e19cbd
treef5dd4adb667fca37cc55799e03abc880a0f02f38
parent49613abd60f4fd77185d0dc8b2979ed2db31fb75
bnx2x: Correct ringparam estimate when DOWN

Orabug: 25477835

Until interface is up [and assuming ringparams weren't explicitly
configured] when queried for the size of its rings bnx2x would
claim they're the maximal size by default.
That is incorrect as by default the maximal number of buffers would
be equally divided between the various rx rings.

This prevents the user from actually setting the number of elements
on each rx ring to be of maximal size prior to transitioning the
interface into up state.

To fix this, make a rough estimation about the number of buffers.
It wouldn't always be accurate, but it would be much better than
current estimation and would allow users to increase number of
buffers during early initialization of the interface.

Reported-by: Seymour, Shane <shane.seymour@hpe.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 65870fa77fd7f83d7be4ed924d47ed9e3831f434)
Signed-off-by: Brian Maly <brian.maly@oracle.com>
drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c