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 57E02A0471 for ; Thu, 15 Aug 2019 06:41:54 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A167D1BE8F; Thu, 15 Aug 2019 06:41:53 +0200 (CEST) Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60040.outbound.protection.outlook.com [40.107.6.40]) by dpdk.org (Postfix) with ESMTP id 8A4B91BE89 for ; Thu, 15 Aug 2019 06:41:51 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TRLxw6ma5e6e9W40Y85FL7FDAFw5GmcSVA7GvwoYfd+Lw/SJD30sjizyFcdCFNyjQadOoVUiaY1n5L13tR+y3USzToX7nKipXb9V7fK/mga6Rb42RRjwVJ3LDnRalG0iSDz9khNtbGRyNXgGrEwM6tl4HBds7XzPntPY4p6cMmNJjw/mpyzbXqkhBtTHh6dPUHEc4dLMDXJI3yZzHut2fFCEzueAnZQud5Ga/O3ROKnN94h6sgsP0akGN5QQxTnjEjb9PdFHjyTjaqQ/weigG3Z1MXm3DhXWDQAwbbWkx41eyeyR26cXSG/grgh1rQc5rBM6r0LonU5no4yeJkWNtw== 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=RASBZLK++xFOXPK2kiXAJ788rPKW+uH1io2DYeo2Yhw=; b=C0VG4ZHIx5e+6uX1iFaROW2VNXHDu5AIUVwXRT3DEjB9qJ+D5ZTNqb6kowbSH8IKnMGP6YKEmZvoMMWyBYdDbxxIAa5KDHsQKHhPwWlBIisQJtG0dveHXaMOG63MnXWKyRpXaN9eafXjNqZy2/5fkGgyc8rYcLt5dxHz3VBvPly9ajG47QsBOgkb2zD/TgAogrNGuFPenMsKXXwvdCsfc9nsXBAuJv/rNXxTT7ZPum+34tazYL+ErZBeYMPvcFIo0s0M3t96mCV0uRWIeb4lmDcWzWIwU2L+Zjjp6XGFCZf18eD1R/yIRecvNWUJazv7MLm2OCAPothuqrc1uBWwsQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=mellanox.com; dmarc=pass action=none header.from=mellanox.com; dkim=pass header.d=mellanox.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=RASBZLK++xFOXPK2kiXAJ788rPKW+uH1io2DYeo2Yhw=; b=Kl80jIyFXbGdB/Z8fsC/1LeSOSTBD1EJIkH/hpV1vJEgS6KmOMa/iIgYlfknO/D1N2dav/kcYPEU+08R5qpIGczEzNaIR/X5EfcgQ5xZp8n5R2M+M51EJD2WMBLcIH3SIs4pTi+8eFIrO/4VwkrJd64bZSagn2FlS6opzsYofVU= Received: from AM4PR05MB3425.eurprd05.prod.outlook.com (10.171.190.15) by AM4PR05MB3476.eurprd05.prod.outlook.com (10.171.187.157) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2157.18; Thu, 15 Aug 2019 04:41:50 +0000 Received: from AM4PR05MB3425.eurprd05.prod.outlook.com ([fe80::3444:7cb9:25db:14c9]) by AM4PR05MB3425.eurprd05.prod.outlook.com ([fe80::3444:7cb9:25db:14c9%3]) with mapi id 15.20.2157.022; Thu, 15 Aug 2019 04:41:50 +0000 From: Ori Kam To: Stephen Hemminger CC: Thomas Monjalon , "ferruh.yigit@intel.com" , "arybchenko@solarflare.com" , Shahaf Shuler , Slava Ovsiienko , Alex Rosenbaum , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [RFC] ethdev: support hairpin queue Thread-Index: AQHVUdxZYjq5dQPUn0m0/551v94NJqb5OMaAgADm1OCAAAgZIIAAlVkAgADkO3A= Date: Thu, 15 Aug 2019 04:41:49 +0000 Message-ID: References: <1565703468-55617-1-git-send-email-orika@mellanox.com> <20190813084619.6b78a7b9@hermes.lan> <20190814075600.1d9bc493@hermes.lan> In-Reply-To: <20190814075600.1d9bc493@hermes.lan> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=orika@mellanox.com; x-originating-ip: [185.175.35.255] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: d4aca9d9-6901-4230-9df1-08d7213ae34e x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(4618075)(2017052603328)(7193020); SRVR:AM4PR05MB3476; x-ms-traffictypediagnostic: AM4PR05MB3476: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-forefront-prvs: 01304918F3 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(136003)(376002)(366004)(346002)(39860400002)(396003)(189003)(199004)(13464003)(256004)(81156014)(54906003)(66946007)(53936002)(305945005)(8936002)(66476007)(81166006)(53546011)(2906002)(74316002)(64756008)(66446008)(7736002)(478600001)(8676002)(76176011)(7696005)(14454004)(14444005)(76116006)(9686003)(25786009)(55016002)(33656002)(66556008)(102836004)(4326008)(6246003)(6506007)(6116002)(86362001)(3846002)(99286004)(446003)(52536014)(486006)(229853002)(11346002)(6436002)(316002)(5660300002)(66066001)(26005)(186003)(476003)(71200400001)(6916009)(71190400001); DIR:OUT; SFP:1101; SCL:1; SRVR:AM4PR05MB3476; H:AM4PR05MB3425.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: UZXPZjpe72Q75/pbkSDewn35P78EvgQgSeeMby999Kl2PIWOzL5HeaIAqPRS9RJ+Aq2hIP8DpH9R/bbegjwl5AYaTnhzfEquDbVz9rA4jlOaIA8ZchtqEPVUorhhBa/SdOgiVX5qn4Cxxe60r0Q/mghXdlAaEnk/rzygRLX15ICrxxkMTfsEs94lCIhW6LL49d87yTWdDVNBWtlsjLEI8/9FXT4Y7tOtg+OHrFo+8BpXRp4uTv8O/enzmVgyWS7M6w8IEMPj5m4ICZnu9vTL+UKYLgcf9JP1VwXttpg02XaO2ZJtfts4VqC4JyIgWsdheGghrL175jKHMZAOtr42MaL8TkXOWtTkRkn+HaYFSLDgeLDVeyomwtCz1QQYAizII7OWMje5ARyT6+jViZeRBQ7jWCulbV8JOy5wO/Z4qFA= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: d4aca9d9-6901-4230-9df1-08d7213ae34e X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Aug 2019 04:41:49.9945 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: dFuvVeMHc7PqisKDBBakJEkUFtyMlT1SVmNxfrMPCXh3jkQIifZZoD0kXkUhcosb7tpaK6cNuth4vdrX/0UAsw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR05MB3476 Subject: Re: [dpdk-dev] [RFC] ethdev: support hairpin queue 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" > -----Original Message----- > From: Stephen Hemminger > Sent: Wednesday, August 14, 2019 5:56 PM > To: Ori Kam > Cc: Thomas Monjalon ; ferruh.yigit@intel.com; > arybchenko@solarflare.com; Shahaf Shuler ; Slava > Ovsiienko ; Alex Rosenbaum > ; dev@dpdk.org > Subject: Re: [dpdk-dev] [RFC] ethdev: support hairpin queue >=20 > On Wed, 14 Aug 2019 06:05:13 +0000 > Ori Kam wrote: >=20 > > > -----Original Message----- > > > From: Ori Kam > > > Sent: Wednesday, August 14, 2019 8:36 AM > > > To: Stephen Hemminger > > > Cc: Thomas Monjalon ; ferruh.yigit@intel.com; > > > arybchenko@solarflare.com; Shahaf Shuler ; > Slava > > > Ovsiienko ; Alex Rosenbaum > > > ; dev@dpdk.org > > > Subject: RE: [dpdk-dev] [RFC] ethdev: support hairpin queue > > > > > > Hi Stephen, > > > > > > > -----Original Message----- > > > > From: Stephen Hemminger > > > > Sent: Tuesday, August 13, 2019 6:46 PM > > > > To: Ori Kam > > > > Cc: Thomas Monjalon ; ferruh.yigit@intel.com; > > > > arybchenko@solarflare.com; Shahaf Shuler ; > Slava > > > > Ovsiienko ; Alex Rosenbaum > > > > ; dev@dpdk.org > > > > Subject: Re: [dpdk-dev] [RFC] ethdev: support hairpin queue > > > > > > > > On Tue, 13 Aug 2019 13:37:48 +0000 > > > > Ori Kam wrote: > > > > > > > > > This RFC replaces RFC[1]. > > > > > > > > > > The hairpin feature (different name can be forward) acts as "bump= on > the > > > > wire", > > > > > meaning that a packet that is received from the wire can be modif= ied > using > > > > > offloaded action and then sent back to the wire without applicati= on > > > > intervention > > > > > which save CPU cycles. > > > > > > > > > > The hairpin is the inverse function of loopback in which applicat= ion > > > > > sends a packet then it is received again by the > > > > > application without being sent to the wire. > > > > > > > > > > The hairpin can be used by a number of different NVF, for example= load > > > > > balancer, gateway and so on. > > > > > > > > > > As can be seen from the hairpin description, hairpin is basically= RX > queue > > > > > connected to TX queue. > > > > > > > > > > During the design phase I was thinking of two ways to implement t= his > > > > > feature the first one is adding a new rte flow action. and the se= cond > > > > > one is create a special kind of queue. > > > > > > > > > > > > Life would be easier for users if the hairpin was an attribute > > > > of queue configuration, not a separate API call. > > > > > > I was thinking about it. the reason that I split the functions is tha= t they use > > > different > > > parameters sets. For example the hairpin queue doesn't need memory > region > > > while it does need > > > the hairpin configuration. So in each case hairpin queue / normal que= ue > there > > > will be > > > parameters that are not in use. I think this is less preferred. What = do you > think? > > > > > > > Forgot in my last mail two more reasons I had for this for this: > > 1. changing to existing function will break API, and will force all app= lications > to update date. > > 2. 2 API are easier to document and explain. > > 3. the reason stated above that there will be unused parameters in each= call. >=20 > New API's are like system calls, they create longer term support overhead= . > It would be good if there was support for this on multiple NIC types. I don't know the capability of other NICs. I think this is a good feature t= hat can be embrace and implemented by other NICS (may be they can even have some SW implementa= tion for this that will still use CPU but will give faster packet rate since they know ho= w their HW works) Regarding the long term support, I'm sorry but I don't see the longer suppo= rt issue that important since for this=20 exact reason I think a dedicated API is much easer to maintain. Also my be = in future there will be=20 a new type and then the generic function will have a lot of unused code whi= ch is hard to maintain and debug. Thanks, Ori