From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0087.outbound.protection.outlook.com [104.47.38.87]) by dpdk.org (Postfix) with ESMTP id E7EA32B9D for ; Fri, 3 Mar 2017 10:26:03 +0100 (CET) Received: from CY4PR03CA0004.namprd03.prod.outlook.com (10.168.162.14) by BN6PR03MB2945.namprd03.prod.outlook.com (10.175.126.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.947.12; Fri, 3 Mar 2017 09:26:02 +0000 Received: from BL2FFO11FD006.protection.gbl (2a01:111:f400:7c09::188) by CY4PR03CA0004.outlook.office365.com (2603:10b6:903:33::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.947.12 via Frontend Transport; Fri, 3 Mar 2017 09:26:02 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BL2FFO11FD006.mail.protection.outlook.com (10.173.161.2) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.933.11 via Frontend Transport; Fri, 3 Mar 2017 09:25:58 +0000 Received: from b27504-OptiPlex-790.ap.freescale.net (b27504-OptiPlex-790.ap.freescale.net [10.232.132.60]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id v239Psdd023237; Fri, 3 Mar 2017 02:25:55 -0700 From: Nipun Gupta To: CC: , , , , , , Nipun Gupta Date: Fri, 3 Mar 2017 21:03:02 +0530 Message-ID: <1488555182-17881-1-git-send-email-nipun.gupta@nxp.com> X-Mailer: git-send-email 1.9.1 X-EOPAttributedMessage: 0 X-Matching-Connectors: 131330067617767946; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(336005)(7916002)(39380400002)(39860400002)(39410400002)(39400400002)(39850400002)(39450400003)(39840400002)(2980300002)(1109001)(1110001)(339900001)(189002)(199003)(9170700003)(5003940100001)(8936002)(47776003)(81166006)(50226002)(104016004)(8676002)(2351001)(77096006)(50986999)(86362001)(106466001)(85426001)(575784001)(105606002)(4326008)(110136004)(8656002)(36756003)(626004)(33646002)(38730400002)(356003)(2906002)(54906002)(6916009)(189998001)(48376002)(50466002)(53936002)(5660300001)(92566002)(6666003)(305945005); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR03MB2945; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; MLV:ovrnspm; MX:1; A:1; PTR:InfoDomainNonexistent; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD006; 1:JmCxtblOJiFICJN0e/WOf4QTMqwwj/LqbjRldB0o1lf2lA+/oxQFpvResEa0H/BXsr/pbesLLWg3rdJjGZIhcmpkMC/SM7UGbIoKNDxZlaeGSajfF1NRwGfBEr8V8ssIFWLS/YBnqbpTEployiChl50rR+e+hlZZK8IrnypNN80fGgPOd2QctI91HWawJLRlRemvh94JymqiCuY4j/zhvqL6yiXM8yJ/dCQWPmglJ78wYsIgd2mpJ20/2aqwLGhzX8SwTvoai5/sWm+hsA2va/crhe3wV8ynGN/A3jJdq7RgUdeh34Ysn4Lb9h0/WkKKXP33rKzNC7YnFNZ7u4f0Qn5romkT64UJOesEaVFWXWEQGLVlWX1BY+av2TflnQiLRQVrzfj2dm4tFxp+kO1OCYj92P6U8fQWtx10LmyYITSEwUio4x3xv/68NWKEnbxRxDgtlXr4VZn3rsV+HYKYkvAnNipO3//ixZ0YbcpDEf63xV3w1tFAUASautN6ZlKfp1HPpKht6s/CAI8fgNDfi31gpu6BZcoR3tAWasjDjG6jSJoK06a3Yqe10GZTflYyQQJL3dv2viG3fab2rJlg6mQWr6cd1FMpRvvRyX0qm04ml438VpKP2ELHqKoz//ysL2JUhIKL3Jn//FNoUaFrVAsI3OyXOoPuF5rnk2Om7PV7gDvNp4vFBRbuDhsUxqe/HBLsGijT1XBCWGOoLUm+QlxmY4RuMoBwJfQ2NRYQk9YCmqulmI0VH2Tdccwpu97a MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 3441e553-e30c-409a-620a-08d462174f26 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:BN6PR03MB2945; X-Microsoft-Exchange-Diagnostics: 1; BN6PR03MB2945; 3:qt23SlJe5T+UQJl9S0jW7NyfXb9R5S/tFdR7hoCsFQ9j5m2CydDf8aOn2YBvlDcdGw54tSYSwSUf8lH+a4vRxt41vvWZCz+Bc3j4vEUlsYcnE26E69wpL8ZqLFwZjIYp4h8Taa7XF0b7b9ejQr8TJG65DPCZ1oqpwnmuaoqTmuFFspVGe/dKrx8hNrndb23m+DUR+8UnsGpoTLn6mM3H1Vl3pj85334A0UhjALnWpGhXPkUI7sOJ35+SV1EDFmWjyACJLjBWLtGmCWZjSYZDG0gYI4Yq0LXPBPlaWowhPuWdsA3gRk6Lzlx0yXHskB2hFeYkfDZ7ft36t/G7n0ZE3nGInz9B6eZ49U+lPm1XwVqo3Uo5LehBX/UPGDReDF1r; 25:2TqdYpTBZjKhiXriNv0vYfY3W7HWYNAKaU9U+Tb6c+aDGl9Mm/0MGMtux+ZSeGhcQ5j1KzvVu6RCaCWSjb2/5Vjoeug0sGOGSBm5Nm36pTKtBN1mCHoW5hrHM9wYt9gQMFlGt4QpK7WKIiTz6exCvOVhe/eWqRmjrRUsE4pqqFWKxP+iNHlwTuzObNn4lbBuyCC49uiFjae+VL1cF6EmCuic8uEf7j1ywmVWy3cT6kvHIsrLEv8ahE0XCYmPZpxY3ua00CEA+IyPrwgpO9lt8T5oKsyfutJBPB8Vd5Vp9n5qAqMXWtpT5kNLoG2FRQg9ZqpUPuxmDYGxcbB6Uol+hoqcprW5VPnIUV4mYEfL6yuw+EpYofTnN8asHNyqerkqvQUwjbBTVK0P3NnHcWdebQ2H4L93dlLPdhJnQJIKRX6V3aST9csoWNqvJs0F+AdRtK+FBYtgsXt1CMuHG1INOg== X-Microsoft-Exchange-Diagnostics: 1; BN6PR03MB2945; 31:tR91p3dGitDTMcC52lX2KH5KpvNlUcKhIFxto+I8wQDH5qOJWi3NSwPb4hB/ZrHZsrxhTJBZpZ68fYap8ieRsgmxIVjQRuMx1zr9RHtyffRsg/5uAVZ/UrSvtg7ewtIRbCN/am7KmxWTuS9QgGZBRjgeXcDApGwVv8ES4BFLvED7KATommwoDuQOhvws554tJ4/D6dUb12bASkkwaFhfVgcRWS9mGpspR/dpjR8Rnd2kCFpywt7GZkbwkxkiGYpFml0m4DEGePcZ6KnB0uu7Vh7pt4uLaurP7Si/1xE/964= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(278428928389397)(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095060)(601004)(2401047)(8121501046)(5005006)(13017025)(13015025)(13024025)(13018025)(13023025)(10201501046)(3002001)(6055026)(6096035)(20161123561025)(20161123559025)(20161123556025)(20161123565025)(20161123563025); SRVR:BN6PR03MB2945; BCL:0; PCL:0; RULEID:(400006); SRVR:BN6PR03MB2945; X-Microsoft-Exchange-Diagnostics: 1; BN6PR03MB2945; 4:1jkxOWeSsOeGwakXp5QnhIKS55uLifCpqXxD9hfoHMBxEofzemv/usa/LOeSt7VMNAr/ZliVdNWqTHv4g5piGDOGoUO3R5CXC+JeUBzl/4BuF3wdU3Jr1zikqcPimpMIdOUHkzSRB88/RQYE9yq6m4rYGWK4MVplsKwnRy4L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U6/qmG/mNUHgyMtYBR0+PrBT8miR5HHTtjXtofvC8YIdBdj8So3Q08nyBlLx9sky2ZA4i/Hf7EeKSfHtzzt1K7MnDd66tlxtfA4Xzo6er/QauOyppQr6J6obG/4ujsXbMe1CSiYwhbRd46jPIgDKUdbDjzppFHemmkbsyFeBvkTa/B0aWMC7/MX4hPsFRulEw+uIlN+MTTpp2EaPpJZz6Dv2H3g== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Mar 2017 09:25:58.7815 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR03MB2945 Subject: [dpdk-dev] [PATCH v2] eventdev: event device to contain rte device holder X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Mar 2017 09:26:04 -0000 rte_device is a generic device which is available to the applications and EAL. This patch replaces rte_pci_device in 'struct rte_eventdev' and in 'struct rte_event_dev_info' with common rte_device. Signed-off-by: Nipun Gupta Acked-by: Shreyansh Jain --- drivers/event/skeleton/skeleton_eventdev.c | 2 +- lib/librte_eventdev/rte_eventdev.c | 6 +++--- lib/librte_eventdev/rte_eventdev.h | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/event/skeleton/skeleton_eventdev.c b/drivers/event/skeleton/skeleton_eventdev.c index dee0faf..770dce3 100644 --- a/drivers/event/skeleton/skeleton_eventdev.c +++ b/drivers/event/skeleton/skeleton_eventdev.c @@ -383,7 +383,7 @@ if (rte_eal_process_type() != RTE_PROC_PRIMARY) return 0; - pci_dev = eventdev->pci_dev; + pci_dev = RTE_DEV_TO_PCI(eventdev->dev); skel->reg_base = (uintptr_t)pci_dev->mem_resource[0].addr; if (!skel->reg_base) { diff --git a/lib/librte_eventdev/rte_eventdev.c b/lib/librte_eventdev/rte_eventdev.c index 68bfc3b..b8be5da 100644 --- a/lib/librte_eventdev/rte_eventdev.c +++ b/lib/librte_eventdev/rte_eventdev.c @@ -125,7 +125,7 @@ dev_info->dequeue_timeout_ns = dev->data->dev_conf.dequeue_timeout_ns; - dev_info->pci_dev = dev->pci_dev; + dev_info->dev = dev->dev; if (dev->driver) dev_info->driver_name = dev->driver->pci_drv.driver.name; return 0; @@ -1196,7 +1196,7 @@ struct rte_eventdev * "device data"); } - eventdev->pci_dev = pci_dev; + eventdev->dev = &pci_dev->device; eventdev->driver = eventdrv; /* Invoke PMD device initialization function */ @@ -1250,7 +1250,7 @@ struct rte_eventdev * /* Free event device */ rte_event_pmd_release(eventdev); - eventdev->pci_dev = NULL; + eventdev->dev = NULL; eventdev->driver = NULL; return 0; diff --git a/lib/librte_eventdev/rte_eventdev.h b/lib/librte_eventdev/rte_eventdev.h index 7073987..6140078 100644 --- a/lib/librte_eventdev/rte_eventdev.h +++ b/lib/librte_eventdev/rte_eventdev.h @@ -330,7 +330,7 @@ */ struct rte_event_dev_info { const char *driver_name; /**< Event driver name */ - struct rte_pci_device *pci_dev; /**< PCI information */ + struct rte_device *dev; /**< Device information */ uint32_t min_dequeue_timeout_ns; /**< Minimum supported global dequeue timeout(ns) by this device */ uint32_t max_dequeue_timeout_ns; @@ -1059,8 +1059,8 @@ struct rte_eventdev { /**< Pointer to device data */ const struct rte_eventdev_ops *dev_ops; /**< Functions exported by PMD */ - struct rte_pci_device *pci_dev; - /**< PCI info. supplied by probing */ + struct rte_device *dev; + /**< Device info. supplied by probing */ const struct rte_eventdev_driver *driver; /**< Driver for this device */ -- 1.9.1