From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6C540A052F for ; Sun, 26 Jan 2020 19:45:46 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6154F4C93; Sun, 26 Jan 2020 19:45:46 +0100 (CET) Received: from mail-pf1-f194.google.com (mail-pf1-f194.google.com [209.85.210.194]) by dpdk.org (Postfix) with ESMTP id A39174C74 for ; Sun, 26 Jan 2020 19:45:44 +0100 (CET) Received: by mail-pf1-f194.google.com with SMTP id i6so3853892pfc.1 for ; Sun, 26 Jan 2020 10:45:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references; bh=x1XHEmfvGq/qCFDMPVqn76MVMff0KeRIgdzZUtaIF3I=; b=aqDtpZFxQAMV4KF8uHpvySd63BXXmdYeAuK51HeQfBX9qV78v4SgAf6PVTdSfR5Sqt e7AnCSpUsnYrwzoPmMKS4FgoobxfP6YZ6KrYQiuFBV+5F6vGFMhwaZ5He7E0L9MJnaAa NJV9btihkMyphdYOaE18LegPEmUxdT+anioQKHWSgVR8S2GanPN+3OD3LlS+nwskDM+j 6TXkkBNOWg3C1Vq3C2nmr2hKNy1Uwib9xwswigfp/Y3D+fuAGykATlfr2ionvAsxrdEU KkwPQFMf+lkay4K2PwTME3mNapoEx47B6cIpXnQgzwvXgK4yv87fzfbrXyhoZ/hhXklG kJUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=x1XHEmfvGq/qCFDMPVqn76MVMff0KeRIgdzZUtaIF3I=; b=SDJ/kY4nMZY7I9slqD27b9vejFCK0zFvp9jBJ1QmBd139FCCb3k8hEV7Qt/8trpfqZ atoJXLJTVwsk9W+n8Nm2R0X17+Jcgy9vte8f9Nq6myfoBaM4j2bEyvjbVadY7gnhXjyc tDnMfFU+fwplEcoeHz7sOUrlNtVgqIU9CvqgoQZ6qPxCcx+mIKFEGcpX0lGBVXhKTeW/ z0vUrSVh7exKxkuqselkopCHJia9DYnUZiN5jEAykl4XcfkQXZk29s6KDSEHLYiopSCr PIna+g3q2xN13SiXgmVtI8OrD/8/kP7w82+PLyeH+4sCRIihTpeY+IMdkDJLdNRi1Kqg ODvw== X-Gm-Message-State: APjAAAUykE/KSSuzn3hISHa65Jr7vdU1cgVajBP7KUvVn4olvNAt6SuF bNZQSvrxm1rhqUAomPgnRmZM86TH X-Google-Smtp-Source: APXvYqx0Ue1XV0H1QaETXtX7ftdO+NDNbR2+hXTgx+aUVCBAop7eZC/4MRQNyCv46ZlOLptJhpt1zQ== X-Received: by 2002:a62:5447:: with SMTP id i68mr13191265pfb.44.1580064343687; Sun, 26 Jan 2020 10:45:43 -0800 (PST) Received: from localhost.localdomain ([2400:4050:c8c2:de00:b50a:4377:14ac:92ae]) by smtp.gmail.com with ESMTPSA id h7sm13639086pfq.36.2020.01.26.10.45.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Jan 2020 10:45:43 -0800 (PST) From: Yasufumi Ogawa To: spp@dpdk.org, ferruh.yigit@intel.com, yasufum.o@gmail.com Date: Mon, 27 Jan 2020 03:45:32 +0900 Message-Id: <20200126184533.10762-4-yasufum.o@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200126184533.10762-1-yasufum.o@gmail.com> References: <20200126184533.10762-1-yasufum.o@gmail.com> Subject: [spp] [PATCH 3/4] spp_nfv: enable to add and del memif X-BeenThere: spp@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Soft Patch Panel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: spp-bounces@dpdk.org Sender: "spp" This update is to enable spp_nfv to add and del while running. Signed-off-by: Yasufumi Ogawa --- src/nfv/commands.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/nfv/commands.h b/src/nfv/commands.h index 7e50c8c..e5b25be 100644 --- a/src/nfv/commands.h +++ b/src/nfv/commands.h @@ -41,6 +41,12 @@ do_del(char *p_type, int p_id) return -1; dev_detach_by_port_id(port_id); + } else if (!strcmp(p_type, "memif")) { + port_id = find_port_id(p_id, MEMIF); + if (port_id == PORT_RESET) + return -1; + dev_detach_by_port_id(port_id); + } else if (!strcmp(p_type, "nullpmd")) { port_id = find_port_id(p_id, NULLPMD); if (port_id == PORT_RESET) @@ -78,6 +84,10 @@ do_add(char *p_type, int p_id) type = PCAP; res = add_pcap_pmd(p_id); + } else if (!strcmp(p_type, "memif")) { + type = MEMIF; + res = add_memif_pmd(p_id); + } else if (!strcmp(p_type, "nullpmd")) { type = NULLPMD; res = add_null_pmd(p_id); -- 2.17.1