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 6B140A0540; Mon, 22 Aug 2022 17:07:32 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1BE0D40A81; Mon, 22 Aug 2022 17:07:32 +0200 (CEST) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2060.outbound.protection.outlook.com [40.107.237.60]) by mails.dpdk.org (Postfix) with ESMTP id E28A140694 for ; Mon, 22 Aug 2022 17:07:29 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LUGFu3cQQAa3DLamOUA2EUjdDMr90GsAJm7aMMBwNtJwT10ovaY0owlqv1MGeRuOTqDtMNMNiMMpms2KYf7q0Zop/S4PWm+CS8VDajFJdo1r48xwUVoPzO73ww4tJ2Pd8s2A61mbdIJl+2mvs83p3QzdcB25C7b1DH102tooYCzwuEAt6dUPBe2PlfNif9exWSRr/IjBcLhxZcmytjHq/is+hnIKs1YV4Hyu/UWFWkW6R4UK6dvxYJVdYDyiwaW4hICgbqFCNnnoffH11KPo7d3RLUP4Mox+tPqknKzRSPGOrME/8GoiCTwmz2juYL6VLkbzC6oZZjOAb8iaQ+z7+w== 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=pjde0p4b3kNxbw4vF0wZ7gHyVMczxcRk1uef3gJZnfo=; b=EcxG3bfLb+2+rWreyTjs6GI0dApqAhTOZ7tSPJfI9EN3927v4WfMqyTczRQPRpELAPI2YtcgMOjbvxjhXTjEo2z8g3+aXtFYBWB/Kc2uVbyw2XXzGLD2TCWwjL1GTniFtWI70V/zUWcWWcXZ9RW+WcNkZgT59MMpQX1OUjN3w4zhWw0MKuL0/Z3fuqBgdUx/YPE/NquPwskVYwKChSxfNbxV9mJO4iRnXK4U1gXuWOr+XdYwx5JwC7TiYIUd19g0BjcJJFAe9G9OpaL+yto5uN8EkzLWR18H8WvK4g54iGb0Uj0tZ5cSKV46KRdsX89fyR4mhpW8Wb2UPFCrWxojZA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 149.199.80.198) smtp.rcpttodomain=microsoft.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=pjde0p4b3kNxbw4vF0wZ7gHyVMczxcRk1uef3gJZnfo=; b=Ziell3ndoZDVW6i33cjvs5W6xSZeIncqcnfK0sfp9/9pwl8sxcrpQyt+x4ifMX4fBc3rCmzVQvLU5VLWfKgyXVNhZRTpvMBSEHitxPTq736Bl9Ca2X+mOnznzEMeQCqWwqBEXUPXo1Ld3+9WqlRwIJjK9uojP77spkscqurvYr8= Received: from DM6PR06CA0094.namprd06.prod.outlook.com (2603:10b6:5:336::27) by DM6PR02MB4812.namprd02.prod.outlook.com (2603:10b6:5:17::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5546.22; Mon, 22 Aug 2022 15:07:17 +0000 Received: from DM3NAM02FT005.eop-nam02.prod.protection.outlook.com (2603:10b6:5:336:cafe::ef) by DM6PR06CA0094.outlook.office365.com (2603:10b6:5:336::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5546.22 via Frontend Transport; Mon, 22 Aug 2022 15:07:17 +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-pvapexch02.xlnx.xilinx.com; pr=C Received: from xir-pvapexch02.xlnx.xilinx.com (149.199.80.198) by DM3NAM02FT005.mail.protection.outlook.com (10.13.5.123) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5546.15 via Frontend Transport; Mon, 22 Aug 2022 15:07:17 +0000 Received: from xir-pvapexch02.xlnx.xilinx.com (172.21.17.17) by xir-pvapexch02.xlnx.xilinx.com (172.21.17.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.14; Mon, 22 Aug 2022 16:07:16 +0100 Received: from smtp.xilinx.com (172.21.105.198) by xir-pvapexch02.xlnx.xilinx.com (172.21.17.17) with Microsoft SMTP Server id 15.1.2176.14 via Frontend Transport; Mon, 22 Aug 2022 16:07:16 +0100 Envelope-to: longli@microsoft.com, thomas@monjalon.net, david.marchand@redhat.com, dev@dpdk.org, sharmaajay@microsoft.com, sthemmin@microsoft.com, viacheslavo@nvidia.com, matan@nvidia.com Received: from [10.71.194.74] (port=49686) by smtp.xilinx.com with esmtp (Exim 4.90) (envelope-from ) id 1oQ919-0005E4-Iu; Mon, 22 Aug 2022 16:07:07 +0100 Message-ID: <0443d4db-0fe3-60d6-b62f-14976965f1a7@xilinx.com> Date: Mon, 22 Aug 2022 16:07:05 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.1.2 Subject: Re: [Patch v4 01/17] net/mana: add basic driver, build environment and doc Content-Language: en-US From: Ferruh Yigit To: , Thomas Monjalon , David Marchand CC: , Ajay Sharma , Stephen Hemminger , Viacheslav Ovsiienko , Matan Azrad References: <1657324171-31369-1-git-send-email-longli@linuxonhyperv.com> <1657324171-31369-2-git-send-email-longli@linuxonhyperv.com> <859e95d9-2483-b017-6daa-0852317b4a72@xilinx.com> In-Reply-To: <859e95d9-2483-b017-6daa-0852317b4a72@xilinx.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3cd39c4c-6a8a-479f-b061-08da84500108 X-MS-TrafficTypeDiagnostic: DM6PR02MB4812:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: teYN7eiZ14pHIU/0+BMwxsm78OaejBt5SHrtCKAlt80PBgCGwQ9vlOWi+XAq39yJzjbrr8nNLbpg8NmW87ln6gYF5RtDbNlm+NCmOadX+gmn/NOimzJcmQc4l3OH2PG/0kFQPD2PL1BbOPX/NglW05ZfEVjBJFB1Caiw7rqPSUah7bElmBg5CJ8d38FZ+xlTVRO3rX568Pwu+hc0Rkokaw9Q0i3HUQjeR98XExHHLcWPCnKAzwxoeymbE05tHC6LK8FKV1kQtkyJsNCov1PIEsKig475cKlUIZnvhmGAYY1xf75lnI32XmCHTR7GMYVmMvj2dyKY3wBILh3y3T9hoqxegZ7UduBnFfeKsxufXqyF8eCHWsSnQkEqFInDf0s/tuEdTYRy3AwU32EuJvCjsysicEiLXw3GEtyAa2CJWX7aXijVhc9nO+W31PKwRc4divc8vcse2VGnXbeVlIhXR3CRuE1jEjNlI7YoW5jnG7Km7h9i2mD0pdqI8RQqMj+7jRnwOYpzScJGzRnRcW3YqXYNRR4AcyxUuSmMZhq7MAr0Ho2Ha5mEx26rv0M32Uzag3xQglaAYSS9agjxuryYKoeIzzjIAqXOZqdxuzTAlHnpvzmdGjGzn23S2OcS/LIvmlbRh9DngV7+IDnASdtRzQ5KedJInC/SraUD8T+d/fkPCv2qZglnJiH9pMo4eyggMbzOWQM/Kg/2DnSydaLumkALVGA4j4WRiZUTFypizf/S7Nqr+nDLMgMv+T9Gf8NH/GR2aQsuA6zD9WwsYWGX5+W7d1/COb8JpMZwD1hzGegt+KRlOh36L1Lusd6CNagZuNis4uju1d0dIn/HWIhD3w== X-Forefront-Antispam-Report: CIP:149.199.80.198; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:xir-pvapexch02.xlnx.xilinx.com; PTR:unknown-80-198.xilinx.com; CAT:NONE; SFS:(13230016)(4636009)(346002)(39860400002)(136003)(396003)(376002)(36840700001)(46966006)(40470700004)(31696002)(26005)(44832011)(5660300002)(8936002)(9786002)(2906002)(53546011)(82310400005)(40460700003)(36860700001)(426003)(47076005)(336012)(186003)(2616005)(356005)(40480700001)(7636003)(82740400003)(36756003)(54906003)(110136005)(478600001)(41300700001)(31686004)(4326008)(8676002)(70586007)(70206006)(316002)(50156003)(43740500002); DIR:OUT; SFP:1101; X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Aug 2022 15:07:17.3599 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3cd39c4c-6a8a-479f-b061-08da84500108 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-pvapexch02.xlnx.xilinx.com] X-MS-Exchange-CrossTenant-AuthSource: DM3NAM02FT005.eop-nam02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR02MB4812 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/22/2022 4:03 PM, Ferruh Yigit wrote: >> +                             struct rte_pci_device *pci_dev, >> +                             struct rte_ether_addr *mac_addr) >> +{ >> +       struct ibv_device **ibv_list; >> +       int ibv_idx; >> +       struct ibv_context *ctx; >> +       struct ibv_device_attr_ex dev_attr; >> +       int num_devices; >> +       int ret = 0; >> +       uint8_t port; >> +       struct mana_priv *priv = NULL; >> +       struct rte_eth_dev *eth_dev = NULL; >> +       bool found_port; >> + >> +       ibv_list = ibv_get_device_list(&num_devices); >> +       for (ibv_idx = 0; ibv_idx < num_devices; ibv_idx++) { >> +               struct ibv_device *ibdev = ibv_list[ibv_idx]; >> +               struct rte_pci_addr pci_addr; >> + >> +               DRV_LOG(INFO, "Probe device name %s dev_name %s >> ibdev_path %s", >> +                       ibdev->name, ibdev->dev_name, ibdev->ibdev_path); >> + >> +               if (mana_ibv_device_to_pci_addr(ibdev, &pci_addr)) >> +                       continue; >> + >> +               /* Ignore if this IB device is not this PCI device */ >> +               if (pci_dev->addr.domain != pci_addr.domain || >> +                   pci_dev->addr.bus != pci_addr.bus || >> +                   pci_dev->addr.devid != pci_addr.devid || >> +                   pci_dev->addr.function != pci_addr.function) >> +                       continue; >> + > > As far as I understand, intention of this loop is to find 'ibdev' > matching this device, code gooes through all "ibv device list" for this, > I wonder if there is a easy way for doing this, like a sysfs entry to > help getting this information? > And how mlx4/5 does this? Since there are multiple RDMA devices now, does it make sense to have RDMA bus driver, which can hide some PCIe details under bus, and driver can get PCI and ibdev information during probe?