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 060F3A00BE for ; Thu, 10 Mar 2022 14:19:38 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id ED77341143; Thu, 10 Mar 2022 14:19:37 +0100 (CET) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2058.outbound.protection.outlook.com [40.107.92.58]) by mails.dpdk.org (Postfix) with ESMTP id 8B7374113E; Thu, 10 Mar 2022 14:19:35 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oLZMhUk5jCpZ9ippuQdV3Dk+nr0+gg1gfRcJxPCRIeEAg3gx5zdxRZJ6l8bLvBwxGUXy82oColV3fPUCepWJt/LaZCnduWEkc6sbI9QNOWY6SFNbFK7iju0Gke3TgGuVhNw/pblrWfVvOqXXNoltDMfD06eJBXChK/ZrKN5qGZN3R1H7LWwi/G7gPSFxbknnTacZaW5cSCYWg6cqXAamy7d5SN3pyfADczXJaJ6dwZsyNO6wf8/IOyaBfWDquYZrda5OAZ8shS1UBx+qcZWMtjuWgZ8301L43C/WGCx0tbKLVi1Duro8PCeyOCIfxghyRCBphCyCF4PsJytutCez6g== 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=MfmHWS7MpVbyPjIJ//EdeI+EAXRoqKa7smoj52q8JIE=; b=QScWRKDXavqeIBkNvLQcO0SqheqNcsjBFJzfO63yyN6jciyTR8zFTY6dWv13pGcC2taPwJrv6TuMZ9KDcTe73fUlUzTddq9fm85XAYD/OVUFnaATl/+N+EjxEhU11wvypay6tYaoEGTkn3WFiPB4YUryEtjkjMbHyFXLG+pr64rBBAEPJcc802t0bSW+ikg32wzDKnDdqLtnlwWjdUnsg4T7ELYGYqvTF1cMyciT8GnEa/OBWJkRICiVYFMvcKNLbYbKWV6nWpKteNDw03QY+/PFeqrrjsy2yyByU49tNvs+ySJyfKauJhXpPOpeOn/HV9AVu/ayQMCaQUD9VfRLGA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.234) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject 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=MfmHWS7MpVbyPjIJ//EdeI+EAXRoqKa7smoj52q8JIE=; b=Z9htRR1wUP4qMvNyG0kvNuHlcEO6c9iA4v9WKKd2lZkw6AolW/lvfTZ16w4NfPbFGFDDBALSEhERwNS8TMnvEwVj9Th88omUXBbA0mVRTwqkgEAKdHC7QTDTcxqwm9CWdjviwO4zOv85cfzCOy3sRS+3gBQNWWQM6f8E0r9zPVjC5RhG6xI3vR81807w+TP3wvXpI2TpoK+b1Vg7R7SaX+bse5UcLrc0UyvTNklKVuyWx3D4XdHoLEOpc/cskHp5l2IhzDWd7RY4x8s0EnA9NEvDSYVS7jziaMn2FpJDjkr4KV6XyRrDDVVXwbSKoMhAJuQOQi8N0wX2yTxoCklVjQ== Received: from DM5PR19CA0028.namprd19.prod.outlook.com (2603:10b6:3:9a::14) by BN9PR12MB5275.namprd12.prod.outlook.com (2603:10b6:408:100::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5038.15; Thu, 10 Mar 2022 13:19:34 +0000 Received: from DM6NAM11FT038.eop-nam11.prod.protection.outlook.com (2603:10b6:3:9a:cafe::8b) by DM5PR19CA0028.outlook.office365.com (2603:10b6:3:9a::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5061.22 via Frontend Transport; Thu, 10 Mar 2022 13:19:34 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.234) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 12.22.5.234 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.234; helo=mail.nvidia.com; Received: from mail.nvidia.com (12.22.5.234) by DM6NAM11FT038.mail.protection.outlook.com (10.13.173.137) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5061.22 via Frontend Transport; Thu, 10 Mar 2022 13:19:32 +0000 Received: from rnnvmail204.nvidia.com (10.129.68.6) by DRHQMAIL101.nvidia.com (10.27.9.10) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Thu, 10 Mar 2022 13:19:31 +0000 Received: from rnnvmail202.nvidia.com (10.129.68.7) by rnnvmail204.nvidia.com (10.129.68.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Thu, 10 Mar 2022 05:19:30 -0800 Received: from nvidia.com (10.127.8.13) by mail.nvidia.com (10.129.68.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22 via Frontend Transport; Thu, 10 Mar 2022 05:19:28 -0800 From: Michael Baum To: CC: Matan Azrad , Raslan Darawsheh , Viacheslav Ovsiienko , Subject: [PATCH] net/mlx5: fix FD configuration for Rx interrupt Date: Thu, 10 Mar 2022 15:19:23 +0200 Message-ID: <20220310131923.1144368-1-michaelba@nvidia.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9966408c-fca0-45c7-8807-08da02989d8e X-MS-TrafficTypeDiagnostic: BN9PR12MB5275:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: uZ9uQhqlJkp7C3FU/2Ra1qMPiWHuE3jea4QHKxImNVOJGpFYyQ6Oiopn8UCOXlukOnTo16N9CrIgpQMuZOImcHwNOQ+7duhTpA1O5j+/Maxmf45wo06TG20DZMarvvvyzDX0oB2rorT8TYhKRLTTgMLh+tymy+6J8iNfb1Wc7+MGPr4cxfKGqYPqlpeoeRPyRg6rlvueoe+0TUBG5DZI+ysiTVoFAqBfz8Q5vSblsm26nANOdzh64BuiccReTcYBGhbutIla2SfO3u2RBBojG2pQleQQ4PDcpalo+JC+46cANmpyHeJ/KQi0vJxGkeCIrHRDOjfNdZoDuGp78ocZn0XMTpf00SGSdQrz/3nDlCofLB47WEcq5RE2pQ7MUQc3xhWHKPcCfCu36UsZ8IlHgFgCPyI4ISErT6sN11YyXowuhSikTohTEvWcOLFi6B2RojnkNYefGiSdM76O/DD6HuTzrtTZdDIAWHgwqhKM/53WjJI9a7gDtfM4pcCwEAtCjWm8Ze39CXUPAMOc3FWIks+GjBT1Dll7uD6Iia3D4adMSX/639CDcA3MFcFA8uJTpQcpeidJ1t2qBaNrrk1EPrmgMDEr8OA+S1pzdtEN8RmFMvhzBWdTtwkk1cmyXPF5w1llvPZqIW+iE33oS+PqmI5yrd49o37ux77Sohl8Gq9pH3tFHCpPrVFghVI1IjSTC62T0j7mDww6iv00cutnQw== X-Forefront-Antispam-Report: CIP:12.22.5.234; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:mail.nvidia.com; PTR:ErrorRetry; CAT:NONE; SFS:(13230001)(4636009)(46966006)(36840700001)(40470700004)(450100002)(55016003)(2906002)(83380400001)(86362001)(81166007)(6286002)(36860700001)(356005)(8676002)(8936002)(7696005)(508600001)(70206006)(4326008)(70586007)(5660300002)(82310400004)(40460700003)(336012)(6666004)(2616005)(316002)(186003)(26005)(6916009)(36756003)(47076005)(54906003)(1076003)(426003)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Mar 2022 13:19:32.6901 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9966408c-fca0-45c7-8807-08da02989d8e X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[12.22.5.234]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT038.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN9PR12MB5275 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org The mlx5_rx_intr_vec_enable() function allocates queue vector and fill FD list for Rx interrupts. The driver wrongly configured the FD with a non-blocking flag which prevent waiting on this FD. This patch removes O_NONBLOCK flag adding. Fixes: 3c7d44af252a ("net/mlx5: support user space Rx interrupt event") Cc: stable@dpdk.org Signed-off-by: Michael Baum Acked-by: Matan Azrad --- drivers/net/mlx5/mlx5_rxq.c | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c index f16795bac3..b38505b85c 100644 --- a/drivers/net/mlx5/mlx5_rxq.c +++ b/drivers/net/mlx5/mlx5_rxq.c @@ -1075,7 +1075,6 @@ mlx5_rx_intr_vec_enable(struct rte_eth_dev *dev) /* This rxq obj must not be released in this function. */ struct mlx5_rxq_priv *rxq = mlx5_rxq_get(dev, i); struct mlx5_rxq_obj *rxq_obj = rxq ? rxq->ctrl->obj : NULL; - int rc; /* Skip queues that cannot request interrupts. */ if (!rxq_obj || (!rxq_obj->ibv_channel && @@ -1097,23 +1096,10 @@ mlx5_rx_intr_vec_enable(struct rte_eth_dev *dev) rte_errno = ENOMEM; return -rte_errno; } - rc = mlx5_os_set_nonblock_channel_fd(rxq_obj->fd); - if (rc < 0) { - rte_errno = errno; - DRV_LOG(ERR, - "port %u failed to make Rx interrupt file" - " descriptor %d non-blocking for queue index" - " %d", - dev->data->port_id, rxq_obj->fd, i); - mlx5_rx_intr_vec_disable(dev); - return -rte_errno; - } - if (rte_intr_vec_list_index_set(intr_handle, i, RTE_INTR_VEC_RXTX_OFFSET + count)) return -rte_errno; - if (rte_intr_efds_index_set(intr_handle, count, - rxq_obj->fd)) + if (rte_intr_efds_index_set(intr_handle, count, rxq_obj->fd)) return -rte_errno; count++; } -- 2.25.1