git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
net/mlx5: fix meter flow direction check
[dpdk.git]
/
usertools
/
dpdk-pmdinfo.py
diff --git
a/usertools/dpdk-pmdinfo.py
b/usertools/dpdk-pmdinfo.py
index
d7eb1ec
..
3381aa6
100755
(executable)
--- a/
usertools/dpdk-pmdinfo.py
+++ b/
usertools/dpdk-pmdinfo.py
@@
-185,7
+185,7
@@
class PCIIds:
return None
def parse(self):
return None
def parse(self):
- if
len(self.contents) < 1
:
+ if
not self.contents
:
print("data/%s-pci.ids not found" % self.date)
else:
vendorID = ""
print("data/%s-pci.ids not found" % self.date)
else:
vendorID = ""
@@
-193,7
+193,7
@@
class PCIIds:
for l in self.contents:
if l[0] == "#":
continue
for l in self.contents:
if l[0] == "#":
continue
- elif
len(l.strip()) == 0
:
+ elif
not l.strip()
:
continue
else:
if l.find("\t\t") == 0:
continue
else:
if l.find("\t\t") == 0:
@@
-307,7
+307,7
@@
class ReadElf(object):
except KeyError:
continue
except KeyError:
continue
- if
len(pmdinfo["pci_ids"]) != 0
:
+ if
pmdinfo["pci_ids"]
:
print("PMD HW SUPPORT:")
if pcidb is not None:
self.pretty_print_pmdinfo(pmdinfo)
print("PMD HW SUPPORT:")
if pcidb is not None:
self.pretty_print_pmdinfo(pmdinfo)
@@
-346,7
+346,7
@@
class ReadElf(object):
mystring = force_unicode(data[dataptr:endptr])
rc = mystring.find("PMD_INFO_STRING")
if rc != -1:
mystring = force_unicode(data[dataptr:endptr])
rc = mystring.find("PMD_INFO_STRING")
if rc != -1:
- self.parse_pmd_info_string(mystring)
+ self.parse_pmd_info_string(mystring
[rc:]
)
dataptr = endptr
dataptr = endptr