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 14A08A04DD; Sat, 4 Jan 2020 02:33:53 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 406751D509; Sat, 4 Jan 2020 02:33:52 +0100 (CET) Received: from mail-pj1-f42.google.com (mail-pj1-f42.google.com [209.85.216.42]) by dpdk.org (Postfix) with ESMTP id 7193F1D501 for ; Sat, 4 Jan 2020 02:33:50 +0100 (CET) Received: by mail-pj1-f42.google.com with SMTP id j11so5213826pjs.1 for ; Fri, 03 Jan 2020 17:33:50 -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:mime-version :content-transfer-encoding; bh=FRuUbN1OEE+X7cnfHd4EopovSr5Kjxhs16L2WBMiIdk=; b=WT9g1hqaS6suZmib0WUcbAtN91oVaASzkexIJw+mi+FUTiBQp/5wXyp6hIJbuXoHof Mw4XQJQXIpCQCHUXHBAauMXLpQtdOzVj4MBNHlfpPvvZHYPoRsRNlLqPSDhancqSKYuw qyS7RG7FB3VC3NTCkX8qSuAcYZe1d6goIV3Kh+0y4/iqBkPI26nqu8uxBYls/tdQsw/K Hz2kRxP1TSWyrOEsSxRbHmOfpE6bfH6neikS6edF1DI7gov99WeHaYfWdgexZi+Unieo OmNVoajYdPCjqkmegEkzOcZNPoH3rXsi66YfKBhAs1DQDTCHsh7sGIOXsD141faSfAts T4Gw== 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:mime-version :content-transfer-encoding; bh=FRuUbN1OEE+X7cnfHd4EopovSr5Kjxhs16L2WBMiIdk=; b=nOyjRcGm1lYo7JGfe3UQNmOqp/ejDi9GG+K3Uniqil1EUh674dcFHBnpwQsxuNYoQk FzuB2C8+gdA5N6PyG7OzytnPX0UgfFJQgu0Dd+YnMDMNC8i1LPfzlOWHlz5f4IKJg6Pp W0zUa1928iHx6J73CnFBsKjv/dZs3mMkhkTek3KKz4mqBvLjnFK4R+9S5wU7CuHsABR/ B0CDkJxvsu54llM8ZWOvJiG1mW+vYKveZJ6dqHbe6LG8ssBT2u9yz5iK1KXSmBsV8QMu qoJD1mjIzUIhWTYBJEuTp9MbDoNLH/umFGn1hXRTEgiBcRTYTlCgsWeXg3LPgtAUTqr6 rHGQ== X-Gm-Message-State: APjAAAUeshymkyVPKM6BA/JU7FFOelBqStne7lJYMhoujDPjYAFBKQ80 bQJOQXaebq2TjCsur+uyef9XVB9a/CE= X-Google-Smtp-Source: APXvYqwxTTYB2H+1rMZ4VswRdt7buKFCjaK2lTA7dpSOp1nUBzhdrVkUfNF2/tQL7Fa+DUI90VaEqw== X-Received: by 2002:a17:902:8d95:: with SMTP id v21mr94335793plo.61.1578101628883; Fri, 03 Jan 2020 17:33:48 -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.33.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Jan 2020 17:33:47 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Fri, 3 Jan 2020 17:33:27 -0800 Message-Id: <20200104013341.19809-1-stephen@networkplumber.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH 00/14] cleanup resources on shutdown 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" Recently started using valgrind with DPDK, and the results are not clean. The DPDK has a function that applications can use to tell it to cleanup resources on shutdown (rte_eal_cleanup). But the current coverage of that API is spotty. Many internal parts of DPDK leave files and allocated memory behind. This patch set is a start at getting the sub-parts of DPDK to cleanup after themselves. These are the easier ones, the harder and more critical ones are in the drivers and the memory subsystem. There are no visible API or ABI changes here. Stephen Hemminger (14): eal: log: close on cleanup eal: log: free dynamic state on cleanup eal: alarm: close timerfd on eal cleanup eal: cleanup threads eal: intr: cleanup resources eal: mp: end the multiprocess thread during cleanup eal: interrupts close epoll fd on shutdown eal: vfio: cleanup the mp sync handle eal: close mem config on cleanup tap: close netlink socket on device close eal: cleanup plugins data ethdev: raise priority of old driver warning eal: hotplug: cleanup multiprocess resources eal: malloc: cleanup mp resources drivers/net/tap/rte_eth_tap.c | 7 ++++- lib/librte_eal/common/eal_common_log.c | 30 +++++++++++++++++- lib/librte_eal/common/eal_common_options.c | 12 +++++++ lib/librte_eal/common/eal_common_proc.c | 17 +++++++--- lib/librte_eal/common/eal_options.h | 1 + lib/librte_eal/common/eal_private.h | 30 ++++++++++++++++++ lib/librte_eal/common/hotplug_mp.c | 5 +++ lib/librte_eal/common/hotplug_mp.h | 6 ++++ lib/librte_eal/common/malloc_heap.c | 6 ++++ lib/librte_eal/common/malloc_heap.h | 3 ++ lib/librte_eal/common/malloc_mp.c | 12 +++++++ lib/librte_eal/common/malloc_mp.h | 3 ++ lib/librte_eal/linux/eal/eal.c | 28 +++++++++++++++++ lib/librte_eal/linux/eal/eal_alarm.c | 11 +++++++ lib/librte_eal/linux/eal/eal_interrupts.c | 35 ++++++++++++++++++--- lib/librte_eal/linux/eal/eal_log.c | 14 +++++++++ lib/librte_eal/linux/eal/eal_vfio.h | 1 + lib/librte_eal/linux/eal/eal_vfio_mp_sync.c | 8 +++++ lib/librte_ethdev/rte_ethdev.c | 2 +- 19 files changed, 218 insertions(+), 13 deletions(-) -- 2.20.1