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 B4814A04BA; Wed, 7 Oct 2020 18:37:19 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 544B21BCAB; Wed, 7 Oct 2020 18:35:39 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id F1EF91BAE5; Wed, 7 Oct 2020 18:35:24 +0200 (CEST) IronPort-SDR: cm8ZCxPbEfwqHGikG9bBuzn60uhKdAGxfAR+eeVGvKejw/LEup1K8k4ev57hfI4oLcgrmytjuJ f9gtLGwTPp7A== X-IronPort-AV: E=McAfee;i="6000,8403,9767"; a="144933382" X-IronPort-AV: E=Sophos;i="5.77,347,1596524400"; d="scan'208";a="144933382" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Oct 2020 09:30:36 -0700 IronPort-SDR: uSHW/D8vmMdYOjwBMIocsqm4m21JgFGf9RXRPGPT+mWQaIJ5h1JcbUj1Mtc7wsuoVr7+AkDm/O wVxg5YJ3w3Ww== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,347,1596524400"; d="scan'208";a="354965651" Received: from silpixa00399126.ir.intel.com ([10.237.222.4]) by orsmga007.jf.intel.com with ESMTP; 07 Oct 2020 09:30:34 -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: Wed, 7 Oct 2020 17:30:00 +0100 Message-Id: <20201007163023.2817-3-bruce.richardson@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201007163023.2817-1-bruce.richardson@intel.com> References: <20200721095140.719297-1-bruce.richardson@intel.com> <20201007163023.2817-1-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v5 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