DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Richardson, Bruce" <bruce.richardson@intel.com>
To: Lilijun <jerry.lilijun@huawei.com>, "dev@dpdk.org" <dev@dpdk.org>,
	"stephen@networkplumber.org" <stephen@networkplumber.org>
Subject: Re: [dpdk-dev] kernel panic when stop my test demo
Date: Wed, 15 Oct 2014 10:08:39 +0000
Message-ID: <59AF69C657FD0841A61C55336867B5B03441EDC0@IRSMSX103.ger.corp.intel.com> (raw)
In-Reply-To: <543E419A.70509@huawei.com>



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Lilijun
> Sent: Wednesday, October 15, 2014 10:43 AM
> To: dev@dpdk.org; stephen@networkplumber.org
> Subject: Re: [dpdk-dev] kernel panic when stop my test demo
> 
> Hi all,
> 
> After adding unmap uio resources operations in process signal handler functions,
> An new error was found as follows:
> Call Trace:
>  [<ffffffffa01cd530>] uio_release+0x40/0x60 [uio]
>  [<ffffffff811b1329>] __fput+0xe9/0x270
>  [<ffffffff811b15fe>] ____fput+0xe/0x10
>  [<ffffffff810823c7>] task_work_run+0xa7/0xe0
>  [<ffffffff81012a77>] do_notify_resume+0x97/0xb0
>  [<ffffffff815f2a92>] int_signal+0x12/0x17
> 
> The code for unmap uio resources is shown:
> static void pci_dev_uio_unmap(struct rte_pci_device *pci_dev, uint8_t port_id)
> {
>         int i;
> 
>         RTE_LOG(INFO, EAL, "begin unmap port %d uio resource! \n", port_id);
>         if (NULL == pci_dev)
>         {
>                 RTE_LOG(ERR, EAL, "begin unmap port %d uio resource! \n", port_id);
>                 return;
>         }
> 
>         for (i = 0; i != PCI_MAX_RESOURCE; i++)
>         {
>                 /* skip empty BAR */
>                 if (0 == pci_dev->mem_resource[i].phys_addr)
>                         continue;
>                 if (munmap(pci_dev->mem_resource[i].addr, pci_dev-
> >mem_resource[i].len)
>                                                                         == -1){
>                         RTE_LOG(ERR, EAL, "Error with munmap\n");
>                         return;
>                 }
>         }
>         if (close(pci_dev->intr_handle.fd) == -1){
>                 RTE_LOG(ERR, EAL, "Error closing interrupt handle\n");
>                 return;
>         }
>         pci_dev->intr_handle.type = RTE_INTR_HANDLE_UNKNOWN;
>         RTE_LOG(INFO, EAL, "unmap port %d uio resource successfully!\n",
> port_id);
> }
> 
> Does anyone has some ideas?
> 
> Thanks for any help.
> Jerry
> 
> On 2014/10/14 19:58, Lilijun wrote:
> > Hi Stephen and all,
> >
> > I have a same problem as this older email describes on Aug 14, 2013.
> > Any help will be appreciated.
> >
> > The details is shown as follows.
> > The key step implementation of my demo is:
> > 1. Firstly, call rte_eal_init() to do some initialization.
> > 2. Switch the driver of my Intel  82599 NIC from ixgbe.ko to igb_uio.ko
> > like tools/dpdk_nic_bind.py written in C source code.
> > 3. Configure rte_dev and start it.
> > 4. Do some rx/tx tests.
> > 5. call rte_eth_dev_stop(dpdk_port_id) to stop the hardware as your history
> emails.
> > 6. Switch the driver of the NIC from igb_uio.ko to ixgbe.ko.
> > 7. Kill the demo using commands: kill -9.

Just to clarify one point - you have an application running which was using the NICs with DPDK while you remove the uio driver and replace it with ixgbe? I would expect doing such a thing to cause problems as stopping the device does not cause the NIC BAR memory to be unmapped from the DPDK process. Therefore removing the driver providing that memory map and getting another driver to start using those same BARs would not be recommended.

/Bruce

  reply	other threads:[~2014-10-15 10:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-14  3:51 安宏奎
2013-08-14  5:58 ` Stephen Hemminger
2013-08-14  6:41   ` [dpdk-dev] 答复: " 安宏奎
2014-10-14 11:58   ` [dpdk-dev] " Lilijun
2014-10-15  9:42     ` Lilijun
2014-10-15 10:08       ` Richardson, Bruce [this message]
2014-10-16  2:40         ` Lilijun
2014-10-16  9:37           ` Richardson, Bruce

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=59AF69C657FD0841A61C55336867B5B03441EDC0@IRSMSX103.ger.corp.intel.com \
    --to=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=jerry.lilijun@huawei.com \
    --cc=stephen@networkplumber.org \
    /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

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/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 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

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


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