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 79365A00C3; Wed, 21 Sep 2022 19:55:24 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 59FBD40691; Wed, 21 Sep 2022 19:55:24 +0200 (CEST) Received: from NAM04-BN8-obe.outbound.protection.outlook.com (mail-bn8nam04on2086.outbound.protection.outlook.com [40.107.100.86]) by mails.dpdk.org (Postfix) with ESMTP id C91B74067C for ; Wed, 21 Sep 2022 19:55:22 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=F6plPJonf3UgoTmmdi97Z7T3DFvOqRtzJMJOmU2u8EJEr1zSKtjwp4pJKZJYyUFj39hWJtrFZFkIUdpbxqRNcsiqQp9kq+MEMsaiK91IyBE7qosNM+AumEtReZV27iK34VCAfBEO8cXn075pitrDmSd1bYJ+pgGeQSgLf9q350FegLIJbh9LeekXy3W1S296V31ySOwe9T6ZYh8f9i9uorokW8U/8lc7fOgbcFCkO9QSWvDqpI8rvMdpHAQ5XPfWIj6QPsoo5KPYZtOlY69o1jt2cKVV2CYCCHDyAyMINp2GY8iI0gZSZMTOAPjBhOHE1CAXz6H6mL4w/0LMkL8upg== 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=CC55Dd/94trEKE0iAwU6ycjTaR1yQGzXX73UdLgZRkA=; b=W1CcAu+PJ4Smd1qriiOrL3WiNgeCgdpbKiAXNwOa0o/dZYjBS9CAxQl94RKfhqMurEr0UsfnohC1zhczx3Ru108D87EITYRfacmsq9CDre/pJSqGz81ly3aE4UF0uk+WSutQ+QIfWwDb+OwTFt8ACsLmf8po6h+p7TPsDH45SuQB6mDu1kcQ2iDQ/8GRxMOB0PZWGECMx3qDEGvXq36aB+0sQe0o1nhlCG4rvDR64F39MmCdvmfFnMus1WXi2RNjIOZG1SZaYwetHSSfIsLUljaifh8CW/DF2BvtQaSmZcmQpXQxq2aJZ2LrXVUi6ipacu/1tUfZmgrfp38YPhzbHA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=softfail (sender ip is 149.199.80.198) smtp.rcpttodomain=microsoft.com smtp.mailfrom=amd.com; dmarc=fail (p=quarantine sp=quarantine pct=100) action=quarantine header.from=amd.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=CC55Dd/94trEKE0iAwU6ycjTaR1yQGzXX73UdLgZRkA=; b=PuSNGCulf4iZEsKoU9Ra3a0Fyc7A5SmOxVgUozXsDGTKo/l3+ZgtwohStM/tOuL+3/NsJE8d3RxvD1ddrQWlDeLwzQx781tSSMNBUMkNoWVlFAQW7L78DEsAyHVw5kkVJlLt2jaynNiaMWQi+Y/UdnJkQODviSI7qf4VukZf0KY= Received: from SA9PR13CA0163.namprd13.prod.outlook.com (2603:10b6:806:28::18) by CH2PR02MB6582.namprd02.prod.outlook.com (2603:10b6:610:78::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5654.14; Wed, 21 Sep 2022 17:55:21 +0000 Received: from SN1NAM02FT0023.eop-nam02.prod.protection.outlook.com (2603:10b6:806:28:cafe::cb) by SA9PR13CA0163.outlook.office365.com (2603:10b6:806:28::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5654.14 via Frontend Transport; Wed, 21 Sep 2022 17:55:21 +0000 X-MS-Exchange-Authentication-Results: spf=softfail (sender IP is 149.199.80.198) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=fail action=quarantine header.from=amd.com; Received-SPF: SoftFail (protection.outlook.com: domain of transitioning amd.com discourages use of 149.199.80.198 as permitted sender) Received: from xir-pvapexch01.xlnx.xilinx.com (149.199.80.198) by SN1NAM02FT0023.mail.protection.outlook.com (10.97.4.236) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5654.14 via Frontend Transport; Wed, 21 Sep 2022 17:55:20 +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; Wed, 21 Sep 2022 18:55:19 +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; Wed, 21 Sep 2022 18:55:19 +0100 Envelope-to: ferruh.yigit@xilinx.com, longli@microsoft.com, dev@dpdk.org, sharmaajay@microsoft.com, sthemmin@microsoft.com Received: from [10.71.194.74] (port=25410) by smtp.xilinx.com with esmtp (Exim 4.90) (envelope-from ) id 1ob3wN-00073L-0z; Wed, 21 Sep 2022 18:55:19 +0100 Message-ID: Date: Wed, 21 Sep 2022 18:55:18 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Subject: Re: [Patch v8 01/18] net/mana: add basic driver with build environment and doc Content-Language: en-US To: , Ferruh Yigit CC: , Ajay Sharma , Stephen Hemminger References: <1662169260-4953-2-git-send-email-longli@linuxonhyperv.com> <1662674189-29524-1-git-send-email-longli@linuxonhyperv.com> From: Ferruh Yigit In-Reply-To: <1662674189-29524-1-git-send-email-longli@linuxonhyperv.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN1NAM02FT0023:EE_|CH2PR02MB6582:EE_ X-MS-Office365-Filtering-Correlation-Id: c711ea64-b911-4c0f-9892-08da9bfa73b9 X-MS-Exchange-SenderADCheck: 2 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: cpAsOTiBUUY/y24hvzmlCJnygrJtAe3oggSOclZTwORexPEazn0hdgIf4m9luXI5Y85seLFIiuBgOFwyDRag3yenmQIUQt1WtXi5X+BVFx09ZpuM7pLRVwOhA0Br/hTAa+VKpYBkD5cUUIoQTW6zW+vZsL8HxJp0+Q9XfgSo7W4IwkDJ9tWEIXhiiG8+QLsPgjDjgJvH8SM4jxkmFptyead2FMePXf8zXXJyap4JjECFGNKWcYFaJVVE3XpVf1F4rBxU0CMjQXYeZTXGSQs6KHylgpOxBZtW3mhvx0cYufCqhMRPXjWXIjFrhVp1hdfojXAobsibkr4Kl5sglcXkuYOYUnJrxgw54ZBE804yAOoRJx7ZBvK9sRWUp2sWYxfyx2Zf+IfYQrVaEo57fzQKuNr+bVOIh5TSwQ+oN0HQGkwxzXcGzem2S5zTd1g/tG1Kch6Jhms80qjfteBudBXblb0uxnSmi5A3Fbc0/vw92hs0IRi6T8NbBCLWmvzZdlQFyagPZTEFF03MS7LmzmLmzAIHeI4ojlI5thVX9I6aPOyYe7C/0XZFa9V2oZ1LxsvU6SK1i6gyYxc+DLy5XmS/p9QcK9NalshoOnfOdr5sCKyNBqrPXYdTit6HdnBz+UWx/YkMoPxSaEnyQc1xXBcVwPr+G4IRJQKP0gqD0PCJ1n3kqBKkEgzsEN6vjcm3K6CHxfzCW8QqEjkHyf7pUDYECbLDvBUiHvo0rzjK6Bso8yUpTUU9TkoDfSAJSCHI52g+V4DWMfGPVYKez0mpRKdhxiEUQWtDe8bP4X1WIN08V6BQHrHOzDYd6p2kR+0T1myS6Y6LWsMn/9TOH6UWrnqy3g== 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:(13230022)(4636009)(346002)(396003)(376002)(39860400002)(136003)(451199015)(46966006)(40470700004)(41300700001)(26005)(53546011)(31696002)(86362001)(4326008)(82310400005)(356005)(8936002)(7636003)(9786002)(54906003)(45080400002)(36756003)(110136005)(70206006)(70586007)(8676002)(498600001)(35950700001)(2616005)(47076005)(2906002)(44832011)(40460700003)(5660300002)(336012)(40480700001)(316002)(82740400003)(83380400001)(31686004)(50156003)(43740500002); DIR:OUT; SFP:1101; X-OriginatorOrg: xilinx.onmicrosoft.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Sep 2022 17:55:20.9675 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c711ea64-b911-4c0f-9892-08da9bfa73b9 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: SN1NAM02FT0023.eop-nam02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR02MB6582 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 9/8/2022 10:56 PM, longli@linuxonhyperv.com wrote: > From: Long Li > > MANA is a PCI device. It uses IB verbs to access hardware through the > kernel RDMA layer. This patch introduces build environment and basic > device probe functions. > > Signed-off-by: Long Li > --- > Change log: > v2: > Fix typos. > Make the driver build only on x86-64 and Linux. > Remove unused header files. > Change port definition to uint16_t or uint8_t (for IB). > Use getline() in place of fgets() to read and truncate a line. > v3: > Add meson build check for required functions from RDMA direct verb header file > v4: > Remove extra "\n" in logging code. > Use "r" in place of "rb" in fopen() to read text files. > v7: > Remove RTE_ETH_TX_OFFLOAD_TCP_TSO from offload cap. > v8: > Add clarification on driver args usage to nics guide. > Fix coding sytle on function definitions. > Use different variable names in MANA_MKSTR. > Use MANA_ prefix for all macros. > Use RTE_PMD_REGISTER_PCI in place of rte_pci_register. > Add .vendor_id = 0 to the end of PCI table. > Remove RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS from dev_flags. > <...> > +Prerequisites > +------------- > + > +This driver relies on external libraries and kernel drivers for resources > +allocations and initialization. The following dependencies are not part of > +DPDK and must be installed separately: > + > +- **libibverbs** (provided by rdma-core package) > + > + User space verbs framework used by librte_net_mana. This library provides > + a generic interface between the kernel and low-level user space drivers > + such as libmana. > + > + It allows slow and privileged operations (context initialization, hardware > + resources allocations) to be managed by the kernel and fast operations to > + never leave user space. > + > +- **libmana** (provided by rdma-core package) > + > + Low-level user space driver library for Microsoft Azure Network Adapter > + devices, it is automatically loaded by libibverbs. The minimal version of > + rdma-core with libmana is v43. > + > +- **Kernel modules** > + > + They provide the kernel-side verbs API and low level device drivers that > + manage actual hardware initialization and resources sharing with user > + space processes. > + > + Unlike most other PMDs, these modules must remain loaded and bound to > + their devices: > + > + - mana: Ethernet device driver that provides kernel network interfaces. > + - mana_ib: InifiniBand device driver. > + - ib_uverbs: user space driver for verbs (entry point for libibverbs). > + Can you please add minimum required versions of kernel and libibverbs (if it applies)? <...> > + > +static struct rte_pci_driver mana_pci_driver = { > + .driver = { > + .name = "net_mana", > + }, No need to set .driver.name, 'RTE_PMD_REGISTER_PCI' macro below should be setting it already, can you please check? <...> > +#define MANA_DEV_TX_OFFLOAD_SUPPORT ( \ > + RTE_ETH_TX_OFFLOAD_MULTI_SEGS | \ > + RTE_ETH_TX_OFFLOAD_IPV4_CKSUM | \ > + RTE_ETH_TX_OFFLOAD_TCP_CKSUM | \ > + RTE_ETH_TX_OFFLOAD_UDP_CKSUM) > + Can you please add code when they are used, instead of batch adding the header, this helps to keep all patches as logical entities. This comment is valid for multiple code below.