From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marc Sune Subject: Re: =?gb2312?b?tPC4tDogIFBvcnQtaWRzIGFuZCBOSUMgZmVhdHVy?= =?gb2312?b?ZXM=?= Date: Fri, 16 Aug 2013 00:15:04 +0200 Message-ID: <520D52E8.9000407@bisdn.de> References: <520B4641.2030802@bisdn.de> <008101ce9959$e4959370$adc0ba50$@126.com> <20130815075704.33261119@nehalam.linuxnetplumber.net> Mime-Version: 1.0 Content-Type: text/plain; charset=GB2312 Content-Transfer-Encoding: quoted-printable Cc: dev-VfR2kkLFssw@public.gmane.org To: Stephen Hemminger Return-path: In-Reply-To: <20130815075704.33261119-We1ePj4FEcvRI77zikRAJc56i+j3xesD0e7PPNI6Mm0@public.gmane.org> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" Dear Stephen, 1) The problem is that, if the interfaces are binded to the IGB_UIO driver *before* the DPDK-based application is started, there is no way, as far as I've seen, to get such information. Of course, you cannot use anymore ethtool or whatever to get at least the speeds that the card is supporting. Btw, I don't need them, but offloads would probably be also quite useful. So in general all the "features" or "capabilities" supported by the NIC. A general and elegant solution, IMHO would be to add to this in the info of the NIC, probably to struct rte_eth_dev_info; something like: enum rte_eth_features { ETH_LINK_100MB_HD =3D 1 << 0, ETH_LINK_100MB_FD =3D 1 << 1, ETH_LINK_1000MB_HD =3D 1 << 2, ETH_LINK_1000MB_FD =3D 1 << 3, ETH_LINK_10000MB_HD =3D 1 << 4, ETH_LINK_10000MB_FD =3D 1 << 5, //More features to be added here: }; struct rte_eth_dev_info { //... uint32_t capabilities; //Bitmap of enum rte_eth_features (could be also an uint64_t) }; I assume this informations are very easily gathered by the driver itself, since it knows the exact NIC model and capabilities. 2) Are the ids determined when the NICs are being binded to the DPDK driver, or when the IGB_UIO driver is insmoded? If it is the former, then the ids won't be consistent across reboots or binding order, which is not very desirable (IMHO), and actually is going to cause some problems in our application. Best marc On 15/08/13 16:57, Stephen Hemminger wrote: > On Thu, 15 Aug 2013 09:51:00 +0800 > =B0=B2=BA=EA=BF=FC wrote: > >> For the question one, maybe you can detect it before binding to igb_ui= o >> >> >> -----=D3=CA=BC=FE=D4=AD=BC=FE----- >> =B7=A2=BC=FE=C8=CB: dev-bounces-VfR2kkLFssw@public.gmane.org [mailto:dev-bounces-VfR2kkLFssw@public.gmane.org]= =B4=FA=B1=ED Marc Sune >> =B7=A2=CB=CD=CA=B1=BC=E4: 2013=C4=EA8=D4=C214=C8=D5 16:57 >> =CA=D5=BC=FE=C8=CB: dev-VfR2kkLFssw@public.gmane.org >> =D6=F7=CC=E2: [dpdk-dev] Port-ids and NIC features >> >> Dear all, >> >> Two quick questions: >> >> 1) Is there a way to get the features available in the NIC? In particu= lar, I >> cannot see a way to retrieve the *maximum speed* of the card and I nee= d to >> determine whether is a FE, GE or 10GE card. > Not at present. You need to look at the information in rte_pci_device > for the ethernet (see rte_eth_dev_info) and then do your own matching > against ID and features. > > As DPDK evolves more of the hardware features need to be abstracted > to allow applications to be build once and run on varying hardware. > IMHO some of the low level features like read/write thresholds really > shouldn't be exposed through the API. Setting them correctly depends > too much on the underlying hardware, chip version, and driver and reall= y > shouldn't be something the application writer has to worry about. > > >> 2) For a certain number of NICs installed in the system and bound to t= he >> IGB_UIO driver, is it safe to assume that the association phyisical po= rt <-> >> port_id will always be the same? Even after reboot, and regardless of = the >> order that are bound to the IGB_UIO driver (e.g. using pci_unbind.py)? > Since probe is single threaded. The discovery order will be constant > on the same system. But will change if hardware added/removed. > > Another future area of work that needs to be addressed is hot plugging > devices into a running application.