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 E2AD44598A; Sat, 14 Sep 2024 08:33:41 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AA9AF4026C; Sat, 14 Sep 2024 08:33:41 +0200 (CEST) Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by mails.dpdk.org (Postfix) with ESMTP id 1FD474026A for ; Sat, 14 Sep 2024 08:33:38 +0200 (CEST) Received: from mail.maildlp.com (unknown [172.19.88.105]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4X5Lt51pPDzfbhR; Sat, 14 Sep 2024 14:31:25 +0800 (CST) Received: from dggpeml500024.china.huawei.com (unknown [7.185.36.10]) by mail.maildlp.com (Postfix) with ESMTPS id 2746A140137; Sat, 14 Sep 2024 14:33:37 +0800 (CST) Received: from [10.67.121.161] (10.67.121.161) by dggpeml500024.china.huawei.com (7.185.36.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Sat, 14 Sep 2024 14:33:36 +0800 Message-ID: Date: Sat, 14 Sep 2024 14:33:36 +0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 05/19] net/xsc: add ioctl command interface To: Stephen Hemminger , WanRenyong CC: , , References: <20240911020740.3950704-6-wanry@yunsilicon.com> <20240910205058.25bf5f8c@hermes.local> <8cf9b5e8-cab4-45e6-b959-1d87f8a8ea99@yunsilicon.com> <20240911225021.16839cb2@hermes.local> <1ff7f17e-181b-49da-8f84-bf430f449dec@yunsilicon.com> <7c5d74b1-2d69-4595-b966-4044b6f7c698@huawei.com> <20240913195429.1e6f174b@hermes.local> Content-Language: en-US From: fengchengwen In-Reply-To: <20240913195429.1e6f174b@hermes.local> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.121.161] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To dggpeml500024.china.huawei.com (7.185.36.10) 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 2024/9/14 10:54, Stephen Hemminger wrote: > On Fri, 13 Sep 2024 10:55:08 +0800 > "WanRenyong" wrote: > >>> >>>> Ioctl API is used for interaction between PMD and kernel driver. As you >>>> said, ioctl is >>>> >>>> the worst API, should I consider using read and write instead? >>> It seemed the ioctl couldn't handle VF located in VM, and interact >>> with PF driver which run in host kernel. >>>> If not, could you please give me some advice? >>> If your NIC support firmware, could consider use firmware as mid-man between DPDK and kernel. >>> >>>> >> Hello, fengchenwen, >> >> Thanks for your reply. >> Sorry for not describing it clearly. We know how to implement the >> bifurcation functionality. The main issue is that ioctl is used >> forcommunication with the kernel driver by PMD, but ioctl is not >> considered a good API, we need to find a better approach. Implemented >> via firmware might be a good idea, but it's complex, we can think about >> it in the further.Recently shoud I consider using read and write >> instead?  Is there any advise? > > > There are already several pre-existing ways to do bifurcation in drivers. > 1. RDMA which is used by mlx5 and mana drivers. > 2. using SR-IOV and queue steering. (Intel did this but not sure if it still exists) > 3. BPF > > It seems unlikely a new approach using ioctl() that only works on your device > would be accepted by the netdev developers. I just "grep -rn ioctl | wc -l" and found there are 518. Some of them are net driver which open char device. Ioctl could be an option as long as it meets current and future needs.