From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi0-f65.google.com (mail-oi0-f65.google.com [209.85.218.65]) by dpdk.org (Postfix) with ESMTP id 3B6361B557 for ; Fri, 29 Jun 2018 03:56:01 +0200 (CEST) Received: by mail-oi0-f65.google.com with SMTP id i12-v6so2633461oik.2 for ; Thu, 28 Jun 2018 18:56:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=hXv1XyDQ9FYYvhLY7WbYWIZ0bgQgqJ+Ndpj8blSVBaE=; b=WJXWFf6nHJzFnoYv8uLbO72H38Zg1OmeE+p+iPYuCkvOVOkzvWsDYBTREq2xjjmiG+ OcOi9WyQrp0yUKtVQ9HhyaTREgeM6FQPSk3f+uhXKx+hAf28Mg8dZaDqeZzybWwLfbSp ZxIP4OqbUxvp2eiQRiwuZxCZeWeLVIG3fX7A4uu9KmEIX4F5vuI9nOhzHi/oVMEDzve/ /4EWP+I/uwJ8JRqmWJOzeRvwwABkXrrgi13rMk3GdmWBTTP3O5xPB8gQgXWV6y1gHAk2 ZtgZIYuSDAImCe6+artG26gr0dteR9vknTTZ3TewNQLcfGEx8/7/gAvAZlwVtNoRkuw/ K5mA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=hXv1XyDQ9FYYvhLY7WbYWIZ0bgQgqJ+Ndpj8blSVBaE=; b=RAbUFz1S5j+7c+49ENghJh5u/78Wjq5VPCI66/fw1YoW8F8tNVbteG9YEO8Hc37MN9 aKaVonBJpOTJMCwUvehT6ZAhqdq+On6zxIArV2M9PvfJs13cLI1P+HV7mdFNrpju1erV Am+xcu7oE1urntOSdoCSz1jLTSV699GhH/uXhKv2ErOou7oTgR9XNUE4RNTJWMLu2+kQ LYWPu8vZkR9lLTVVteBdL6q5VzMCN0zcCHWH589Oy6AeXOKMsxBtItVJgO325I5KfbGL 4AhgAj/K99elF8C+hwochLE3oiBSKAwt4KbuBy3nlhd52kISnlOjDFeEGb0IdbKCpcW4 6k+g== X-Gm-Message-State: APt69E0e5dUFapEpgtFmGOIGveRNTYFx2pL/4jyq7U7CaKL7FgdLxV0t wWKdM+RffBIZNykiaoLKgaQ= X-Google-Smtp-Source: AAOMgpfKjapXuxPhPqeCKVYuEO+r/sd8k25KyvgfXWupGM/1Iw3vtCiIoF+nLcAWUBCH8586RwNcFQ== X-Received: by 2002:aca:6144:: with SMTP id v65-v6mr7764318oib.147.1530237360417; Thu, 28 Jun 2018 18:56:00 -0700 (PDT) Received: from linux.adax.com (172-11-198-60.lightspeed.sntcca.sbcglobal.net. [172.11.198.60]) by smtp.gmail.com with ESMTPSA id n3-v6sm3941288otk.38.2018.06.28.18.55.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 28 Jun 2018 18:55:59 -0700 (PDT) Sender: Dan Gora From: Dan Gora To: ferruh.yigit@intel.com Cc: dev@dpdk.org, Dan Gora Date: Thu, 28 Jun 2018 18:55:07 -0700 Message-Id: <20180629015508.26599-10-dg@adax.com> X-Mailer: git-send-email 2.18.0.rc1.1.g6f333ff2f In-Reply-To: <20180629015508.26599-1-dg@adax.com> References: <20180628224513.18391-1-dg@adax.com> <20180629015508.26599-1-dg@adax.com> Subject: [dpdk-dev] [PATCH v2 09/10] kni: add rte_kni_free to KNI vdev driver X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jun 2018 01:56:01 -0000 Add rte_kni_free to the virual KNI device. Signed-off-by: Dan Gora --- drivers/net/kni/rte_eth_kni.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/kni/rte_eth_kni.c b/drivers/net/kni/rte_eth_kni.c index ab63ea427..24c6991e6 100644 --- a/drivers/net/kni/rte_eth_kni.c +++ b/drivers/net/kni/rte_eth_kni.c @@ -463,11 +463,13 @@ eth_kni_remove(struct rte_vdev_device *vdev) if (eth_dev == NULL) return -1; - eth_kni_dev_stop(eth_dev); - internals = eth_dev->data->dev_private; rte_kni_release(internals->kni); + eth_kni_dev_stop(eth_dev); + + rte_kni_free(internals->kni); + rte_free(internals); rte_eth_dev_release_port(eth_dev); -- 2.18.0.rc1.1.g6f333ff2f