From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id A2A0FA04B5; Wed, 2 Sep 2020 07:31:55 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D91061C0AD; Wed, 2 Sep 2020 07:31:49 +0200 (CEST) Received: from mail-oo1-f99.google.com (mail-oo1-f99.google.com [209.85.161.99]) by dpdk.org (Postfix) with ESMTP id 0A83D1C0AC for ; Wed, 2 Sep 2020 07:31:49 +0200 (CEST) Received: by mail-oo1-f99.google.com with SMTP id r6so875300oon.13 for ; Tue, 01 Sep 2020 22:31:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=B7q66jR+fpJmPGVW3WqeiklxyfPn/TvQLK9A4Uk99nA=; b=Ytdci9xvLMD53xsSIHsG/pM5GoXGMU0fMIRzs2aJyS+6t5xWepWpfyky9oVWGy343/ 4wxAlWjpK5AnQFyooO05P+vtjsLDwlvTPzdzZGvVFQ1C7S9Pf/k7fAKV8FyzYT/K+eMd nkL/ey5NNowvhlxY7avda2NNeD1J6pDdk2QL4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=B7q66jR+fpJmPGVW3WqeiklxyfPn/TvQLK9A4Uk99nA=; b=iNzzFkmq3+3LtpIpE4iM21MimIpfpgdKcl0xTIAavQyErvmNnvaVHuIEJg3AB0Vdbb mSBMka2yEmnuzPya45wKPkwPVEr3lBgmFucun3w5heAaqGrtUmKUl8fSQPcJ0iXxirTi 1EGB5VE4f2CsAUqIJjtR3S5kEbH6+ujFhUlxdSFTfkpV9QGr6vfwU2UeEGZQ/10tcVkj /IuIow2xYvh3iqfKVIK8vl0bue4QNoubyWz3hjtRFs+cxJc5znWq1uD79YVblTWFF1B/ eDelnaJGkhayDjmIxTdEZK++3zeEwqlJovhY6XnQ74p//TL6td4zWkf21yC0hg3OLM7X TZtQ== X-Gm-Message-State: AOAM533cOIFhSG0WVOCzA6M0rwHGcFmCV67TfaaqLCl2ooFkMEzyGzNS JzsUbgPcVA+F0I4dFr5WfjHxQM3lLfi5F5OjBYT0XL5SF7ZG4/V7DzmWP9r6x5oSCilIJ9daB1N vCG+rDEQqwZHEOpDlv6LNrPZzw6Nct/b6GH5BHlmISHGuayjmL6gph8qJWa//dDs7RefFOrVZZv eGZQ== X-Google-Smtp-Source: ABdhPJwJqBVtUKUZQBOqvh6CKJR4adbKMFbKn8qLgAmKXBy0gbm0Oviah5RFVw569biSJkCuoPdXc44PjiZ/ X-Received: by 2002:a4a:d509:: with SMTP id m9mr4194959oos.77.1599024708255; Tue, 01 Sep 2020 22:31:48 -0700 (PDT) Received: from localhost.localdomain ([192.19.223.252]) by smtp-relay.gmail.com with ESMTPS id h26sm566703oos.1.2020.09.01.22.31.46 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 01 Sep 2020 22:31:48 -0700 (PDT) X-Relaying-Domain: broadcom.com From: Ajit Khaparde To: dev@dpdk.org Cc: Kishore Padmanabha , Shahaji Bhosle Date: Tue, 1 Sep 2020 22:31:35 -0700 Message-Id: <20200902053138.39649-2-ajit.khaparde@broadcom.com> X-Mailer: git-send-email 2.21.1 (Apple Git-122.3) In-Reply-To: <20200902053138.39649-1-ajit.khaparde@broadcom.com> References: <20200731172302.5292-1-ajit.khaparde@broadcom.com> <20200902053138.39649-1-ajit.khaparde@broadcom.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v3 1/4] net/bnxt: configure loopback parif for egress flows X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Kishore Padmanabha Configure loopback parif for full offload egress flows. PARIF is handler to a partition of the physical port. The full offload egress flows for the VF rep interface must use loopback parif to offload missed flows. The miss flow path for the VF rep interface has to be loopback interface parif entry and for the non-VF rep interface it has to be the interface's parif entry. Fixes: fe82f3e02701 ("net/bnxt: support exact match templates") Signed-off-by: Kishore Padmanabha Reviewed-by: Shahaji Bhosle Reviewed-by: Ajit Khaparde --- drivers/net/bnxt/tf_ulp/ulp_rte_parser.c | 6 ++++++ .../net/bnxt/tf_ulp/ulp_template_db_class.c | 20 +++++++++---------- .../net/bnxt/tf_ulp/ulp_template_db_enum.h | 3 ++- 3 files changed, 18 insertions(+), 11 deletions(-) diff --git a/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c b/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c index 861414da9..fcb7c4430 100644 --- a/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c +++ b/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c @@ -211,6 +211,12 @@ bnxt_ulp_comp_fld_intf_update(struct ulp_rte_parser_params *params) ULP_COMP_FLD_IDX_WR(params, BNXT_ULP_CF_IDX_VF_FUNC_PARIF, parif); + + /* populate the loopback parif */ + ULP_COMP_FLD_IDX_WR(params, + BNXT_ULP_CF_IDX_LOOPBACK_PARIF, + BNXT_ULP_SYM_VF_FUNC_PARIF); + } else { /* Set DRV func PARIF */ if (ulp_port_db_parif_get(params->ulp_ctx, ifindex, diff --git a/drivers/net/bnxt/tf_ulp/ulp_template_db_class.c b/drivers/net/bnxt/tf_ulp/ulp_template_db_class.c index 94160a902..aaa552aeb 100644 --- a/drivers/net/bnxt/tf_ulp/ulp_template_db_class.c +++ b/drivers/net/bnxt/tf_ulp/ulp_template_db_class.c @@ -16731,8 +16731,8 @@ struct bnxt_ulp_mapper_result_field_info ulp_class_result_field_list[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, .result_operand_true = { - (BNXT_ULP_CF_IDX_VF_FUNC_PARIF >> 8) & 0xff, - BNXT_ULP_CF_IDX_VF_FUNC_PARIF & 0xff, + (BNXT_ULP_CF_IDX_LOOPBACK_PARIF >> 8) & 0xff, + BNXT_ULP_CF_IDX_LOOPBACK_PARIF & 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, .result_operand_false = { @@ -16933,8 +16933,8 @@ struct bnxt_ulp_mapper_result_field_info ulp_class_result_field_list[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, .result_operand_true = { - (BNXT_ULP_CF_IDX_VF_FUNC_PARIF >> 8) & 0xff, - BNXT_ULP_CF_IDX_VF_FUNC_PARIF & 0xff, + (BNXT_ULP_CF_IDX_LOOPBACK_PARIF >> 8) & 0xff, + BNXT_ULP_CF_IDX_LOOPBACK_PARIF & 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, .result_operand_false = { @@ -17135,8 +17135,8 @@ struct bnxt_ulp_mapper_result_field_info ulp_class_result_field_list[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, .result_operand_true = { - (BNXT_ULP_CF_IDX_VF_FUNC_PARIF >> 8) & 0xff, - BNXT_ULP_CF_IDX_VF_FUNC_PARIF & 0xff, + (BNXT_ULP_CF_IDX_LOOPBACK_PARIF >> 8) & 0xff, + BNXT_ULP_CF_IDX_LOOPBACK_PARIF & 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, .result_operand_false = { @@ -17337,8 +17337,8 @@ struct bnxt_ulp_mapper_result_field_info ulp_class_result_field_list[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, .result_operand_true = { - (BNXT_ULP_CF_IDX_VF_FUNC_PARIF >> 8) & 0xff, - BNXT_ULP_CF_IDX_VF_FUNC_PARIF & 0xff, + (BNXT_ULP_CF_IDX_LOOPBACK_PARIF >> 8) & 0xff, + BNXT_ULP_CF_IDX_LOOPBACK_PARIF & 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, .result_operand_false = { @@ -17530,8 +17530,8 @@ struct bnxt_ulp_mapper_result_field_info ulp_class_result_field_list[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, .result_operand_true = { - (BNXT_ULP_CF_IDX_VF_FUNC_PARIF >> 8) & 0xff, - BNXT_ULP_CF_IDX_VF_FUNC_PARIF & 0xff, + (BNXT_ULP_CF_IDX_LOOPBACK_PARIF >> 8) & 0xff, + BNXT_ULP_CF_IDX_LOOPBACK_PARIF & 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, .result_operand_false = { diff --git a/drivers/net/bnxt/tf_ulp/ulp_template_db_enum.h b/drivers/net/bnxt/tf_ulp/ulp_template_db_enum.h index 985591844..4c6c3599d 100644 --- a/drivers/net/bnxt/tf_ulp/ulp_template_db_enum.h +++ b/drivers/net/bnxt/tf_ulp/ulp_template_db_enum.h @@ -132,7 +132,8 @@ enum bnxt_ulp_cf_idx { BNXT_ULP_CF_IDX_L3_HDR_CNT = 40, BNXT_ULP_CF_IDX_L4_HDR_CNT = 41, BNXT_ULP_CF_IDX_VFR_MODE = 42, - BNXT_ULP_CF_IDX_LAST = 43 + BNXT_ULP_CF_IDX_LOOPBACK_PARIF = 43, + BNXT_ULP_CF_IDX_LAST = 44 }; enum bnxt_ulp_cond_opcode { -- 2.21.1 (Apple Git-122.3)