[spp] [PATCH 2/4] spp_nfv: fix incorrect deleting for ring port
x-fn-spp at sl.ntt-tx.co.jp
x-fn-spp at sl.ntt-tx.co.jp
Fri Feb 8 09:47:51 CET 2019
From: Hideyuki Yamashita <yamashita.hideyuki at po.ntt-tx.co.jp>
Spp_nfv uses `rte_eal_hotplug_remove()` in `dev_detach_by_port_id()` to
delete a ring. However, it is wrong because it causes an error when
adding the same ring again. This update is to use `rte_eth_dev_stop()`
and `rte_eth_dev_close()` as correct manner.
Signed-off-by: Hideyuki Yamashita <yamashita.hideyuki at po.ntt-tx.co.jp>
Signed-off-by: Naoki Takada <takada.naoki at lab.ntt.co.jp>
---
src/nfv/commands.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/nfv/commands.h b/src/nfv/commands.h
index 36ad86d..c8f726f 100644
--- a/src/nfv/commands.h
+++ b/src/nfv/commands.h
@@ -38,7 +38,8 @@ do_del(char *res_uid)
if (port_id == PORT_RESET)
return -1;
- dev_detach_by_port_id(port_id);
+ rte_eth_dev_stop(port_id);
+ rte_eth_dev_close(port_id);
} else if (!strcmp(p_type, "pcap")) {
port_id = find_port_id(p_id, PCAP);
--
2.17.1
More information about the spp
mailing list