Blame SOURCES/0093-netdrv-bnxt-Avoid-logging-an-unnecessary-message-whe.patch

f95c89
From fd58eda8d85adfa7b537e19b4407155cd014f76b Mon Sep 17 00:00:00 2001
f95c89
From: Jonathan Toppins <jtoppins@redhat.com>
f95c89
Date: Fri, 6 Dec 2019 20:12:49 -0500
f95c89
Subject: [PATCH 93/96] [netdrv] bnxt: Avoid logging an unnecessary message
f95c89
 when a flow can't be offloaded
f95c89
f95c89
Message-id: <f09a970352f5c52cefbca0156ac1174b441b1353.1575651772.git.jtoppins@redhat.com>
f95c89
Patchwork-id: 291381
f95c89
O-Subject: [PATCH rhel8 09/13] bnxt: Avoid logging an unnecessary message when a flow can't be offloaded
f95c89
Bugzilla: 1773724
f95c89
RH-Acked-by: Steve Best <sbest@redhat.com>
f95c89
RH-Acked-by: David Arcari <darcari@redhat.com>
f95c89
RH-Acked-by: Jarod Wilson <jarod@redhat.com>
f95c89
RH-Acked-by: John Linville <linville@redhat.com>
f95c89
f95c89
For every single case where bnxt_tc_can_offload() can fail, we are
f95c89
logging a user friendly descriptive message anyway, but because of the
f95c89
path it would take in case of failure, another redundant error message
f95c89
would get logged. Just freeing the node and returning from the point of
f95c89
failure should suffice.
f95c89
f95c89
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
f95c89
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
f95c89
Signed-off-by: David S. Miller <davem@davemloft.net>
f95c89
(cherry picked from commit 08f8280e8788202a67a359952cd436707f8789bd)
f95c89
Bugzilla: 1773724
f95c89
Build Info: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=25154853
f95c89
Tested: simple boot test
f95c89
Signed-off-by: Jonathan Toppins <jtoppins@redhat.com>
f95c89
Signed-off-by: Bruno Meneguele <bmeneg@redhat.com>
f95c89
---
f95c89
 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c | 3 ++-
f95c89
 1 file changed, 2 insertions(+), 1 deletion(-)
f95c89
f95c89
Index: src/drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c
f95c89
===================================================================
f95c89
--- src.orig/drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c	2020-02-06 16:23:18.307489314 +0100
f95c89
+++ src/drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c	2020-02-06 16:23:22.853447585 +0100
f95c89
@@ -1274,7 +1274,8 @@
f95c89
 
f95c89
 	if (!bnxt_tc_can_offload(bp, flow)) {
f95c89
 		rc = -EOPNOTSUPP;
f95c89
-		goto free_node;
f95c89
+		kfree_rcu(new_node, rcu);
f95c89
+		return rc;
f95c89
 	}
f95c89
 
f95c89
 	/* If a flow exists with the same cookie, delete it */