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, thomas@monjalon.net,
	Kevin Laatz <kevin.laatz@intel.com>,
	stable@dpdk.org, Sunil Pai G <sunil.pai.g@intel.com>,
	Bruce Richardson <bruce.richardson@intel.com>,
	Radu Nicolau <radu.nicolau@intel.com>
Subject: [dpdk-stable] [PATCH v5 02/25] raw/ioat: fix missing close function
Date: Wed,  7 Oct 2020 17:30:00 +0100
Message-ID: <20201007163023.2817-3-bruce.richardson@intel.com> (raw)
In-Reply-To: <20201007163023.2817-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>
Reviewed-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Sunil Pai G <sunil.pai.g@intel.com>
Acked-by: Radu Nicolau <radu.nicolau@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-10-07 16:35 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   ` [dpdk-stable] [PATCH v3 02/25] raw/ioat: fix missing close function Bruce Richardson
2020-09-25 11:12     ` [dpdk-stable] [dpdk-dev] " 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   ` Bruce Richardson [this message]
     [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=20201007163023.2817-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=radu.nicolau@intel.com \
    --cc=stable@dpdk.org \
    --cc=sunil.pai.g@intel.com \
    --cc=thomas@monjalon.net \
    /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

patches for DPDK stable branches

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/stable/0 stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ https://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git