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 C5CE5A0C43; Thu, 23 Sep 2021 14:33:59 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3FABE41260; Thu, 23 Sep 2021 14:33:59 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id 6282D41257; Thu, 23 Sep 2021 14:33:56 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10115"; a="284842013" X-IronPort-AV: E=Sophos;i="5.85,316,1624345200"; d="scan'208";a="284842013" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Sep 2021 05:33:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,316,1624345200"; d="scan'208";a="474836288" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by orsmga007.jf.intel.com with ESMTP; 23 Sep 2021 05:33:55 -0700 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Thu, 23 Sep 2021 05:33:54 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Thu, 23 Sep 2021 05:33:54 -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; Thu, 23 Sep 2021 05:33:54 -0700 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.106) 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; Thu, 23 Sep 2021 05:33:54 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=K941bY4O+oFgIec5pM/9qJ4DKPsjR+mHUHDKsSACrqe6mRZ2roQKZ0lzdhhAA0aRVC5BrvkPvxgVach+V5NtvUM66BxWNvBKUKBnyIIgKRJHMuq3ghw5/9SNKn/6OTNVV6oz66o5/yK+De+saoexwebm74ZfIm2knnpfccaA2uolbNqW2fpZC4mTuiMesZXRhuuJldZBKa2OJj6eZavJQ0KbX7r3wiw1dlLJGQn46LxdwtCEsColDUOfmv3LlaHhhJu1d3S9WKe4JapmfxvXsxTuJuCyp1VeNYSw6ZYm+tUMEViXCL8IgdbUjEAJq3nQXgEHlUegCXn3Itc1i8BzjQ== 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; bh=wdY5svrv/GuH6Lb5dFMYo1wlG/mTx3cQpcmaGJPM3fk=; b=fBE+C4tUVvsIppnuHAViz5a++pENEaDX8PWDpi2rhbB1FxGT7ooMyC44wO9hESe0mIJ0naVUsiTJJDufXYoBpcXomXC24vm1Reb0ckXRtWnCzZ9xx+D3M4zmsDYByEjbI62IGy7VFj8qyuEotpZ5WXQpBk58KMk5pztxlwkySs1mZIl2rvJIuiO+Y7M1NQpmIZEQhRV6VWUSt7OdTwDT3vp23ReQKH885GR7NLXCxqrElUfiQRYC5pVetastQWQkqfG/c93xRFhzBGJWEtgfG/h5eLeAQDTueIfvtyy24vYD6yyYGXVe3lHMYwSq5jUFGqc/CW3EGI9fo1H0XHeHrg== 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=wdY5svrv/GuH6Lb5dFMYo1wlG/mTx3cQpcmaGJPM3fk=; b=u1Ycvvry3U+wKjWskMBM6poK4/VKb+Ek5f3w52kZ01BCcqwzE5IQLRMRO7ljSrU+PI4dYaV6vzccsEXFugZCH31LVTJNrU8C4Opqaz9VOZroG5altlvtCBlxjbAja5JvBKpJNGulWdwr3ESdBSCSQKpzOBIRVoXc7aEEbLpwF2Y= Received: from PH0PR11MB4791.namprd11.prod.outlook.com (2603:10b6:510:43::10) by PH0PR11MB4790.namprd11.prod.outlook.com (2603:10b6:510:40::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.13; Thu, 23 Sep 2021 12:33:51 +0000 Received: from PH0PR11MB4791.namprd11.prod.outlook.com ([fe80::60ba:24be:ee9f:a155]) by PH0PR11MB4791.namprd11.prod.outlook.com ([fe80::60ba:24be:ee9f:a155%8]) with mapi id 15.20.4544.015; Thu, 23 Sep 2021 12:33:51 +0000 From: "Loftus, Ciara" To: Stephen Hemminger CC: "dev@dpdk.org" , "stable@dpdk.org" , "Yigit, Ferruh" , "Zhang, Qi Z" , "Burakov, Anatoly" Thread-Topic: [dpdk-dev] [PATCH] net/af_xdp: fix support of secondary process Thread-Index: AQHXoN77Z48TeDhdbUWkYsYq/ENWeautAvwwgAAXEICAAAHtcIABwzIAgALNWGA= Date: Thu, 23 Sep 2021 12:33:51 +0000 Message-ID: References: <20210903161525.9929-1-stephen@networkplumber.org> <20210920074337.595f3742@hermes.local> <20210921104524.6cda31b9@hermes.local> In-Reply-To: <20210921104524.6cda31b9@hermes.local> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.6.200.16 authentication-results: networkplumber.org; dkim=none (message not signed) header.d=none;networkplumber.org; dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 4af80430-ca1f-476c-9a5e-08d97e8e6619 x-ms-traffictypediagnostic: PH0PR11MB4790: 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: 446ye24WmniSzgCpHsOnTfrOqoNIGpycVC/HoEkWmyJeFbEJaJiow0yqr0WGmj7E/1MS/ZrVjSuCegB7oAC7AAeqzmmtdLnXRm6n9XuBNn+jAvJyRDeTbpMsNOzUa84XRVrwdGQQTma1CJqKRl/6Fy9o3RghHblemvbaQua06ytQ0IAtmDB5eOWnEX3KngmLUXeRO3mjUdAQjMSHW4kkLN7jB9eVhzlUnSoizZCuHExEyO6xuKuGv8TPw4UneKAWccb50fmaZ3mRa0Em15Iqtt8n76WaJJf2k+3bu9CzXNIRQ/8x/LVvNFUHsXpiBlfFo5X4B2FGUmk5PY1SnDDv7TXbY79nLW16rc1eWZ47AJ09B2xZwCtGsvAxPmM5ialaclhlXos4PZgkkmWgPDQ/EhsregLBD4Enz8/FKwKoeKvGXtIKX1aEHSYEIi86ibU3oPynhG0nq6tiPeeWOuEwLVNY6peyTuHN0+BhDtX/GsitWwXIMbx/LHuuhipp81FAkuee6b3OuuymmWnGH3bWTvcOqO6dsXkd54eJ8nO7Vby6oKrBVTXmgniAkL49QRZXS5tLBLfu1zvprjRIae6kQUznObJRw+fAQlmbG0WGsejNoax4bz5lMKUIBj+TJ+9PUUR8uVLSIofHlPrDCPEyVNn020Se+goOSLXGu0pjZMY9e0kBpiUE5QlP7DQfUHhlVrAGQHFPbubYDPPuhmg9+Q== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB4791.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(86362001)(66946007)(38070700005)(83380400001)(66476007)(122000001)(64756008)(76116006)(52536014)(66556008)(7696005)(54906003)(66446008)(508600001)(6506007)(26005)(316002)(8936002)(186003)(107886003)(9686003)(55016002)(2906002)(6916009)(71200400001)(38100700002)(4326008)(33656002)(8676002)(5660300002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?4wplHI5K4M/wzxM9YpZbKxJqsl1PodlXlNle5VrCBaHGRGmDZgJuFC5xPjNI?= =?us-ascii?Q?ApE29HNSeHFb4O1Z8JY7pVOXnqfbKrk37FbwfqXhMHuGJ/H8W79ehzDgaOPq?= =?us-ascii?Q?8AKs+m5eE+yiU6Ha+3xW3UdNG15pMiA4iyR6F1lzPvHgK5SNF0epWjM2oUaE?= =?us-ascii?Q?/YeHmQoIVXtunX2svReYdHjjCkvsPvzB1Kor15FtzSgFhiDfmEOP7PFax8PM?= =?us-ascii?Q?krVJq/7LI6QfuzP3njmVu0FAzl6m7fGjgevMqVLu061hhMiXNVvcgUsX+VFV?= =?us-ascii?Q?OjfMQDeEcM8JnCGzeyyitUAMqTUlDpjEx3SkNZiwMKZ4cuIXxfT2ikcdE0a/?= =?us-ascii?Q?HLAe/lRD/I+QGUMhasLNea4Z68ff07AaI7+2rF9hJuC+Z92kO9H7IlKhZjJP?= =?us-ascii?Q?ygzEXNJ1CR9rGrN3DCnbwcfr50ErZ8MGacck+8OSgSxkQAxAjU36T+uW2Eok?= =?us-ascii?Q?fZzSugltuf3UUjmhDCkMEMgkX1l5QEG+gn49+Lc7PSqSyFSMrmEtKKJpoXkM?= =?us-ascii?Q?xD6+4A6YMYtkHU78lA0d+Vowsege1+RFpsqfrPWvQIHg4Pe0gq+wddvM2Caw?= =?us-ascii?Q?lvjpjRdZ2Q8Fvu136s/vCTwf0SfMI1zRMtChplE1SzSVG5nt24cjNsVRR3xA?= =?us-ascii?Q?4MwTwPTXBpH6tuRY5uSYHNBZI3V10Ntp2+HW3IQSst1p4j5XPbs6Bdk+Ae1l?= =?us-ascii?Q?v1kct3YK2VSr09lqOBML1Q0GgKUounrCOXZm87UavLm71KOxllMcOMfhzgMR?= =?us-ascii?Q?YTp6y5frVGij5nLe/N6ONWe0WVlu3rfZcm2oBd9Bzu4TAi0mleN49Ps9I/x8?= =?us-ascii?Q?PXx0/tB/dJwPtBuqc70yqI9KtEVx+j9rvfMtpCIurCUKzhyjB55EepHMIZa8?= =?us-ascii?Q?5NL/JtzMRMVEm0baDhcOYSyQqwQAXRw3hLHogmpZ7QrYPE+Y66ONpRBO+7aa?= =?us-ascii?Q?6qLooXYRRGtBxzzPEjMS6FYEgZwmv+eHrcqAGTNUvmsSEE1ab0z9XWswFPS5?= =?us-ascii?Q?NfsH+rXkNtv1pCh2EfBePq8DYmXM1gVXulrWKmpo1vch1XHMB2JfVWN+H2Jz?= =?us-ascii?Q?QQjxI/vZ0ss/4A06AANoR6zn93UL78t8F1XbHjOdmKhqTSVNeCdNwZQPDPi1?= =?us-ascii?Q?0Mi6Hu+Gy3fACGP5u1CWwJz6i4Zgmm2OOzBwGXIkR4SQiuV0E2/4lu8QlM2M?= =?us-ascii?Q?xDliFCUVlzmlyIKFrdSKB+hVLz++5VCEQMlvqX7SRIUG3nIZk6xodBtcXRJb?= =?us-ascii?Q?EPz2nlSegnVLnbqfcljByJ+nWwPhx0l9//JzW4fxOjApbizZGpFVLTFwCDlk?= =?us-ascii?Q?fWv/U4JpyNfSI3BzjZqh5eF/?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB4791.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4af80430-ca1f-476c-9a5e-08d97e8e6619 X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Sep 2021 12:33:51.1472 (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: T75WO7fZ6M14qY+OJeITDdxButuNOCBSebIkjFSCVxY6DpNjf88lP0SlidNIF1qJOYwwvT3oqdhJ/xL+IVQMuA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB4790 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH] net/af_xdp: fix support of secondary process 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 Sender: "dev" > > > > > > > > > > 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 initializat= ion > > > > > 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 transmitt= ing > > > > > 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 perm= it > > > 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 ca= n'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 pl= ease 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. >=20 > 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. >=20 > 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?). >=20 > 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. Thanks, Ciara