From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B096DC433EF for ; Mon, 11 Oct 2021 08:39:23 +0000 (UTC) Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by mail.kernel.org (Postfix) with ESMTP id D527E60EBD for ; Mon, 11 Oct 2021 08:39:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org D527E60EBD Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=oktetlabs.ru Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dpdk.org Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1F158410E6; Mon, 11 Oct 2021 10:39:22 +0200 (CEST) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id 19E2B410E2 for ; Mon, 11 Oct 2021 10:39:20 +0200 (CEST) Received: from [192.168.38.17] (aros.oktetlabs.ru [192.168.38.17]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by shelob.oktetlabs.ru (Postfix) with ESMTPSA id 83B777F6D6; Mon, 11 Oct 2021 11:39:19 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru 83B777F6D6 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=oktetlabs.ru; s=default; t=1633941559; bh=lIK38kaNZKcvbzOfgRvhjhXCfVcCVVe2iyeFLVrheMs=; h=Subject:To:Cc:References:From:Date:In-Reply-To; b=nNybqJNFKR/UWZ26LhxhyhikR1DZHb9nyhHWVSQ2XN7+VmKNNULWZIUXBidhd5uGT Dl+LQ2T0sd3lUDylk0nSRWaIAr644KjTMrRrKEcE8qFEygi3oWke6KjwBm5T3GWExs ZINtkwdDloE7f2qwTnP1wuCZbmYDnlwvBvURKiSc= To: fengchengwen , Konstantin Ananyev , dev@dpdk.org Cc: xiaoyun.li@intel.com, anoobj@marvell.com, jerinj@marvell.com, ndabilpuram@marvell.com, adwivedi@marvell.com, shepard.siegel@atomicrules.com, ed.czeck@atomicrules.com, john.miller@atomicrules.com, irusskikh@marvell.com, ajit.khaparde@broadcom.com, somnath.kotur@broadcom.com, rahul.lakkireddy@chelsio.com, hemant.agrawal@nxp.com, sachin.saxena@oss.nxp.com, haiyue.wang@intel.com, johndale@cisco.com, hyonkim@cisco.com, qi.z.zhang@intel.com, xiao.w.wang@intel.com, humin29@huawei.com, yisen.zhuang@huawei.com, oulijun@huawei.com, beilei.xing@intel.com, jingjing.wu@intel.com, qiming.yang@intel.com, matan@nvidia.com, viacheslavo@nvidia.com, sthemmin@microsoft.com, longli@microsoft.com, heinrich.kuhn@corigine.com, kirankumark@marvell.com, mczekaj@marvell.com, jiawenwu@trustnetic.com, jianwang@trustnetic.com, maxime.coquelin@redhat.com, chenbo.xia@intel.com, thomas@monjalon.net, ferruh.yigit@intel.com, mdr@ashroe.eu, jay.jayatheerthan@intel.com References: <20211004135603.20593-1-konstantin.ananyev@intel.com> <20211007112750.25526-1-konstantin.ananyev@intel.com> <20211007112750.25526-5-konstantin.ananyev@intel.com> <4c57bb9d-21d6-0722-92b8-987283bb8fe6@huawei.com> <2f8c4eba-879f-7ee8-28c3-f8c23f1f885d@huawei.com> From: Andrew Rybchenko Organization: OKTET Labs Message-ID: Date: Mon, 11 Oct 2021 11:39:19 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: <2f8c4eba-879f-7ee8-28c3-f8c23f1f885d@huawei.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v5 4/7] ethdev: copy fast-path API into separate structure 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 Sender: "dev" On 10/11/21 4:18 AM, fengchengwen wrote: > Sorry to self-reply. > > I think it's better the 'struct rte_eth_dev *dev' hold a pointer to the > 'struct rte_eth_fp_ops', e.g. > > struct rte_eth_dev { > struct rte_eth_fp_ops *fp_ops; > ... // other field > } > > The eth framework set the pointer in the rte_eth_dev_pci_allocate(), and driver fill > corresponding callback: > dev->fp_ops->rx_pkt_burst = xxx_recv_pkts; > dev->fp_ops->tx_pkt_burst = xxx_xmit_pkts; > ... > > In this way, the behavior of the primary and secondary processes can be unified, which > is basically the same as that of the original process. Frankly speaking I see huge value in scheme suggested by Konstantin to care about ops in stopped state on ethdev value. So, I like approach in the patch more.