From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id D4C07A046B for ; Tue, 28 May 2019 16:34:38 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D5110137D; Tue, 28 May 2019 16:34:37 +0200 (CEST) Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70042.outbound.protection.outlook.com [40.107.7.42]) by dpdk.org (Postfix) with ESMTP id 1DCF11D7 for ; Tue, 28 May 2019 16:34:36 +0200 (CEST) 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=ycnZ3jsJjLamLkRJn7twDmD30yUUvDuO9OuVF1OOdKo=; b=PMybjA8J2/XJ2nEPO/qrNoDgnFWY+zubF85vrva/r90sHk6ZY5gPEH5lFeYfCCnKK8GTBnq9IUANPm9cfKeGWNgAwdPWelMLfeFOBuGP1F5bCrnuKwqzKVJOkJRuK5eDT4phT+WQY+9lkASwdJ/afEkEWBVuerEpfcrf0BVGsYY= Received: from AM4PR05MB3425.eurprd05.prod.outlook.com (10.171.190.15) by AM4PR05MB3330.eurprd05.prod.outlook.com (10.171.191.28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1922.17; Tue, 28 May 2019 14:34:35 +0000 Received: from AM4PR05MB3425.eurprd05.prod.outlook.com ([fe80::c9ea:c445:68e5:942]) by AM4PR05MB3425.eurprd05.prod.outlook.com ([fe80::c9ea:c445:68e5:942%4]) with mapi id 15.20.1922.021; Tue, 28 May 2019 14:34:35 +0000 From: Ori Kam To: Shahaf Shuler , Yongseok Koh CC: "dev@dpdk.org" , Ori Kam Thread-Topic: [RFC] net/mlx5 add hairpin support Thread-Index: AdURTrvYF7kMxSN/QaWhTYMOj1R1KA== Date: Tue, 28 May 2019 14:34:34 +0000 Message-ID: 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: [193.47.165.251] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 2de53c33-af2f-4330-be20-08d6e3799b01 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:AM4PR05MB3330; x-ms-traffictypediagnostic: AM4PR05MB3330: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8882; x-forefront-prvs: 00514A2FE6 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(346002)(136003)(376002)(39860400002)(366004)(396003)(199004)(189003)(99286004)(486006)(14454004)(7696005)(8936002)(476003)(26005)(6636002)(6506007)(4326008)(102836004)(81166006)(25786009)(8676002)(86362001)(81156014)(2906002)(186003)(305945005)(71200400001)(6116002)(33656002)(74316002)(52536014)(6436002)(76116006)(66946007)(66476007)(64756008)(107886003)(73956011)(66446008)(66556008)(53936002)(9686003)(55016002)(110136005)(54906003)(68736007)(316002)(66066001)(3846002)(7736002)(14444005)(5660300002)(256004)(478600001)(71190400001); DIR:OUT; SFP:1101; SCL:1; SRVR:AM4PR05MB3330; H:AM4PR05MB3425.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX: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: viKA+oCiNxFz6AlCBGgyYX7sbeeXUK0il1f0jySrK7KdSQedVo+NYX0AQndRyWn3P30n6447HOQVkckiPOQbqeGUd0QgibuhvAP13QiugB3aG0wD0dy0Lwkb/hEimU1ACuONkHsjkw3nYU6LAG7WOP9KttwsElPNy+OpGJOr3OaBpl9mro10XvxocCOUh+pTH5fWLrFeeEBDXD/zFvXZR9FhOPMdJI2yvPTcgLikFGMQkJ2Q6QXoSJkpiXdbjukteX9zcBNjUHzpiL9qR/l1kZ0C4WwDdwXSHEHmNJQrwym8AeB0jWuk1QDU+vU/4gLwwvGMD3QBY84kSbsAe6vC7njOi7xGSQCVuC+urrF034W0xyXWKYAV/V/kjOr+BcA5e/rFurFaMt+DSB5W/U+BIPBizPh11E1F0WrAr2WuPUc= 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: 2de53c33-af2f-4330-be20-08d6e3799b01 X-MS-Exchange-CrossTenant-originalarrivaltime: 28 May 2019 14:34:34.9964 (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: orika@mellanox.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR05MB3330 Subject: [dpdk-dev] [RFC] net/mlx5 add hairpin support 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" The hairpin feature acts as "bump on the wire", meaning that a packet that = is received from the wire can be modified using offloaded action and then sent back to the wire witho= ut application intervention which can save CPU cycles. The hairpin is the inverse function of loopback in which application 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 bala= ncer, gateway and so on. In current version the hairpin will work only on routing from the wire port= to the same wire port. This can later be expanded to work between different ports. The hairpin will be composed of 2 flows one ingress flow, which will be det= ected as hairpin flow by setting transfer flag =3D 1 and action port. The second rule if required, will be normal egress flow. In order to combine between the flows, the application can set metadata on = the ingress which will be copied to the egress were it can be matched. Signed-off-by: Ori Kam Thanks Ori Kam