Soft Patch Panel
 help / color / mirror / Atom feed
From: Yasufumi Ogawa <yasufum.o@gmail.com>
To: Itsuro Oda <oda@valinux.co.jp>
Cc: spp@dpdk.org, ferruh.yigit@intel.com
Subject: Re: [spp] [PATCH v2 01/12] drivers/vhost: add multi process supported vhost PMD for SPP
Date: Tue, 7 Jan 2020 19:41:52 +0900	[thread overview]
Message-ID: <dfbfbf6f-b1d9-1afe-758b-29f2531b2f63@gmail.com> (raw)
In-Reply-To: <20191225044954.3600-2-oda@valinux.co.jp>

Hi,

On 2019/12/25 13:49, Itsuro Oda wrote:
> vhost PMD can not be used by secondary processes since DPDK 18.11.
> SPP project decided to have own vhost PMD which can be used by
> secondary processes at the moment. This vhost PMD is based on the
> original vhost PMD but is simplified very much only to support
> functions used by SPP. Thereby it becomes easy to fix the probrem.
> 
> The main idea of the fix is that execution of vhost start/stop
> is moved to eth_dev_start/stop from probe/remove.
> 
> Note that only process which executes eth_dev_start can use the
> vhost device although the vhost device is shared among the primary
> process and secondary processes. Once eth_dev_stop is executed by
> the process which used the vhost device, it is available to be
> used by any process. It is user responsibility that multipul
> processes don't use the vhost device at the same time.
> 
> Signed-off-by: Itsuro Oda <oda@valinux.co.jp>
> ---
>   src/drivers/vhost/Makefile                    |  28 +
>   .../vhost/rte_pmd_spp_vhost_version.map       |   4 +
>   src/drivers/vhost/rte_spp_vhost.c             | 588 ++++++++++++++++++
>   3 files changed, 620 insertions(+)
>   create mode 100644 src/drivers/vhost/Makefile
>   create mode 100644 src/drivers/vhost/rte_pmd_spp_vhost_version.map
>   create mode 100644 src/drivers/vhost/rte_spp_vhost.c
> 
> diff --git a/src/drivers/vhost/Makefile b/src/drivers/vhost/Makefile
[...]
> +
> +static inline struct pmd_internal *
> +find_internal_resource(int vid)
> +{
> +	struct pmd_internal *internal;
> +	int i;
> +	char ifname[PATH_MAX];
This variable is declared, but not used from anywhere.

> +
> +	if (rte_vhost_get_ifname(vid, ifname, sizeof(ifname)) == -1)
> +		return NULL;
[...]
> +}
> +
> +static const struct eth_dev_ops ops = {
> +	.dev_start = eth_dev_start,
> +	.dev_stop = eth_dev_stop,
> +	.dev_configure = eth_dev_configure,
> +	.dev_infos_get = eth_dev_info, > +	.rx_queue_setup = eth_rx_queue_setup,
> +	.tx_queue_setup = eth_tx_queue_setup,
> +	.rx_queue_release = eth_queue_release,
> +	.tx_queue_release = eth_queue_release,
> +	.link_update = eth_link_update,
> +	.stats_get = eth_stats_get,
> +	.stats_reset = eth_stats_reset,
> +};
This struct causes compilation errors because of incompatible pointer types.

$ make
== src
== drivers
== vhost
   CC rte_spp_vhost.o
rte_spp_vhost.c:371:19: error: initialization from incompatible pointer 
type [-Werror=incompatible-pointer-types]
   .dev_infos_get = eth_dev_info,
                    ^~~~~~~~~~~~
rte_spp_vhost.c:371:19: note: (near initialization for ‘ops.dev_infos_get’)
rte_spp_vhost.c:378:17: error: initialization from incompatible pointer 
type [-Werror=incompatible-pointer-types]
   .stats_reset = eth_stats_reset,
                  ^~~~~~~~~~~~~~~
rte_spp_vhost.c:378:17: note: (near initialization for ‘ops.stats_reset’)
cc1: error: unrecognized command line option 
‘-Wno-address-of-packed-member’ [-Werror]
cc1: all warnings being treated as errors

 From my understanding, eth_dev_info() and eth_stats_reset() are defined 
as void in your patch, but DPDK expects int by referring the definition 
of eth_dev_ops in lib/librte_ethdev/rte_ethdev_core.h:609.

Regards,
Yasufumi
> +
> +static int
[...]

  reply	other threads:[~2020-01-07 10:41 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-23  5:00 [spp] [PATCH 0/3] revive vhost Itsuro Oda
2019-12-23  5:00 ` [spp] [PATCH 1/3] multi process supported vhost PMD for SPP Itsuro Oda
2019-12-23  5:00 ` [spp] [PATCH 2/3] make use of " Itsuro Oda
2019-12-23  5:00 ` [spp] [PATCH 3/3] make robust against process start and termination Itsuro Oda
2019-12-24  5:57 ` [spp] [PATCH 0/3] revive vhost Yasufumi Ogawa
2019-12-24  6:09   ` Itsuro ODA
2019-12-24  6:30     ` Yasufumi Ogawa
2019-12-25  4:49 ` [spp] [PATCH v2 00/12] " Itsuro Oda
2019-12-25  4:49   ` [spp] [PATCH v2 01/12] drivers/vhost: add multi process supported vhost PMD for SPP Itsuro Oda
2020-01-07 10:41     ` Yasufumi Ogawa [this message]
2020-01-08  1:17       ` Itsuro ODA
2020-01-08  1:23         ` Itsuro ODA
2019-12-25  4:49   ` [spp] [PATCH v2 02/12] drivers: add to build " Itsuro Oda
2019-12-25  4:49   ` [spp] [PATCH v2 03/12] shared: switch to use " Itsuro Oda
2019-12-25  4:49   ` [spp] [PATCH v2 04/12] spp_primary: add link to " Itsuro Oda
2019-12-25  4:49   ` [spp] [PATCH v2 05/12] spp_nfv: " Itsuro Oda
2019-12-25  4:49   ` [spp] [PATCH v2 06/12] spp_vf: " Itsuro Oda
2019-12-25  4:49   ` [spp] [PATCH v2 07/12] spp_mirror: " Itsuro Oda
2019-12-25  4:49   ` [spp] [PATCH v2 08/12] spp_primary: stop vhost before detach Itsuro Oda
2019-12-25  4:49   ` [spp] [PATCH v2 09/12] spp_nfv: " Itsuro Oda
2019-12-25  4:49   ` [spp] [PATCH v2 10/12] shared: make sure vhost is stopped before (re)using the vhost Itsuro Oda
2019-12-25  4:49   ` [spp] [PATCH v2 11/12] spp_nfv: exclude vhosts at process initialization Itsuro Oda
2019-12-25  4:49   ` [spp] [PATCH v2 12/12] spp_vf, spp_mirror: " Itsuro Oda
2020-01-09 23:10 ` [spp] [PATCH v3 00/12] revive vhost Itsuro Oda
2020-01-09 23:10   ` [spp] [PATCH v3 01/12] drivers/vhost: add multi process supported vhost PMD for SPP Itsuro Oda
2020-01-09 23:10   ` [spp] [PATCH v3 02/12] drivers: add to build " Itsuro Oda
2020-01-09 23:10   ` [spp] [PATCH v3 03/12] shared: switch to use " Itsuro Oda
2020-01-09 23:10   ` [spp] [PATCH v3 04/12] spp_primary: add link to " Itsuro Oda
2020-01-09 23:10   ` [spp] [PATCH v3 05/12] spp_nfv: " Itsuro Oda
2020-01-09 23:10   ` [spp] [PATCH v3 06/12] spp_vf: " Itsuro Oda
2020-01-09 23:10   ` [spp] [PATCH v3 07/12] spp_mirror: " Itsuro Oda
2020-01-09 23:10   ` [spp] [PATCH v3 08/12] spp_primary: stop vhost before detach Itsuro Oda
2020-01-09 23:10   ` [spp] [PATCH v3 09/12] spp_nfv: " Itsuro Oda
2020-01-09 23:10   ` [spp] [PATCH v3 10/12] shared: make sure vhost is stopped before (re)using the vhost Itsuro Oda
2020-01-09 23:10   ` [spp] [PATCH v3 11/12] spp_nfv: exclude vhosts at process initialization Itsuro Oda
2020-01-09 23:10   ` [spp] [PATCH v3 12/12] spp_vf, spp_mirror: " Itsuro Oda
2020-01-17  2:27   ` [spp] [PATCH v3 00/12] revive vhost Yasufumi Ogawa

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=dfbfbf6f-b1d9-1afe-758b-29f2531b2f63@gmail.com \
    --to=yasufum.o@gmail.com \
    --cc=ferruh.yigit@intel.com \
    --cc=oda@valinux.co.jp \
    --cc=spp@dpdk.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
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).