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 DAB88A0C43; Tue, 19 Oct 2021 12:36:18 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C307D40E2D; Tue, 19 Oct 2021 12:36:18 +0200 (CEST) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2075.outbound.protection.outlook.com [40.107.94.75]) by mails.dpdk.org (Postfix) with ESMTP id 1E74A40683 for ; Tue, 19 Oct 2021 12:36:17 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WkR4NfBls1GoG2p8TU7EfSXigdHAlBybv+3QTjCHdT9A/Y6ZMgIlm6CFYSJBFel3KLN2EU+eVUq3DieO/sQ+aGVC4eYZDO6WIZ0Ph9UfN/oobsnzs2bMzdSQKMokTwT5d2jIQPsOcjWQZ/G9N769U+ZrXh2dTr91mDT5gFAXE3JmROTkM9YzpyOxOdpWozYWPyhqGAAgLOI9+UY+ktYvE7FUF+8rXhHOJvdAV+PS0eTGzZd9/8ARZs6GQPMkEx8BLSAkwKLHGlXj01xD8W0eAYr7sAUcyheQ4in4byRPMhpXjUslms0Y2BcNDYeCloIRZCKSTOUKgkLljnvggHXKZw== 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=uXn7gx4x5e4avZzcqMI2avFSIwitxwLtqghREPxRsE0=; b=Rc1nz4DoFxLKYevoWNUudPd6Yn6bhEFzWGGCatwOqPS8upxEnAMNqGD0jOqPcKPMqn/xGoKX3nGkKqKP2o/tZF5orDManxBwZIO2bVI4TDOdvFR3pqW7+Rc0AIMXlcbN+rFVGyjS+9mB24PMyHHxekFS3Fd5Na82ShRhXwIigND232LZnNQnAmC4o8OEFkWZW0+3PMAa9+oG9DWIk6bFrPljWklo4mEmhS/EDTl5IZi+bMgJBZX5+Ki0+Gv9fp8WGTiVbXvv6yfAaQii08RrOimikGJXlhwfPnc3QPLcffQRUe7VHKb7i0IfnE1WBqTHLIQ/vHmJfzzVnmzagGeQ9Q== 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=uXn7gx4x5e4avZzcqMI2avFSIwitxwLtqghREPxRsE0=; b=hbNveSNTIhP4gMQUKQkzoLKgOTMUE23xkkZ5jadLpC9xSWv/VAqA1+ZsBv2CPZ0ROWzdgKf/AtHiFLu/WLRYhsgXpJu12b42JpxqlEemHL9a/C+TaKkL7r2VvdaL3PShOMc0e+CspJXvMECqhiljRAiXEr/1W17dkJ+Vdb8nTLgkLVgIVEcMNokZW7sg5ZR6+cw43tcSm7+zeUwyHz5EI6/LbZ2iHqOOGWmRFGi2QD2Y1DAXgcEYlHjRjV1SKSqeSrfkacsqUl16tuzZQaC6xqBYABKpWrY2nSRtdzF4IXIDv5TpHgxYB8m9eXJnwMH5dCeC7VF12o/y7t+9nJqv1A== Received: from DM5PR18CA0070.namprd18.prod.outlook.com (2603:10b6:3:22::32) by CH2PR12MB3702.namprd12.prod.outlook.com (2603:10b6:610:27::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.16; Tue, 19 Oct 2021 10:36:15 +0000 Received: from DM6NAM11FT053.eop-nam11.prod.protection.outlook.com (2603:10b6:3:22:cafe::c9) by DM5PR18CA0070.outlook.office365.com (2603:10b6:3:22::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.16 via Frontend Transport; Tue, 19 Oct 2021 10:36:15 +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 DM6NAM11FT053.mail.protection.outlook.com (10.13.173.74) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4608.15 via Frontend Transport; Tue, 19 Oct 2021 10:36:15 +0000 Received: from nvidia.com (172.20.187.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Tue, 19 Oct 2021 10:36:12 +0000 From: Xueming Li To: CC: , Viacheslav Ovsiienko , Lior Margalit , Matan Azrad Date: Tue, 19 Oct 2021 18:34:58 +0800 Message-ID: <20211019103501.2216840-6-xuemingl@nvidia.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211019103501.2216840-1-xuemingl@nvidia.com> References: <20210927083256.337450-1-xuemingl@nvidia.com> <20211019103501.2216840-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.187.6] 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: 8e103fb3-0934-42af-4d03-08d992ec472a X-MS-TrafficTypeDiagnostic: CH2PR12MB3702: 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: 5JQsptxMWZk4ZyalwZNuGEkAEXvJ/L79rW9Wyktk+ZPGVgbMfxv7rPTy/6iDSyrYAusL7FlHMRS8+9JOw8aFueZD5LyHy+pWWkSYWeIxLxXNTKxOypJ+0J609qT8iREUtw544R+eKZG1KQOpY0foMIgYZEkr/LUt05hN3Mi9G+w0/090duCybuYv1eten1IQeeNRVba8WAf4DnE83sGiP/k+3HRDJYCKvBMXmNy7FcUKD4hc2g73lTTeGo/QujBsbD2Yjm0ZrT+dwxpAN4Dawhgz63RsMUKOYLNCWlhqXE8dSqOfpLHs/JgQm3qBz9GG0TQWaq53QOwTre/38yRxi3BkQgVKtG2grbm5oZiig/e0bp2duz7Rg/O7N1GOSMFFogICnDGYv+4KmjFXS3/TubMGZbo8dZJqZJK8b2Nk0O3YpCWiitmZC5enseoICqhMgR91F6yBiTnAAtUeUDarKnSbE/VG71JcLbWrADbyZlwRYi7+7trElCUIjWUK7muZoiV1Grommkigdf65m9oHjMwZpehxTup2+cgc1SDEIjWCrTM74/c2JiH0Pwh71/kKFOKE3LEdIAjOJFMcwwT7tvSaIKQH0lHnwuExo4cfr2VxN+pbxqTseG0fLLGUBX0KPlcl9bJcyALr/CPHPu3tqLR9yHh/4fYAt0UAOyaqumW+n35ez16T5+iY1xh1sVIqZKzVleTwtk4hLZIJoIP+TQ== 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)(36840700001)(46966006)(16526019)(2906002)(5660300002)(70206006)(356005)(7696005)(6916009)(54906003)(6666004)(82310400003)(6286002)(316002)(7636003)(83380400001)(4326008)(2616005)(508600001)(70586007)(55016002)(336012)(36756003)(36860700001)(107886003)(26005)(86362001)(186003)(1076003)(426003)(8936002)(8676002)(47076005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Oct 2021 10:36:15.0809 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8e103fb3-0934-42af-4d03-08d992ec472a 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: DM6NAM11FT053.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB3702 Subject: [dpdk-dev] [PATCH v3 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 Acked-by: Viacheslav Ovsiienko --- 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