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 7170845C50; Sat, 2 Nov 2024 02:06:51 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 40DA9402B7; Sat, 2 Nov 2024 02:06:51 +0100 (CET) Received: from NAM02-DM3-obe.outbound.protection.outlook.com (mail-dm3nam02on2085.outbound.protection.outlook.com [40.107.95.85]) by mails.dpdk.org (Postfix) with ESMTP id 1AEF94029A for ; Sat, 2 Nov 2024 02:06:50 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Qwr5NFwLi9aeAKBmxVjOO3TC5Tzan5B2D8YW6qvUoRT4lEdzm4TTGwXI7VOICgYagiEAkscIwOi2RNOFFk7KpFFxh0lnNZrqngfQbbFHlrybvD6IoddfXpTIoJuk+kGBJgAohGhi4CfAF3iP/XnV7bqEkx0QHJ1H2UbLLxwPZffOQOxld8N3Y3lQ/Cp1hiBonnJFC0kBbx75tKeiScGE9R4vsaI9C7BiMUYoiREtKiUyon/xAJbikhFPgRaM0e0B115EQGKmgjqo/gceyl5ha8YxiVZ12PEMBeJeKNl8um+hyXSUSYEg3T5TCO2N24+Teum8tS0Lmsj4aUYmeku6xw== 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=D9qPYnxs77TAYVEv7zQa0wYNiD34ZK9z2K48QCV/Xn0=; b=EKqx7ZPwglOasl7iir4I6Ur9dTHVaYqFzx8Cpug+Mw9JyObSzzJAs21BAt/sRVSoF5NDTH/JNVTvxeqpi5qNeA0qwTAL6nDPXHF2R96as2kbeFRCoR4I4mpPWQxrZ5RJApv8n6lIbG0H3636WJIEticbA9gwoW8GUGiyWmZqNYAysBM7aLUnxaF39U6ii48EKj1tjmdAvP9TLVJsR/AXQ/HWDWtNOjMiU2NuFEP35Dpfw2o2uL8ShehEs9ZHiKdUlRoheVzLaB/msdmxHkUAcF6rGQdV/qiMqQ3dU7oSiLyVBCvxSe/oO5DHMvHhfYC34/iwxdOm/6AMax5eIWmHiA== 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=D9qPYnxs77TAYVEv7zQa0wYNiD34ZK9z2K48QCV/Xn0=; b=uskLRD7ks8yi4UGjUedDsyFgKrXLxCzAkFojDBfehakHnPzWZAVI5PlQL8RZUcm1IQOWKoRuJJ22+IZVxEqFP3dmihwldTrSPfKZT9Jp7MrPIRDQvKfgA/cDKSpn/BfaIKmsbuUKPN+99DY9tsoyl24SJMTN+IS35ECLGGwaQvQ= 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:06:46 +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:06:46 +0000 Message-ID: <48dbc87b-b051-46dc-9600-02cd25d5c848@amd.com> Date: Sat, 2 Nov 2024 01:06:40 +0000 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v9 6/9] net/zxdh: add zxdh get device backend infos 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-7-wang.junlong1@zte.com.cn> Content-Language: en-US From: Ferruh Yigit In-Reply-To: <20241101062156.2637339-7-wang.junlong1@zte.com.cn> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: LO6P265CA0003.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:339::10) 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: 600367e4-ab56-4977-7897-08dcfada9f73 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?d21YQ2RHbVd2dmcrazNadE1qdjZFajVPY2hVMGlKY3AzQjArNDF3NUJKTTBN?= =?utf-8?B?T3FiQVkwejBscVFmR01jdlJKVzF5eS9LSlhSdHdHdlpmYTN2bVhoc0w1RzNK?= =?utf-8?B?U3NJU2dqeGQrNnZMYUI3YXpFaUlBM3RId2hjUEFBRWlBN0IyRXFseU9JR2hM?= =?utf-8?B?Rm9YeUhqeklFcUdqK0Q5SnBkM0VzbTRkMHpsMmZkSXBuWU9WeUgyRGhod0sy?= =?utf-8?B?d2p5bTZ0bytjRlp4TERLVG91YW52OThPNmFISHptOXNTTDM0RHhET2hXclRQ?= =?utf-8?B?a01ZRjJGVVJITjg2d2E0eWVzeGMzQTlDNDhsUjZaaDB1TGlOb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cWxnOW1UNjVSaTFmOFFZSjNy?= =?utf-8?B?QS9WTEYyVVh0ZVVST1ppdHFueW5JQUFFU0RSc3VWTmVxR29PZGZnUkRxb0lo?= =?utf-8?B?SWNoSkMzamkzZkx0ZHhRd1g4NDI5Zzh0OUU1QjBDREpGcHlDTDFMdzNWUk1Y?= =?utf-8?B?Wi9xZUgydS9lV0JoaVZJWmROVHZOMHpseGQvVW5EaGQ5UURWQ0lPNGgwSCto?= =?utf-8?B?RmJnQXdlaWg5em1ERjVNSURybHd5ZDdGUnpQb1FkWmJqOC9HU2RiSVNId1M3?= =?utf-8?B?VUxsald2RzRISmlQa3BzQTFwd2R4YTlib21BOFNFRHpweGN0YUczOWhVamxQ?= =?utf-8?B?NktBRWtZNXlIODZxd2hjS042MmFNKzlEM1pYZWtLSGNqMStTb08wQjRDVUpY?= =?utf-8?B?blhlaTlkT2hBT2VVYXFWS085NlBNa0hpbTZMdkltR3krVTd4T091UWZHTHh2?= =?utf-8?B?UFFFQ0JYOGo2cUtOUXE3RnR2ckxQV25GMEJ3RzBrbmhIN05KNWJEWjNsTDla?= =?utf-8?Q?CrZy3OVGwIMinMjYt+JOrQMC8H4hvvzloVGeGvg?= 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?SUZ6UUhmbEszbElFSXU3bjJUd1dIV2p4cFFoOE16RUhBZy9nNTdRa1pudG5K?= =?utf-8?B?RXFQczJFVHJjNFBreHVWY0lOcERvcGtUUWlJc3ZkUG5IdnBYbkRSQ3pQdXlJ?= =?utf-8?B?YUV5WS82cCs0NjNJUWtlNWZoREtibzRvSER2NUlES2JUbjArOHVwVE05dDEz?= =?ut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mJnY3hOYUNWVmNKK1BTRWRBSStz?= =?utf-8?B?NUdYYjBGS0Vad2lucm5iVDNOV3Frc1hnL1d3OUNsTm4xVDNDTWRWSnJTaUl0?= =?utf-8?B?MVVTSEx3Wm1hYy85ZnZ4MHJFbXVuWSs1LzNMUlBHekQwOFprQUdaL3BYcWRs?= =?utf-8?Q?4HKo4OQ8UgHLh48ENkYTVczs+?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 600367e4-ab56-4977-7897-08dcfada9f73 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:06:46.7305 (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: h0eXAzWHC+SxkHu7HAZ8DyrIGxcBB6MAHTECdeCsBiy2eXEIyLYTxBd5ymfj+SaB 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: > Add zxdh get device backend infos, > use msg chan to send msg get. > > Signed-off-by: Junlong Wang  > <...> > +uint16_t zxdh_vport_to_vfid(union zxdh_virport_num v) > +{ > +    /* epid > 4 is local soft queue. return 1192 */ > +    if (v.epid > 4) > +        return 1192; > +    if (v.vf_flag) > +        return v.epid * 256 + v.vfid; > +    else > +        return (v.epid * 8 + v.pfid) + 1152; > +} > Is there a reason to not make this function static? This way can get rid of the decleration in the header file.