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 2FCDAA055C; Mon, 5 Sep 2022 17:42:07 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E2B47400D6; Mon, 5 Sep 2022 17:42:06 +0200 (CEST) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2074.outbound.protection.outlook.com [40.107.223.74]) by mails.dpdk.org (Postfix) with ESMTP id 2227240041 for ; Mon, 5 Sep 2022 17:42:06 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JQ5uPrDZxG9QNtzi4p0XTNxGW8DVNtl0p2yNLnbFOf1iIzbS+QPGdvf1XiAGJBOw5gOG8MWDtx76LHoVUYo8IgFuWiwEX8OeXJtGVv+u9ZKjAu7UtsEqz1lwwqkz7+Uij+j2vHmFyHLSTuao5l+AZXqHSgBT2Na3r39AKL3t6qRJm17VL77bmoIO/7JeEk7uaH+zyQLmVE7wmEWKa04hwTsrRTOGEXVly2YJQGHCAUhIRf5HAEsyUuIh+iaguSS/l5KRoy2RDgNZp2I1wf8T2UqpETilpbuxdDrwpgPlRIFm4abZc9IzkMzC52rGwOiJR7W7gCaQ8Rr8VRe5+b06MQ== 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=fBNQzNeZhJGK4B6a8USYSJgcb2b5ISDnimxPqhEM3S4=; b=oVZx38RtQyvp4NfTobXg6W3CycnzUnuEmeQ91EoNdW0yvbW+UpUKO7R4FiXc84FLY4JlUWrMO/N9R7sb/1IpWXX4iVr70ceFXWk9PbzFjH2ox7mrEBnQB9h8NYFXnilrBMKHPAODsSNaCG5p3zmsNOaqy3Kw1E7Z3gPUi2FF1wxLsFW8CTYXA81HKzqWx5i7W8XQpLf0bFED1wWJwY0xSJKc2OlioYY+OtdZHo+FBDbnPs8oPoHbhKtVHXBP2MtNGg9Zsi7pQCnhIO6ffQQgVm59NOMm8ZBlBN45nuM4G+UpplV6w7mN+zM5P4ZC2XOmV2F864HON0qS3oFzXpyMpQ== 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=fBNQzNeZhJGK4B6a8USYSJgcb2b5ISDnimxPqhEM3S4=; b=kC5Z5nA7YdHhFq0S7M4enRG3WHwlTETvwp/tUEdqkQDnA2rNHg6CvVNrNyCj5LeDUdvYAk+zReKJrjq1VI5zdv+i1Pxv6RD9Od75qfzjb1ok2GtZtv9bv2Cgkiop0A0ym1HoB5ociSVxD9MRK5MhXcq6p+/aCjHojE4P621NZEY= Received: from SA0PR11CA0168.namprd11.prod.outlook.com (2603:10b6:806:1bb::23) by SN6PR02MB4110.namprd02.prod.outlook.com (2603:10b6:805:31::12) 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:42:03 +0000 Received: from SN1NAM02FT0057.eop-nam02.prod.protection.outlook.com (2603:10b6:806:1bb:cafe::f2) by SA0PR11CA0168.outlook.office365.com (2603:10b6:806:1bb::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5588.10 via Frontend Transport; Mon, 5 Sep 2022 15:42:03 +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 SN1NAM02FT0057.mail.protection.outlook.com (10.97.4.123) 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:42:03 +0000 Received: from xir-pvapexch01.xlnx.xilinx.com (172.21.17.15) 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:42:02 +0100 Received: from smtp.xilinx.com (172.21.105.197) by xir-pvapexch01.xlnx.xilinx.com (172.21.17.15) with Microsoft SMTP Server id 15.1.2375.24 via Frontend Transport; Mon, 5 Sep 2022 16:42:02 +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=6191) by smtp.xilinx.com with esmtp (Exim 4.90) (envelope-from ) id 1oVEEb-0001fC-VR; Mon, 05 Sep 2022 16:42:02 +0100 Message-ID: <39c13f4a-8122-5b72-b909-0a9197acff89@xilinx.com> Date: Mon, 5 Sep 2022 16:42:01 +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 05/12] net/nfp: add flower PF setup and mempool init logic Content-Language: en-US To: Chaoyong He , CC: , References: <1660299750-10668-1-git-send-email-chaoyong.he@corigine.com> <1660299750-10668-6-git-send-email-chaoyong.he@corigine.com> From: Ferruh Yigit In-Reply-To: <1660299750-10668-6-git-send-email-chaoyong.he@corigine.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4b0cd2a2-2842-4b3f-72ea-08da8f552e37 X-MS-TrafficTypeDiagnostic: SN6PR02MB4110:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: N5zZl70IN5zbLjo1scnQyaqoESyxrJJGmj06T26RwgQHmknz8eY/Q1TXUH5alvaAGKKxKtAStyO+qAfLmGOddadfgmaBCUVUNpXZxkQ+wVMudGGWnNsNbikmNvb6j7v5RWSmZO8Ua6ehLpR0dSHpjKDLLJ2ZLLN7k0jQfVxK1r9AYcZo3s6sRB1FFIgg1jIvJuop8HBZK4MJYqCK9RDFsHLa5ArJFREZTz0vAraCmqPx/B+XFE45z/s6fa5lslcezM6KgBGqvEoqfVD0SMuvO+DxbJkR3Di3uIP9chehpJLF87AVHKNS/85Y+SpAd9Bno28ZiQgm3o5RpEjkVQ1CXWlkF9e5EI/r/vN5eUaUv7DV5aLmrvxIcJIu30nvLbRS6EQVEDLXegDWJNiljG1I+g8iaD85bpsij4b1RXua1H5ER2/LenaXBOnc61uub1TFpQR8N+/5XbJdFEj99hEc7TXL5LQrTg1ZeZkghCY9SpdUtte6VXswVcLTcnzCeOpt+xrv1bXqHRIasgSj7M5sAaBJDtD/qiH1s43wZV7OGwz+u5cyMAlI4QWEKxczAnG8kvQHF9O2XY1t/PsV/GQE/BqT3HeUU9LMjcZmjPJch+CC85L5wvlmK4hDZed0fVYlj6+EHiXbPWcgiOVc5bXGXCRH4J6nGCATROmDq32d9YdLj6WbgYStAXLwtbZrWx9n9Cwn0Kn+dW/QYDj4AuYHvsbTrf3lWoKuirDyKOukIIv6t5X8z4KCb7JBM/L8DfgQgLZbTCqg0jJ7NH+wDE4MKxIHBoWk7sk582JDrGcyrRBtWZ9wnZ9RU18SSXqYssVICl3TTEKHnvHKulap1zYZ8Q== 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)(376002)(136003)(346002)(39860400002)(396003)(40470700004)(36840700001)(46966006)(40460700003)(8936002)(2906002)(316002)(4326008)(70586007)(40480700001)(110136005)(82310400005)(54906003)(5660300002)(478600001)(44832011)(70206006)(7636003)(8676002)(356005)(47076005)(31696002)(41300700001)(9786002)(82740400003)(53546011)(36756003)(426003)(26005)(186003)(2616005)(31686004)(336012)(36860700001)(50156003)(43740500002); DIR:OUT; SFP:1101; X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Sep 2022 15:42:03.4380 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4b0cd2a2-2842-4b3f-72ea-08da8f552e37 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: SN1NAM02FT0057.eop-nam02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR02MB4110 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: > Adds the vNIC initialization logic for the flower PF vNIC. The flower > firmware exposes this vNIC for the purposes of fallback traffic in the > switchdev use-case. The logic of setting up this vNIC is similar to the > logic seen in nfp_net_init() and nfp_net_start(). > > Adds minimal dev_ops for this PF device. Because the device is being > exposed externally to DPDK it should also be configured using DPDK > helpers like rte_eth_configure(). For these helpers to work the flower > logic needs to implements a minimal set of dev_ops. The Rx and Tx > logic for this vNIC will be added in a subsequent commit. > > OVS expects incoming packets coming into the OVS datapath to be > allocated from a mempool that contains objects of type "struct > dp_packet". For the PF handling the slowpath into OVS it should > use a mempool that is compatible with OVS. This commit adds the logic > to create the OVS compatible mempool. It adds certain OVS specific > structs to be able to instantiate the mempool. > Can you please elaborate what is OVS compatible mempool? <...> > +static inline struct nfp_app_flower * > +nfp_app_flower_priv_get(struct nfp_pf_dev *pf_dev) > +{ > + if (pf_dev == NULL) > + return NULL; > + else if (pf_dev->app_id != NFP_APP_FLOWER_NIC) > + return NULL; > + else > + return (struct nfp_app_flower *)pf_dev->app_priv; > +} > + What do you think to unify functions to get private data, instead of having a function for each FW, it can be possible to have single one?