From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3EE63A00C3; Tue, 18 Jan 2022 13:14:53 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BF0C242710; Tue, 18 Jan 2022 13:14:51 +0100 (CET) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id 48BFF4068E for ; Tue, 18 Jan 2022 13:14:49 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1642508089; x=1674044089; h=message-id:date:to:cc:references:from:subject: in-reply-to:content-transfer-encoding:mime-version; bh=YDjn9dxth/ouSPBvPRMrNQCDkw8NlIvGyaEPTZnWEBM=; b=UAhf9FDCbfFf2/q+4+OnH5iQhkedT7JfZt/nVheegWRv4YIL6ojKbbEz YatHGULTHWXzy7XgRjETrp4ag2lM0s/b0ARFPh5clS1aNpiBFyYE50tfc aEgSomU8dM/aSm2DKzUBLxzshSQIAsuOiyB67VmBJVgtglT2a8/krW4UB llv6Dk78L+KQBsij1LJJNNKVvIoYVuJe6dHaAwIvwh66cU5rvTn2P3pds RlxRsHH5mmofvrVrIdlqFs6vFDB9zYK2EW5Q9glfCED/mC26LEJdpgpEy i+NlPd+Wa44txVu6/TAuE6z1eo3ctDMc8vdi0d1lrsM0I5n42uiwvJDlv Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10230"; a="244760959" X-IronPort-AV: E=Sophos;i="5.88,297,1635231600"; d="scan'208";a="244760959" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jan 2022 04:14:48 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,297,1635231600"; d="scan'208";a="622121039" Received: from orsmsx605.amr.corp.intel.com ([10.22.229.18]) by fmsmga002.fm.intel.com with ESMTP; 18 Jan 2022 04:14:47 -0800 Received: from orsmsx606.amr.corp.intel.com (10.22.229.19) by ORSMSX605.amr.corp.intel.com (10.22.229.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Tue, 18 Jan 2022 04:14:47 -0800 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx606.amr.corp.intel.com (10.22.229.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20 via Frontend Transport; Tue, 18 Jan 2022 04:14:47 -0800 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.168) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.20; Tue, 18 Jan 2022 04:14:47 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QC/V0gzBQ3wopC1k80LX047CuIA9qS1lIzkfY7Iw917FBCtpJCm3GMQvycoC8mJ/nans2LfekYdCT3rTtmcgXy0SQfq+2zeBqylbwlfwtgmThoWt1EMpqYgCHC1lEzDzu7XNq6RLDKeB1tBscVDwftVB7u4D0BMjr7lVSfK2+NdVW/dCDlitP0I2gqcfD1yquBv4vMNmixfZj6x4R58LHIs5h/Kwecsq241ynJKfhzBY4Yty5CW376JB2JTT3WLE+TWjg9HASWWBI9jghwqLTo4XKw3lF8hcHK4bUIqJecZ1gsYcC7mQfTg3g+FbyZSk2dJKJ/lyoDvwekIpx9V8EA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=vxOWTmICuSyI9OUf15dPxwFOwe+Y3UoE+TBHDxNMRKU=; b=nlQF3AXvMCyCzMxzRnJWnt4qpiIQV9F8AIsO5vtFFJxcuelikITf0tFi71DZ8X4lYlz2h9dHG2HlHEbGkCB5atlry0PCmGdmLd85aG38SlzvPMf7tWmMNvxeM6OGHzPzbljNuzuMwQnEji0pFuj9HuukbOgMgRFRS3d2JVWULhayR1N1ipVaKuwbCX8Pir1Qw2KIGbXQ0ClpqJjwaZOqAtkxHLVU1Qq/E9vB9QjxsD7OUk1qlgCnaKMMous++Zuqdv1CR4EZRLG3Tn4k7ue1WmYnVrPcGNsFs3fmt7KblFK66ienAAemMQxJ97T1VQCphT1a59ATKeFqgb7Q8P7ZEA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) by MN2PR11MB4238.namprd11.prod.outlook.com (2603:10b6:208:188::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4888.11; Tue, 18 Jan 2022 12:14:45 +0000 Received: from PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::5046:8550:928d:850e]) by PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::5046:8550:928d:850e%7]) with mapi id 15.20.4888.014; Tue, 18 Jan 2022 12:14:45 +0000 Message-ID: <913936f2-8170-d880-d36f-4a1f0b07fd5b@intel.com> Date: Tue, 18 Jan 2022 12:14:39 +0000 Content-Language: en-US To: kumaraparameshwaran rathinavel CC: Kumara Parameshwaran , "keith.wiles@intel.com" , "dev@dpdk.org" , Raslan Darawsheh References: <20211126041515.96259-1-kumaraparamesh92@gmail.com> <83fe377d-adfe-76ca-5bbb-4f02f8575380@intel.com> From: Ferruh Yigit Subject: Re: [PATCH] net/tap: Bug fix to populate fds in secondary process X-User: ferruhy In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: LO4P265CA0033.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:2ae::6) To PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 050679b6-3595-4e26-69f7-08d9da7c1d24 X-MS-TrafficTypeDiagnostic: MN2PR11MB4238:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6790; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Wsr+LuS5lGo5bgpTuybzulkWDiJ72OXkEb1dAxxZHN/cyZrEEPLusEED3kZE12ssv7Z0fu9c82EEc3iNTU7WIa27F4ikfMSDXWhit3+lQzUwxlecC82dKwL84/dX9ENPgzmyFzIYv685exNCM7EdvOxTRkK7aDJeI/4V1TG2E6jlyD7eExLUPNKQ09kmiK/SI3L8JQ2PpLgWEXj60Z4/9YD+LF7nDV0SOlFpWoNaUsmzrkUtSyW0VGYh/1kLnHXjTEOr/dkk2MBe75hb2Yr74YUnhAeBzL3FrY9dPWMq7gG54FDORfCJPth485C07rXmBzW8Es1Bx5bRxVd6xem3gl9VZlidYeJtfdE+DM9W38+Pbe01bU1SeUfRddB33aA+tDtZXdofYAKsj8W94efYXghZ3e3jEf6n4sBOwJLZLiHr/KV1ieXR49ALq2feB7uWcMgsuM9pL7NbQtaR7jkxhcjpxImGhw2Kg+T0dA4YYEUfECMDnBW5hadYms+0eDLMxHcj3BnQpzzAlcLjZgDQeLx8ZApO5JUGme/huMa3St16hkCFI7h/6hnkruB9D9WR5bFj3XxXRZZUg3MfnqM4NO5/g7uiuT2lH+bDdDbVZ+RGpZ5B6eUMj3H4e51RfcYAEVSTwa9cO1yq2w08sewSYFKVtB85sdsry9ERfhtLTFLD7k12kNuR3iCJaG3NknUxLsGLvZwyffoTZpY7vFRf5A== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB5000.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(31686004)(83380400001)(186003)(36756003)(6916009)(5660300002)(8676002)(82960400001)(26005)(53546011)(6506007)(44832011)(31696002)(4326008)(66476007)(6486002)(508600001)(86362001)(2616005)(6512007)(38100700002)(66556008)(8936002)(66946007)(2906002)(6666004)(316002)(54906003)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?QnhuMjFoS2Ezd0lvNjI4eTVzczVjRHhNTVlaVW5JQWM3dmdBZE54R2tFOXhP?= =?utf-8?B?R09YOCtYckFqU0wzbTlsQ0JjMmtIbmdFTGVMQlhFdE5aV3RVUXpuemRCYkl3?= =?utf-8?B?T2dmS1V6N2c5N1ZhS1ZpZU1ITXlTZGV6QnlJY0lPMEJsQ2gxbWQ4dERBYVV5?= =?utf-8?B?R2NTQzljSVBwNnVUaG94NDQ4NkdyT3R3RkVGTzROd05NOGdIQWpHZFpZdUov?= =?utf-8?B?UVFjbkcrNDhoK2pMbSsxaGozWmxwWmJmVGUreHFmR3UwSVpORlFxeTh5aFEw?= =?utf-8?B?UVljMWc5bFV4aFVWb2lTbWVReUZrampneTJ2WEVZQjFhWTVRa0gxeTRvR1Zy?= =?utf-8?B?L3Rpc0VhZnRDQ0lKQlVDcnFOelBsRDhhdU5ZK05xdVJPRjl0MzlRYUw2dFcz?= =?utf-8?B?QUh5bXBnQzloWWhzdDlzcEFITDhjRnhwbFZZRUZLMDZQQ0ZBM3Fw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d24 X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5000.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jan 2022 12:14:45.2017 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: e1+YPD65oHYwZdfRwvYthVTppW0jVMEgv0dfkzi3DHQs+5Gbpe+PWVtm+q6BjjsTq3clRgeIYll/1BIsZlUXAA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB4238 X-OriginatorOrg: intel.com X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On 1/18/2022 10:52 AM, kumaraparameshwaran rathinavel wrote: Comment moved down, please avoid top posting. > > On Tue, Jan 18, 2022 at 2:40 PM Ferruh Yigit > wrote: > > On 1/18/2022 4:39 AM, Kumara Parameshwaran wrote: > >>   static int > >>   tap_dev_start(struct rte_eth_dev *dev) > >>   { > >>        int err, i; > >> > >> +     tap_mp_req_on_rxtx(dev); > >> + > > > > As for as I understand your logic is primary sends the message to the secondar(y|ies), > > so what happens first secondary is started? > > ​In case of TAP PMD looks like there is an assumption where primary should be started first. There is an existing check below during the probe function call. > > if (!rte_eal_primary_proc_alive(NULL)) { > >       TAP_LOG(ERR, "Primary process is missing"); > >        return -1; > > } > > > > What about secondary sends the message when they are started? > > ​IMHO, since primary process setups the queue it should be sufficient for the primary processes to the send the message and secondary need not send anything. > > > > Also above functions is called by both primary and secondary, what happens when it is > > called by secondary? And the logic is not clear, it can be good to add a process type > > check to clarify. > > ​Sure, these are for tap_intr_handle_set and tap_dev_start functions? > > I was thinking within the 'tap_dev_start()' function, for 'tap_mp_req_on_rxtx()' call. > > Not sure how 'tap_intr_handle_set()' is involved, am I missing something. >> Yes, even I was confused if it had been the tap_intr_handle_set function. > > In general the tap_dev_start should not be invoked by the secondary and only primary should do it. I referred it to a couple of PMDs and that was the case. Please let me know if I am missing something in my understanding. > Yes, that is the intended usecase, that primary does the start. But having the check can help documenting the intention, that it is only for primary.