Fixed QAT device binding and device unbinding when vpp package is removed
Change-Id: I35ad6a42093cad0945df1df09a39c63c4560dce6
Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
diff --git a/build-root/deb/debian/vpp.postrm b/build-root/deb/debian/vpp.postrm
index ac16a45..24b4842 100644
--- a/build-root/deb/debian/vpp.postrm
+++ b/build-root/deb/debian/vpp.postrm
@@ -7,7 +7,7 @@
for d in $pci_dirs; do
for f in ${d}/*; do
[ -e "${f}/config" ] || continue
- echo 1 > ${f}/remove
+ echo ${f##*/} > ${d}/unbind
basename `dirname ${f}` | xargs echo -n "Removing driver"; echo " for PCI ID" `basename ${f}`
removed=y
done
diff --git a/build-root/rpm/vpp.spec b/build-root/rpm/vpp.spec
index 95196e9..7bc18ca 100644
--- a/build-root/rpm/vpp.spec
+++ b/build-root/rpm/vpp.spec
@@ -244,7 +244,7 @@
for d in $pci_dirs; do
for f in ${d}/*; do
[ -e "${f}/config" ] || continue
- echo 1 > ${f}/remove
+ echo ${f##*/} > ${d}/unbind
basename `dirname ${f}` | xargs echo -n "Removing driver"; echo " for PCI ID" `basename ${f}`
removed=y
done
diff --git a/src/vnet/devices/dpdk/init.c b/src/vnet/devices/dpdk/init.c
index 7249cc5..c50c065 100755
--- a/src/vnet/devices/dpdk/init.c
+++ b/src/vnet/devices/dpdk/init.c
@@ -858,7 +858,7 @@
vec_reset_length (pci_addr);
pci_addr = format (pci_addr, "%U%c", format_vlib_pci_addr, &d->bus_address, 0);
- if (d->device_class != PCI_CLASS_NETWORK_ETHERNET)
+ if (d->device_class != PCI_CLASS_NETWORK_ETHERNET && d->device_class != PCI_CLASS_PROCESSOR_CO)
continue;
if (num_whitelisted)