From: Michael Chan <michael.chan@broadcom.com> To: davem@davemloft.net Cc: netdev@vger.kernel.org, Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com> Subject: [PATCH net 5/6] bnxt_en: Use correct src_fid to determine direction of the flow Date: Fri, 16 Aug 2019 18:33:36 -0400 Message-ID: <1565994817-6328-6-git-send-email-michael.chan@broadcom.com> (raw) In-Reply-To: <1565994817-6328-1-git-send-email-michael.chan@broadcom.com> From: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com> 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> --- drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c index 6fe4a71..6224c30 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; -- 2.5.1
next prev parent reply index Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-08-16 22:33 [PATCH net 0/6] bnxt_en: Bug fixes Michael Chan 2019-08-16 22:33 ` [PATCH net 1/6] bnxt_en: Fix VNIC clearing logic for 57500 chips Michael Chan 2019-08-16 22:33 ` [PATCH net 2/6] bnxt_en: Improve RX doorbell sequence Michael Chan 2019-08-16 22:33 ` [PATCH net 3/6] bnxt_en: Fix handling FRAG_ERR when NVM_INSTALL_UPDATE cmd fails Michael Chan 2019-08-16 22:33 ` [PATCH net 4/6] bnxt_en: Suppress HWRM errors for HWRM_NVM_GET_VARIABLE command Michael Chan 2019-08-16 22:33 ` Michael Chan [this message] 2019-08-16 22:33 ` [PATCH net 6/6] bnxt_en: Fix to include flow direction in L2 key Michael Chan 2019-08-17 8:49 ` kbuild test robot 2019-08-18 20:06 ` [PATCH net 0/6] bnxt_en: Bug fixes David Miller
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1565994817-6328-6-git-send-email-michael.chan@broadcom.com \ --to=michael.chan@broadcom.com \ --cc=davem@davemloft.net \ --cc=netdev@vger.kernel.org \ --cc=venkatkumar.duvvuru@broadcom.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Netdev Archive on lore.kernel.org Archives are clonable: git clone --mirror https://lore.kernel.org/netdev/0 netdev/git/0.git git clone --mirror https://lore.kernel.org/netdev/1 netdev/git/1.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 netdev netdev/ https://lore.kernel.org/netdev \ netdev@vger.kernel.org public-inbox-index netdev Example config snippet for mirrors Newsgroup available over NNTP: nntp://nntp.lore.kernel.org/org.kernel.vger.netdev AGPL code for this site: git clone https://public-inbox.org/public-inbox.git