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 3FB98A00BE; Mon, 16 May 2022 13:06:07 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2998D40A7A; Mon, 16 May 2022 13:06:07 +0200 (CEST) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2079.outbound.protection.outlook.com [40.107.94.79]) by mails.dpdk.org (Postfix) with ESMTP id 8CBA740A79 for ; Mon, 16 May 2022 13:06:05 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JY+4TfgoJrDCFF5CR8KZpYTj+3G15KJJxBfqtltTylHNRZZvyjtb99R55WHOBVlUy4vEUggkDyCUXtVJE4WC3gHJ+/NKSnFt8Hk3w07khzmiTgxMGzy4R+ztnFaXlDyvrMSL1yTHqwgyGrO+EZNfCi9BDBkKMrO83HbM/T6SKcTfgGDGXCCobYSAmAflEPf24pmPEyXVrhdoGRwNLDbOY8ajqxsrjHAJns2Zc7U5U5TelfE8weuAPYBuUqAGEeyHYcnVdVm9G1rraMhQgObqJNqa0/px+aQhAeQESSXcze8EPDVyU11bjfZCYaY9PpfrEVBtEmjKF95uAYLxdmQLjA== 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=q6QVOu6Nf7Cr6Uu4WfrBbTppap/6pFXqykQMWXQJrqY=; b=czxSvMwmzOdMs9TEwPyvlAyGSpUgr7SsiHRA08YEgpB1Fst992x8w76c4fjeT6Wr1fq5XQPQ221OPuCBWbf5gPeom+F1ykPVPhnRCoXYbJizRyBsX5eo42/nWTMUIwUFMdANqnXZ2H5WQYTt7igAt1t8gCpV5QQh6v73rz/QBr5jPsIKTkNEIfDm/9U9N1GciOffo335bQ+IjaPoWR6rnK3viye+7417djKsb4p9GGnig0Nh+zYRbYL3HKBfFSG2oKsMsGYBZIkl8JlK8VG1wulxsZ1y9xqKYlrbawolWaaQ//bvV+jDfiQOQ5XKEdDpOAzZHkGUVU6p+GY653CJ0g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 149.199.80.198) smtp.rcpttodomain=chelsio.com smtp.mailfrom=xilinx.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=xilinx.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector2-xilinx-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=q6QVOu6Nf7Cr6Uu4WfrBbTppap/6pFXqykQMWXQJrqY=; b=r2cX7ZdBqLj5bqGwZIsHD+nnoL3GFgVzWMMJX6ZEt7OOyQk2d9f+kYUJ/c2q4/vWY/UiVxIB+BKX1uxxgYxYLV0axXHBdryXZyrCCN80ivagrlVMqMEqHiSzgO/yCAz+UdGP5t1Yg8aYfAKNb8ccelYnb1Kb2cyyl3vyp7hBmhk= Received: from BN8PR07CA0032.namprd07.prod.outlook.com (2603:10b6:408:ac::45) by MN2PR02MB6031.namprd02.prod.outlook.com (2603:10b6:208:185::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5250.14; Mon, 16 May 2022 11:06:03 +0000 Received: from BN1NAM02FT047.eop-nam02.prod.protection.outlook.com (2603:10b6:408:ac:cafe::c0) by BN8PR07CA0032.outlook.office365.com (2603:10b6:408:ac::45) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5250.13 via Frontend Transport; Mon, 16 May 2022 11:06:03 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 149.199.80.198) smtp.mailfrom=xilinx.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.80.198 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.80.198; helo=xir-pvapexch01.xlnx.xilinx.com; Received: from xir-pvapexch01.xlnx.xilinx.com (149.199.80.198) by BN1NAM02FT047.mail.protection.outlook.com (10.13.3.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5250.13 via Frontend Transport; Mon, 16 May 2022 11:06:03 +0000 Received: from xir-pvapexch02.xlnx.xilinx.com (172.21.17.17) by xir-pvapexch01.xlnx.xilinx.com (172.21.17.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.14; Mon, 16 May 2022 12:06:02 +0100 Received: from smtp.xilinx.com (172.21.105.197) by xir-pvapexch02.xlnx.xilinx.com (172.21.17.17) with Microsoft SMTP Server id 15.1.2176.14 via Frontend Transport; Mon, 16 May 2022 12:06:02 +0100 Envelope-to: rahul.lakkireddy@chelsio.com, dev@dpdk.org Received: from [10.71.119.205] (port=2031) by smtp.xilinx.com with esmtp (Exim 4.90) (envelope-from ) id 1nqYY6-0004GV-1Q; Mon, 16 May 2022 12:06:02 +0100 Message-ID: Date: Mon, 16 May 2022 12:06:01 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Subject: Re: [PATCH v2] net/cxgbe: read firmware configuration file from filesystem Content-Language: en-US To: Rahul Lakkireddy , References: <1fa943f9b1b63260b093448f6d8fab58b7aa523d.1652691839.git.rahul.lakkireddy@chelsio.com> From: Ferruh Yigit In-Reply-To: <1fa943f9b1b63260b093448f6d8fab58b7aa523d.1652691839.git.rahul.lakkireddy@chelsio.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1f8109f7-0cf9-4654-2289-08da372c112f X-MS-TrafficTypeDiagnostic: MN2PR02MB6031: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: TDfef9fTxImc4nGlYzOg7NPJISO5V6Sv66mjFV0EnnOOLcHbqYCvgUFiXjTLj2JcE4w7Z4w2FcvaASeBELPHtik+U+E0Bt9aJOirqdfwamhllgxo6C0VPGBUvz3NqnJN5DHiwQhWD7WUC8MXUlkIttvGwTFd2boaZR0QuB23aPWpZnzrQVGiGpoz4FtMpAO/eI7X058g6bneBb7nlq/R15Y9fie3euX6SLELxSP+fI4nm3GjC+y38E4SteO8N88RSEz3Yos8d22GE2nXVGgE4LmWvU2sTnOA0JA5KANORHDJEZWuYSVyCKPqNcumGmdkFKZMQSbWiYS0sjd/0b5WGJCCV9Zk/LePKk88uZaPLNIV/ir5VYGTu3tV6RalMc8xn9cWdi7i2gwGS/8ohjt/Yc2WwrKRl5NDGsSz29S1KYsgLp2E3l820H5mfJJJkbcDE6dtTsg1VdKCllweM6Vz8dUB66xq7O+04vYxoih01UbfO2UgTjVzC77B9dxJIeAHwFhY9Jov3QZpTOWtw6FzG7XfZAZjW9XX+RF2JMuvXyCtqLXxjmszvNIr4mHtjJFNGwvLNHoiZkwQBUDh7Af6ncCSK6F7GVsmJUNOmiRjhsihQGplwsFrbnVwd1Kah3f0UpNXki82tV0dvKRma8BelgWNZBBlZ7X1Xwqpt+gwsxpDOC4mbEBVn7WytfDQ7yZbrM9ca27qb0Tc1TO5h+LwQU+pgFmANMf50hSQ5dZlnrY= X-Forefront-Antispam-Report: CIP:149.199.80.198; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:xir-pvapexch01.xlnx.xilinx.com; PTR:unknown-80-198.xilinx.com; CAT:NONE; SFS:(13230001)(4636009)(46966006)(40470700004)(36840700001)(44832011)(70206006)(8676002)(70586007)(508600001)(5660300002)(8936002)(9786002)(186003)(40460700003)(36756003)(2616005)(53546011)(26005)(31696002)(356005)(336012)(47076005)(426003)(7636003)(2906002)(83380400001)(36860700001)(82310400005)(31686004)(110136005)(316002)(50156003)(43740500002); DIR:OUT; SFP:1101; X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 May 2022 11:06:03.1018 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1f8109f7-0cf9-4654-2289-08da372c112f X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.80.198]; Helo=[xir-pvapexch01.xlnx.xilinx.com] X-MS-Exchange-CrossTenant-AuthSource: BN1NAM02FT047.eop-nam02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR02MB6031 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 On 5/16/2022 11:27 AM, Rahul Lakkireddy wrote: > Add support to read firmware configuration file from > /lib/firmware/cxgb4/ path in the filesystem. The firmware > config file is used to enable or disable NIC features before > firmware initialization to help retrieve better debug data to > analyze firmware init failures. The config file can also > be used to redistribute resources, like queues, TCAMs, etc., > from disabled physical functions (PFs) to main PF, before > firmware init. Hi Rahul, Please find comments below. Also can you please send a new version for both 4/5 and 5/5 (this patch) from original series? > > Signed-off-by: Rahul Lakkireddy > --- > v2: > - Update cxgbe pmd doc about the firmware config file > - Update commit message to explain more about firmware config file > > doc/guides/nics/cxgbe.rst | 28 ++ > drivers/net/cxgbe/base/t4fw_interface.h | 1 + > drivers/net/cxgbe/cxgbe_main.c | 329 ++++++++++++++++-------- > 3 files changed, 245 insertions(+), 113 deletions(-) > > diff --git a/doc/guides/nics/cxgbe.rst b/doc/guides/nics/cxgbe.rst > index a1d30c488b..fc8a5751f1 100644 > --- a/doc/guides/nics/cxgbe.rst > +++ b/doc/guides/nics/cxgbe.rst > @@ -838,3 +838,31 @@ to configure the mtu of all the ports with a single command. > > testpmd> port stop all > testpmd> port config all max-pkt-len 9000 > + > +Hardware Configuration and Debugging > +------------------------------------ > + > +Firmware Configuration File > +~~~~~~~~~~~~~~~~~~~~~~~~~~~ > + > +To enable or disable Chelsio NIC features before firmware initialization, > +the Chelsio firmware configuration file can be placed in following > +directory. The CXGBE PMD will search and pick up the firmware > +configuration file during the Chelsio NIC probe, before initializing > +the firmware. > + Does it worth to mention what happens if the FW config file doesn't exist? Or mention from FW config file load order, as you described in mail list, to understand the relation with 'cxgbtool'? > +.. code-block:: console > + > + cp /t6-config.txt /lib/firmware/cxgb4/t6-config.txt > + There is also 't5-config.txt' in the code. > +The firmware configuration file is mainly intended to be used to debug > +firmware initialization failures. It can also be used to redistribute > +NIC resources from disabled physical functions (PFs) to main PF before > +initializing firmware. > + > +.. warning:: > + > + Note that the Chelsio firmware configuration file contains very low > + level details that is specific to the Chelsio NIC. Hence, the > + firmware configuration file must not be modified without expert > + guidance from Chelsio support team. Will it be too much detail to document what config can be changed via this FW config? <...>