Commit 02597d39 authored by Alex Barba's avatar Alex Barba Committed by Jakub Kicinski

bnxt_en: fix potentially incorrect return value for ndo_rx_flow_steer

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: c0c050c5 ("bnxt_en: New Broadcom ethernet driver.")
Reported-by: default avatarAkshay Navgire <anavgire@purestorage.com>
Signed-off-by: default avatarAlex Barba <alex.barba@broadcom.com>
Signed-off-by: default avatarAndy Gospodarek <gospo@broadcom.com>
Signed-off-by: default avatarMichael Chan <michael.chan@broadcom.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 6d81ea37
......@@ -12903,8 +12903,8 @@ static int bnxt_rx_flow_steer(struct net_device *dev, const struct sk_buff *skb,
rcu_read_lock();
hlist_for_each_entry_rcu(fltr, head, hash) {
if (bnxt_fltr_match(fltr, new_fltr)) {
rc = fltr->sw_id;
rcu_read_unlock();
rc = 0;
goto err_free;
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment