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 DAB5BA00C3; Tue, 18 Jan 2022 10:10:24 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7908A426F0; Tue, 18 Jan 2022 10:10:24 +0100 (CET) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 8E763426ED for ; Tue, 18 Jan 2022 10:10:22 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1642497022; x=1674033022; h=message-id:date:to:cc:references:from:subject: in-reply-to:content-transfer-encoding:mime-version; bh=rwns1HOf2jgPAh1kplWwESTQEoxJEKFzqpnC0iF4yrU=; b=bKsYb7q5Gq0j73dd9Awfr0V7bO9LTCa//wA5F6Hu7YemmhmDxwovrjnS HA2qe2w7LgLe+rb1lPP1s/gP3oKr2ybFOFjuIhfusuQf5Kl091TbmPaYk BDzncSD7ExImxbp5oZwCoXBoijoJynVejiNlvF3yKpOKVRBq1plc+WaRZ uXzd2cGWc99vRuU13ql4lQv+8Js53nsEIsFU2NNcqGe0nb0NLoQCOsSab ATxh4vvThENKKQ695KR1SStOyU9mULDq91hC9Qv0fLIdMx82zEamng5+a rdStpwzlgJr2tjoIHYHn6VUXGWz7k8LqUsDCoxcYx1Mlhj0aF7qDtb9u/ Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10230"; a="232131414" X-IronPort-AV: E=Sophos;i="5.88,297,1635231600"; d="scan'208";a="232131414" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jan 2022 01:10:21 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,297,1635231600"; d="scan'208";a="492604332" Received: from fmsmsx604.amr.corp.intel.com ([10.18.126.84]) by orsmga002.jf.intel.com with ESMTP; 18 Jan 2022 01:10:08 -0800 Received: from fmsmsx606.amr.corp.intel.com (10.18.126.86) by fmsmsx604.amr.corp.intel.com (10.18.126.84) 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 01:10:08 -0800 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx606.amr.corp.intel.com (10.18.126.86) 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 01:10:08 -0800 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.169) by edgegateway.intel.com (192.55.55.68) 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 01:10:07 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Y1HR0RLjVbebfEG4CibHn3EpkxDhklAx21sYHN5Ib0CAW3ETsM5BzGCi7ZHn3rQtu8ZFVQIQSEqNCWzQ7RrgGy5XiOPvtTHXdCTOMV6Zfhy8F8uyEpKUEHrVnLW3EuqlQWYQIugJDnpBMz0hM5Ah9NYxvdQqiM6TD6zKPe8KpbdIOYSXrcGGTuVcy9TIbN08uS7BxBlVa+xBA7gYaLhJr6n/Ggwz2aEAgUZm3WZHDrybDQOwV+HCkBNBB1W/W4Y/4bsez0p+PwIz0LRsZ27U5/oYFq9pZmd545TzQzfgY8k5lU8RRu7Bwro+hIrBB4AO5nDSK3NDYGOhELZFFFlgew== 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=IW3L4RDcW8VuRDJMu+mIgjyBThp3q9+BxMv/hIIzpT0=; b=U3QOrb8ila50ZlW0LJipZRhyF9D94FGicto/J6lO73UzpJWa7s0OnKCSGeAnhhDpzkMBy15uCoH2yxC1CQLkrYNAPAcFSENf3XTfqllVbF0vzmGfvu9Fd2j4E84sfhnXLme1QxZlEFgQBkpsBUdNUokA3MmIa7gVc8X9kMJGKsJFb7UV3nGQSqkaf3BzY8u3y3DmDqd9Z72S9pZHXVF86YetgI78x8mB77bcq2ZQFNMcBxlrryDoD3LyibF32g7LHklRjqK3k0j/4UL0tBR5ec5egVdU8Ia6Tj3dtYrCjQNYxK6Uv8vYS0Al8FS7bBvslcvPTi+76/8bD3KgWugWBQ== 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 CY4PR11MB1846.namprd11.prod.outlook.com (2603:10b6:903:11f::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4888.12; Tue, 18 Jan 2022 09:10:05 +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 09:10:05 +0000 Message-ID: Date: Tue, 18 Jan 2022 09:10:01 +0000 Content-Language: en-US To: Kumara Parameshwaran , Kumara Parameshwaran , "keith.wiles@intel.com" CC: "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: LO2P265CA0446.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:e::26) 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: 56e2340f-daeb-440a-f0ea-08d9da62513d X-MS-TrafficTypeDiagnostic: CY4PR11MB1846:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3968; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: KNo0hxRS9AAsiHHb2Q/WmQVWYvs1sO7AJUX37j/wyfj9GMbesq54LjCJV95IF6J37brjLHDv4HfZDMiOhLUM7mphdr7bZSeEY9vcWHnanqxEfmSTaFh8EPjWoj5enpEZ2JYgnvmhTDQkIQ5Jwi766PXy2Hmyy6UPOrTgN8cOIriMgkPa2lLvKMzzJnqTyWJyYJp5UXmfbnMpVplfI5EdQWpF7GMqHxPHcs9YksdauU7SA6bZeCRMncOAfJYNhpHdU3LRBPdVXSkrtnlFV9aIAPbBjR5Bzqf6ffsQZz8uQ+I1CPgavjuBRfadkXigdj0qJeTxFXyrpg9rmJ7yE5xkFCcoDrHEiu4A3csbI12EsrlkOgOOwpl6GEDjshRvbjvaUinyWWw/Xt84gmSlecPsvcyVFGooeFuQ60UgVg0IxEqRNwf3BLsSP/gchcr3tU2m6C5ueoWVdakM61K2wKXUr3Afwa1pRQaaE+BvL0XA4XQw5fck86BniYgfdzeukEQjTkuDnB92YQqokGGzBz2nyB2hlETOsQLo23szZGZVnkQdwaBKrAByGbH7fu6boYvuS3r/Jzf7KlET7vY2v10H8AqbwAajEWAMJv82lNjab3EIqWehxzAx2DG7mKZBqf/vNYV5ONavqNVsnCag4xBJAbI6E9nBmJ+/FsN0iGglLmiOTjz81Y02V4Lk6yanYgv6vxOWIeDNqxlwaQeIqXTXSw== 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)(66946007)(6512007)(6506007)(316002)(110136005)(38100700002)(54906003)(5660300002)(2906002)(83380400001)(31686004)(66556008)(66476007)(82960400001)(53546011)(186003)(6486002)(2616005)(86362001)(6666004)(8936002)(4326008)(6636002)(8676002)(44832011)(26005)(508600001)(31696002)(36756003)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?TUJyQ0NBUWUwaTh1UHNzcnhmM1U4RXZUcFN3RnhCVk5GOE00bkxvQ0liNjcr?= =?utf-8?B?N2o0em1BSDVaUGhOcDBtc1BzQWlCNFlKWkVXTVF2UllYa2pYL2p2QXdsNzk5?= =?utf-8?B?Vm01cVkxMUpaVHBwa2psSktnU2w1b1pFbzU2S0JLNXhaS29rMFNmb2F3d29I?= =?utf-8?B?cGhjVEprV1ZDUkUvNFJzZnRSUWZYeEFPQ0gyeFpsZk1HNVQ4SDUwQ1oxQTVa?= =?utf-8?B?em9JTzcxRU9tNDRmYXZ0anVvOEFGSkFxR3ZmL3R0SjdJRm9KSHVGQkQ4TCtX?= =?utf-8?B?aXRIeVo0cW9aL0ZjMmhvVDVSaW5zOE92Y0wvT2xjUitzTTBac1VueWFNZEYr?= =?utf-8?B?cHJrM3d2OWx1blFsT2R6QkdPSEhjd3BvTzZRN3NmVEtxeEwrOXZLZ3RFZHBH?= =?utf-8?B?WmNUNGtjR05jRkRHQ2kzd1NQY3ZGWm1kOVl4aEFDRzUrR2dCUnRzZmZBc3Np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Z4VEtYdjFR?= =?utf-8?B?QzRPU0xwc0RHZGlzSlhGVmorVDYrNXpLMW5yenVJekprUGhCdmU5WWdKTlo4?= =?utf-8?B?WG9CdEJMUDFmY0RmdDcrbHovSVNmd0lKL3cyTmRPOWlxUDNnOXdSWlF4R01j?= =?utf-8?B?d3pZeWJHSncvQUJOaXdzV1FmdDcxZFRDS0hGdC9oU1U1M09MTXRVbU1WdXVu?= =?utf-8?B?dmNtc2xSbWt3T1VTRHkxTnJZWnhZVkZWOEsySmtjWXFpcEloM21QVlVldGtN?= =?utf-8?B?WlF6cm5tTUpzRktDSytPQ2RVU0VuVVFWekJScmN3VWxlb2RkTjN4djkwMnNj?= =?utf-8?B?TFhKcVRqTnVheXIzbzVETUFpd3JJV0VnOVlQUjdXWVU4NTJYWGZPWE1xVVAz?= =?utf-8?B?bDRLdWhaanJmMDZKcHV0a2x5aVNsWmdMOUo5a3VtaFNLOUg0bDR2N0Q0Qlg4?= =?utf-8?B?QTF4aG15MnZqbEFsdVptaDhDZlQ5dVFZTkRBVEhsOEtPVE9xVzRMaVhwSDk0?= =?utf-8?B?c3dwTVVMbHFXa0tVSEcwN0VwNk1jRG1sR1Q2aTl2NFloTWIzZGZOdGwvSG44?= =?utf-8?B?MGo0bXE0MWdMZFFtYU9CcFZBK3VkMWQyVGFrekxoZkZYTjg4d1ZpMHBUUStU?= =?utf-8?B?b3pWVnU0RjRRaHlJajBNZk9xV1J4ZXF2QUdqcG9UNnUycFNOb0ZPSDNlaVdv?= =?utf-8?B?NWozdi9jTDlEVnR4N2lrU3loeXdEMnVhNnNDenNkQTNpRlVZWjkxN0NPQXlz?= =?utf-8?B?ei81S2thdVF2cVR4dnpRbFRlTVRxYmpGMk04WFpnek5RVldUeTRReGJNQzUx?= =?utf-8?Q?8jygNBlcWMvXxzTygJ0p50I=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 56e2340f-daeb-440a-f0ea-08d9da62513d X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5000.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jan 2022 09:10:05.7580 (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: ABkJagR9/BUiOveb4SlgoCAezyW5K6e8n4Gx9Qd38q5CzhwOlFsow3PCqInCxDcj9zE1KggQacln+2D3pSefKw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR11MB1846 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 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.