lkml.org 
[lkml]   [2013]   [Nov]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH RESEND][pciutils] libpci: pci_id_lookup - add udev/hwdb support
Hello and sorry for the delay,

> >> + if [ -f /usr/include/libudev.h -o -f /usr/local/include/libudev.h ] ; then
> >> + HWDB=yes
> >> + else
> >> + HWDB=no
> >> + fi
> >
> > Does this make sense? Does every version of libudev support hwdb?
>
> Good point. I'll replace it with a pkg-config call, is that acceptable?

Sure.

> > As you wrote it, hwdb has always priority over pci.ids (unless local lookup is
> > disabled). As a user, I would expect that pci.ids (being a part of the pciutils)
> > is the primary source of data and other sources (network lookups, hwdb) are
> > used only if pci.ids do not match or if explicitly requested.
>
> Hm, this was actually intentional. The reason being that I'd like to
> avoid reading in the pci.ids db in the common case, as using the hwdb
> should be much more efficient (it is most likely already in memory and
> lookup is constant time), and also we (at the distro level) want to
> move away from the {usb,pci}.ids and rather default to hwdb
> everywhere.
>
> My original intention was to make hwdb a replacement for pci.ids, but
> I ended up going the less invasive route, would making it a
> replacement be more acceptable?

Before establishing priorities, I want to understand several things:

First of all, how is the hwdb populated? I really don't want lspci users
to be stuck with an obsolete list of PCI devices. Currently, the user
can easily run update-pciids to get a fresh copy of pci.ids, or to use
the DNS-based protocol to resolve unknown devices on the fly. Does hwdb
provide anything like that?

From a brief examination of systemd-208, I understand that the PCI part
of the hwdb is generated by systemd maintainers calling ids-update.pl,
which not even a part of the systemd tarball. Is it expected that the only
way how to get a recent hwdb is to update systemd packages?

Also, did you consider the opposite, that is making hwdb call libpci
to resolve PCI IDs? What are the downsides?

Have a nice fortnight
--
Martin `MJ' Mares <mj@ucw.cz> http://mj.ucw.cz/
Faculty of Math and Physics, Charles University, Prague, Czech Rep., Earth
Make $$$ fast. Learn Perl!


\
 
 \ /
  Last update: 2013-11-10 14:01    [W:0.192 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site