Soft Patch Panel
 help / color / Atom feed
From: Itsuro ODA <oda@valinux.co.jp>
To: Yasufumi Ogawa <yasufum.o@gmail.com>
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: Wed, 08 Jan 2020 10:23:29 +0900
Message-ID: <20200108102329.A253.277DD91C@valinux.co.jp> (raw)
In-Reply-To: <20200108101752.A24F.277DD91C@valinux.co.jp>

Hi,

Oops.

> The API of these methods are diffrent from v18.08 and v18.11 (or after).
> You seem to make under v18.11 (or after). The patch is under v18.08.
> Make sure your RTE_SDK.

v18.08 -> v19.08
v18.11 -> v19.11

Thanks.

On Wed, 08 Jan 2020 10:17:52 +0900
Itsuro ODA <oda@valinux.co.jp> wrote:

> Hi Yasufumi,
> 
> On Tue, 7 Jan 2020 19:41:52 +0900
> Yasufumi Ogawa <yasufum.o@gmail.com> wrote:
> 
> > 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;
> > [...]
> 
> rte_vhost_get_ifname stores interface name to ifname.
> ifname is compared with internal->ifname a few after lines.
> "if (internal != NULL && !strcmp(internal->iface_name, ifname)) " 
> 
> > > +}
> > > +
> > > +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 ^[$B!F^[(Bops.dev_infos_get^[$B!G^[(B)
> > 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 ^[$B!F^[(Bops.stats_reset^[$B!G^[(B)
> > cc1: error: unrecognized command line option ^[$B!F^[(B-Wno-address-of-packed-member^[$B!G^[(B [-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.
> 
> The API of these methods are diffrent from v18.08 and v18.11 (or after).
> You seem to make under v18.11 (or after). The patch is under v18.08.
> Make sure your RTE_SDK.
> 
> > Regards,
> > Yasufumi
> 
> Thanks.
> 
> > > +
> > > +static int
> > [...]
> 
> -- 
> Itsuro ODA <oda@valinux.co.jp>

-- 
Itsuro ODA <oda@valinux.co.jp>


  reply index

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
2020-01-08  1:17       ` Itsuro ODA
2020-01-08  1:23         ` Itsuro ODA [this message]
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 publically 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=20200108102329.A253.277DD91C@valinux.co.jp \
    --to=oda@valinux.co.jp \
    --cc=ferruh.yigit@intel.com \
    --cc=spp@dpdk.org \
    --cc=yasufum.o@gmail.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

Soft Patch Panel

Archives are clonable:
	git clone --mirror http://inbox.dpdk.org/spp/0 spp/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 spp spp/ http://inbox.dpdk.org/spp \
		spp@dpdk.org
	public-inbox-index spp


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.spp


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