From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0061.outbound.protection.outlook.com [104.47.0.61]) by dpdk.org (Postfix) with ESMTP id 265291B1B1 for ; Mon, 8 Jan 2018 12:16:47 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=dkt6pExl9qpv5CvZIuHmFsN2vZB0tQ/LGPzgVze0q2w=; b=xSFBJV68dt+J2cH9sP8GYq0hfSgsfEZPZ9zcetoLi+kHi6qjex/YG83jPYazwCWw5cgBqJqXx35vthBspFyGAd+Od/ZPJbxStBTsHNsqjBXEl3FM8950/NAjhdAOqhNtUhFzUfhkSj+eGc0C1rBKt9CszlvWRqjpxkQnBmQ/LxQ= Received: from AM6PR0502MB3797.eurprd05.prod.outlook.com (52.133.21.26) by AM6PR0502MB3797.eurprd05.prod.outlook.com (52.133.21.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.386.5; Mon, 8 Jan 2018 11:16:38 +0000 Received: from AM6PR0502MB3797.eurprd05.prod.outlook.com ([fe80::b4b4:7de8:cf70:aa3a]) by AM6PR0502MB3797.eurprd05.prod.outlook.com ([fe80::b4b4:7de8:cf70:aa3a%13]) with mapi id 15.20.0386.006; Mon, 8 Jan 2018 11:16:38 +0000 From: Matan Azrad To: =?iso-8859-1?Q?Ga=EBtan_Rivet?= CC: Thomas Monjalon , Jingjing Wu , "dev@dpdk.org" , Neil Horman , Bruce Richardson , Konstantin Ananyev Thread-Topic: [PATCH v2 5/6] net/failsafe: use ownership mechanism to own ports Thread-Index: AQHTiGwOSAyydzKqT0SdrH6I57pnh6Np0Flw Date: Mon, 8 Jan 2018 11:16:37 +0000 Message-ID: References: <1511870281-15282-1-git-send-email-matan@mellanox.com> <1515318351-4756-1-git-send-email-matan@mellanox.com> <1515318351-4756-6-git-send-email-matan@mellanox.com> <20180108103240.yvtwyvi2lfpeakeu@bidouze.vm.6wind.com> In-Reply-To: <20180108103240.yvtwyvi2lfpeakeu@bidouze.vm.6wind.com> Accept-Language: en-US, he-IL Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=matan@mellanox.com; x-originating-ip: [193.47.165.251] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; AM6PR0502MB3797; 6:19A7dTgy5bCQ2zd22/Ec23HnJ0td7K5zqjpphD+gllzm7xd6cWt/g4wGZWx210YeWz1J5E91Qd4eF1IAjzsTp4o9g16EJQe3kj5PhR88x4HWS7jPFc9RYLHK1FlHcgjhtUwBm0X/MIqBfuGxQdhLv+bQJTY80hKutTcUXAncOnU6P1zyYn8YanDGR5WoRkySufY/GD3a9efFpXNOShTMccmAwTpgkeKc9iWgJcSDZHiaDHr2J9UZ7CKBaHOtwfXPGzDcAaBqilOrhpVivS+SueAvIGDY3G0zRhbVhzZX/Y4uyaauOaaUoDGC9ytonBuRHTfAR38aOVOe41lvZDR2cHRuZzOguB4ajDqYchqpH7zRFESXkHEwIB2GGM1XzvYN; 5:Z7mB3wAUOooVw/T5W4w++enYxv2qEp8EIFvtUpME4Hhav7OPDylzgYvEldTBy6o9y/35EmD5u93/xvzqqGTmIPNDwWjKkkuC02DprtVrQ7kFCusKKBESdmFRmRIZUMmnaU7DFobftkVV8Dcx3LQYYJYlcwyhRrZbTxamddi1MNk=; 24:szpQ7S5HFyj1VDdvHLMeAftJz03yLPe3L8IAJmkZpyOi60N2iHXa762kwXiGNj6RcM5yzEXzA3ffrxBjh2cmOICG/E/Lr0UX2fqeS5fFdfY=; 7:6icn/GhzJQ8PQ2r1CaTTWUl92Io2nGU7fWdCp1hV5lkit+4w2xvBpJ5zInV1KbD8JHvkqdVLx2wJisoQoi9ffw51sa5s/1s5aVewX1n6rpBgaY5HDU7cEsmTk2YZyEudquhryPUyezCa25tUccdd1enoEQ4/E4Nr91q4SA2Q1LR8P6LdM7FFx/geLzvZFdcLJdkk2UHcPs89wqo51edBzknzChhHjAUNnjxk6f469I7gPpuXRZdIBQqkJsOH8Nv+ x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 316f94aa-db37-4d4a-484d-08d55689492e x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(48565401081)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(3008032)(2017052603307)(7153060)(7193020); SRVR:AM6PR0502MB3797; x-ms-traffictypediagnostic: AM6PR0502MB3797: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(60795455431006); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040470)(2401047)(8121501046)(5005006)(3231023)(944501075)(3002001)(10201501046)(93006095)(93001095)(6055026)(6041268)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123560045)(20161123562045)(6072148)(201708071742011); SRVR:AM6PR0502MB3797; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:AM6PR0502MB3797; x-forefront-prvs: 054642504A x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(376002)(396003)(39860400002)(39380400002)(346002)(366004)(24454002)(51914003)(189003)(199004)(55016002)(3660700001)(8676002)(229853002)(14454004)(33656002)(478600001)(8936002)(2906002)(9686003)(86362001)(3280700002)(305945005)(105586002)(6436002)(81166006)(7736002)(68736007)(74316002)(53936002)(54906003)(93886005)(66066001)(6506007)(5660300001)(5250100002)(97736004)(106356001)(6116002)(316002)(2950100002)(3846002)(7696005)(6916009)(4326008)(102836004)(2900100001)(99286004)(76176011)(6246003)(25786009)(81156014); DIR:OUT; SFP:1101; SCL:1; SRVR:AM6PR0502MB3797; H:AM6PR0502MB3797.eurprd05.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:3; A:1; LANG:en; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: QVbsgiESfRIzjSc1AmBzuFSG6Ix5UuXZrk/y5fyCjvkdQ2y8CdDt1MyHbzuj6/wdlbRtFsMGsaodkZ6OIWrA4Q== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 316f94aa-db37-4d4a-484d-08d55689492e X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Jan 2018 11:16:37.9977 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR0502MB3797 Subject: Re: [dpdk-dev] [PATCH v2 5/6] net/failsafe: use ownership mechanism to own ports X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Jan 2018 11:16:47 -0000 Hi Gaetan From: Ga=EBtan Rivet, Sent: Monday, January 8, 2018 12:33 PM > Hi Matan, >=20 > Thanks for the patches. A remark however: >=20 > On Sun, Jan 07, 2018 at 09:45:50AM +0000, Matan Azrad wrote: > > Fail-safe PMD sub devices management is based on ethdev port > mechanism. > > So, the sub-devices management structures are exposed to other DPDK > > entities which may use them in parallel to fail-safe PMD. > > > > Use the new port ownership mechanism to avoid multiple managments of > > fail-safe PMD sub-devices. > > >=20 > I think your implementation does not work with several fail-safe instance= s, > have you tested this configuration? >=20 Why not? Each instance calls to fs_eth_dev_create and there the unique owne= r id allocation is called. So, Any instance should get a unique owner id. =20 > It should be possible for a user to create any number of fail-safe instan= ces. > The minimum would be to allow for multiple fail-safe side-by-side, but id= eally > it should also support a recursive > configuration: >=20 > +-----------+ > |fail-safe | > | | > | | > +-+ +--+ > | | | | > | +-----------+ | > | | > +-------v----+ +-----v-----+ > |fail-safe | | | > | | | | > | | | | > | | | | > +-+ +-+ | | > | +------------+ | +-----------+ > | | > +-----v-----+ +-----v-----+ > | | | | > | | | | > | | | | > | | | | > | | | | > +-----------+ +-----------+ >=20 > If I am not mistaken on this, then you need to generate different owner-i= ds > for each fail-safe instances. >=20 it is already done as I wrote above. > I suggest using the full fail-safe instance name, as they are already ass= ured to > be different from each other by the EAL, and you thus won't need to > generate IDs on the fly, as well as declare a global owner-id prefix. >=20 The ID generation should be initiated by the DPDK entity itself(the fail-sa= fe instance in this case). The prefix can be changed to the EAL full fail-safe instance name, but it i= s not must, because the owner IDs are different. > -- > Ga=EBtan Rivet > 6WIND