[dpdk-dev] [PATCH] usertools: fix pmdinfo parsing

Robin Jarry robin.jarry at 6wind.com
Wed Nov 4 09:06:29 CET 2020


2020-11-03, David Marchand:
> Less ugly with a regular expression?
> 
> if re.match(r"^librte_(baseband|compress|crypto|event|net|raw|regex|vdpa)_",
>             force_unicode(tag.needed)):

No, that's worse :D

As Stephen said, maybe it would be more readable if the list of
supported classes were in a constant somewhere.

  DRIVER_CLASSES = (
      'baseband',
      'compress',
      'crypto',
      'event',
      'net',
      'raw,
      'regex',
      'vdpa',
  )

-- 
Robin


More information about the dev mailing list