bnxt_en: fix potentially incorrect return value for ndo_rx_flow_steer
authorAlex Barba <alex.barba@broadcom.com>
Thu, 3 Nov 2022 23:33:27 +0000 (19:33 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 25 Nov 2022 16:35:35 +0000 (17:35 +0100)
commit5a067a8edf726f299e44b37eb7c39055a9a55b07
treec1634503cacc81e2f47d5505aafc39e76ea7cf51
parent5876b7f249a1ecbbcc8e35072c3828d6526d1c3a
bnxt_en: fix potentially incorrect return value for ndo_rx_flow_steer

[ Upstream commit 02597d39145bb0aa81d04bf39b6a913ce9a9d465 ]

In the bnxt_en driver ndo_rx_flow_steer returns '0' whenever an entry
that we are attempting to steer is already found.  This is not the
correct behavior.  The return code should be the value/index that
corresponds to the entry.  Returning zero all the time causes the
RFS records to be incorrect unless entry '0' is the correct one.  As
flows migrate to different cores this can create entries that are not
correct.

Fixes: c0c050c58d84 ("bnxt_en: New Broadcom ethernet driver.")
Reported-by: Akshay Navgire <anavgire@purestorage.com>
Signed-off-by: Alex Barba <alex.barba@broadcom.com>
Signed-off-by: Andy Gospodarek <gospo@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/broadcom/bnxt/bnxt.c