From patchwork Mon Sep 28 16:42:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 79024 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 682B7A04DB; Mon, 28 Sep 2020 18:43:43 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7181D1D6A6; Mon, 28 Sep 2020 18:43:05 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 9F3B11D66E; Mon, 28 Sep 2020 18:43:00 +0200 (CEST) IronPort-SDR: ND/VraUrBDKfm30kphGg0hyi92JEs20REc3AhNB9IcjH1rHfwH5h7qkNWS17xzVVfzX8JclPxY Ib9qtXYhymEA== X-IronPort-AV: E=McAfee;i="6000,8403,9758"; a="223619749" X-IronPort-AV: E=Sophos;i="5.77,313,1596524400"; d="scan'208";a="223619749" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Sep 2020 09:42:59 -0700 IronPort-SDR: TPnfkfmYOHybJOcJ+ldaBA3zpKT7dkIw3I9CCmI0UfQD84pTy65WDQa6OM3pivid8DfupzmKiB YV1GL/ukZjrQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,313,1596524400"; d="scan'208";a="338250457" Received: from silpixa00399126.ir.intel.com ([10.237.222.4]) by fmsmga004.fm.intel.com with ESMTP; 28 Sep 2020 09:42:58 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: patrick.fu@intel.com, Kevin Laatz , stable@dpdk.org, Sunil Pai G , Bruce Richardson Date: Mon, 28 Sep 2020 17:42:22 +0100 Message-Id: <20200928164245.84997-3-bruce.richardson@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200928164245.84997-1-bruce.richardson@intel.com> References: <20200721095140.719297-1-bruce.richardson@intel.com> <20200928164245.84997-1-bruce.richardson@intel.com> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v4 02/25] raw/ioat: fix missing close function 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" From: Kevin Laatz When rte_rawdev_pmd_release() is called, rte_rawdev_close() looks for a dev_close function for the device causing a segmentation fault when no close() function is implemented for a driver. This patch resolves the issue by adding a stub function ioat_dev_close(). Fixes: f687e842e328 ("raw/ioat: introduce IOAT driver") Cc: stable@dpdk.org Reported-by: Sunil Pai G Signed-off-by: Kevin Laatz Reviewed-by: Bruce Richardson Acked-by: Sunil Pai G --- drivers/raw/ioat/ioat_rawdev.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/raw/ioat/ioat_rawdev.c b/drivers/raw/ioat/ioat_rawdev.c index 7f1a154360..0732b059fe 100644 --- a/drivers/raw/ioat/ioat_rawdev.c +++ b/drivers/raw/ioat/ioat_rawdev.c @@ -203,6 +203,12 @@ ioat_xstats_reset(struct rte_rawdev *dev, const uint32_t *ids, uint32_t nb_ids) return 0; } +static int +ioat_dev_close(struct rte_rawdev *dev __rte_unused) +{ + return 0; +} + extern int ioat_rawdev_test(uint16_t dev_id); static int @@ -212,6 +218,7 @@ ioat_rawdev_create(const char *name, struct rte_pci_device *dev) .dev_configure = ioat_dev_configure, .dev_start = ioat_dev_start, .dev_stop = ioat_dev_stop, + .dev_close = ioat_dev_close, .dev_info_get = ioat_dev_info_get, .xstats_get = ioat_xstats_get, .xstats_get_names = ioat_xstats_get_names,