From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 2979E1B10D for ; Wed, 3 Oct 2018 18:28:09 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Oct 2018 09:28:09 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,336,1534834800"; d="scan'208";a="79581947" Received: from fyigit-mobl.ger.corp.intel.com (HELO [10.237.221.49]) ([10.237.221.49]) by orsmga006.jf.intel.com with ESMTP; 03 Oct 2018 09:28:07 -0700 To: Thomas Monjalon , Raslan Darawsheh Cc: "dev@dpdk.org" , "keith.wiles@intel.com" , Shahaf Shuler , Ori Kam References: <1538047196-13789-2-git-send-email-rasland@mellanox.com> <2772955.aHLSG1IVkg@xps> <1606810.hPqmbmdGoK@xps> From: Ferruh Yigit Openpgp: preference=signencrypt Message-ID: <2c167597-e5fb-f5bf-3d2e-d807bb45da79@intel.com> Date: Wed, 3 Oct 2018 17:28:06 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <1606810.hPqmbmdGoK@xps> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v4 2/2] net/tap: add queues when attaching from secondary process 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: Wed, 03 Oct 2018 16:28:10 -0000 On 10/2/2018 12:38 PM, Thomas Monjalon wrote: > 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? I think it is good to unregister, but we need to keep number of active tap devices, so register if "active_tap == 1", unregister when "active_tap == 0" ?