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 B6F3DA04BC; Thu, 8 Oct 2020 11:52:46 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6F7EB1B850; Thu, 8 Oct 2020 11:51:51 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 6FD5E1BCDB; Thu, 8 Oct 2020 11:51:46 +0200 (CEST) IronPort-SDR: VPz59qVXS1y1fCmL8t2GYkl6okTDZZpYZaRMg4ZWDEgd3KKmA4fpXpE5dgoaYg3UwZUsbYjG1V Wrro2IiSXgOA== X-IronPort-AV: E=McAfee;i="6000,8403,9767"; a="152226352" X-IronPort-AV: E=Sophos;i="5.77,350,1596524400"; d="scan'208";a="152226352" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Oct 2020 02:51:44 -0700 IronPort-SDR: eI7PnyKoppa7yY8udWSH268WIyIb6knxKNzxjmVwf8WQU9ya4SFVuyBHLziesiPGCGsJeTKqnf 0vS2nL091Iuw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,350,1596524400"; d="scan'208";a="344686603" Received: from silpixa00399126.ir.intel.com ([10.237.222.4]) by orsmga008.jf.intel.com with ESMTP; 08 Oct 2020 02:51:42 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: patrick.fu@intel.com, thomas@monjalon.net, Kevin Laatz , stable@dpdk.org, Sunil Pai G , Bruce Richardson , Radu Nicolau Date: Thu, 8 Oct 2020 10:51:10 +0100 Message-Id: <20201008095133.123014-3-bruce.richardson@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201008095133.123014-1-bruce.richardson@intel.com> References: <20200721095140.719297-1-bruce.richardson@intel.com> <20201008095133.123014-1-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v6 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 Acked-by: Radu Nicolau --- 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 7f1a15436..0732b059f 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, -- 2.25.1