DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Wu, Jingjing" <jingjing.wu@intel.com>
To: "Xia, Chenbo" <chenbo.xia@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>,
	"thomas@monjalon.net" <thomas@monjalon.net>,
	"david.marchand@redhat.com" <david.marchand@redhat.com>
Cc: "stephen@networkplumber.org" <stephen@networkplumber.org>,
	"Liang, Cunming" <cunming.liang@intel.com>,
	"Lu, Xiuchun" <xiuchun.lu@intel.com>,
	"Li, Miao" <miao.li@intel.com>
Subject: Re: [dpdk-dev] [PATCH 5/9] vfio_user: implement interrupt related APIs
Date: Wed, 30 Dec 2020 01:04:59 +0000
Message-ID: <BN6PR11MB4052F85B71FBCDED48540598E3D70@BN6PR11MB4052.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20201218073851.93609-6-chenbo.xia@intel.com>

>  	if ((cmd == VFIO_USER_DMA_MAP || cmd == VFIO_USER_DMA_UNMAP
> ||
> +		cmd == VFIO_USER_DEVICE_SET_IRQS ||
>  		cmd == VFIO_USER_DEVICE_RESET)
>  		&& dev->ops->lock_dp) {
>  		dev->ops->lock_dp(dev_id, 1);

About cmd "VFIO_USER_REGION_WRITE", irq setting would cause update_status to iavfbe device.
Where will the lock be?

> @@ -871,7 +1056,8 @@ static int vfio_user_message_handler(int dev_id, int fd)
>  		if (vfio_user_is_ready(dev) && dev->ops->new_device)
>  			dev->ops->new_device(dev_id);
>  	} else {
> -		if ((cmd == VFIO_USER_DMA_MAP || cmd ==
> VFIO_USER_DMA_UNMAP)
> +		if ((cmd == VFIO_USER_DMA_MAP || cmd ==
> VFIO_USER_DMA_UNMAP
> +			|| cmd == VFIO_USER_DEVICE_SET_IRQS)
>  			&& dev->ops->update_status)
>  			dev->ops->update_status(dev_id);
>  	}
> @@ -898,6 +1084,7 @@ static int vfio_user_sock_read(int fd, void *data)
>  		if (dev) {
>  			dev->ops->destroy_device(dev_id);
>  			vfio_user_destroy_mem_entries(dev->mem);
> +			vfio_user_clean_irqfd(dev);
>  			dev->is_ready = 0;
>  			dev->msg_id = 0;
>  		}
> @@ -995,9 +1182,9 @@ vfio_user_start_server(struct vfio_user_server_socket
> *sk)
>  	}
> 
>  	/* All the info must be set before start */
> -	if (!dev->dev_info || !dev->reg) {
> +	if (!dev->dev_info || !dev->reg || !dev->irqs.info) {
>  		VFIO_USER_LOG(ERR, "Failed to start, "
> -			"dev/reg info must be set before start\n");
> +			"dev/reg/irq info must be set before start\n");
>  		return -1;
>  	}
> 


  reply	other threads:[~2020-12-30  1:05 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-18  7:38 [dpdk-dev] [PATCH 0/9] Introduce vfio-user library Chenbo Xia
2020-12-18  7:38 ` [dpdk-dev] [PATCH 1/9] lib: introduce " Chenbo Xia
2020-12-18 17:13   ` Stephen Hemminger
2020-12-19  6:12     ` Xia, Chenbo
2020-12-18 17:17   ` Stephen Hemminger
2020-12-19  6:25     ` Xia, Chenbo
2020-12-18  7:38 ` [dpdk-dev] [PATCH 2/9] vfio_user: implement lifecycle related APIs Chenbo Xia
2021-01-05  8:34   ` Xing, Beilei
2021-01-05  9:58     ` Xia, Chenbo
2020-12-18  7:38 ` [dpdk-dev] [PATCH 3/9] vfio_user: implement device and region " Chenbo Xia
2021-01-06  5:51   ` Xing, Beilei
2021-01-06  7:50     ` Xia, Chenbo
2020-12-18  7:38 ` [dpdk-dev] [PATCH 4/9] vfio_user: implement DMA table and socket address API Chenbo Xia
2020-12-18  7:38 ` [dpdk-dev] [PATCH 5/9] vfio_user: implement interrupt related APIs Chenbo Xia
2020-12-30  1:04   ` Wu, Jingjing [this message]
2020-12-30  2:31     ` Xia, Chenbo
2020-12-18  7:38 ` [dpdk-dev] [PATCH 6/9] vfio_user: add client APIs of device attach/detach Chenbo Xia
2020-12-18  7:38 ` [dpdk-dev] [PATCH 7/9] vfio_user: add client APIs of DMA/IRQ/region Chenbo Xia
2021-01-07  2:41   ` Xing, Beilei
2021-01-07  7:26     ` Xia, Chenbo
2020-12-18  7:38 ` [dpdk-dev] [PATCH 8/9] test/vfio_user: introduce functional test Chenbo Xia
2020-12-18  7:38 ` [dpdk-dev] [PATCH 9/9] doc: add vfio-user library guide Chenbo Xia
2021-01-06  5:07   ` Xing, Beilei
2021-01-06  7:43     ` Xia, Chenbo
2020-12-18  9:37 ` [dpdk-dev] [PATCH 0/9] Introduce vfio-user library David Marchand
2020-12-18 14:07   ` Thanos Makatos
2021-01-14  6:14 ` [dpdk-dev] [PATCH v2 " Chenbo Xia
2021-01-14  6:14   ` [dpdk-dev] [PATCH v2 1/9] lib: introduce " Chenbo Xia
2021-01-14  6:14   ` [dpdk-dev] [PATCH v2 2/9] vfio_user: implement lifecycle related APIs Chenbo Xia
2021-01-14  6:14   ` [dpdk-dev] [PATCH v2 3/9] vfio_user: implement device and region " Chenbo Xia
2021-01-14 18:48     ` David Christensen
2021-01-19  3:22       ` Xia, Chenbo
2021-01-14  6:14   ` [dpdk-dev] [PATCH v2 4/9] vfio_user: implement DMA table and socket address API Chenbo Xia
2021-01-14  6:14   ` [dpdk-dev] [PATCH v2 5/9] vfio_user: implement interrupt related APIs Chenbo Xia
2021-01-14  6:14   ` [dpdk-dev] [PATCH v2 6/9] vfio_user: add client APIs of device attach/detach Chenbo Xia
2021-01-14  6:14   ` [dpdk-dev] [PATCH v2 7/9] vfio_user: add client APIs of DMA/IRQ/region Chenbo Xia
2021-01-14  6:14   ` [dpdk-dev] [PATCH v2 8/9] test/vfio_user: introduce functional test Chenbo Xia
2021-01-14 19:03     ` David Christensen
2021-01-19  3:27       ` Xia, Chenbo
2021-01-19 18:26         ` David Christensen
2021-01-14  6:14   ` [dpdk-dev] [PATCH v2 9/9] doc: add vfio-user library guide Chenbo Xia
2021-01-15  7:58   ` [dpdk-dev] [PATCH v2 0/9] Introduce vfio-user library David Marchand
2021-01-19  3:13     ` Xia, Chenbo

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=BN6PR11MB4052F85B71FBCDED48540598E3D70@BN6PR11MB4052.namprd11.prod.outlook.com \
    --to=jingjing.wu@intel.com \
    --cc=chenbo.xia@intel.com \
    --cc=cunming.liang@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=miao.li@intel.com \
    --cc=stephen@networkplumber.org \
    --cc=thomas@monjalon.net \
    --cc=xiuchun.lu@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

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