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 54FB145C50; Sat, 2 Nov 2024 02:07:47 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 40AC2402B7; Sat, 2 Nov 2024 02:07:47 +0100 (CET) Received: from NAM02-BN1-obe.outbound.protection.outlook.com (mail-bn1nam02on2063.outbound.protection.outlook.com [40.107.212.63]) by mails.dpdk.org (Postfix) with ESMTP id 2BD064029A for ; Sat, 2 Nov 2024 02:07:46 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=SWknMRCMvzFqsK0R24iTyhectOU/qiZ+uu3TSwUrzDBkLI3aSVmhK45I/rsM9Vpx/YxqzsO1//zkm30eqWtCR9GzzDkeCuXnr/x7rwAh/DZBfh/rov85NKedlSB7R78lBh9nq3Li57qrrh3K1lbUvtMtJ4/f+4cU7ejFElLo9QtTi1L5+SjS8fa9wcgyJz3gMOzYP+GyrZPPpSgux05MqG4ACemcJpdbOqHoyuoaq5nE8qA4op13aPnHfohYsdwKsTlI5FPdKEQanKc6WJ7SujqYtJX01QqtXd/NxGP/S46PzeFn4WT0T7M7WCEi03gecivhwo/Xn3tbcuNDQWyU9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=YO1c5Cz7ElBRt3NRBK0kPgpW2+rM9vLWQOkDyyQ2m58=; b=P2vZjj7kR4+g3/4Ke2QiMDNmNBbdPiSvVzOv3RP62PcsOMjk6x7HR9xdKDgA1HEq9YkW8h9Lrq7QsxZfzSbBk+BNACHLjxuHV5VdcDSHzQO1Mf8PZfj7FAQybIukulqtnPBuafwQfMrN57p7ygjCrjKUFgsXc+IwYp3xS5vI6+xcQ6AMjoFG9yA6oU8mqpZizAuxtcfXytkm/LQ+nH7XXkIqT7MWgk7PLgUhHudki1+hCL+RYJ/vLCmbpJnOkJcGuyDPBEieHC7hHPHxJmX95pWgDvgdOcKwfe4Y/c8npY8ERwJSasMYHmG+sRwUcVHvpXbOEtmh3AnDIT61N5Tfnw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=YO1c5Cz7ElBRt3NRBK0kPgpW2+rM9vLWQOkDyyQ2m58=; b=s57T26vytnZLPJi9K9iU6Ftq8xfpSSdEkvYZIRXyTEDCW7uHD6vs3o9eVZ+hPlrno3FZD87bKTlPsPwZqoiwn2EnOHpg2+h50dajTk7IbqvjJfucNzvgjVzUOJ1HQhIoRDHn2o1kvpXby8DoOM+0AxatXquGLy1WvVRJEk6ttHY= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from SJ2PR12MB8830.namprd12.prod.outlook.com (2603:10b6:a03:4d0::9) by MW5PR12MB5682.namprd12.prod.outlook.com (2603:10b6:303:19f::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.27; Sat, 2 Nov 2024 01:07:44 +0000 Received: from SJ2PR12MB8830.namprd12.prod.outlook.com ([fe80::c3eb:df02:eaa9:2055]) by SJ2PR12MB8830.namprd12.prod.outlook.com ([fe80::c3eb:df02:eaa9:2055%4]) with mapi id 15.20.8114.015; Sat, 2 Nov 2024 01:07:43 +0000 Message-ID: Date: Sat, 2 Nov 2024 01:07:38 +0000 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v9 7/9] net/zxdh: add configure zxdh intr implementation To: Junlong Wang , dev@dpdk.org Cc: wang.yong19@zte.com.cn References: <20241030090124.2540776-2-wang.junlong1@zte.com.cn> <20241101062156.2637339-1-wang.junlong1@zte.com.cn> <20241101062156.2637339-8-wang.junlong1@zte.com.cn> Content-Language: en-US From: Ferruh Yigit In-Reply-To: <20241101062156.2637339-8-wang.junlong1@zte.com.cn> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: LO6P265CA0006.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:339::15) To SJ2PR12MB8830.namprd12.prod.outlook.com (2603:10b6:a03:4d0::9) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ2PR12MB8830:EE_|MW5PR12MB5682:EE_ X-MS-Office365-Filtering-Correlation-Id: 8603af6e-32a2-40e7-2060-08dcfadac190 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|376014; X-Microsoft-Antispam-Message-Info: =?utf-8?B?V0lqcVFwcGc2SHovcUNjb3VuN1JmbHppYmVKaUFOQlhidUhzQjdwTlR6cHky?= =?utf-8?B?eTAwSGlMRTI3OFNXaGRUUENIWk53NmVzV0JnK1N3TDRZRjdsMVRjNE5WMk9q?= =?utf-8?B?dXBzazNSWXRGenFiVHEraThNRjNwVlVKaW9Tc0hYNlBWWkNrUyswZFdUR0RC?= =?utf-8?B?eStUeStmSlg1WDVXQVVjR0wvaFdGUzY4ODl2bkZzZFd1M2lwUDRGN3VTc2Nk?= =?utf-8?B?NVQ1VTFJQmFUelhXYjhraTJET0llSXZpNHlJQ3VMY1czTkJjVm0rZUJDTTND?= =?utf-8?B?WHVpTS82ZGt3NC8vcTY2SFN0d0JIQ21YV2VxMUJ0bktDVkdpbkVSZEQ1Vnpk?= =?utf-8?B?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DJMSU1wbXZ2?= =?utf-8?B?ZGVscTJIUHgyd2NwUmgydDU2ZEFTYU1zNXhhS25qcTU0UCtxaFBMc1pOK0Rs?= =?utf-8?B?QjZ3R1J2SnY3RDZIcW1SVWhWYlh1U3k1bWg2VDVDakxhRERaU3YwczVUejJO?= =?utf-8?B?RDk3R1NmL3JwQVVmNi9kRGNaODdzWnNRNGpZTk0rV1AwOTRVaGJMbW55M2Ix?= =?utf-8?B?ZCsrMDVTQVJBRWlMMG90WXY5aFBZaUs0UGFrSW9IRjh2cmYwY3J2Nm9yUGxr?= =?utf-8?B?dVN3clExZlZoRHJwVTl5SmxLRnFQTE9kY3lnT1llTHJPSXVmRW5OSCt6Szgx?= =?utf-8?B?b1QxdWZwNldRTmJ5YnRGZGQ2V1VwRlZkNStQSC9tSjBhYVVlR0gzSlhrQ2Jj?= =?utf-8?B?OWh2a3VLdEM2VUFTZlVYTWlmOFNRc3hCNlFHYjRObGxRenhKb05rcDNMYW1O?= =?utf-8?B?SUtNMkswNzgxM09BbTZpSnhPaHVnNitqWFFSWkk4MGYvTE5HbjVvTU9CQUE2?= =?utf-8?Q?J9JAzbp/63n7Z+lnuS8qyHnFeEHESWj0oGnqy4h?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ2PR12MB8830.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(366016)(376014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?NFNPbTF5UDV4RUhNYmY0L3RmWmpMRUxheWNjbTc0aTR1Q0RSRHJCQkxOM2Iz?= =?utf-8?B?bzFRQzhBT3RWUUV5K2NUbnhFandNek41aFp3TXB1NU9KdTBRTnZpZkdCRGx4?= =?utf-8?B?TTNVRGZ0bitJbHRsdjRRVDQ0TVlSclFGVVA4dXhTUlgxbGlaSjlz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DhkNEJ4VUQ5RU96SUJUNHUrV1dwQm5HVHlXQy9E?= =?utf-8?B?RDlaYkNhdkp0ZFpqR212MHkwd0I5TWF3RGtvbjVIZGd6dEdhazV3RWpWdHc1?= =?utf-8?B?Z2Nscm1jcDF0a2JPTGc4Z3RaVjVaa1lTWmxxaTl2QU5sd2xHVG1sTTNuaitH?= =?utf-8?Q?LtNxf44yePss86U/9vYQhkseO?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8603af6e-32a2-40e7-2060-08dcfadac190 X-MS-Exchange-CrossTenant-AuthSource: SJ2PR12MB8830.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Nov 2024 01:07:43.9101 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: UUx+1lMLhshbDcjJsQ1vQY7059XDjChEv0u6tNhF3pOOnvbZhRMWcXPVeOzx/l48 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW5PR12MB5682 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 11/1/2024 6:21 AM, Junlong Wang wrote: > configure zxdh intr include risc,dtb. and release intr. > > Signed-off-by: Junlong Wang  > <...> > +static int32_t zxdh_configure_intr(struct rte_eth_dev *dev) > +{ > +    struct zxdh_hw *hw = dev->data->dev_private; > +    int32_t ret = 0; > + > +    if (!rte_intr_cap_multiple(dev->intr_handle)) { > +        PMD_INIT_LOG(ERR, "Multiple intr vector not supported"); > +        return -ENOTSUP; > +    } > +    zxdh_intr_release(dev); > +    uint8_t nb_efd = ZXDH_MSIX_INTR_DTB_VEC_NUM + ZXDH_MSIX_INTR_MSG_VEC_NUM; > + > +    if (dev->data->dev_conf.intr_conf.rxq) > +        nb_efd += dev->data->nb_rx_queues; > + > +    if (rte_intr_efd_enable(dev->intr_handle, nb_efd)) { > +        PMD_INIT_LOG(ERR, "Fail to create eventfd"); > +        return -1; > +    } > + > +    if (rte_intr_vec_list_alloc(dev->intr_handle, "intr_vec", > +                    hw->max_queue_pairs + ZXDH_INTR_NONQUE_NUM)) { > +        PMD_INIT_LOG(ERR, "Failed to allocate %u rxq vectors", > +                    hw->max_queue_pairs + ZXDH_INTR_NONQUE_NUM); > +        return -ENOMEM; > +    } > +    PMD_INIT_LOG(DEBUG, "allocate %u rxq vectors", dev->intr_handle- >>vec_list_size); > +    if (zxdh_setup_risc_interrupts(dev) != 0) { > +        PMD_INIT_LOG(ERR, "Error setting up rsic_v interrupts!"); > +        ret = -1; > +        goto free_intr_vec; > +    } > +    if (zxdh_setup_dtb_interrupts(dev) != 0) { > +        PMD_INIT_LOG(ERR, "Error setting up dtb interrupts!"); > +        ret = -1; > +        goto free_intr_vec; > +    } > + > +    if (zxdh_queues_bind_intr(dev) < 0) { > +        PMD_INIT_LOG(ERR, "Failed to bind queue/interrupt"); > +        ret = -1; > +        goto free_intr_vec; > +    } > + > +    if (zxdh_intr_enable(dev) < 0) { > +        PMD_DRV_LOG(ERR, "interrupt enable failed"); > +        ret = -1; > +        goto free_intr_vec; > +    } > One of the above log use 'PMD_INIT_LOG()' and other 'PMD_DRV_LOG()', how do you diffrentiate? Do you really need two different log type, init and driver? (I understand need for others, Rx, Tx & msg, but still less is easier)