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 333DDA055A; Mon, 5 Sep 2022 17:39:00 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 253D940697; Mon, 5 Sep 2022 17:39:00 +0200 (CEST) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2081.outbound.protection.outlook.com [40.107.243.81]) by mails.dpdk.org (Postfix) with ESMTP id 9230F40041 for ; Mon, 5 Sep 2022 17:38:58 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bHrahvW3oJf9rfvA3mWTuo0rlQC/g8yvvQpCh3V2B8j4PsocytZXuBes80lxO1aikmThfTCyr6usXb98Wzh6Zt6Olg3SD8Fs36RhvjMxchdoNFWYSuuWjMMNwFhVqpd7DhL1QoskzCPAOYHtwLHupx9+Bo62Q52Zt281MzYVxf/6P1tTVJWFKOj1jiTLR4sk+iJG3E9jhhDtAUrCyD/rDejFDmYsfpkoX+OFQhBezPPEty9T8DdeAaBAp5XcC/1cXPzIYE97cHI9gXdBzzKCzFGFZynpmdalxsgX5Z8sh8Hv85hCvrFlLWHan9Y/RdsJAnqN1M0hktfSIl2o/GA5Bw== 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=7prm1CXd1AzvLry/9TqJqAOKGJqh3qB8at24vY9OlVQ=; b=HPbHc7BKezpuKZcFCoku8IS4GIZt8q9OI6JIK7+WTSn6TKSVebIoII10eofAkATPmUNmkoyZGjDWWdB6amGD8pa+0LwtZ4Ldredde/g68c9eV6OYPszkkTSiqtZqGYQoIIcI/4GFl2KZaXKi1Q+sTQAE0BDMOtARPF1W4dzoy6CxZiOy3q6zFRRBXH+xHE6aMtRZphU+N2YvXHMbO6zuq+9fj4WWRyC0xpvjTg1HB7GmyRh6km5s6BEqBIlW2qhDY4GucqJ9zWRQ3gz5n1qZu5oekUoP0ghfRRe+fRVkMA+qjjpPT3yE9WERlxJTjOqxERk4GcjBtkcMQcmBH2x4tQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 149.199.80.198) smtp.rcpttodomain=corigine.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=7prm1CXd1AzvLry/9TqJqAOKGJqh3qB8at24vY9OlVQ=; b=GZHK9/kz+bWvKlz7SoxmMrqyE8jlxDzn9m0rg1StkKAjHdEXS9xKKsWQ0ONRU3c7Cq1sYWJTcD5jvd1M41DwppCn604J+MyAuPs+R7MO7N8Vjx4mZlRrRWb5gBy7M1Q/Y8hdRjVJapzZQ+jIgyDztoUDwBYRc8StcXlnIKYh8UU= Received: from SA9P221CA0013.NAMP221.PROD.OUTLOOK.COM (2603:10b6:806:25::18) by BYAPR02MB5957.namprd02.prod.outlook.com (2603:10b6:a03:122::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5588.10; Mon, 5 Sep 2022 15:38:55 +0000 Received: from SN1NAM02FT0024.eop-nam02.prod.protection.outlook.com (2603:10b6:806:25:cafe::1e) by SA9P221CA0013.outlook.office365.com (2603:10b6:806:25::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5588.11 via Frontend Transport; Mon, 5 Sep 2022 15:38:55 +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; pr=C Received: from xir-pvapexch01.xlnx.xilinx.com (149.199.80.198) by SN1NAM02FT0024.mail.protection.outlook.com (10.97.5.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5588.10 via Frontend Transport; Mon, 5 Sep 2022 15:38:55 +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.2375.24; Mon, 5 Sep 2022 16:38:53 +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.2375.24 via Frontend Transport; Mon, 5 Sep 2022 16:38:53 +0100 Envelope-to: chaoyong.he@corigine.com, dev@dpdk.org, oss-drivers@corigine.com, niklas.soderlund@corigine.com Received: from [10.71.194.74] (port=15425) by smtp.xilinx.com with esmtp (Exim 4.90) (envelope-from ) id 1oVEBZ-0001a5-O6; Mon, 05 Sep 2022 16:38:53 +0100 Message-ID: <15d65d03-1c53-3e30-42ff-904ebdef0961@xilinx.com> Date: Mon, 5 Sep 2022 16:38:53 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.2.1 Subject: Re: [PATCH v7 03/12] net/nfp: move app specific init logic to own function Content-Language: en-US To: Chaoyong He , CC: , References: <1660299750-10668-1-git-send-email-chaoyong.he@corigine.com> <1660299750-10668-4-git-send-email-chaoyong.he@corigine.com> From: Ferruh Yigit In-Reply-To: <1660299750-10668-4-git-send-email-chaoyong.he@corigine.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ce60b7da-8a9a-4301-4045-08da8f54bdfb X-MS-TrafficTypeDiagnostic: BYAPR02MB5957:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: vaRgIUeMUOoMl61Dy/bYc8iyl7jdMy80pyp3RjntFUAhFwZBhU8kHdJgDwkpGOY00U6MbQaPlUSUhHuS0kyVqGdAWkw5LKqlx4xmJ4Fa4wb3tkSPJFAyBF8U/QpahDLovNs4DI9To092wTzJ2QCpfVYQ3RWuiKDPdSvMj8IRRYYqaGpZw6ckGV6fZa/EjP/VnTNd0/pqOzsAo6IWLq9zjwXpo5MNsfTWRUNUZDzKYcN7e7IsaAOFuU/mlUHjCj32MMmkWj/fJOoYAElzcNUeybtcic+Rsk8nMXlOYR3Jhr/RdwN9+838XQW4AC+xQwHj/jbiDaAtR7WUE8RJTMxr8wfBtj1kfRW7M+RPIhcwRB4Scv8TkBO94505DNTLEfplOoPnAMWCjcWxdBTaDx+Kwqwse/yBeLkGofSPejAm0CVjXKeERUxBuUiMvJM6yuqNorQjbSKtov6CgYKMdXDBjAjz/9BFAAhMA8I2kN/hGnpNqLm0GvMinDSz9W4sDbIyue5kANUKLwcKBjJoCT9sucH3Qnmcq5FR+kWBKvIaU0fXbFCFwoRmWu9jxRk2zz7f6psLr1EZNmyVRSEF+Wzl+fEnBw8TQ0Tmg8+soAo88bBQAu91/16Zi50yWHs+PObuJRmGhf6h4PioCQmdxw9l9nRJhzipa2lL7AGLS53nVyoZtTzrcWLcypVZrf9Fz933S71o0UL4NuidhZc+hb0ewdb0NVdrORELcLz6aQV3k4s16i/cgNU9Dy/Du87b1PEO7fAUZtJhzaBAvh9+9JY3RkF935r68iDav78SuzfrFPlV4ynAX+rAB0uhSXlgCGJJ 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:(13230016)(4636009)(396003)(39860400002)(346002)(376002)(136003)(40470700004)(46966006)(36840700001)(36756003)(4744005)(186003)(82740400003)(336012)(2906002)(2616005)(44832011)(426003)(31686004)(47076005)(82310400005)(5660300002)(53546011)(4326008)(70206006)(36860700001)(8936002)(26005)(9786002)(316002)(70586007)(8676002)(41300700001)(31696002)(54906003)(110136005)(7636003)(478600001)(40480700001)(356005)(40460700003)(50156003)(43740500002); DIR:OUT; SFP:1101; X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Sep 2022 15:38:55.1543 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ce60b7da-8a9a-4301-4045-08da8f54bdfb 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: SN1NAM02FT0024.eop-nam02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR02MB5957 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 8/12/2022 11:22 AM, Chaoyong He wrote: > The NFP card can load different firmware applications. > This commit move the init logic of corenic app of the > secondary process into its own function. > > Signed-off-by: Chaoyong He > Reviewed-by: Niklas Söderlund <...> > + switch (app_id) { > + case NFP_APP_CORE_NIC: > + PMD_INIT_LOG(INFO, "Initializing coreNIC"); > + ret = nfp_secondary_init_app_nic(pci_dev, sym_tbl, cpp); > + if (ret != 0) { > + PMD_INIT_LOG(ERR, "Could not initialize coreNIC!"); > + goto sym_tbl_cleanup; > } If you are planning to add more FW app support, what do you think to add another abstraction for it? Something like struct fw_ops { *init() *secondary_init() ... } ... ret = fw_ops[app_id].secondary_init(...); ...