From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4D792A04BC; Thu, 8 Oct 2020 11:07:40 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 94BC91BB71; Thu, 8 Oct 2020 11:07:38 +0200 (CEST) Received: from nat-hk.nvidia.com (nat-hk.nvidia.com [203.18.50.4]) by dpdk.org (Postfix) with ESMTP id 8FA861BB43 for ; Thu, 8 Oct 2020 11:07:35 +0200 (CEST) Received: from HKMAIL102.nvidia.com (Not Verified[10.18.92.9]) by nat-hk.nvidia.com (using TLS: TLSv1.2, AES256-SHA) id ; Thu, 08 Oct 2020 17:07:33 +0800 Received: from HKMAIL101.nvidia.com (10.18.16.10) by HKMAIL102.nvidia.com (10.18.16.11) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Thu, 8 Oct 2020 09:07:30 +0000 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.109) by HKMAIL101.nvidia.com (10.18.16.10) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Thu, 8 Oct 2020 09:07:29 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lKA9cUhhG9cvixC6O8a/jFew2YPOJEJ4U+LHbKbm0h8LVTA3fuz1DOsmWhEGLRoakeTKtQcWymi2u7VJuexLtHxCDOWTXeiuW1OCqHL84vHdpAvKBI+yOS2RoU26f1xhPh6Lp2CtT9OB90JLWbeE5UtJicE3JWKrQDAy2wXYYX5qLbp3IP/ikpivDoQyLqF3YWTnpGCduehUc8cbAjvfURlfYwAefACzthB0rgwhMfGLcXpuJI3OGNwXHbIJHuLcidf/YHhbriRqOW/p6v0bwLVYo2XBPbMvCzZR2aZDFRl6iPLY0ZwjmeruvN9EJon/kOXauW0gEywoMOIRMQqq8A== 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-SenderADCheck; bh=z01COhUX3w0GRaHw4KfDtq9eGlMaDwDf2ARAwp1cvy8=; b=AcFE+VINdzgcrmEx7SOEvzb3NBvHVXm2D1N47Uqs6KWnyFZOxiJu23ZqG4fAsfUClcZtOBUTU/6CdTOmNx+SZxnRDhECiNSHziD/Z733OikpcBKe3dUjjBVj2F1b7gfv37wfQiLCBem0Lzjn/2VRzla6VmbAUoNQ9csd5KCd3A+vzvz9YWhVsdEA1AReGTMxheeH7phrk8Aw6TQ7cgva7EjnmTR3dlDXZCXfzzdgsK59/ClKbnOoiXe7zzfnau879608Y4uVvzczW3Kx7HdCd8j6iWpUL3fTsN8A1tiowOzLFpAXwyV87m0fk6gRcANRVB+TCo88HNFbuf3bAez8EQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none Received: from MN2PR12MB4286.namprd12.prod.outlook.com (2603:10b6:208:199::22) by BL0PR12MB2530.namprd12.prod.outlook.com (2603:10b6:207:43::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3455.23; Thu, 8 Oct 2020 09:07:27 +0000 Received: from MN2PR12MB4286.namprd12.prod.outlook.com ([fe80::61fd:a36e:cf4f:2d3f]) by MN2PR12MB4286.namprd12.prod.outlook.com ([fe80::61fd:a36e:cf4f:2d3f%9]) with mapi id 15.20.3455.023; Thu, 8 Oct 2020 09:07:27 +0000 From: Ori Kam To: Bing Zhao , NBU-Contact-Thomas Monjalon , "ferruh.yigit@intel.com" , "arybchenko@solarflare.com" , "mdr@ashroe.eu" , "nhorman@tuxdriver.com" , "bernard.iremonger@intel.com" , "beilei.xing@intel.com" , "wenzhuo.lu@intel.com" CC: "dev@dpdk.org" Thread-Topic: [PATCH v2 1/6] ethdev: add hairpin bind and unbind APIs Thread-Index: AQHWnVBLSNkk9556HESLuuvZPmIfQ6mNae7w Date: Thu, 8 Oct 2020 09:07:27 +0000 Message-ID: References: <1601511962-21532-1-git-send-email-bingz@nvidia.com> <1602147098-9768-1-git-send-email-bingz@nvidia.com> <1602147098-9768-2-git-send-email-bingz@nvidia.com> In-Reply-To: <1602147098-9768-2-git-send-email-bingz@nvidia.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: nvidia.com; dkim=none (message not signed) header.d=none;nvidia.com; dmarc=none action=none header.from=nvidia.com; x-originating-ip: [147.236.152.129] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 0d680882-6eb0-4ded-65f7-08d86b699406 x-ms-traffictypediagnostic: BL0PR12MB2530: x-ld-processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8882; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 3jRCmkeLPOihz6XpN9+2meLD1LSNMnCKO53giYFt7eLdZMu/6ya2xrWnhmV0BkKUTvL/1w+BNZuq9oh1F2pLRgC28mXuKqcAkA8UymaIGrerWvskzwlJQ126wTTFI68tKuFJ50ls4cahq/zZWqP6O5P9cM8I6uIvxKawPbOf3pQ81boT7DYFPAZpDJ1hg/uoVmGdeJagkOmQRbofPtzwTGb8jU2ls7jCLD4VXaJxLwZx38QWLJcnQsbu/Cu8SnKMgmSyc9KoCW+I1t9ijkscxBPR+UDs3I4Yxp6JqWIntygR2GrjPXl/vaOasCG3hv2I x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MN2PR12MB4286.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(376002)(39860400002)(346002)(396003)(366004)(52536014)(9686003)(2906002)(86362001)(71200400001)(66446008)(64756008)(66556008)(66476007)(66946007)(76116006)(55016002)(8676002)(33656002)(186003)(8936002)(83380400001)(26005)(316002)(7696005)(53546011)(478600001)(4326008)(110136005)(5660300002)(6506007); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: 2hqqvNzGHM60+9ekMoubjG5tcWOvFXQTu8vcKKenllZduQdIsEiLL5JGiHypVdmAQtjukbgwuWWLz71O7zRwl6XWbXs9FXYgOJazRpyp38PRmJtmN+JT+4hIu7f0UBbMROIZL9w3aDA5uTn2dg7TQ6CscuPlJa69n6PWBd7BqvKaYFSOH5ufAWD66GglCE8/7b2o9qltxtA0EDcEyqtLQiluFMLQt5Zi+IMmSxBjyX+DEyDb+rNZQ1DUbZR5i047s1QO+vtQiKHhNb9LUuUUvUl/7iti0mnwoeN9O588qQ8zpFd50dtMFDopiH+jgYVnWanxzedG2kt7gSqG3C6304bbB0AjafcfgLnL8PedEshOVTuvdJfPK4rySSAUVeo+amx4vVxPoZt4auWXyw5XmZZN4BLeXPHBDSzh0jw3p2IA2SzFBTM5WUZmyb1WPzzDSLsBlM+SmUJUuLBggQUiK3zNb43P+l0ipCBBplCwG4FgnU2GkfeF2hzJkthU3j332fGsPw+e0yuNuvKMIK1tO5QMVyRIqT3gX1u1OoblwkA3T4yqFKK8BjVV0t2FPvYay6vcm05D7rFCW4a6ejKJGp9G7CDWqNjlVQqGMlSvWJodU/ZlcGDtiPrLl8NL3Y03bgYAon8p8R1BwHdQlqx3mA== 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: MN2PR12MB4286.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0d680882-6eb0-4ded-65f7-08d86b699406 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Oct 2020 09:07:27.0627 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: do6LP8pCMqDErMXwdSE8vXds4rd0yK70TlWy1bD+Ly7WBOVbYFdZBmaYEfu+E1BuKnQPeUNcpUetCUvBuMKmFA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR12MB2530 X-OriginatorOrg: Nvidia.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1602148053; bh=z01COhUX3w0GRaHw4KfDtq9eGlMaDwDf2ARAwp1cvy8=; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:From:To: CC:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References: In-Reply-To:Accept-Language:Content-Language:X-MS-Has-Attach: X-MS-TNEF-Correlator:authentication-results:x-originating-ip: x-ms-publictraffictype:x-ms-office365-filtering-correlation-id: x-ms-traffictypediagnostic:x-ld-processed: x-ms-exchange-transport-forked:x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers:x-ms-exchange-senderadcheck: x-microsoft-antispam:x-microsoft-antispam-message-info: x-forefront-antispam-report:x-ms-exchange-antispam-messagedata: Content-Type:Content-Transfer-Encoding:MIME-Version: X-MS-Exchange-CrossTenant-AuthAs: X-MS-Exchange-CrossTenant-AuthSource: X-MS-Exchange-CrossTenant-Network-Message-Id: X-MS-Exchange-CrossTenant-originalarrivaltime: X-MS-Exchange-CrossTenant-fromentityheader: X-MS-Exchange-CrossTenant-id:X-MS-Exchange-CrossTenant-mailboxtype: X-MS-Exchange-CrossTenant-userprincipalname: X-MS-Exchange-Transport-CrossTenantHeadersStamped:X-OriginatorOrg; b=G0dzONKWswXj40DXqF0SGTowgqwbueqArzHxMIcde1rAKAf1NK4Y/eSDV/vOoLKr5 MB70INJzXi9350+XAn+cW8DVV5j4BKXcS8BfNbxx4w8kPDjjd/eKzv6xOHAetB6oTt 1mwm/N/feshg1F7XNqp5Ul1/WTUKEdeHYPKieacsyb7wzGEHvFZ8myyS21cs5IebUp /ulHPIFYK2H01Cv3m9vV5tGDSORSx4DljWgdUaYiNrB9INkBkcctYPu75O48RnfzSk YDXteDjz2zuLNCOhRXHU1dNlcf956XhQZuaEMInJWJZBugRTv5uZu5n+5Dup/eLlfJ K96gpkwtG29Kg== Subject: Re: [dpdk-dev] [PATCH v2 1/6] ethdev: add hairpin bind and unbind APIs 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi Bing > -----Original Message----- > From: Bing Zhao > Sent: Thursday, October 8, 2020 11:52 AM > Subject: [PATCH v2 1/6] ethdev: add hairpin bind and unbind APIs >=20 > In single port hairpin mode, all the hairpin TX and RX queues belong > to the same device. After the queues are set up properly, there is > no other dependency between the TX queue and its RX peer queue. The > binding process that connected the TX and RX queues together from > hardware level will be done automatically during the device start > procedure. Everything required is configured and initialized already > for the binding process. >=20 > But in two ports hairpin mode, there will be some cross-dependences > between two different ports. Usually, the ports will be initialized > serially by the main thread but not in parallel. The earlier port > will not be able to enable the bind if the following peer port is > not yet configured with HW resources. What's more, if one port is > detached / attached dynamically, it would introduce more trouble > for the hairpin binding. >=20 > To overcome these, new APIs for binding and unbinding are added. > During startup, only the hairpin TX and RX peer queues will be set > up. Nothing will be done when starting the device if the queues are > without auto-bind attribute. Only after the required ports pair > started, the `rte_eth_hairpin_bind()` API can be called to bind the > all TX queues of the egress port to the RX queues of the peer port. > Then the connection between the egress and ingress ports pair will > be established. >=20 > The `rte_eth_hairpin_unbind()` API could be used to disconnect the > egress and the peer ingress ports. This should only be called before > the device is closed if needed. When doing the clean up, all the > egress and ingress pairs related to a single port should be taken > into consideration, especially in the hot unplug case. >=20 > Signed-off-by: Bing Zhao > --- > v2: remove the all peer ports logic from rte API > --- Acked-by: Ori Kam Thanks, Ori