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 3EA8DA04DD; Sat, 4 Jan 2020 02:35:20 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 195CA1C0B6; Sat, 4 Jan 2020 02:34:11 +0100 (CET) Received: from mail-pl1-f196.google.com (mail-pl1-f196.google.com [209.85.214.196]) by dpdk.org (Postfix) with ESMTP id 6CBB31D540 for ; Sat, 4 Jan 2020 02:34:03 +0100 (CET) Received: by mail-pl1-f196.google.com with SMTP id b22so19616059pls.12 for ; Fri, 03 Jan 2020 17:34:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=5SbRrlbd1L2WS6lePAGc0pDNaSt2ZIUzCyVTIi9ZU5g=; b=G6ekjBjVTafPLUJoKmLqLZsYDg5SaOXh7YJmFdEDHZ5VyPxh/QVL05B0aV+7BSrni4 oo057wHFNNZdThItpofcQautD5wIKEtLxEas5s/1oghEYn6KVNp1rFmJ9WB2WvJRQk/P 9khXGjnAx5MzdUuDSkS87m/R7jlnop/8MuDKdWQLaD4bOyVwr3jr1DJdN5/CjtAA9873 gLpfrogiz0HYQdnSZeLOxLUE0pX+ksWbZ7ciTtV19hgomLZqKZI92ey/I9T7VCmye+jJ XSCyBBv2eAMrYlecFk1cA7LhZVBBrmQnfGX2IujchtxElcLhHvQ0X/37v6ZX88qdfHRb G7JA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=5SbRrlbd1L2WS6lePAGc0pDNaSt2ZIUzCyVTIi9ZU5g=; b=pKng8Yhru3X5i7UlKYrbjMXIlQa4zhx++Jn9QRrp5HsSbF+2iqv3+lvfP7oximBC5B E8UaWNTkT+kUwhCb0wyz3+HP+83UNp4dNT4gUmJEpnDPf9BMQAflspz/8OXW28sMW1nZ 6EQQYjeMdzsbqdzjo+bGePrrIMjJ0OnmRfVOXeWgOY+2dN4MWBoechdrwheNK6Tn4FQX wloD0Ot2BB+DQmRDjntEXm8sRgaLW+KtxmRUkCLcchbUzJbCsECezQ9+/G8cJz0NCcSF SQybNa7CwtmvEKloE+Cm8dZhKZ67fqXhWWLTJUbl5jiQc9nOSyacpemVUlFkWfx0LKWN 8ESw== X-Gm-Message-State: APjAAAVuFsh9hnq/s+xCMH0/hHoxKQrI+TLnZ7WgBTBdvdREjYLNUmJD r6bFRRUAlFL1dRNkX82kxX5Lo9tYlZc= X-Google-Smtp-Source: APXvYqx6QdNwxe+ARMi/tZZ9PfLqwlTPb4Dac8dwDxang7VupulXE184S5oFHzvz+MxoJxiEFv5cXQ== X-Received: by 2002:a17:902:a505:: with SMTP id s5mr69453949plq.244.1578101642278; Fri, 03 Jan 2020 17:34:02 -0800 (PST) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id j6sm16212934pjv.10.2020.01.03.17.34.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Jan 2020 17:34:01 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , pascal.mazon@6wind.com, stable@dpdk.org Date: Fri, 3 Jan 2020 17:33:37 -0800 Message-Id: <20200104013341.19809-11-stephen@networkplumber.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200104013341.19809-1-stephen@networkplumber.org> References: <20200104013341.19809-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH 10/14] tap: close netlink socket on device close 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" The netlink socket for flow creation was left open and never closed. Fixes: bf7b7f437b49 ("net/tap: create netdevice during probing") Cc: pascal.mazon@6wind.com Cc: stable@dpdk.org Signed-off-by: Stephen Hemminger --- drivers/net/tap/rte_eth_tap.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c index a13d8d50d7d7..d293dd8eeed5 100644 --- a/drivers/net/tap/rte_eth_tap.c +++ b/drivers/net/tap/rte_eth_tap.c @@ -1035,6 +1035,11 @@ tap_dev_close(struct rte_eth_dev *dev) &internals->remote_initial_flags); } + if (internals->nlsk_fd != -1) { + close(internals->nlsk_fd); + internals->nlsk_fd = -1; + } + if (internals->ka_fd != -1) { close(internals->ka_fd); internals->ka_fd = -1; @@ -2406,7 +2411,7 @@ rte_pmd_tap_remove(struct rte_vdev_device *dev) TAP_LOG(DEBUG, "Closing %s Ethernet device on numa %u", tuntap_types[internals->type], rte_socket_id()); - if (internals->nlsk_fd) { + if (internals->nlsk_fd != -1) { tap_flow_flush(eth_dev, NULL); tap_flow_implicit_flush(internals, NULL); tap_nl_final(internals->nlsk_fd); -- 2.20.1