summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVenkat Duvvuru <venkatkumar.duvvuru@broadcom.com>2019-08-17 17:04:51 -0400
committerSasha Levin <sashal@kernel.org>2019-08-25 10:10:37 -0400
commit58516d32c2871e277ceaaa0ab1dec5c56f29034d (patch)
treeae95102658f78cf6e90333e5cd975d17f999e639
parent45ad3556e9edcc9ee505ca8544dad7480736a713 (diff)
downloadlinux-stable-58516d32c2871e277ceaaa0ab1dec5c56f29034d.tar.gz
linux-stable-58516d32c2871e277ceaaa0ab1dec5c56f29034d.tar.bz2
linux-stable-58516d32c2871e277ceaaa0ab1dec5c56f29034d.zip
bnxt_en: Use correct src_fid to determine direction of the flow
[ Upstream commit 685ec6a81bb0d47faf1dba49437d5bdaede2733d ] Direction of the flow is determined using src_fid. For an RX flow, src_fid is PF's fid and for TX flow, src_fid is VF's fid. Direction of the flow must be specified, when getting statistics for that flow. Currently, for DECAP flow, direction is determined incorrectly, i.e., direction is initialized as TX for DECAP flow, instead of RX. Because of which, stats are not reported for this DECAP flow, though it is offloaded and there is traffic for that flow, resulting in flow age out. This patch fixes the problem by determining the DECAP flow's direction using correct fid. Set the flow direction in all cases for consistency even if 64-bit flow handle is not used. Fixes: abd43a13525d ("bnxt_en: Support for 64-bit flow handle.") Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com> Signed-off-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c
index 44d6c5743fb9..a25ed190b5b2 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c
@@ -1285,9 +1285,7 @@ static int bnxt_tc_add_flow(struct bnxt *bp, u16 src_fid,
goto free_node;
bnxt_tc_set_src_fid(bp, flow, src_fid);
-
- if (bp->fw_cap & BNXT_FW_CAP_OVS_64BIT_HANDLE)
- bnxt_tc_set_flow_dir(bp, flow, src_fid);
+ bnxt_tc_set_flow_dir(bp, flow, flow->src_fid);
if (!bnxt_tc_can_offload(bp, flow)) {
rc = -EOPNOTSUPP;