Blame SOURCES/0037-netdrv-bnxt_en-Use-correct-src_fid-to-determine-dire.patch

f95c89
From c6fc223ec3d9a83bd206c14fa5ad064cee76f21a Mon Sep 17 00:00:00 2001
f95c89
From: Jonathan Toppins <jtoppins@redhat.com>
f95c89
Date: Wed, 2 Oct 2019 18:22:52 -0400
f95c89
Subject: [PATCH 37/96] [netdrv] bnxt_en: Use correct src_fid to determine
f95c89
 direction of the flow
f95c89
f95c89
Message-id: <5d51854166a66f196a410e05a77ee9b68a95e4df.1570027456.git.jtoppins@redhat.com>
f95c89
Patchwork-id: 276456
f95c89
O-Subject: [RHEL-8.2 PATCH 30/78] bnxt_en: Use correct src_fid to determine direction of the flow
f95c89
Bugzilla: 1724766
f95c89
RH-Acked-by: John Linville <linville@redhat.com>
f95c89
RH-Acked-by: Jarod Wilson <jarod@redhat.com>
f95c89
f95c89
Direction of the flow is determined using src_fid. For an RX flow,
f95c89
src_fid is PF's fid and for TX flow, src_fid is VF's fid. Direction
f95c89
of the flow must be specified, when getting statistics for that flow.
f95c89
Currently, for DECAP flow, direction is determined incorrectly, i.e.,
f95c89
direction is initialized as TX for DECAP flow, instead of RX. Because
f95c89
of which, stats are not reported for this DECAP flow, though it is
f95c89
offloaded and there is traffic for that flow, resulting in flow age out.
f95c89
f95c89
This patch fixes the problem by determining the DECAP flow's direction
f95c89
using correct fid.  Set the flow direction in all cases for consistency
f95c89
even if 64-bit flow handle is not used.
f95c89
f95c89
Fixes: abd43a13525d ("bnxt_en: Support for 64-bit flow handle.")
f95c89
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@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 685ec6a81bb0d47faf1dba49437d5bdaede2733d)
f95c89
Bugzilla: 1724766
f95c89
Build Info: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=23809532
f95c89
Tested: build, boot, basic ping
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 | 4 +---
f95c89
 1 file changed, 1 insertion(+), 3 deletions(-)
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:12.415543397 +0100
f95c89
+++ src/drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c	2020-02-06 16:23:15.352516438 +0100
f95c89
@@ -1285,9 +1285,7 @@
f95c89
 		goto free_node;
f95c89
 
f95c89
 	bnxt_tc_set_src_fid(bp, flow, src_fid);
f95c89
-
f95c89
-	if (bp->fw_cap & BNXT_FW_CAP_OVS_64BIT_HANDLE)
f95c89
-		bnxt_tc_set_flow_dir(bp, flow, src_fid);
f95c89
+	bnxt_tc_set_flow_dir(bp, flow, flow->src_fid);
f95c89
 
f95c89
 	if (!bnxt_tc_can_offload(bp, flow)) {
f95c89
 		rc = -EOPNOTSUPP;