[spp] [PATCH v2 5/6] spp_nfv: replace deprecated rte_eth_dev_detach

x-fn-spp at sl.ntt-tx.co.jp x-fn-spp at sl.ntt-tx.co.jp
Wed Nov 21 07:52:18 CET 2018


From: Hideyuki Yamashita <yamashita.hideyuki at po.ntt-tx.co.jp>

Replace rte_eth_dev_detach() with dev_detach_by_port_id() for spp_nfv.

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/nfv.c | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/src/nfv/nfv.c b/src/nfv/nfv.c
index bf16d81..c47691d 100644
--- a/src/nfv/nfv.c
+++ b/src/nfv/nfv.c
@@ -309,32 +309,26 @@ do_del(char *res_uid)
 			return -1;
 
 	} else if (!strcmp(p_type, "ring")) {
-		char name[RTE_ETH_NAME_MAX_LEN];
-
 		RTE_LOG(DEBUG, APP, "Del ring id %d\n", p_id);
 		port_id = find_port_id(p_id, RING);
 		if (port_id == PORT_RESET)
 			return -1;
 
-		rte_eth_dev_detach(port_id, name);
+		dev_detach_by_port_id(port_id);
 
 	} else if (!strcmp(p_type, "pcap")) {
-		char name[RTE_ETH_NAME_MAX_LEN];
-
 		port_id = find_port_id(p_id, PCAP);
 		if (port_id == PORT_RESET)
 			return -1;
 
-		rte_eth_dev_detach(port_id, name);
+		dev_detach_by_port_id(port_id);
 
 	} else if (!strcmp(p_type, "nullpmd")) {
-		char name[RTE_ETH_NAME_MAX_LEN];
-
 		port_id = find_port_id(p_id, NULLPMD);
 		if (port_id == PORT_RESET)
 			return -1;
 
-		rte_eth_dev_detach(port_id, name);
+		dev_detach_by_port_id(port_id);
 
 	}
 
-- 
2.18.0



More information about the spp mailing list