From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v4 2/2] net/tap: add queues when attaching from secondary process Date: Tue, 02 Oct 2018 13:38:09 +0200 Message-ID: <1606810.hPqmbmdGoK@xps> References: <1538047196-13789-2-git-send-email-rasland@mellanox.com> <2772955.aHLSG1IVkg@xps> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: "dev@dpdk.org" , "keith.wiles@intel.com" , Shahaf Shuler , Ori Kam , ferruh.yigit@intel.com To: Raslan Darawsheh Return-path: Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id 207DC2C0C for ; Tue, 2 Oct 2018 13:38:12 +0200 (CEST) In-Reply-To: List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 02/10/2018 12:50, Raslan Darawsheh: > From: Thomas Monjalon > > 02/10/2018 12:34, Raslan Darawsheh: > > > @@ -2056,6 +2179,13 @@ rte_pmd_tap_probe(struct rte_vdev_device *dev) > > > > > > TAP_LOG(NOTICE, "Initializing pmd_tap for %s as %s", > > > > > > name, tap_name); > > > > > > + /* Register IPC feed callback */ > > > + ret = rte_mp_action_register(TAP_MP_KEY, tap_mp_sync_queues); > > > + if (ret < 0 && rte_errno != EEXIST) { > > > + TAP_LOG(ERR, "%s: Failed to register IPC callback: %s", > > > + tuntap_name, strerror(rte_errno)); > > > + goto leave; > > > + } > > > > > > ret = eth_dev_tap_create(dev, tap_name, remote_iface, &user_mac, > > > > > > ETH_TUNTAP_TYPE_TAP); > > > > Is it an issue registering tap_mp_sync_queues at each tap probing? > > Should we do it only once? > > It should be as of per device so we should do it for each port alone since several ports can have different queues. > > Moreover, if the port that has the registration was closed or unplugged we'll not be able to sync qeues for other ports. I think we should do register on first tap device probing and never unregisters. Ferruh, any opinion?