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 E5481A0C4D for ; Tue, 5 Oct 2021 17:04:48 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D06D4413C4; Tue, 5 Oct 2021 17:04:48 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id 82ACB413AF; Tue, 5 Oct 2021 17:04:46 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10128"; a="226079791" X-IronPort-AV: E=Sophos;i="5.85,349,1624345200"; d="scan'208";a="226079791" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Oct 2021 08:02:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,349,1624345200"; d="scan'208";a="589388370" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orsmga004.jf.intel.com with ESMTP; 05 Oct 2021 08:02:23 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Tue, 5 Oct 2021 08:02:22 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Tue, 5 Oct 2021 08:02:22 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.169) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.12; Tue, 5 Oct 2021 08:02:22 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=doBcQ1qoElSS4daLruLeeUnAQqTS1zt8NoCHtVKwUDyRdwtSE6Cj/oUxluyU2UNlrAFb5G1pC8m2veGUFNlzu6pq9tilIPv4VRVyWLWVy846d4J4UOu0eoFrNpIgai3urHxCsH+VcLLnvPXmQK8Mv0g/A0HT15FQufdsTocvUwVICFbtUc1ig5vwU9bHYKSYHrtT80WhfCfplo8Y3SBrbZWHUu1EBzH8th4AhxEU9xD9rBWRUHQ7QtfTpfxLkLlNx5kS1nDszoSHy2wjZ7hBSTtCXECDueHhDp+v515wyDwss//jowd7YqG2yFLYIoWDlZklpri3uyYvOEe4qb3ulA== 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=hOrMZp+GuC3XTe5J54TB8xgmqOzabqSr0m0NF/SU/vQ=; b=b0OzkZBCvd1DzKaWV0QiKgDlW60M5l9WCi1xClHtvAFcwuTdEcp7GlhR564OihIH9WKnst0QenTgUgvJkfHbAjTKHOZ9/aN4qkfm8iE/T0nlO3wwb+uRWxs21bVrj0bXS9sSC5ha3581i4SQn54ur2B8PMVoBjkKK2bpT1uRaejVB6hf+ZJOv14DfmFrynwFhVJIAZoLjU2OFL7mSB1h0wDSjOYyLfaCU9awhMK++av6IWlPolRTvhjTCatUVb7QqKR9U3Ogv6/HkNbFWq0APtsLdVLTmFK7lRMdSXFxUikGbAB8fWB2RoBkN3xXXcitZ0O6dFvgDDz4t3XxrA6fZQ== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=hOrMZp+GuC3XTe5J54TB8xgmqOzabqSr0m0NF/SU/vQ=; b=azIh9ka2zwTfopxTpXvESh0dmJbtuk9LIApKw5mz4I4zQQPdk/yQIkAH/H5pbTuHXF2+nb9c35UXZvf5bbpoeBQP/ViZUdgrHPg/kZNHz44ycmI3rgcx8Au0FKMJ7oQmmiRl05Btt3VSZXSkd9fuuNfda10sf9VLbJ9qSd4s6t0= Authentication-Results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; Received: from PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) by PH0PR11MB4967.namprd11.prod.outlook.com (2603:10b6:510:41::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4566.22; Tue, 5 Oct 2021 15:02:20 +0000 Received: from PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::747b:3a08:d1ec:31fc]) by PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::747b:3a08:d1ec:31fc%4]) with mapi id 15.20.4566.022; Tue, 5 Oct 2021 15:02:20 +0000 Message-ID: Date: Tue, 5 Oct 2021 16:02:14 +0100 Content-Language: en-US To: "Loftus, Ciara" , Stephen Hemminger CC: "dev@dpdk.org" , "stable@dpdk.org" , "Zhang, Qi Z" , "Burakov, Anatoly" References: <20210903161525.9929-1-stephen@networkplumber.org> <20210920074337.595f3742@hermes.local> <20210921104524.6cda31b9@hermes.local> From: Ferruh Yigit X-User: ferruhy In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: DU2PR04CA0028.eurprd04.prod.outlook.com (2603:10a6:10:3b::33) To PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) MIME-Version: 1.0 Received: from [192.168.0.206] (37.228.236.146) by DU2PR04CA0028.eurprd04.prod.outlook.com (2603:10a6:10:3b::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4566.22 via Frontend Transport; Tue, 5 Oct 2021 15:02:18 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 42934661-aa59-46c8-a3db-08d988112112 X-MS-TrafficTypeDiagnostic: PH0PR11MB4967: X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:10000; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: eEXLDt6Bs6cwpUUX0I2T++ghUfKG740LLWLkPg93dvjsQGu2PRHdQI9ERLPm49s7QiYOoQdhBI0cNNJolJeylAfE7qxPVrfuKz/V77kSw7P+PDTND+IQNnBx2kjl/Yz+ebG5mqttpLfCs7NsrJGGQMXPrFK7ZI3nZbvtKl1XR6ut6ZhD37OZSVN9EN8Xtrg45uo0CxVJ3iH5sQ89YF7hInMwwfy8NC9V94IgoPSPjT/eq/uCUALsyy215UnPH0ABbawHhtQvpIxXxQFGSJMQrj7k7Qn4MmQuZIfjFZ4wdmtZmu+sq8CF9D7FCgApTJumu+I/EjJJc80NPpJmkH++WrjbmV1pGuPoKw9fgL+jJqFh/+Y/eUbpxtep2Y6D4++H7YQXSW29VT1GuJ/29Yv1KN3VZWLUapZiWI+pyBb2jhwoDcO4cEs7pYsY1twue9degwShKyssTrkA1gir+Va4PVDgO078lelgTknNqjsbrI8FaHPoOIsB+OPRKLKASgE5RIJl/S8teXieA9qGaWT5DzGFMKlTIy1Gn+BETwXKRLo61heDd+xZJuBZJ2lTgHBQoOeg9WFwK7M5/GVmymC/p6sr5KE/vTX+0EQTau168tm12RFaqATQiQuQYyeh2qgs7229etfRQ/cnXixNef3aRcFcb8m1XDXn1Oup465/w1ZnBHKeBbcYY4qyr1NFU8T9FMdMvxZEkSv3F57K8QtyEz6+ACOt5SFeWz4CA6lxec8nXPQPU8i7LSqRDT1v7Zulw9N5Fi+auv7nX/gS0OpnIEWNLlIZxSjhV62pKlW/21E= 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:(4636009)(366004)(86362001)(2616005)(36756003)(956004)(508600001)(186003)(107886003)(4326008)(2906002)(53546011)(66946007)(6486002)(316002)(8676002)(44832011)(5660300002)(8936002)(6666004)(83380400001)(38100700002)(31696002)(66556008)(966005)(26005)(31686004)(16576012)(66476007)(110136005)(54906003)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?Wm5vTUZuZ2hSY1JmYU1FblZ5UVdDTUliSHFCaXZpcHI4NVdaV0I4SHVpd0hH?= =?utf-8?B?OHczTkN5NFcyZUpKdmlDbzEwZlF1Z3BoRmlncHphVlhWVDJTc2wxcGU1M05t?= =?utf-8?B?WjhBOHVoU0h2ajg2ckZ2VDEzeHNhSW9wTHFndm4yYXQ5bGpvRVRRcG5yaExv?= =?utf-8?B?bWtNN29tcGhnbUJpcGxHQmViTU15bTZ5czFrU1Z6amFKVS9KeHhrSjdSd1l3?= =?utf-8?B?dUdtblNSeWNVaXJqRHdzbTJtN0Y2UnBETlZNcWdQWjU0MkVaQlEwNG9VaVhp?= =?utf-8?B?cVkvSnJnOUNiZXZqbmRJaTV0Z3NadkNvdDlFZkpmS08zQjJsbWVrZzhOdHF2?= =?utf-8?B?cTFXdlVRSXRld1FuQWV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AzRE43YnFPK3dSN05ITUUrVEZTbklzMHQrcWFVQk1wRlVoa2tyNEpTQ0Nv?= =?utf-8?B?NUlnRnFBQTA4MWJBcEFEYWV0UXJ3TXBDUkxsamZ0VFR0N2dqdXNjU3AxaXJ2?= =?utf-8?B?SjVnVkRCUFo2SzZnbmlENTNOZzl2WUtGdXdWV1IvR2xVdFNYL3FlUzQ0L2VY?= =?utf-8?B?MHVGRzBTellKUWs0cDkwQUl4UHgvODd1cEM4ZFBlQ1hyNTZiYTFJbm8yYjBy?= =?utf-8?B?OU1tZ3MvdW9MUllrMm5tem5nOGNjTExQbUdRYjEwSHFyaDRJQ2ZlTjExQ2RU?= =?utf-8?B?ZXN6S1NWYmxNcEp6b2Q4RmpRNU81MjJaNXVtVmtmSGhxT3NOcVZ4RmxyamhJ?= =?utf-8?B?dTNBbEFRM3VBZjNCZE1zbUNxbk1RcThTREZRRXRnYmt5SjdIQnBjNGoyUDdP?= =?utf-8?B?dGRrV3lrV2xocGpEb0g1TEROMXV4akkySmYrSGROb0NIcjlBK0s4Y2t3ZXVI?= =?utf-8?Q?swgHYAIsNy2vXd0o8lokHKpXpmbFbV9/btVyxbM?= X-MS-Exchange-CrossTenant-Network-Message-Id: 42934661-aa59-46c8-a3db-08d988112112 X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5000.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Oct 2021 15:02:20.3005 (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: 0aUS1z/ocEf4dR0vfHjcmyXjSXbyKNkIL2e5EArXKXZgHgNNzPnVxCgWJB93q81w6WgNMExOiIBjMyA1bd/O9w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB4967 X-OriginatorOrg: intel.com Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH] net/af_xdp: fix support of secondary process X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" On 9/23/2021 1:33 PM, Loftus, Ciara wrote: >>>>>> >>>>>> Doing basic operations like info_get or get_stats was broken >>>>>> in af_xdp PMD. The info_get would crash because dev->device >>>>>> was NULL in secondary process. Fix this by doing same initialization >>>>>> as af_packet and tap devices. >>>>>> >>>>>> The get_stats would crash because the XDP socket is not open in >>>>>> primary process. As a workaround don't query kernel for dropped >>>>>> packets when called from secondary process. >>>>>> >>>>>> Note: this does not address the other bug which is that transmitting >>>>>> in secondary process is broken because the send() in tx_kick >>>>>> will fail because XDP socket fd is not valid in secondary process. >>>>> >>>>> Hi Stephen, >>>>> >>>>> Apologies for the delayed reply, I was on vacation. >>>>> >>>>> In the Bugzilla report you suggest we: >>>>> "mark AF_XDP as broken in with primary/secondary >>>>> and return an error in probe in secondary process". >>>>> I agree with this suggestion. However with this patch we still permit >>>> secondary, and just make sure it doesn't crash for get_stats. Did you >> change >>>> your mind? >>>>> Personally, I would prefer to have primary/secondary either working >> 100% >>>> or else not allowed at all by throwing an error during probe. What do you >>>> think? Do you have a reason/use case to permit secondary processes >> despite >>>> some features not being available eg. full stats, tx? >>>>> >>>>> Thanks, >>>>> Ciara >>>> >>>> There are two cases where secondary is useful even if send/receive can't >>>> work from secondary process. >>>> The pdump and proc-info applications can work with these patches. >>>> >>>> I am using XDP over pdump as an easy way to get packets into the code >> for >>>> testing. >>>> >>>> The flag in the documentation doesn't have a "limited" version. >>>> If you want, will send another patch to disable secondary support. >>> >>> Thanks for explaining. Since there are use cases for secondary, even if the >> functionality is limited, I don't think it should be disabled. >>> Since we can't flag it as 'limited' in the feature matrix, could you please add >> a note about the send/receive limitation in the AF_XDP PMD documentation >> in a v2? There are already a number of limitations listed, which you can add >> to. >>> >>> Thanks, >>> Ciara >>> >>>> >>>> Supporting secondary, means adding a mechanism to pass the socket >>>> around. >> >> Looking at this in more detail, and my recommendation is: >> For 21.11 release (and mark it as Fixes so it gets backported). Have the driver >> return -ENOTSUP in secondary process. >> >> For 22.03 add real secondary support using the rte_mp_msg to pass >> necessary >> state to secondary process. Includes socket (and other memory regions?). >> >> The pdump and proc-info cases are only useful for developer testing, and >> there are >> other ways to do the same thing. > > > +1 that sounds reasonable to me. > This patch superseded by following which disables the secondary process support: https://patches.dpdk.org/project/dpdk/patch/20210930134604.32585-1-ciara.loftus@intel.com/