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 404AFA0C41 for ; Mon, 20 Sep 2021 17:09:50 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 37D21410EC; Mon, 20 Sep 2021 17:09:50 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 1CB0640DF5; Mon, 20 Sep 2021 17:09:46 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10113"; a="210385567" X-IronPort-AV: E=Sophos;i="5.85,308,1624345200"; d="scan'208";a="210385567" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Sep 2021 08:09:46 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,308,1624345200"; d="scan'208";a="701089468" Received: from fmsmsx605.amr.corp.intel.com ([10.18.126.85]) by fmsmga006.fm.intel.com with ESMTP; 20 Sep 2021 08:09:45 -0700 Received: from fmsmsx609.amr.corp.intel.com (10.18.126.89) by fmsmsx605.amr.corp.intel.com (10.18.126.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Mon, 20 Sep 2021 08:09:45 -0700 Received: from fmsmsx606.amr.corp.intel.com (10.18.126.86) by fmsmsx609.amr.corp.intel.com (10.18.126.89) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Mon, 20 Sep 2021 08:09:44 -0700 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.2242.12 via Frontend Transport; Mon, 20 Sep 2021 08:09:44 -0700 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.177) 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.2242.12; Mon, 20 Sep 2021 08:09:44 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GtHlvvjXgPFehM5s525dCUmqV5ZWM4vW3y/d75lMuH0zFzqN0shCzKhLqNsFDs4kcZ6Rgp8q0OYiLV0tX7VBABfIJ1d4RFoFrubDI1YbZbtNygrblGxxm36swHxV4VwcLzBGWuqUiQqKVZZJxQq4tvvlpFa+d8lfvLebvg88vlbhc641zSPnyMXRZJf3vlGCpQN3v5oQkUNKJQ3h8M+mIxE0F0ur3IIowKwlyQSv1F+ggZJoNdGHiv2GBpIBulPfSJnfarMg9JDH77LHV4FF0kW3wkQyxkQlJCLlD/+0T0vHMz6uJ7Y2sbc3VGE+P5RKc6UC7BQ2riVIZVNc3HvITg== 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=JQv+TT3hEV0w6t6sRd4XG6C2Ahte8S52fsnvmV6VNXo=; b=PRjEuUHY2sQA+PE2tHTktoPbwG+vEQ0Br+zVm1Ja4nqafBb7lMXpdz1gy/OZKN5BdJW5K/ohrkEYWvoRJObQ5eIwoLCcx4ut6NbmFKvRRSLFJ5C63CZyV2M/L3y/PkD8eD/pYznUt71mHLexzOT/35dYg6FkdtXxP70wlfHZ9Vb9XOfnG3bMI6SfzqzSlTjaMc9UkshuZWy05FK+wxrLYwUjiE/tl/3iMvOjWhWfxvHs7agWvzxth/1IE6hb1K8rs0mJve+B7q5sF9ueoQdYtDDkDgj/OvNe2Vxrnh8JeRBQj53FflbOM4pE5PsvfmoBgWva8NBmkdp6dSOWTL4Clw== 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=JQv+TT3hEV0w6t6sRd4XG6C2Ahte8S52fsnvmV6VNXo=; b=M8jnAivMv+kDEeYv8gN2UT+U1yikwnhzIyo5L5ApTK5LD8w7112o+4aQYZhPYmXdjCQ1qI88WS/FyXDTNQPLNjM7h+sC1YeAe6v9xSu/QDA2rlyCPAlKxZSHp2lWFlamrFbfwr+r9eMSDhweYdlduuoNYoa9HbodkQRFrutRLJY= Received: from PH0PR11MB4791.namprd11.prod.outlook.com (2603:10b6:510:43::10) by PH0PR11MB4871.namprd11.prod.outlook.com (2603:10b6:510:30::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4523.14; Mon, 20 Sep 2021 15:09:36 +0000 Received: from PH0PR11MB4791.namprd11.prod.outlook.com ([fe80::60ba:24be:ee9f:a155]) by PH0PR11MB4791.namprd11.prod.outlook.com ([fe80::60ba:24be:ee9f:a155%7]) with mapi id 15.20.4500.019; Mon, 20 Sep 2021 15:09:36 +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/ENWeautAvwwgAAXEICAAAHtcA== Date: Mon, 20 Sep 2021 15:09:36 +0000 Message-ID: References: <20210903161525.9929-1-stephen@networkplumber.org> <20210920074337.595f3742@hermes.local> In-Reply-To: <20210920074337.595f3742@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: e89d7ec3-f4c3-49fe-17ba-08d97c48a911 x-ms-traffictypediagnostic: PH0PR11MB4871: 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: lGRKOAPAlLeyC6fYGQF2yTo/qi7RTxdg+cpOIFSqhAL/U5V4rz0pq2YpOHX/Akq/JdFkfVhfqRkQT7Hv957FKCyed9kcixuIX627CTGP9J4BFyykeAfffykwefI1CFl2rTwOEqm+WdJmTusy5VhRhdB8LLCDawAlmths2+RpLiuR9r/Ze+18KdYcfkASZFOM+KyMMyr4g8K07ZNWSsR1xizbx92sWEVRC75GkUb+B6iQ4eoWbLBQu/+5p7CRvABoc0JEMY+DHC4YvJGAJjfdOtGU3RbtkGYCEeqDmUbaXvaA+gMM3RFB3pgbeWfijQy0miC9z+uojH4R8fQB4J6A4z+QvQchbQrIj405fg3tGjqaH1aHIYMJxkAW+lwoXw0hirmDswjCWWynIyvcbBxw1yZhNBjL5bfd6IT0WekzT4CT7kmO0IisnRaFthAMGk2AyU6jwzzAQDXheVp2Y6jTVWEACOGI0xLLe2YMB5J6yylukqPkKUSqiNvpAw0sim+ixgaGElCNEJZzW4sgHuvjV3+yX8BG6bY22M/fTjem5Pk+ZmT8D5zu+iYYfEPCuw5V7CelLH53eUIl3BW6pYawOweatT7a0GUusXfvL431H+C8KtToL1HdIOdz0KBH0cieWyuLJgGXNimWQOFs3V7Xte2lmVy2Xm1aGRYNoHUXfgv+cziNdjcDQzCaMy1uAwHxCP3YGbnKHOJK6wo32imsXQ== 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)(376002)(136003)(39860400002)(396003)(346002)(366004)(52536014)(316002)(107886003)(86362001)(38070700005)(71200400001)(9686003)(26005)(55016002)(6916009)(122000001)(8676002)(478600001)(6506007)(7696005)(38100700002)(186003)(54906003)(5660300002)(2906002)(66446008)(8936002)(66946007)(66476007)(64756008)(76116006)(66556008)(83380400001)(53546011)(4326008)(33656002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?GgSfGNmUCIsHO23X5kkxV5gbcAkDtcnFlciHJNFu24uKKbwFSJ1UoGhr8DAI?= =?us-ascii?Q?bM9IK3mBERQDMwj9KXSVqK0LL/XSz3pNxIMUrn6xMubAaGVYa5LHeZXid8JL?= =?us-ascii?Q?Mj2ZdgMREjQhJxDwY5GQgdTf0Aejs5Gm7k3N8eApC6x85qL5rQKhN8dByhJh?= =?us-ascii?Q?73hbTkYzspAcd5NSblAo9S5WyTAsqq01lqf9kilv3YLs9gMamMQsvFTcu20T?= =?us-ascii?Q?7jmP7K+ZW8/NqXdc+BVG3V5VFCamG9IpaeCCHavV5lxQecGb/DKwqM7i2cVU?= =?us-ascii?Q?N+aaQWgnXm0NM/UAEG1nSz0XZK8wAJ58ydFNIi/YiseOKuoXjOkONq/xIsN7?= =?us-ascii?Q?eIwCc/R+F33MTb1ag37+8h/C1MnO8KAM7SEGtAn8Kfm2zx5KzggqhYgT5uzs?= =?us-ascii?Q?69VAxt9fyIMitsN6LX1EU1guTAK3RLyJN8ROfKQuRl9hYenOFW5NLSHyqArH?= =?us-ascii?Q?3kdVLM09648D2b6rREVmluB3AMkPubzeTdO4a8M+8YdV06LFy/zSwp7b7ApP?= =?us-ascii?Q?PHIcSGSa+xNU31+4y/oNmINr4Txuk22FA1E/ie+3QIry/TFnEgSKkWCcptai?= =?us-ascii?Q?6X7/r73vHxrhvsD4dX4OblEl6jXhd2qphx4dAYOUFZ+8Jt2ti4rnJDBiedKL?= =?us-ascii?Q?lzim142sRzwj+JCm6+zIBYc1TqfYViO6qDHtUx6GDjnx71TI/4pBvhkW5l/R?= =?us-ascii?Q?PMU9LsrGeMGxGZULXjwjbP7rrzHU6DLLmmNRU9yrAXYeiszcPBcZOR9aTcKu?= =?us-ascii?Q?S/gAfR7OB3T3tyFJgbdA8a7WCgh/kHbFgJLquY+EycSVhGwAuFdfq/MpAzDG?= =?us-ascii?Q?qVTU78Jn+oYkp306qzAfJP7x1yf0ceSJEdmAJaYXgfhgPc1QyJPJyv3GuPyQ?= =?us-ascii?Q?ZsrozM9JwDIUKptDxtyLN1vFv+O6BspdI+cPgxqke0DEDXxjhaZ9ufzJfPwj?= =?us-ascii?Q?7mahe7wrI00T3HhGhLgCQzjCtO1CEm3dl/MI+zoiWciynwBj2NASzjGZ4UBh?= =?us-ascii?Q?7JqU9Hccyyck4a86RGROmsoxYvoI8Hi38OwwS3qkkM085LfjXO6jsVEXXNSF?= =?us-ascii?Q?3Zld0CVHrUr2WWXVbKQxwBxgy4VCoduiAP+f44+3IqRCnkS9RoE3hWdogh2M?= =?us-ascii?Q?RXOOfEsWu64f9BHRaN1YsrsC7CM8IofRJFR0DeVt2aShI7i48IVbD2r1A00n?= =?us-ascii?Q?2ycpv2EDRZ4VBnpY+HAK8zj/bEvCw1WUfNRbdMPVQOMfBDlHFV1mLeDn6ueJ?= =?us-ascii?Q?MVugcVrHeX9kO6fmbz7cIO9Zcqye15JfE8TfBJ8AFkuov7+sbAG1LM2YwcPf?= =?us-ascii?Q?t0FGptt2U/q4l7roZpffCIW9?= 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: e89d7ec3-f4c3-49fe-17ba-08d97c48a911 X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Sep 2021 15:09:36.4191 (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: 3rNdi+bCsqwQ7SS9VzREl6w0nQL2XQT6gBaIgjolLtxWS1qyoCg/ZTX03Z8W5xrr2MeDHxlzpA+NqY0iI6KPtQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB4871 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" >=20 > On Mon, 20 Sep 2021 13:23:57 +0000 > "Loftus, Ciara" wrote: >=20 > > > -----Original Message----- > > > From: dev On Behalf Of Stephen Hemminger > > > Sent: Friday 3 September 2021 17:15 > > > To: dev@dpdk.org > > > Cc: Stephen Hemminger ; > > > stable@dpdk.org; xiaolong.ye@intel.com > > > Subject: [dpdk-dev] [PATCH] net/af_xdp: fix support of secondary > process > > > > > > 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 cha= nge > 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 despit= e > some features not being available eg. full stats, tx? > > > > Thanks, > > Ciara >=20 > 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. >=20 > I am using XDP over pdump as an easy way to get packets into the code for > testing. >=20 > 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 documentati= on in a v2? There are already a number of limitations listed, which you can= add to. Thanks, Ciara >=20 > Supporting secondary, means adding a mechanism to pass the socket > around.