From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id F296EA034F; Sat, 16 Oct 2021 10:08:38 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E4C5840141; Sat, 16 Oct 2021 10:08:38 +0200 (CEST) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2051.outbound.protection.outlook.com [40.107.220.51]) by mails.dpdk.org (Postfix) with ESMTP id 552404003F for ; Sat, 16 Oct 2021 10:08:37 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hMoCvZNtzoAtwHmehNBBpuI9oM9Dd1Tbunck5MRtqTwzD6w6hZQFW90AONzJbNcXzrmWzVYe084oJ8LnvlUVpNhtoWK6fbJTHIDnn9ddnqtGFB/vkACBApjIVa3woJwg9PZLy+EPJBdK0SI5esgfvr3WbAOi0M4z4q94R+KweBWqskQ5fm3a/zSUCa5ExoLMlh8GyvXsMGjRl4tjA6F+juyCkVpdsQ9lIbNkWSXhxOjvHkrUGTh59eCByRB6PR0ytnxrXFlEB9+gNgN+ByF1hahTHUni7Kpp751Nq5Cmlyb8gD86WOmqBr08wbVXAb8g1KCb7eFLXrWd2pcEmztFew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Sj5mm+NoL1LIgF4MrKNEWjy9ll4IgoZaX1UMOrWkTXU=; b=eGMvjFPUBcEi2l8tuYrAYMSDEixFd949G5DfcPXQIYHWeCiIKFw3jEUgxl8MMvgT3zU7zwt+jxMpcsN7UV9yj3wrPIUHS74XnPbJjek7BqFcl8sqBzCqut8lppNFOENQ4cCzBiUrz8ovtdMNCBs/8pI2txGTFVpQKm7SgP/kk+8Lk8LJQR2kW2jF4kGr6vhH/bSD3kGQyWYjJ3Wey4eoPzkNsqNpQY2LZdFjZr/AjqoMbCxJe/df+Eql0m1lmRm7IbIzwQEcjyU6g9t5c8+ZrKWqa3bCCbLUPb9xNN5U6Qz3l62zTnqjSpBpKWfljVcD72zR7OFeqgWl+mghawZ+zA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Sj5mm+NoL1LIgF4MrKNEWjy9ll4IgoZaX1UMOrWkTXU=; b=CWYBttlxKzBA1zNPojE6LaXEEKEuIuGIUE158fZgTDMVEWOivnjIoNgmxkSJ+SD+WVjj/3ZjW7xViHAhOziSshHx4TxSmUSt3DQ1lnMvrGpGbAPgb6okxGXdnYPktbbNiIYFsEkIoOuRLIYlhq3ceJOBDSPQhfr+sXEaNpEXavVye3238DrZG/eqJhy6yRFII5mkpkOsuKoj/+vX3Hga9T7l7dEszi+VcL9r3AYiBKmq7zd06OiKD8Dq/Uvo3LLer25OQ30YbvZvVLw/7kt3Ei4SDPcWHhG1nNefYyhHNrTLf6ELzD0Bhzid9hNXS/muAiLcMUSzb2xOoknzt4V/Nw== Received: from MW4PR04CA0282.namprd04.prod.outlook.com (2603:10b6:303:89::17) by MN2PR12MB3470.namprd12.prod.outlook.com (2603:10b6:208:d0::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.16; Sat, 16 Oct 2021 08:08:35 +0000 Received: from CO1NAM11FT017.eop-nam11.prod.protection.outlook.com (2603:10b6:303:89:cafe::9d) by MW4PR04CA0282.outlook.office365.com (2603:10b6:303:89::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.15 via Frontend Transport; Sat, 16 Oct 2021 08:08:34 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by CO1NAM11FT017.mail.protection.outlook.com (10.13.175.108) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4608.15 via Frontend Transport; Sat, 16 Oct 2021 08:08:33 +0000 Received: from nvidia.com (172.20.187.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Sat, 16 Oct 2021 08:08:30 +0000 From: Xueming Li To: CC: , Viacheslav Ovsiienko , "Lior Margalit" , Matan Azrad Date: Sat, 16 Oct 2021 16:07:29 +0800 Message-ID: <20211016080732.1781622-6-xuemingl@nvidia.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211016080732.1781622-1-xuemingl@nvidia.com> References: <20210927083256.337450-1-xuemingl@nvidia.com> <20211016080732.1781622-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.187.5] X-ClientProxiedBy: HQMAIL105.nvidia.com (172.20.187.12) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: eebd31c2-69d2-42d6-0b2d-08d9907c2665 X-MS-TrafficTypeDiagnostic: MN2PR12MB3470: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:227; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: yTWSbXa/FU3sCic4QHqkTRKYCOlYk98FnNge0efyHPUtVmUWCt5jb0Ulo4XnvQ+mgcIurgL9o6bUC3aNbgNbfDQ2dpSqN+WWfTgx2eywEoooSkALJR6lSDAHyZzzKtrjXNKp9KFDdcgUCvnw47hQB2j8jPnahmxptS45Qme6WPds9J8JZPceU1h1Pi1y9cm5EqPTidUxyZy/IAVI07so9FbPcJfWrHt+QZ8SkUVVI6beacch9FrPtSB4kI1kJWiEzrPJg8zFsaJM8sm3rNcCWeF8kcGqyB0nBQRF/ch5s/rrkINZwBA+4+EXI752x4gs4Pr9aVwcQSej5POXxEc9zYQgsIEsTBSIakOayntbLYlD4fdE3An3THD6u5lIqP60PDt6VR6R0PMzKVMJBc1R5mOo1/24PSNXSucejeQLkmVPP83HJqjo0dN6RT4ZEwJxz6md2Q2i78I7RRuv6/md6LMND7v1xTWdMDiHtOydBbCXbxZ21mROaFNa9Gzld8LOzf99kccAhav3MqLEwGwQmCWUoi7jPB6JLbCDbVyDl5lc0HtahwzFaa0ed0u2vocJH6Z+nSEpeXdbPu88ikowefiq+gpFJAxJMsQJW8zARm8ZtmbPi0KXXPwTfmo4Ii4NY5UhyDx0JxjbOSP27xrU4HhbXgC0uaYD5Jr0+ZmFqNSN1szgpE7kDlc+LNDzlX38D70W0qC8wr/QOruCCNG1rA== X-Forefront-Antispam-Report: CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE; SFS:(4636009)(46966006)(36840700001)(4326008)(8676002)(8936002)(2906002)(5660300002)(6916009)(426003)(508600001)(47076005)(316002)(36756003)(82310400003)(70206006)(54906003)(36860700001)(1076003)(2616005)(356005)(83380400001)(16526019)(70586007)(86362001)(7696005)(6286002)(107886003)(186003)(26005)(55016002)(336012)(7636003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Oct 2021 08:08:33.2183 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: eebd31c2-69d2-42d6-0b2d-08d9907c2665 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.34]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT017.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB3470 Subject: [dpdk-dev] [PATCH v2 5/8] net/mlx5: supports flow item of normal Tx queue X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" Extends txq flow pattern to support both hairpin and regular txq. Signed-off-by: Xueming Li --- drivers/net/mlx5/mlx5_flow_dv.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c index f06ce54f7e7..4a17ca64a2e 100644 --- a/drivers/net/mlx5/mlx5_flow_dv.c +++ b/drivers/net/mlx5/mlx5_flow_dv.c @@ -10910,22 +10910,22 @@ flow_dv_translate_item_tx_queue(struct rte_eth_dev *dev, void *misc_v = MLX5_ADDR_OF(fte_match_param, key, misc_parameters); struct mlx5_txq_ctrl *txq; - uint32_t queue; - + uint32_t queue, mask; queue_m = (const void *)item->mask; - if (!queue_m) - return; queue_v = (const void *)item->spec; if (!queue_v) return; txq = mlx5_txq_get(dev, queue_v->queue); if (!txq) return; - queue = txq->obj->sq->id; - MLX5_SET(fte_match_set_misc, misc_m, source_sqn, queue_m->queue); - MLX5_SET(fte_match_set_misc, misc_v, source_sqn, - queue & queue_m->queue); + if (txq->type == MLX5_TXQ_TYPE_HAIRPIN) + queue = txq->obj->sq->id; + else + queue = txq->obj->sq_obj.sq->id; + mask = queue_m == NULL ? UINT32_MAX : queue_m->queue; + MLX5_SET(fte_match_set_misc, misc_m, source_sqn, mask); + MLX5_SET(fte_match_set_misc, misc_v, source_sqn, queue & mask); mlx5_txq_release(dev, queue_v->queue); } -- 2.33.0