Hi Dave,
Two unrelated fixes for bnx2x - the first one is nice-to-have,
while the other fixes fatal behaviour in older adapters.
Please consider applying them to `net'.
Thanks,
Yuval
Yuval Mintz (2):
bnx2x: Correct ringparam estimate when interface is down
bnx2x: Prevent tunnel configuration for 577xx adapters.
drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c | 8 ++++++++
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 4 ++--
2 files changed, 10 insertions(+), 2 deletions(-)
--
1.9.3
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 <redacted>
Signed-off-by: Yuval Mintz <redacted>
---
drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c | 8 ++++++++
1 file changed, 8 insertions(+)
@@ -1872,8 +1872,16 @@ static void bnx2x_get_ringparam(struct net_device *dev,ering->rx_max_pending=MAX_RX_AVAIL;+/* If size isn't already set, we give an estimation of the number+*ofbufferswe'llhave.We'reneglectingsomepossibleconditions+*[wecouldn'tknowforcertainatthispointifnumberofqueues+*mightshrink]butthenumberwouldbecorrectforthelikely+*scenario.+*/if(bp->rx_ring_size)ering->rx_pending=bp->rx_ring_size;+elseif(BNX2X_NUM_RX_QUEUES(bp))+ering->rx_pending=MAX_RX_AVAIL/BNX2X_NUM_RX_QUEUES(bp);elseering->rx_pending=MAX_RX_AVAIL;
Only the 578xx adapters are capable of configuring UDP ports for
the purpose of tunnelling - doing the same on 577xx might lead to
a firmware assertion.
We're already not claiming support for any related feature for such
devices, but we also need to prevent the configuration of the UDP
ports to the device in this case.
Fixes: f34fa14cc033 ("bnx2x: Add vxlan RSS support")
Reported-by: Anikina Anna <redacted>
Signed-off-by: Yuval Mintz <redacted>
---
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Two unrelated fixes for bnx2x - the first one is nice-to-have,
while the other fixes fatal behaviour in older adapters.
Please consider applying them to `net'.