From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mailout1.radware.com (mailout1.radware.com [192.115.180.130]) by dpdk.org (Postfix) with ESMTP id B5CE8379B for ; Thu, 23 Feb 2017 10:02:40 +0100 (CET) Received: from ILMB1.corp.radware.com ([169.254.1.237]) by ILCAS2.corp.radware.com ([176.200.120.122]) with mapi id 14.03.0319.002; Thu, 23 Feb 2017 11:02:40 +0200 From: Ami Sabo To: Yuanhan Liu CC: "dev@dpdk.org" Thread-Topic: [PATCH v2] net/virtio-user: fix multi-process issue Thread-Index: AQHSjSICUVYatg2fIEyH7H7ShMjsbqF1xIoAgACHxVA= Date: Thu, 23 Feb 2017 09:02:38 +0000 Message-ID: <25F949B549CFD14EABC392C69312415C0106DBAD3A@ILMB1.corp.radware.com> References: <1487762487-21698-amis@radware.com> <1487778028-30090-1-git-send-email-amis@radware.com> <20170223025436.GQ18844@yliu-dev.sh.intel.com> In-Reply-To: <20170223025436.GQ18844@yliu-dev.sh.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [176.200.121.203] x-tm-as-product-ver: SMEX-11.0.0.4179-8.100.1062-22902.006 x-tm-as-result: No--15.184700-0.000000-31 x-tm-as-user-approved-sender: Yes x-tm-as-user-blocked-sender: No Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v2] net/virtio-user: fix multi-process issue X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Feb 2017 09:02:41 -0000 Mistakenly sent only partial diff.=20 Resent the all patch (from the original code base) as a reply to the first = message in the thread. -- Ami -----Original Message----- From: Yuanhan Liu [mailto:yuanhan.liu@linux.intel.com]=20 Sent: Thursday, February 23, 2017 4:55 AM To: Ami Sabo Cc: dev@dpdk.org Subject: Re: [PATCH v2] net/virtio-user: fix multi-process issue On Wed, Feb 22, 2017 at 05:40:28PM +0200, Ami Sabo wrote: > diff --git a/drivers/net/virtio/virtio_user_ethdev.c=20 > b/drivers/net/virtio/virtio_user_ethdev.c > index 5291294..9b3c266 100644 > --- a/drivers/net/virtio/virtio_user_ethdev.c > +++ b/drivers/net/virtio/virtio_user_ethdev.c > @@ -418,25 +418,25 @@ virtio_user_pmd_probe(const char *name, const char = *params) > goto end; > } > =20 > - if (rte_eal_process_type() =3D=3D RTE_PROC_PRIMARY) { > - eth_dev =3D virtio_user_eth_dev_alloc(name); > - if (!eth_dev) { > - PMD_INIT_LOG(ERR, "virtio_user fails to alloc de= vice"); > - goto end; > - } > - hw =3D eth_dev->data->dev_private; > - if (virtio_user_dev_init(hw->virtio_user_dev, path, queu= es, cq, > - queue_s= ize, mac_addr) < 0) { > - PMD_INIT_LOG(ERR, "virtio_user_dev_init fails"); > - virtio_user_eth_dev_free(eth_dev); > - goto end; > - } > - } else { > - eth_dev =3D rte_eth_dev_attach_secondary(name); > - if (!eth_dev) { > - goto end; > - } > - } Were you making the patch based on some internal code base? The latest virt= io code doesn't have the above code. > + if (rte_eal_process_type() =3D=3D RTE_PROC_PRIMARY) { > + eth_dev =3D virtio_user_eth_dev_alloc(name); > + if (!eth_dev) { > + PMD_INIT_LOG(ERR, "virtio_user fails to alloc device"); > + goto end; > + } > + hw =3D eth_dev->data->dev_private; > + if (virtio_user_dev_init(hw->virtio_user_dev, path, queues, cq, > + queue_size, mac_addr) < 0) { > + PMD_INIT_LOG(ERR, "virtio_user_dev_init fails"); > + virtio_user_eth_dev_free(eth_dev); > + goto end; > + } > + } else { > + eth_dev =3D rte_eth_dev_attach_secondary(name); We also don't have rte_eth_dev_attach_secondary exported, neither. --yliu