Skip to content

Commit 685ec6a

Browse files
venkatkumarduvvurudavem330
authored andcommitted
bnxt_en: Use correct src_fid to determine direction of the flow
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: abd43a1 ("bnxt_en: Support for 64-bit flow handle.") Signed-off-by: Venkat Duvvuru <[email protected]> Signed-off-by: Michael Chan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent b703ba7 commit 685ec6a

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1285,9 +1285,7 @@ static int bnxt_tc_add_flow(struct bnxt *bp, u16 src_fid,
12851285
goto free_node;
12861286

12871287
bnxt_tc_set_src_fid(bp, flow, src_fid);
1288-
1289-
if (bp->fw_cap & BNXT_FW_CAP_OVS_64BIT_HANDLE)
1290-
bnxt_tc_set_flow_dir(bp, flow, src_fid);
1288+
bnxt_tc_set_flow_dir(bp, flow, flow->src_fid);
12911289

12921290
if (!bnxt_tc_can_offload(bp, flow)) {
12931291
rc = -EOPNOTSUPP;

0 commit comments

Comments
 (0)