patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: dev@dpdk.org
Cc: patrick.fu@intel.com, Kevin Laatz <kevin.laatz@intel.com>,
	stable@dpdk.org, Sunil Pai G <sunil.pai.g@intel.com>
Subject: [dpdk-stable] [PATCH v3 02/25] raw/ioat: fix missing close function
Date: Fri, 25 Sep 2020 12:08:47 +0100	[thread overview]
Message-ID: <20200925110910.284098-3-bruce.richardson@intel.com> (raw)
In-Reply-To: <20200925110910.284098-1-bruce.richardson@intel.com>

From: Kevin Laatz <kevin.laatz@intel.com>

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 <sunil.pai.g@intel.com>
Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
---
 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


  parent reply	other threads:[~2020-09-25 11:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20200721095140.719297-1-bruce.richardson@intel.com>
     [not found] ` <20200925110910.284098-1-bruce.richardson@intel.com>
2020-09-25 11:08   ` [dpdk-stable] [PATCH v3 01/25] doc/api: add ioat driver to index Bruce Richardson
2020-09-25 11:08   ` Bruce Richardson [this message]
2020-09-25 11:12     ` [dpdk-stable] [dpdk-dev] [PATCH v3 02/25] raw/ioat: fix missing close function Bruce Richardson
2020-09-25 11:12     ` [dpdk-stable] " Pai G, Sunil
     [not found] ` <20200928164245.84997-1-bruce.richardson@intel.com>
2020-09-28 16:42   ` [dpdk-stable] [PATCH v4 " Bruce Richardson
     [not found] ` <20201007163023.2817-1-bruce.richardson@intel.com>
2020-10-07 16:30   ` [dpdk-stable] [PATCH v5 " Bruce Richardson
     [not found] ` <20201008095133.123014-1-bruce.richardson@intel.com>
2020-10-08  9:51   ` [dpdk-stable] [PATCH v6 " Bruce Richardson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200925110910.284098-3-bruce.richardson@intel.com \
    --to=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=kevin.laatz@intel.com \
    --cc=patrick.fu@intel.com \
    --cc=stable@dpdk.org \
    --cc=sunil.pai.g@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).