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 7FD49A00BE; Fri, 12 Jun 2020 14:58:04 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9F9C11BF70; Fri, 12 Jun 2020 14:55:22 +0200 (CEST) Received: from relay.smtp.broadcom.com (unknown [192.19.232.149]) by dpdk.org (Postfix) with ESMTP id 9E19B199BC for ; Fri, 12 Jun 2020 14:55:17 +0200 (CEST) Received: from dhcp-10-123-153-55.dhcp.broadcom.net (dhcp-10-123-153-55.dhcp.broadcom.net [10.123.153.55]) by relay.smtp.broadcom.com (Postfix) with ESMTP id 4BECD1BD6D7; Fri, 12 Jun 2020 05:55:17 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.10.3 relay.smtp.broadcom.com 4BECD1BD6D7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1591966518; bh=HA3Bg6J6ezRfhMrIDkcZvNc3jk/vVU5RAAnHY3aZ/J4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Zmd5+5rAUuH35HrZr5jNhsj7iWwrbHSApd0yDpW5JcClpWhujaF4DcbH3wf58Ubja BMbQca94XeiPbtjNMULD5CFCA5mY4Ztn1CpGhSBJiOQWO8/WaXmni1xssKSarOYnGT xDQNzAvH6qzOVpujlCBVY4bdieU4ZnCS+IUHm3j0= From: Somnath Kotur To: dev@dpdk.org Cc: ferruh.yigit@intel.com Date: Fri, 12 Jun 2020 18:20:06 +0530 Message-Id: <20200612125024.15989-19-somnath.kotur@broadcom.com> X-Mailer: git-send-email 2.10.1.613.g2cc2e70 In-Reply-To: <20200612125024.15989-1-somnath.kotur@broadcom.com> References: <20200612125024.15989-1-somnath.kotur@broadcom.com> Subject: [dpdk-dev] [PATCH 18/36] net/bnxt: use vport in the phy port act handler 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 The phy port action handler should get vport details and not vnic id. The fix is to calculate the vport of the given port. Signed-off-by: Kishore Padmanabha Reviewed-by: Michael Baucom Signed-off-by: Somnath Kotur --- drivers/net/bnxt/tf_ulp/ulp_rte_parser.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c b/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c index 842466d..3dd941f 100644 --- a/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c +++ b/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c @@ -1284,7 +1284,7 @@ ulp_rte_phy_port_act_handler(const struct rte_flow_action *action_item, struct ulp_rte_parser_params *prm) { const struct rte_flow_action_phy_port *phy_port; - uint32_t pid; + uint32_t vport; phy_port = action_item->conf; if (phy_port) { @@ -1293,10 +1293,12 @@ ulp_rte_phy_port_act_handler(const struct rte_flow_action *action_item, "Parse Err:Port Original not supported\n"); return BNXT_TF_RC_PARSE_ERR; } - pid = bnxt_get_vnic_id(phy_port->index); - pid = rte_cpu_to_be_32(pid); + /* Get the vport of the physical port */ + /* TBD: shall be changed later to portdb call */ + vport = 1 << phy_port->index; + vport = rte_cpu_to_be_32(vport); memcpy(&prm->act_prop.act_details[BNXT_ULP_ACT_PROP_IDX_VPORT], - &pid, BNXT_ULP_ACT_PROP_SZ_VPORT); + &vport, BNXT_ULP_ACT_PROP_SZ_VPORT); } /* Update the hdr_bitmap with count */ -- 2.7.4