From patchwork Tue Nov 17 18:49:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gregory Etelson X-Patchwork-Id: 84278 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4D858A04E6; Tue, 17 Nov 2020 19:50:01 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C4095F3E; Tue, 17 Nov 2020 19:49:59 +0100 (CET) Received: from hqnvemgate26.nvidia.com (hqnvemgate26.nvidia.com [216.228.121.65]) by dpdk.org (Postfix) with ESMTP id E0007F12 for ; Tue, 17 Nov 2020 19:49:58 +0100 (CET) Received: from hqmail.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate26.nvidia.com (using TLS: TLSv1.2, AES256-SHA) id ; Tue, 17 Nov 2020 10:50:01 -0800 Received: from nvidia.com (172.20.13.39) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Tue, 17 Nov 2020 18:49:54 +0000 From: Gregory Etelson To: , CC: , , , "David Hunt" , Jianfeng Tan Date: Tue, 17 Nov 2020 20:49:39 +0200 Message-ID: <20201117184940.19218-1-getelson@nvidia.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201028095935.27855-1-getelson@nvidia.com> References: <20201028095935.27855-1-getelson@nvidia.com> MIME-Version: 1.0 X-Originating-IP: [172.20.13.39] X-ClientProxiedBy: HQMAIL107.nvidia.com (172.20.187.13) To HQMAIL107.nvidia.com (172.20.187.13) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1605639001; bh=9M202qcYVcFzX4iM1cjV8FlWvXvvk47ZAFDRG5h9Ncc=; h=From:To:CC:Subject:Date:Message-ID:X-Mailer:In-Reply-To: References:MIME-Version:Content-Transfer-Encoding:Content-Type: X-Originating-IP:X-ClientProxiedBy; b=qI0nat5d0TLHNAo4+fF79MQcfQ4f5TbZfx3IvdTb7MpYHmoCHYG/9WeYgkdZqqOqL 6zlp++IFddzx/jgpY6UnRov9NqBlfMgIitGKybku47wxkhamJgCTk/1t6HJWMz+smJ atvgbdKcYrCCOCeIYKQOoj1rC/RD2G0+9vNWRtaDlCWh5hWaq9amq3M2EXUwImWP03 IgkcHfVLe9XLOEkz945ntYU2XX0mXrdQGojHik6Y7qTJZ5k7+r1EBKZcGZiF5W90AH W1qph8NkqUumKdVRiF8HKm6ED+RZjRvlVfJpkaP6z3Or8JX/Wpl5lurTYWE4YAGKoD TPmePvw8WLjfA== Subject: [dpdk-dev] [PATCH v2 1/2] examples/l3fwd-power: fix check_ptype query 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" l3fwd-power uses `--parse-ptype' parameter to query egress packets type. Before that feature is eanbled l3fwd-power verifies PMD ability to advertise supporrtred packet types with rte_eth_dev_get_supported_ptypes(). The patch updates code for PMDs that register supported types after dev_start. Fixes: 82bea4661626 ("examples/l3fwd-power: add --parse-ptype option") Signed-off-by: Gregory Etelson --- examples/l3fwd-power/main.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c index 2874285c4e..995a3b6ad7 100644 --- a/examples/l3fwd-power/main.c +++ b/examples/l3fwd-power/main.c @@ -2707,9 +2707,7 @@ main(int argc, char **argv) if (add_cb_parse_ptype(portid, queueid) < 0) rte_exit(EXIT_FAILURE, "Fail to add ptype cb\n"); - } else if (!check_ptype(portid)) - rte_exit(EXIT_FAILURE, - "PMD can not provide needed ptypes\n"); + } } } @@ -2740,6 +2738,11 @@ main(int argc, char **argv) } /* initialize spinlock for each port */ rte_spinlock_init(&(locks[portid])); + + if (!parse_ptype) + if (!check_ptype(portid)) + rte_exit(EXIT_FAILURE, + "PMD can not provide needed ptypes\n"); } check_all_ports_link_status(enabled_port_mask); From patchwork Tue Nov 17 18:49:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gregory Etelson X-Patchwork-Id: 84279 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5FA8AA04E6; Tue, 17 Nov 2020 19:50:17 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6AB26592C; Tue, 17 Nov 2020 19:50:11 +0100 (CET) Received: from hqnvemgate24.nvidia.com (hqnvemgate24.nvidia.com [216.228.121.143]) by dpdk.org (Postfix) with ESMTP id DFEA25928 for ; Tue, 17 Nov 2020 19:50:08 +0100 (CET) Received: from hqmail.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate24.nvidia.com (using TLS: TLSv1.2, AES256-SHA) id ; Tue, 17 Nov 2020 10:50:17 -0800 Received: from nvidia.com (172.20.13.39) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Tue, 17 Nov 2020 18:49:56 +0000 From: Gregory Etelson To: , CC: , , , Viacheslav Ovsiienko , Shahaf Shuler , Adrien Mazarguil , "Xueming Li" Date: Tue, 17 Nov 2020 20:49:40 +0200 Message-ID: <20201117184940.19218-2-getelson@nvidia.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201117184940.19218-1-getelson@nvidia.com> References: <20201028095935.27855-1-getelson@nvidia.com> <20201117184940.19218-1-getelson@nvidia.com> MIME-Version: 1.0 X-Originating-IP: [172.20.13.39] X-ClientProxiedBy: HQMAIL107.nvidia.com (172.20.187.13) To HQMAIL107.nvidia.com (172.20.187.13) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1605639017; bh=Rfd2uAE8P021aahvo87gZDR+GRrkASOLPSiapGtINDU=; h=From:To:CC:Subject:Date:Message-ID:X-Mailer:In-Reply-To: References:MIME-Version:Content-Transfer-Encoding:Content-Type: X-Originating-IP:X-ClientProxiedBy; b=DTJrTwkmYo1A1iG7xmvuF8ugAbHixhQeQxypkFn4lmHfWKJoo6EiJBh//8q74DC8h QvrW9gQTjYEnlJu/857fVKRt4HNXN+EwsvZUlOFpIyJWmeOgIDkrp+dJki7DVDZ39/ FRQdtliDl6bQfyP1b1mdioQr4iLnQPDmodBTSK549gKqB+kaFf5Nc133VYxKVF/ViQ YaKElsucOUnrTkP+72iE4GoWYNq7UUL96vagM2rAofjJMMmc1YXcoLQFjraLZmoQ9+ 9+9vfRtEB1OSSwhH75sZxk8uQ+2+KwF48U9wbvzQFf4gWqaqBgtgKHIR2X4Op9e7PJ 2+q12d4svzlWA== Subject: [dpdk-dev] [PATCH v2 2/2] drivers/net/mlx5: fix representor interrupts 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" Representor is a port in DPDK that is connected to a VF in such a way that assuming there are no offload flows, each packet that is sent from the VF will be received by the corresponding representor. While each packet that is sent to a representor will be received by the VF. This is very useful in case of SRIOV mode, where the first packet that is sent by the VF will be received by the DPDK application which will decide if this flow should be offloaded to the E-Switch. Representor shares interrupts handler with host PF over the PCI address. Therefore, after PF completes its interrupts handler initialization, no additional actions required for representor. Fixes: 26c08b979d26 ("net/mlx5: add port representor awareness") Signed-off-by: Gregory Etelson Acked-by: Viacheslav Ovsiienko --- drivers/net/mlx5/mlx5_rxq.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c index 0693c924d0..1e2fe706ad 100644 --- a/drivers/net/mlx5/mlx5_rxq.c +++ b/drivers/net/mlx5/mlx5_rxq.c @@ -902,6 +902,9 @@ mlx5_rx_intr_vec_enable(struct rte_eth_dev *dev) unsigned int count = 0; struct rte_intr_handle *intr_handle = dev->intr_handle; + /* Representor shares dev->intr_handle with PF. */ + if (priv->representor) + return 0; if (!dev->data->dev_conf.intr_conf.rxq) return 0; mlx5_rx_intr_vec_disable(dev); @@ -982,6 +985,9 @@ mlx5_rx_intr_vec_disable(struct rte_eth_dev *dev) unsigned int rxqs_n = priv->rxqs_n; unsigned int n = RTE_MIN(rxqs_n, (uint32_t)RTE_MAX_RXTX_INTR_VEC_ID); + /* Representor shares dev->intr_handle with PF. */ + if (priv->representor) + return; if (!dev->data->dev_conf.intr_conf.rxq) return; if (!intr_handle->intr_vec)