From patchwork Mon Apr 25 09:30:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Baum X-Patchwork-Id: 110231 X-Patchwork-Delegate: rasland@nvidia.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 83FEAA00BE; Mon, 25 Apr 2022 11:30:37 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2577E427F0; Mon, 25 Apr 2022 11:30:34 +0200 (CEST) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2072.outbound.protection.outlook.com [40.107.243.72]) by mails.dpdk.org (Postfix) with ESMTP id 88A63427EE; Mon, 25 Apr 2022 11:30:33 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mJQ2y70g8p687BjgP/9RXbpd78PyT72PfL3fVaXPKjz2dfshmjIRNR28LXYoK9Q4sVIUNLssVGhmpMLtW5V2wLLmpbXwki2eFYQQ1ZrVIZzo7opf3YgqR9uuIEMYx3RjyNdoM5QdAa7/g7aq37az9ZzBsL4avy9nsmam5HwYrUYIVSpLPYpwNjblwFqQIj67ikru3F4hmbLqkzmMD9ECVy9TOG6vtW0bYzusBxRN47zVg2TS+Cz02JryM3D9nbMx0w8cmuQKrxAErqc54YCl46j9HmHvFjLP95AaxIVKteZRi4VTU7UMW+a6YR4OSceHxhR0wC7LbiP7VC0E1Hor4A== 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=o5+6T2bTYuCy+Ri/gnHqK/c968ySho13vxZFKi2YD1k=; b=bU1nbmVM7lunazntN6KkFqgUwFwEtwIrfp7Fp3mtJrKkfSKMIjDtintwBulDpbFdYjuIfeFcmHL68YjYz8B3lIXALz2IzLA+lahYnp9r+bA62JemIj/Vm/+wQ1L0AcYxBcO4n+0OeBI1mNw5M+Cv/mHWcFayCBh3lx7TeLz/ub0Jqa9ojn/OoZl3iIkk311FIrXc7cds/qNSAt70AzE7xcgABm8Xe3sqbsWQmlIVkt19dKdhlq7flH8+7VCmJQuzEo6n6QiR08kp8e2LaP8pdRRilgzZZcBqXqTi5CI4PU5BGZ9eRtrgq81FeFLwB39aCZgspsibBJTiJpBBxVJdBA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.238) 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=o5+6T2bTYuCy+Ri/gnHqK/c968ySho13vxZFKi2YD1k=; b=shXjotsI/TvWkA8tK17beI8D9yC552oaaKvO7z21/V4unzZxV0lnogE+bIJGpqm2TxUgcwUW4P2wBZFzJp+pLkTsYfyy8p0iaXyknQl7HqxqjKUiY+Nz/SuioEORArckrJR3DUyNqVEfX2XfmmoXrstB+upkzt7wKLbMHMjnGUcIrL1WbYzncShP9Dz2LVCu2OK9ZrMZa0gwTXfnJOb2V3hvGrHnc7S+geMLhiVRIPE+7yWXQEYu9R6x4IjkrYWR8g2ZtBxZy/eATZjwRxxH+TxQWCrGrXewyl3pGr7Ibqc9cYPbxEg9xesvDrpMx9CDgPHBvmCI7LoMHXIEn9MhQg== Received: from DM6PR02CA0124.namprd02.prod.outlook.com (2603:10b6:5:1b4::26) by DM4PR12MB5134.namprd12.prod.outlook.com (2603:10b6:5:391::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5186.14; Mon, 25 Apr 2022 09:30:32 +0000 Received: from DM6NAM11FT053.eop-nam11.prod.protection.outlook.com (2603:10b6:5:1b4:cafe::86) by DM6PR02CA0124.outlook.office365.com (2603:10b6:5:1b4::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5186.15 via Frontend Transport; Mon, 25 Apr 2022 09:30:32 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.238) 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.238 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.238; helo=mail.nvidia.com; Received: from mail.nvidia.com (12.22.5.238) 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.5186.14 via Frontend Transport; Mon, 25 Apr 2022 09:30:31 +0000 Received: from rnnvmail204.nvidia.com (10.129.68.6) by DRHQMAIL105.nvidia.com (10.27.9.14) with Microsoft SMTP Server (TLS) id 15.0.1497.32; Mon, 25 Apr 2022 09:30:30 +0000 Received: from rnnvmail204.nvidia.com (10.129.68.6) 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; Mon, 25 Apr 2022 02:30:30 -0700 Received: from nvidia.com (10.127.8.13) by mail.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 via Frontend Transport; Mon, 25 Apr 2022 02:30:28 -0700 From: Michael Baum To: CC: Matan Azrad , Raslan Darawsheh , Viacheslav Ovsiienko , , Subject: [PATCH 1/2] net/mlx5: fix miss LRO validation in RxQ setup Date: Mon, 25 Apr 2022 12:30:19 +0300 Message-ID: <20220425093020.125319-2-michaelba@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220425093020.125319-1-michaelba@nvidia.com> References: <20220425093020.125319-1-michaelba@nvidia.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e35f41af-1ba2-498f-539f-08da269e3e76 X-MS-TrafficTypeDiagnostic: DM4PR12MB5134: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: PkQSWkXxHrCRiTQCKkW+whII1MUo+wiHspEcI17Ssl7/1F4odTvpUX+TooONGQpXwbCw+rSbsXbCPRwKGSsu59QdxZwFWK9fUcaFTm9AkJnKPIZPO8nbo7j+P+a9FP8OeXskLifjXNjZJwZZKNeFgah4LgNHehs4JcHCUoE3rnTBfbK9wATPINoaF6q+svnvDOx7tAYWbRxPZrBRU7gSZPtELEIvN5QFcXugxQ9ysCvc4FwTKQ6me6tpwxRzTKfn+DHYyPw2ymA4Noq2qlXl7cLU6ZoJ4dlcna710ZI8g6EKKDIJiaNca1w6uBQsJIaDJtSQg6ExUisqK5jwGfr3Xvkwxq/CaMzyzseD01FFFOF4/1NqUII2M9DKh2Pu/dFxBbsK40NqOAbtpcqcKv+4m2j6B17kLTS/2IUy7HLybAOFpvnbsgZi1UgXow0Bq5xHpq6TlbIlZ2qtrWa3xRCq/mdq8bgZ/Pp6ciLwB4C33Ymot1dS5Z99Mg9KwITClcbTN6xRbTgXujVM/ibTG+132yRmaFM/JUZYnL2oFtS3lg6FZ8oUbnHa/FwlGVXPtcUBi+iFlgSnM7AM4vmDy0MFMmcW7F/CYwwRtKCXEUCVSxcQ+ln/kAOicoXJCmWyFyKmo8Pm5B7DvUZbSyLmr5ZEt/7aS4jlCbR4WJzDa8lvXsmzVPrM+H+V88wYBLZhAhVHSqg+Gddbz/4yhtu+wm2cNA== X-Forefront-Antispam-Report: CIP:12.22.5.238; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(13230001)(4636009)(40470700004)(46966006)(36840700001)(5660300002)(8936002)(54906003)(356005)(81166007)(40460700003)(6916009)(316002)(2906002)(7696005)(6666004)(4326008)(36860700001)(82310400005)(86362001)(6286002)(450100002)(55016003)(508600001)(36756003)(70206006)(70586007)(8676002)(336012)(1076003)(47076005)(26005)(186003)(426003)(2616005)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Apr 2022 09:30:31.9883 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e35f41af-1ba2-498f-539f-08da269e3e76 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.238]; 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: DM4PR12MB5134 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 The mlx5_rx_queue_setup() gets from user the LRO offload. When LRO is configured, the LRO flag in rxq_data is set to 1. This patch adds validation to make sure the LRO is supported. Fixes: 17ed314 ("net/mlx5: allow LRO per Rx queue") Cc: matan@mellanox.com Cc: stable@dpdk.org Signed-off-by: Michael Baum Acked-by: Matan Azrad --- drivers/net/mlx5/mlx5_rxq.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c index 981c296f29..a2d03f9f67 100644 --- a/drivers/net/mlx5/mlx5_rxq.c +++ b/drivers/net/mlx5/mlx5_rxq.c @@ -842,6 +842,14 @@ mlx5_rx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc, dev->data->dev_conf.rxmode.offloads; bool is_extmem = false; + if ((offloads & RTE_ETH_RX_OFFLOAD_TCP_LRO) && + !priv->sh->dev_cap.lro_supported) { + DRV_LOG(ERR, + "Port %u queue %u LRO is configured but not supported.", + dev->data->port_id, idx); + rte_errno = EINVAL; + return -rte_errno; + } if (mp) { /* * The parameters should be checked on rte_eth_dev layer. From patchwork Mon Apr 25 09:30:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Baum X-Patchwork-Id: 110232 X-Patchwork-Delegate: rasland@nvidia.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 06DFFA00BE; Mon, 25 Apr 2022 11:30:42 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2CDEF427EE; Mon, 25 Apr 2022 11:30:37 +0200 (CEST) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2052.outbound.protection.outlook.com [40.107.236.52]) by mails.dpdk.org (Postfix) with ESMTP id 1EC34410E6; Mon, 25 Apr 2022 11:30:36 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cRa9hhNVDRdobZ+3l3/1FGkP4sXoFliFhOfLJBykixjiC2F4TCuYIKtEStHQj2m3XwjRK1dUUQ9FbXQZ1HZ4t6D5Wb0gnHq3rPgIXJpYbIS7NKcpWjEXc4tbQ8vL7qLWU6Fsv9a57BSrPgI0TYBo0HYURISg9R4izLDzJ7f6BYo4gWtUHfiEzMeJMrcdNBhA1dEifm3x1HoRkLLlpYSnLYVRoTRyZHW9Y3HYlwLytwtVbh3DY1mGAMlsZc5g62dGNS+1cMqGxVw4XU9R2+EzgAef6wiMlF9cq9eTYkYs1yunEDB1AgIaDlxPXMsdvC53EjbO5Bv1znC0eyy8scEEag== 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=25+MaFvjgpXkOr+h3ZvWXZZ0wLV6fb9NY5YaCL0hnX8=; b=mnSttnrkCi9J0CH/CndnySp4NgS1KlWpnwvBDBWMVE11JRBk/snmBnRSAyOPQhbBUBT1KoqxpypwyrhXbpbI6TSvY5KBLAmtg9Syk8rxfEEslKxw5KCTyMQZPyuUGJeJIEArD5Va2KpDxIP/48fxLHHTiEW3ar2JMNdmc/0IABOgx5KK84PolfzusNkvavtHQW4LA3trgMX2naCkw+BqxOC82m8G3uEEt3hGodl5DeGqUPlms55MURZtnpDodsfkvryc9fSImpW2JMxhVB/cfvHk7nSjap1MFqFN6u95dI02CF9i0GonY/rpYq2dxTftM92DaBdKFx9xZk6grtpiqQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.238) 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=25+MaFvjgpXkOr+h3ZvWXZZ0wLV6fb9NY5YaCL0hnX8=; b=p0dWnFcI8nc0c+lDObREtntyAkVVBU/WrCri6OLObdnlKCGGSe92oQrintha1lCrJMhgWHGpxHFeW2fkbNqm4cu5N+ygcie+1Wc6hOsTgg3oiXMoZYEd51SgOcZSAIIqH8UkLR2slV+UMoP9uTr7QdiT1x80wpwBIlwSUSh24vV3RvfQIP7SQRMnWWQf0cxum73Gah075L6DPAQ4cpexg+90KW5DrMNLdgWKGJIBgnYXt0RdR2XmzQKa2Fgry5q1GISXlv2xAQjGSsh3BKMyMVa4eM4c5hnoqLoE+luDcg7JSUxWc3//MX8QhMQuH+oAfrejvlXqQviUI6yTK4ZK0w== Received: from DM6PR18CA0027.namprd18.prod.outlook.com (2603:10b6:5:15b::40) by DM4PR12MB5985.namprd12.prod.outlook.com (2603:10b6:8:68::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5186.14; Mon, 25 Apr 2022 09:30:34 +0000 Received: from DM6NAM11FT022.eop-nam11.prod.protection.outlook.com (2603:10b6:5:15b:cafe::e3) by DM6PR18CA0027.outlook.office365.com (2603:10b6:5:15b::40) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5186.21 via Frontend Transport; Mon, 25 Apr 2022 09:30:34 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.238) 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.238 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.238; helo=mail.nvidia.com; Received: from mail.nvidia.com (12.22.5.238) by DM6NAM11FT022.mail.protection.outlook.com (10.13.172.210) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5186.14 via Frontend Transport; Mon, 25 Apr 2022 09:30:33 +0000 Received: from rnnvmail205.nvidia.com (10.129.68.10) by DRHQMAIL105.nvidia.com (10.27.9.14) with Microsoft SMTP Server (TLS) id 15.0.1497.32; Mon, 25 Apr 2022 09:30:33 +0000 Received: from rnnvmail204.nvidia.com (10.129.68.6) by rnnvmail205.nvidia.com (10.129.68.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Mon, 25 Apr 2022 02:30:32 -0700 Received: from nvidia.com (10.127.8.13) by mail.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 via Frontend Transport; Mon, 25 Apr 2022 02:30:30 -0700 From: Michael Baum To: CC: Matan Azrad , Raslan Darawsheh , Viacheslav Ovsiienko , , Subject: [PATCH 2/2] net/mlx5: fix LRO configuration in drop RxQ Date: Mon, 25 Apr 2022 12:30:20 +0300 Message-ID: <20220425093020.125319-3-michaelba@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220425093020.125319-1-michaelba@nvidia.com> References: <20220425093020.125319-1-michaelba@nvidia.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a89567de-0409-4036-dd2a-08da269e3f92 X-MS-TrafficTypeDiagnostic: DM4PR12MB5985: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: 61PsxNUwltMqoGCS/VS/Org55MBeQjdq83Br9Gi1MK4YSb0ZJKQDSZU9GOqxW35uoZH5O1B8VLY1KsYEGh5lYYIq5Q73V/1bgaXFdo5vzgzEt20feFr8gEThoT1lXsIb9xiaSxu3mzSu/ujqi/+k79YVeyRNThQZBO7O+/9wpC7L20kQ3hnJX9tgApH6GQxeh9eOc1TRWvHrr2pJQCG9ClWQMwPi6V0PXvVgbtLVhvySPHFsHeW/4cCn3mAMnn9BhPqr3ZnsNaiCuXjjyGdXLRSHgoxTXS+YPvmzb1TuVAkug7lcKqoMag/hHACnk2zPkEioxztmIwYcFbrrqZWjxS0MWGE725B2ANnhY39uS5GiVoQIPZvHexTfegizZ0bwk5WdDD3tLTn/dg7Fn/Nocc+gDRkfUwHXNBYQ8hTOK35TG6u9UM+UcNKOfMxIV6bXskb+z1Qg+Tz0o300e7z5wkOVqcTOOTXZr/G9gPNJtyV75qWUgwT93ew7f3yfPh+jhi1DNSd7E3OxtkQi4UFqIvda5jDIy7UvJ/hX+B5n+bpmr6k5e3Imosut1dE7fzpidndFmY3e1K91mDX7Dv5PwywhL4oxIf7JN0iOEAkk51a5pKE3nUWHGTDeezqjAgcn+YDqghizTbR4IyAk82o95lTPQ5C8KtE6y3joD8ynZ9d+PX3vwE/oF9iPegjjRcUJqUBsl9XFBo3RYMXnAAHCMwzAxZ7KcQIRk4iPQurfV5VixPVMi0GUR/V0QrH+NADOfQzMNR0EtDaloRCj3TTJig== X-Forefront-Antispam-Report: CIP:12.22.5.238; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(13230001)(4636009)(40470700004)(46966006)(36840700001)(426003)(336012)(6666004)(8936002)(36756003)(55016003)(47076005)(4326008)(6286002)(5660300002)(26005)(508600001)(450100002)(82310400005)(36860700001)(8676002)(83380400001)(40460700003)(70206006)(7696005)(54906003)(70586007)(356005)(86362001)(2616005)(6916009)(186003)(316002)(1076003)(2906002)(81166007)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Apr 2022 09:30:33.8530 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a89567de-0409-4036-dd2a-08da269e3f92 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.238]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT022.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB5985 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 The driver wrongly set the LRO configurations to the TIR of the DevX drop queue even when LRO is not supported. Actually, the LRO configuration is not relevant to the drop queue at all. This causes failure in the initialization of the device, which doesn't support LRO where the drop queue is created. Probably, the drop queue creation by DevX missed the fact that LRO is set by default in the TIR creation function and didn't unset it in the drop queue case like other cases that unset LRO. Move the default LRO configuration to unset it and set it only in the case of all the TIR queues configured with LRO. Fixes: bc5bee028ebc ("net/mlx5: create drop queue using DevX") Cc: dkozlyuk@nvidia.com Cc: stable@dpdk.org Signed-off-by: Michael Baum Acked-by: Matan Azrad --- drivers/net/mlx5/mlx5_devx.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/mlx5/mlx5_devx.c b/drivers/net/mlx5/mlx5_devx.c index 5ab092a259..03c0fac32f 100644 --- a/drivers/net/mlx5/mlx5_devx.c +++ b/drivers/net/mlx5/mlx5_devx.c @@ -715,7 +715,7 @@ mlx5_devx_tir_attr_set(struct rte_eth_dev *dev, const uint8_t *rss_key, { struct mlx5_priv *priv = dev->data->dev_private; bool is_hairpin; - bool lro = true; + bool lro = false; uint32_t i; /* NULL queues designate drop queue. */ @@ -724,9 +724,9 @@ mlx5_devx_tir_attr_set(struct rte_eth_dev *dev, const uint8_t *rss_key, } else if (mlx5_is_external_rxq(dev, ind_tbl->queues[0])) { /* External RxQ supports neither Hairpin nor LRO. */ is_hairpin = false; - lro = false; } else { is_hairpin = mlx5_rxq_is_hairpin(dev, ind_tbl->queues[0]); + lro = true; /* Enable TIR LRO only if all the queues were configured for. */ for (i = 0; i < ind_tbl->queues_n; ++i) { struct mlx5_rxq_data *rxq_i = @@ -776,6 +776,7 @@ mlx5_devx_tir_attr_set(struct rte_eth_dev *dev, const uint8_t *rss_key, if (dev->data->dev_conf.lpbk_mode) tir_attr->self_lb_block = MLX5_TIRC_SELF_LB_BLOCK_BLOCK_UNICAST; if (lro) { + MLX5_ASSERT(priv->sh->dev_cap.lro_supported); tir_attr->lro_timeout_period_usecs = priv->config.lro_timeout; tir_attr->lro_max_msg_sz = priv->max_lro_msg_size; tir_attr->lro_enable_mask =