From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Chan Subject: [PATCH net v2 3/6] bnxt_en: Ignore src port field in decap filter nodes Date: Wed, 11 Apr 2018 11:50:15 -0400 Message-ID: <1523461818-15774-4-git-send-email-michael.chan@broadcom.com> References: <1523461818-15774-1-git-send-email-michael.chan@broadcom.com> Cc: netdev@vger.kernel.org, Sriharsha Basavapatna To: davem@davemloft.net Return-path: Received: from mail-pl0-f68.google.com ([209.85.160.68]:39920 "EHLO mail-pl0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753463AbeDKPui (ORCPT ); Wed, 11 Apr 2018 11:50:38 -0400 Received: by mail-pl0-f68.google.com with SMTP id e7-v6so1697582plt.6 for ; Wed, 11 Apr 2018 08:50:38 -0700 (PDT) In-Reply-To: <1523461818-15774-1-git-send-email-michael.chan@broadcom.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Sriharsha Basavapatna The driver currently uses src port field (along with other fields) in the decap tunnel key, while looking up and adding tunnel nodes. This leads to redundant cfa_decap_filter_alloc() requests to the FW and flow-miss in the flow engine. Fix this by ignoring the src port field in decap tunnel nodes. Fixes: f484f6782e01 ("bnxt_en: add hwrm FW cmds for cfa_encap_record and decap_filter") Signed-off-by: Sriharsha Basavapatna Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c index ac193408..795f450 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c @@ -1051,8 +1051,10 @@ static int bnxt_tc_get_decap_handle(struct bnxt *bp, struct bnxt_tc_flow *flow, /* Check if there's another flow using the same tunnel decap. * If not, add this tunnel to the table and resolve the other - * tunnel header fileds + * tunnel header fileds. Ignore src_port in the tunnel_key, + * since it is not required for decap filters. */ + decap_key->tp_src = 0; decap_node = bnxt_tc_get_tunnel_node(bp, &tc_info->decap_table, &tc_info->decap_ht_params, decap_key); -- 1.8.3.1