From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0040.outbound.protection.outlook.com [104.47.38.40]) by dpdk.org (Postfix) with ESMTP id C77FF14EC for ; Tue, 17 Jan 2017 11:09:43 +0100 (CET) Received: from BN6PR03CA0061.namprd03.prod.outlook.com (10.173.137.23) by BY2PR0301MB0742.namprd03.prod.outlook.com (10.160.63.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.845.12; Tue, 17 Jan 2017 10:09:41 +0000 Received: from BN1AFFO11OLC003.protection.gbl (2a01:111:f400:7c10::150) by BN6PR03CA0061.outlook.office365.com (2603:10b6:404:4c::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.845.12 via Frontend Transport; Tue, 17 Jan 2017 10:09:40 +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 BN1AFFO11OLC003.mail.protection.outlook.com (10.58.53.74) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.803.8 via Frontend Transport; Tue, 17 Jan 2017 10:09:40 +0000 Received: from [10.232.14.39] ([10.232.14.39]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id v0HA9b7m026585; Tue, 17 Jan 2017 03:09:38 -0700 To: Ferruh Yigit , References: <1484581107-2025-1-git-send-email-shreyansh.jain@nxp.com> <1484581107-2025-6-git-send-email-shreyansh.jain@nxp.com> <4721b3d8-7374-76e8-d859-61c86a88a314@intel.com> CC: , From: Shreyansh Jain Message-ID: Date: Tue, 17 Jan 2017 15:43:06 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: <4721b3d8-7374-76e8-d859-61c86a88a314@intel.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-EOPAttributedMessage: 0 X-Matching-Connectors: 131291213808693422; (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)(336005)(2980300002)(1110001)(1109001)(339900001)(3190300001)(24454002)(189002)(377454003)(199003)(2950100002)(6666003)(50466002)(5001770100001)(38730400001)(64126003)(65956001)(65806001)(97736004)(47776003)(4001350100001)(81166006)(36756003)(83506001)(68736007)(8676002)(81156014)(54906002)(85426001)(4326007)(2906002)(8936002)(77096006)(23746002)(229853002)(189998001)(50986999)(230700001)(33646002)(76176999)(54356999)(106466001)(105606002)(31696002)(104016004)(86362001)(65826007)(356003)(305945005)(31686004)(5660300001)(92566002)(30001)(626004); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR0301MB0742; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11OLC003; 1:pflumq4qKo4aoBjLYISTGdd81Mk5xBn+H9WJAEGMNc8/QrW3cZg7htc/rzvHu2nGCI+7Nm2fVyKC2vOc4aLxNSR+c5wyXEHgxSct0ib0uhpFM2gDk3xdYoDtBsMc7JZfJJD1EEd2AKZ1oCNYM3tsgr07ELC2Y2UPMlGlcmgA67hU1PaPvpVxCF4/jn4FvZAUwLJir3WHKD5pkp1qqQaV/OibqFtp2cLB8QLX3ulPxHwwjsTp3Fy2zj2YUlPQOWw/rA2kqxyiunvrtcJ1wxCp1VwsQD2tveGRIwM9tzsK1Ouixki+sUEDErRlzaKTHZhjGWR0jn0ZPoiSWVFJI9YwCkxamFen0eTF6SK1anUJ1QC+b6UDgD/YS4PCiLoSRv31tWa2/FNEwLLoLZg9V/Ppb8OR5ZXbniTnyzORkePi2bB9Uu9h+g1UZ22HnmGxe6PfsF9bZcRbHM1UvaYztC97/Z5KVQXTtGzo3nylG5jAfsEtdEUCkTcmq/3WgXd5ECZepmzEHNDOW+k5IG2XTS6PbAolclG2CPpUpCJrW8sLGV09JL8zgdjCrOkYIfEKzWUt2xWokvyDTXaT0D7KqDCoPqve2D6mEYBZDxH9ZokYtxF6Zd+KJSO2pvm5jG3Elkiz X-MS-Office365-Filtering-Correlation-Id: fac5d6bc-0bbb-4a9f-70ae-08d43ec0f3a9 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:BY2PR0301MB0742; X-Microsoft-Exchange-Diagnostics: 1; BY2PR0301MB0742; 3:8XD07vWIKcC4s/w6KHnUfRqA7Xecgdi2cbDoJ1nWf7STPxPh7mmj4jEHI6nGngfeGSPod13mWuwe0H4MjpYlwNlrZW7xF6nnDptbCI8d8S16J1ohvKg5kTPP7pjGt3ebWueO4kMq8jyP4zca2K0FJ3GZdqbmZ5/gXSbMx075lxhayHu9XqDeF8nMFIRr0xm2SlBIvraKp1ztw+CScmw7XiFEMIyMew9mCYrY2O1cs1BcsucGjBpYhn4eVSfPIx6yVO/e/X7SRizU5ban3vv2E5fqjbfS7sdcs5Oq9a8R2GBHSjRj6l2LNZb44KGjiUFrYefhkwKVomh4RM2iGhpCJ1iWSc1lyPovfu/8X3Yz/zEgDJe2S0jrE1FM95GyN1ad X-Microsoft-Exchange-Diagnostics: 1; BY2PR0301MB0742; 25:57H8fjrHTCmGVYZzL9FNePMYbXUNyzgUrq5ZMr9vh33ZsRNniRbKswVVDu7g2xmdMvsFnKcSNSdlb68EkFPlKlnpgg9D/vJuLPeY9lB90WF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(185117386973197)(211171220733660); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095060)(601004)(2401047)(13023025)(13017025)(13015025)(13024025)(13018025)(5005006)(8121501046)(3002001)(10201501046)(6055026)(6096035)(20161123561025)(20161123559025)(20161123556025)(20161123563025)(20161123565025); SRVR:BY2PR0301MB0742; BCL:0; PCL:0; RULEID:(400006); SRVR:BY2PR0301MB0742; X-Microsoft-Exchange-Diagnostics: 1; BY2PR0301MB0742; 4:+WQKMBh71bZfC/qeK7dJB3AdvdIIXK7BvwV40waZWgo/z21heQSzWS1D9yIvxbvWRlIfsCy2bOvw6AVmldtYtdTjscOD7SE1OLojaGnlwCS+cy4KWbEipoL1o57r456ZJyNwbmLe6qijQW5X7g7KbWXiET2GayGpiE5KM1dNcKVl9DdW92cBlGqV1KaHMMJJBeXoPxoOhDPDK/63XdlLHHFoaRXvSLDlsm5x8rWgS8OaKL2w4kyhDDunp30MWppGQGNxXr5wuYUxlVrK7TauwmJultHoa9TPkeVpm5GhRry4h8bBrVQ+1r0xhy/NV0hvP4jNlqe/gqTBer5lgr6sv8MnxVBskq0WCcRVPaLRfMyUzSI2UDj5Y8NC3Oit3xQuUZy7dIewWeF64x1kHyBPKbp6MSCFFDSPFxi2AyN8N+O5D7QkbAWh1RKmMVV8tpU3pgjk7sDSEkb1HlI3gww7pvrVtaNfg0k3y0m1WIVM6ptRpgA1QM44UJEySQeYcS2pt4MaPUy86SrrJc7lLzYB5Q7DKQ+k36fPH/6IhLEkUIUITP8CuR6arhKFC3+4qUW0oSdkIo/M3qsqXFAjKJFfpIdFBd9hhE4k5DiH3IB5Psnxx7KIyBWq61Hd4aFpZur1RXW1ljmDaKi9TKhvKd1tRqKOuQyWWVIoEdGttTUmx3o+X79VXpxu00iuc37WuZRrX8jlPQpQW+5R0ZHo++NN0wnwgzFIka2Ldv2m7oRJiqhCC2KQj/DOioDnLC0EBD53ya6QmOJ7rQ2JXuQCSns+IQ== X-Forefront-PRVS: 01901B3451 X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1; BY2PR0301MB0742; 23:zU70dAs5Krq7C5QQkp3VTGx828Ev3x4zHZ0?= =?Windows-1252?Q?528uqaC+Wx9AByKSLOgrfk78YZwgAwDyC4PLlwjTnmjWk8gs1xDGqciT?= =?Windows-1252?Q?LY8tIo8wEayqSHiZD5nH47oz6cYmTeRGUqw5vUqC68OnI08qqpzUxsjs?= =?Windows-1252?Q?SOuXK+jqKMP5CEfCp5J68ztH/gzeYVXG2xaJl6gLUWOG9MDp9paFAdiK?= =?Windows-1252?Q?QQO7/0JD1uuEqpFCiGLqV4WvHMeXFgHxPL5Lr7aU0DbghPeTsI3AUicJ?= =?Windows-1252?Q?tU5inEPKEJdmkFeSodinc2q1/+klzVU9ZY/iX7wo7JHvGyR4LzPUQuJN?= =?Windows-1252?Q?CavWMHfpoT5/n+mQCQJfjYulk6Qaqz17OdT/LQ6x/djFL/LrFnqVtqvW?= =?Windows-1252?Q?ZiezcfIF4LfJvVwL1YiDX0nrWPDDeSk52K0DpWDsH/k9SltSbcpn/KlP?= =?Windows-1252?Q?rPyR5490j1lBqwnqzoqlN+q8m/MHhaHs1Wo31+0oly4UfhhCw9f4mqmL?= =?Windows-1252?Q?edtOKHan96W53YD6gbdPkwBGmpGZGZrPIyXRm9hBi5Jt28ukXZHQPJ9d?= =?Windows-1252?Q?cMnx86d/UBAXqdLVZXrfO46vYvMoChgfXLH61RC7MBNPpOusBIbsgJ+E?= =?Windows-1252?Q?COzMJYCaqVgR1j4eCt5EqR0d1ChMu12sWXDsOs1weQ3kf1EIOV20Tb//?= =?Windows-1252?Q?3XGtVJfF7gKFxkMxewRXaJF1mW1RB4Hwoi7jvibWnZ3qo8bPOLhTfMN9?= =?Windows-1252?Q?EVofIvEpRjXCVpL0ewNt4iDNHTGSp841j5abdt7Ce/OQ4RTLHz1fgLqs?= =?Windows-1252?Q?LbI34EaixcWnfESz9/mRCxp0ZhTOfDuCkR4XY4ltWsFBfctMtORMtqF1?= =?Windows-1252?Q?bbxQPErtVSou5gvlcrb/DQTuFpOBHobibRI4RpY6/ffO/pEYdN/KXaEV?= =?Windows-1252?Q?46Ju06qaMYsB1XQD5OAlgttHiDqK+AOSUcwovtg/OfaaGa2MrjEenM3x?= =?Windows-1252?Q?ARqURqzktBG2wO5h6mfLYit2tdx8rwyV4RNNcCaOTggO81EGiwVasknQ?= =?Windows-1252?Q?2lD6aZX5eqLtk7Ij4PY2o/pzpRL/rE8Xa0fVBHw/X+d0d4s1M05TCmZY?= =?Windows-1252?Q?YkNsahjl/0fBAKCGgToawwzKouYeGJB+tRonDUiqoeKVQodZsMQ8JNx8?= =?Windows-1252?Q?Sil7mvWLuc0FgwtogFVftPhA0hCSPRNr06QqgA6veFx0OvBEZOpNn8Ms?= =?Windows-1252?Q?BCdkZ+HzxVsATogSu93/UbWsVGSGiTuF/4vLMOskzLg5baQzLMgu8RCt?= =?Windows-1252?Q?0ErR8c2QcoOL3dvkLbEf2exLqXQk0K//+IZ4tZ5QdUQ1CSVeYxo3J8vl?= =?Windows-1252?Q?0AFzBTsCqx4hTzVm3YvgkbMG2Y1+m3n+kW4ZknVK2wPeWVnwLd7fRh5s?= =?Windows-1252?Q?f9BcIy2DCHbqfh2cEt2La?= X-Microsoft-Exchange-Diagnostics: 1; BY2PR0301MB0742; 6:i+vnZnONIKsU6jIokLf+s8fTtXMlzuLNrIqpLpmoMvGmw8MIggnPMiofW+arcW1xPh3HePN3HFjJcDd5HPD8kGPr986lJG+NNQKIbeRLpPNjXfmtPxfOSzhdNf36/It8BxH0TnmNlMwLxBOsJPM/T/oVxQuuELrABtvXNVpcGfrKlZIooB9wKCUjr+PmR1jNXBeZGVEyFWATyIGudKbXJVb+GkPnE5TblW6Ix4ggNb5M85dCtU601MdmE9A4GmJHtbXjuhDVyjuKksr2twZn7orpHxfd6iWiWKWkUS0a7smYI1Pzhovo/3v46rdXdi53xhlPcilgY3MxNapXOVBPMC0Oh1OUHaMlQzHtAtMroF5gQLaaCNojmDHiuCoDpFrQyBViNR7rhp8zxrKkBfy01Z7PIx6A0TSdhmlBIg/sWn3lCnzeWU7+d8lO97EwlbKl; 5:veHezERJA7BgOULYrCNZjSk5BNVrP5irwXBN6ixpIqSwUyyeVlFDyL3PEvXbM6ZX2sTEEeRAsbNBz7f9knyC04yy2v8v2u1Ab/7NUTKNVvii9NJSkUtGR6eG2Nif94gUNg+/rsQOwJigwHc6lgQ2zF5Bwc821r1Dx3wsPnnL8qqmf47ixWtB40OGT+L/6mB0; 24:v84QapP4x/8bepYCe/Re7NV5FzsixUmbU1K2d9E2HA4PJdhcTz/RlL/OvtJdC8Jg7zDT5fW1aS0YKr/tXduvm0YtsOMQ1qOSZv7HbJxHndc= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BY2PR0301MB0742; 7:9iPREelx/g/68hdg5oyj/b6pBdggoPPNP+GY2L/nme/uEYsVggpWIJ/VB0TF1/VlY8El7cWcggpbjBLGDbpYZ/7whSRJ93I9pmsmO7Q0g9SQTtCeurmZKcpa5/CsrWoyuG2JwPaIWcTzUBxwQb/qSoxkvPhwc34gClOr2XwD5Fvw8MLiYMQDvVBYGycEOpCD1xT5fP/xdpAeM7iGfeIlOA1NsXQvtpDb7QJ//hSJHRJ7bjNHxS/o5z+O6XqkFQg+JG/hsZn5nVx8o2grgcChN/nzlb5C8RpRIW/STqyEtm1QvbO0ot3J/Ww785rcU7uBp7Zicancg5FwjgZhJ1Qg6HSCysrPbKBU5lXfQwmgzU1LSQpEjxyZ3G3hDv29yEvaz+K/I3wM9wY7He4T3NsJ2GaHJojB9l4iYHngf7jq5Uw9vKphSR76FewULzQYfS+8kLq5dJKcq7IO9KgfjnA2zQ== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jan 2017 10:09:40.6821 (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: BY2PR0301MB0742 Subject: Re: [dpdk-dev] [PATCH v6 5/8] eal: introduce bus scan and probe in EAL 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: Tue, 17 Jan 2017 10:09:44 -0000 Just an update on things fixed/updated in v7 against these comments: On Tuesday 17 January 2017 01:28 AM, Ferruh Yigit wrote: > On 1/16/2017 3:38 PM, Shreyansh Jain wrote: >> Each bus implementation defines their own callbacks for scanning bus >> and probing devices available on the bus. Enable EAL to call bus specific >> scan and probe functions during DPDK initialization. >> >> Existing PCI scan/probe continues to exist. It will removed in subsequent >> patches. >> >> Signed-off-by: Shreyansh Jain > > <...> > >> +/* Scan all the buses for registering devices */ >> +int >> +rte_bus_scan(void) > > I hesitate to make this kind of (not really functional) comments in this > stage of the release, but please feel free to ignore them as your wish. > > Previous patch is (4/8) for adding bus scan support, so why not this > function (also .map and .h file part of it) added in prev patch? > > And if there is a specific patch for scan, probe can be another one? v7 Contains a split patch for introducing probe handler and introducing scan and probe in EAL. > >> +{ >> + int ret; >> + struct rte_bus *bus = NULL; >> + >> + TAILQ_FOREACH(bus, &rte_bus_list, next) { >> + ret = bus->scan(); >> + if (ret) { >> + RTE_LOG(ERR, EAL, "Scan for (%s) bus failed.\n", >> + bus->name); >> + /* Error in scanning any bus stops the EAL init. */ >> + return ret; >> + } >> + } >> + >> + return 0; >> +} > > <...> > >> diff --git a/lib/librte_eal/common/eal_common_pci.c b/lib/librte_eal/common/eal_common_pci.c >> index 0d799be..35da451 100644 > <...> >> + >> +/* Add a PCI device to PCI Bus */ >> +void >> +rte_eal_pci_add_device(struct rte_pci_bus *pci_bus, >> + struct rte_pci_device *pci_dev) > > I think more generic approach from previous version was better > (rte_eal_bus_add_device()), but I guess they sacrificed for less > modification. > >> +{ >> + TAILQ_INSERT_TAIL(&pci_bus->device_list, pci_dev, next); >> + /* Update Bus references */ >> + pci_dev->device.bus = &pci_bus->bus; >> +} >> + > > <...> > >> >> +/** >> + * Structure describing the PCI bus >> + */ >> +struct rte_pci_bus { >> + struct rte_bus bus; /**< Inherit the generic class */ >> + struct rte_pci_device_list device_list; /**< List of PCI devices */ >> + struct rte_pci_driver_list driver_list; /**< List of PCI drivers */ > > Why bus device/driver lists moved from rte_bus? Each bus will need this? > Is it to change as less code as possible? > > <...> > >> + >> +/** >> + * Insert a PCI device in the PCI Bus at a particular location in the device >> + * list. It also updates the PCI Bus reference of the new devices to be >> + * inserted. > > Minor issue in document compilation: > > - warning: argument 'pci_dev' of command @param is not found > > - parameter 'new_pci_dev' not documented > > Similar warnings exists for rte_eal_pci_remove_device() too. > > Also following in rte_bus_scan(void) and rte_bus_probe(void) > - warning: argument 'void' of command @param is not found Pushed v7 to ML. 'make doc' is not reporting any warn/error now. Thanks for pointing it out. > >> + * >> + * @param exist_pci_dev >> + * Existing PCI device in PCI Bus >> + * @param pci_dev >> + * PCI device to be added before exist_pci_dev >> + * @return void >> + */ >> +void rte_eal_pci_insert_device(struct rte_pci_device *exist_pci_dev, >> + struct rte_pci_device *new_pci_dev); >> + > > <...> > >