From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0083.outbound.protection.outlook.com [104.47.41.83]) by dpdk.org (Postfix) with ESMTP id 0199B5599 for ; Thu, 1 Dec 2016 07:24:02 +0100 (CET) Received: from BLUPR0301CA0009.namprd03.prod.outlook.com (10.162.113.147) by MWHPR03MB2477.namprd03.prod.outlook.com (10.169.200.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.761.9; Thu, 1 Dec 2016 06:24:01 +0000 Received: from BY2FFO11OLC004.protection.gbl (2a01:111:f400:7c0c::123) by BLUPR0301CA0009.outlook.office365.com (2a01:111:e400:5259::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.747.13 via Frontend Transport; Thu, 1 Dec 2016 06:24:00 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; intel.com; dkim=none (message not signed) header.d=none;intel.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 BY2FFO11OLC004.mail.protection.outlook.com (10.1.15.184) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.734.4 via Frontend Transport; Thu, 1 Dec 2016 06:24:00 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:; UpperCasedChecksum:; SizeAsReceived:945; Count:13 Received: from [10.232.14.87] ([10.232.14.87]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id uB16Nvuw023470; Wed, 30 Nov 2016 23:23:58 -0700 To: Ben Walker References: <1479929804-19614-1-git-send-email-benjamin.walker@intel.com> <1479931644-78960-1-git-send-email-benjamin.walker@intel.com> <1479931644-78960-3-git-send-email-benjamin.walker@intel.com> CC: From: Shreyansh Jain Message-ID: Date: Thu, 1 Dec 2016 11:56:49 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.0 MIME-Version: 1.0 In-Reply-To: <1479931644-78960-3-git-send-email-benjamin.walker@intel.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-IncomingHeaderCount: 13 X-EOPAttributedMessage: 0 X-Matching-Connectors: 131250470408206286; (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)(7916002)(2980300002)(1109001)(1110001)(336004)(3190300001)(339900001)(189002)(199003)(24454002)(377454003)(8676002)(81166006)(81156014)(39450400002)(39410400001)(23746002)(39380400001)(38730400001)(39400400001)(85426001)(77096006)(229853002)(2906002)(97736004)(92566002)(7846002)(4326007)(305945005)(8936002)(356003)(230700001)(189998001)(83506001)(4001350100001)(104016004)(106466001)(105606002)(47776003)(31696002)(65956001)(64126003)(33646002)(76176999)(50986999)(54356999)(626004)(36756003)(50466002)(65806001)(31686004)(5660300001)(86362001)(65826007)(2950100002)(110136003)(68736007)(6916009)(6666003); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR03MB2477; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11OLC004; 1:XVWWXnEZTyffb9tHoBl31CL8CxGv7MFThzdpkVapdYRrurDJ9NEBGFpDfI40rzv9D3X890PGF7N2efRrcEw6IvvzWWd0FOyXcuYY/hOCJHlcE9dTVOtjvLhrmqdsRvKaX8ZUF5bbw0fM0nggezYu8dAxF6gh8BIY9BbmJSIyqguRV2hw1uulH4ha9K+YD2qfMKlZN2DP/mRTa65co5I03Z6rFP30h9NRBEoR+T1rbB5uA0YZElG6YB4yOnIe6Hq2OduijyC4859fkgLiiPZRPWLBQJRUIrffC5xzkYORCV+WBZwD9IVaOOIostHYlw8c3JOKxs2uN/LqFARr2ncxDR6zwedJYhPEJ1BdDuNhKw8wnNHJZG561CNRAFtAouGsqxlZzPQPRx50r/aE/9tVakk6nGucFjFr3bjLR7NvJRI8j0Id5VenpVTzX7V6ZjhUNygxjsnagZND+2lyQAY/kRJ7BT1EU9TkQlYCfHl1VQVU3EAHN/ihhvK2DFJM+OFJaSqfnx4k0F5MwNt3edtzL6Ev4PIhoyUXXPb3TLW0DyXWDzV4b0hTr2nMNyOXP+H0ginbkKPEns+219BMz61bjE97FxS3vG0a19hWE7u7ZF5UqPq6e7a7LgjZFTTynzIqxVbmSDDPH8p2KA2a8DYEnFNglfXGzQjMgJ2nwL+vPc8= X-MS-Office365-Filtering-Correlation-Id: d26ca40c-8a79-4e60-5670-08d419b2a3bd X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:MWHPR03MB2477; X-Microsoft-Exchange-Diagnostics: 1; MWHPR03MB2477; 3:zX5cZyEiZSnKyDPZ9tv4Kx68J5WljJNuEH6itfbRb1/4LC4pgW43phtz1KUBQhwx1J6uwq5Wdh1UZQJU/KpgHd76K09pnaLnI2gcsYFetsrUU5FGqsfwBB7n2vpWnCTxCnCKuvBtljzkVwtX4WONA0Ro+f+gnk4DE1VhIYXYgqylf4tBL9MFuRmQVY6PnrQMyV7EH0E7NuLbXwtFki8D+Qs39E5p1gPSF3Nsj7BYbg7jm3nJpFBz08RcyneCPKNUZgAZ4UVDoBlXFnibDiCDCYVcrTLvDqdgz9ksRLTeSiUNqL8Y9277Z7uoz5wR/5bDqEf/ZktbbATz/UYd4T0vtVIunZII0jFIMOGqaeOFMpSV6GezbiIIalBFj7nFu/vs X-Microsoft-Exchange-Diagnostics: 1; MWHPR03MB2477; 25:MhT/+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rx9f1e3jZM47zGQ== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095060)(601004)(2401047)(13023025)(13015025)(13024025)(13018025)(13017025)(8121501046)(5005006)(10201501046)(3002001)(6055026)(6096035)(20161123565025)(20161123561025)(20161123559025)(20161123556025)(20161123563025); SRVR:MWHPR03MB2477; BCL:0; PCL:0; RULEID:(400006); SRVR:MWHPR03MB2477; X-Microsoft-Exchange-Diagnostics: 1; MWHPR03MB2477; 4:NSocgQbf8hU1iBmbHQ18Ybfg1H8P2vfqup11toCMB0NpbdxrjFa/ETOC0d/7g5TT1D9VivYJGf3rG13Xy47hx0wCDRTi0Fw6RLVCMMtbjkftvjL29+lL0CIa5x1AKkQQpKqEol5jNF2+QL44LMvTdBnTqFBv6LlsD4QEGLjTFAoX7XygeVf1TjQNrJX2Js7haiB/TnmezL8KVQAZ+s1x4dzyhy2DCGK7yX7mGkAiv9d6TEJmuBtj5VAKJuWSsXDfDN0IGprvbAf4TQZx/Ith7n781Q2ZO8q8yvvDsFHKvWgEkH6wSAaI0fj5F3F1ApAhF4yhRjBzsmgup18Wl/9k0qO3cFhFFSuZZ8UzkbeOa3C76X7JY6esgGL/ITj5FbWdqjM4UfL4mKk9ecjMPVZfimOsf3ZSvMIpNLGxQlESU2yEVhVy9Ra6+p0U5X7J3QRc6XehLkFgJGBzT7cYXRq042E9CcgCazP5x3Ly8mCZPjIR672x09NRrcp8YKBi1x24yHbm+43vlm+MyTgQp3bCEPsdpaJqbGF4Igp8iepa31T7DP73JLtt239k2L/3cY5JLWXcK+sG4Ku8//EJA29TLk14epYcAK+Q4Cu7jR7Nhsgs6SJ9j0H+KUYJezaKd6aKlJHVuqmUJObT7rv+0n/27XhD2OGUCiHoJqFVWWRSD1EV1NMbWr/oPwHzgW59qprAvqrgGOMX9zBGPzDIHhbEuyrJyvaMpQnQEx5oL5G/D0uIElyWkfR62oeCPip2yXJn X-Forefront-PRVS: 014304E855 X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1; MWHPR03MB2477; 23:YC4c1is2iGyU0JfKxKBLOgXUp93zD5ZhnVRee?= =?Windows-1252?Q?j5QIou8gybtTk1YfWnXK8qkfOW1INN9YlQzWFjg9BkK0rfu8g61OwQNV?= =?Windows-1252?Q?BRTV73+Zv2cVurSktiazJC4Ic3pV2FQpAJMzv096BVVaVYo8Qe9fIxwl?= =?Windows-1252?Q?FaxjZATtGI54my5VrdJz4HO815hbJGDuhKCHn/W295veQICCykArYEcv?= =?Windows-1252?Q?Xu1YVRAf2WF2U3MV99vShpHDXQrRh/spShkRxEOQJZJaRYABMSt6vS9q?= =?Windows-1252?Q?KoCew5Or53yukmf2cTFT1T+LBdCEsNrGZhg062Xk11z5VGWiyUOmEVUf?= =?Windows-1252?Q?JIHcv2PneBX2mtYHnt/uVvLN6WlKGiXiJj9uhc99xq2CZmNzOdCOHifi?= =?Windows-1252?Q?n5v037hh3jvMDgW0shRZTtcWXfN0X9m277mHV1O24v9GMdtNoDgKHjeB?= =?Windows-1252?Q?OtypMYo3jS1rBQ2h644Oe2C3KB+ER94OscWYMo8hoSMrm7MhMcZ0wwd1?= =?Windows-1252?Q?HryvFu422sOYyZY8Qsvd3dK11MsZOb8y2Ad1Jyz0as4S6TwEefFw7ecg?= =?Windows-1252?Q?DRYjrC4BS4U2NcTuX9WmQhRDMhTHR6pjxXHvTppCQYBhoGetPb22aOfw?= =?Windows-1252?Q?HXkPHTGYiVHYadnt6DNXF+6X5FlHsQx/Zh3wJNots7FXAVbIy2m0ZAYJ?= =?Windows-1252?Q?5UWcjUwNE4PL77qPAit6g7IIwE3eAXwFmb0m5bm35zsB9BXeXsyaKk5/?= =?Windows-1252?Q?mpBMXRN2y9Ohn5/H63WHv34bxSunMckTRfhzo/Hx+djzVuGit3PAbLGC?= =?Windows-1252?Q?hwJfU3jk6rgBpWVAkJQK3rGXClMfzTcmO9edqaYXGSlJYzvV35823fF1?= =?Windows-1252?Q?RG6dmDaBU4ba6XM8N89eA89YwC4H1vsLxqu3IqQ2PwAlMUIa1chQRRQy?= =?Windows-1252?Q?kwZ2Cm8HIJ9IrkfDtdyQ4fXoEte8aicxjaftq1Y9GO/9TvmMTZ7BsaA6?= =?Windows-1252?Q?YAwUCE4/9x51Pmt10Qdn+E4DUfLQ/u/6G6Ugua0PRYAxldJfOGaIiXwM?= =?Windows-1252?Q?uT0d5kLzStuA3DyPlttTGvyga8ddc9ps97H/z0nWGLdFMDkvwP8PYUso?= =?Windows-1252?Q?AsEHyrJ/ILLnkioHfjKQPuJXBjMSjDjs2ZgAe8m6BptGwuLKrsNPwnrQ?= =?Windows-1252?Q?dSZzsbmyonWNGskLmAB+FqH8gcR7db8M6yoO056uV6khihLKqT9Eg6KH?= =?Windows-1252?Q?C95P2WFuuMKwD6A4Sc1kQGWDgBaxgIhuesXLdqtuPafDLjMisfYYPyy1?= =?Windows-1252?Q?1dOA1hHZ5/0ZcSGWH65WOQu845qNX3hkLgEB8KL3Jg8DBaKCZzL66ro5?= =?Windows-1252?Q?eLcfQjjcH4PjsQ3mZf5RdqXZws9UloCpXeod0dxF9P8IlHD/D6TOiu2i?= =?Windows-1252?Q?heBjCExDzAW+NlIhN/6zI97/W3RtTO9Ji+7hwQihtM8g/L/K1pewJKJ7?= =?Windows-1252?Q?JWEAVK6BIrkEeUR2BcOKffoqhU71qdgfoUeRQ8QuRrDL07RC4R3cO0M6?= =?Windows-1252?Q?MCL4RTymVhJgYA=3D?= X-Microsoft-Exchange-Diagnostics: 1; MWHPR03MB2477; 6:3chEX+nDMSIcU/X15jF5U5uXRD30Z0rHaFLQDXj43cetmTZPAUm38N0E6HRxPODO2D2qNLfvdNcFdAG+Z7U6IqiKmhWfpBMRDTCK4xwjhq3tJuqb2nwA76vOu/0vBO/3LqMbNv7fZy408YB2l/EOntSoClG7SI6c+MfgQeXhxL81ie3i/rWqmTZDTyQ2bQq7/y86xYAujDVDFyw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osEow== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Dec 2016 06:24:00.6178 (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: MWHPR03MB2477 Subject: Re: [dpdk-dev] [PATCH v2 3/7] pci: Pass rte_pci_addr to functions instead of separate args X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Dec 2016 06:24:03 -0000 Hello Ben, On Thursday 24 November 2016 01:37 AM, Ben Walker wrote: > Instead of passing domain, bus, devid, func, just pass > an rte_pci_addr. > > Signed-off-by: Ben Walker > --- > lib/librte_eal/linuxapp/eal/eal_pci.c | 32 +++++++++++++------------------- > 1 file changed, 13 insertions(+), 19 deletions(-) > > diff --git a/lib/librte_eal/linuxapp/eal/eal_pci.c b/lib/librte_eal/linuxapp/eal/eal_pci.c > index 876ba38..073af5f 100644 > --- a/lib/librte_eal/linuxapp/eal/eal_pci.c > +++ b/lib/librte_eal/linuxapp/eal/eal_pci.c > @@ -267,8 +267,7 @@ pci_parse_sysfs_resource(const char *filename, struct rte_pci_device *dev) > > /* Scan one pci sysfs entry, and fill the devices list from it. */ > static int > -pci_scan_one(const char *dirname, uint16_t domain, uint8_t bus, > - uint8_t devid, uint8_t function) > +pci_scan_one(const char *dirname, const struct rte_pci_addr *addr) > { > char filename[PATH_MAX]; > unsigned long tmp; > @@ -281,10 +280,7 @@ pci_scan_one(const char *dirname, uint16_t domain, uint8_t bus, > return -1; > > memset(dev, 0, sizeof(*dev)); > - dev->addr.domain = domain; > - dev->addr.bus = bus; > - dev->addr.devid = devid; > - dev->addr.function = function; > + dev->addr = *addr; > > /* get vendor id */ > snprintf(filename, sizeof(filename), "%s/vendor", dirname); > @@ -429,16 +425,14 @@ pci_update_device(const struct rte_pci_addr *addr) > pci_get_sysfs_path(), addr->domain, addr->bus, addr->devid, > addr->function); > > - return pci_scan_one(filename, addr->domain, addr->bus, addr->devid, > - addr->function); > + return pci_scan_one(filename, addr); > } > > /* > * split up a pci address into its constituent parts. > */ > static int > -parse_pci_addr_format(const char *buf, int bufsize, uint16_t *domain, > - uint8_t *bus, uint8_t *devid, uint8_t *function) > +parse_pci_addr_format(const char *buf, int bufsize, struct rte_pci_addr *addr) > { > /* first split on ':' */ > union splitaddr { > @@ -466,10 +460,10 @@ parse_pci_addr_format(const char *buf, int bufsize, uint16_t *domain, > > /* now convert to int values */ > errno = 0; > - *domain = (uint16_t)strtoul(splitaddr.domain, NULL, 16); > - *bus = (uint8_t)strtoul(splitaddr.bus, NULL, 16); > - *devid = (uint8_t)strtoul(splitaddr.devid, NULL, 16); > - *function = (uint8_t)strtoul(splitaddr.function, NULL, 10); > + addr->domain = (uint16_t)strtoul(splitaddr.domain, NULL, 16); > + addr->bus = (uint8_t)strtoul(splitaddr.bus, NULL, 16); > + addr->devid = (uint8_t)strtoul(splitaddr.devid, NULL, 16); > + addr->function = (uint8_t)strtoul(splitaddr.function, NULL, 10); > if (errno != 0) > goto error; > > @@ -490,8 +484,7 @@ rte_eal_pci_scan(void) > struct dirent *e; > DIR *dir; > char dirname[PATH_MAX]; > - uint16_t domain; > - uint8_t bus, devid, function; > + struct rte_pci_addr addr; > > dir = opendir(pci_get_sysfs_path()); > if (dir == NULL) { > @@ -500,20 +493,21 @@ rte_eal_pci_scan(void) > return -1; > } > > + > while ((e = readdir(dir)) != NULL) { > if (e->d_name[0] == '.') > continue; > > - if (parse_pci_addr_format(e->d_name, sizeof(e->d_name), &domain, > - &bus, &devid, &function) != 0) > + if (parse_pci_addr_format(e->d_name, sizeof(e->d_name), &addr) != 0) > continue; > > snprintf(dirname, sizeof(dirname), "%s/%s", > pci_get_sysfs_path(), e->d_name); > - if (pci_scan_one(dirname, domain, bus, devid, function) < 0) > + if (pci_scan_one(dirname, &addr) < 0) > goto error; > } > closedir(dir); > + > return 0; > > error: > Do you mind if I use this patch directly as part of my patchset for bus Model? I was doing a similar change to make the pci_scan_one simpler (and pass along a new argument).. - Shreyansh