From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-DB5-obe.outbound.protection.outlook.com (mail-eopbgr40056.outbound.protection.outlook.com [40.107.4.56]) by dpdk.org (Postfix) with ESMTP id DDF491B1B1 for ; Mon, 16 Apr 2018 10:56:40 +0200 (CEST) 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=XqFMb4l7G31TyNjB935w4cekEHe8sWmmVgRphFQDzj0=; b=AVMXjp2exhfrTf4Feewep134y1DrBTr3VPV2fx6VPSHRVpxCYc1CdRzX5YzKiDRjlG+npP85CxyIMZ4qofzWeQPFs+GIv+LVTMoukOTvE0t8Rmhznlc4B2M6hKrX89tA3yxWdIDJwB+eAjgtOS95vowRaNdQUuHOLi/jrNSTwY0= Received: from DB7PR05MB4426.eurprd05.prod.outlook.com (52.134.109.15) by DB7PR05MB4444.eurprd05.prod.outlook.com (52.134.109.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.675.14; Mon, 16 Apr 2018 08:56:38 +0000 Received: from DB7PR05MB4426.eurprd05.prod.outlook.com ([fe80::808d:386e:26f3:859f]) by DB7PR05MB4426.eurprd05.prod.outlook.com ([fe80::808d:386e:26f3:859f%13]) with mapi id 15.20.0675.015; Mon, 16 Apr 2018 08:56:38 +0000 From: Shahaf Shuler To: Adrien Mazarguil CC: Qi Zhang , "dev@dpdk.org" , "declan.doherty@intel.com" , "sugesh.chandran@intel.com" , "michael.j.glynn@intel.com" , "yu.y.liu@intel.com" , "konstantin.ananyev@intel.com" , "bruce.richardson@intel.com" , Thomas Monjalon Thread-Topic: [dpdk-dev] [PATCH v3 3/4] ethdev: add TTL change actions in flow API Thread-Index: AQHT1UIxX5sbbyp2PEus+K6dx4YpK6QC3wTQgAArxgCAAAFiUA== Date: Mon, 16 Apr 2018 08:56:37 +0000 Message-ID: References: <1522279780-34842-1-git-send-email-qi.z.zhang@intel.com> <20180416051639.188034-1-qi.z.zhang@intel.com> <20180416051639.188034-4-qi.z.zhang@intel.com> <20180416081226.GU4957@6wind.com> In-Reply-To: <20180416081226.GU4957@6wind.com> 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=shahafs@mellanox.com; x-originating-ip: [193.47.165.251] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DB7PR05MB4444; 7:/rsO97EpFbp3iOh7Kz2t50PpwvoeOtcWfThOUauKKK/R3utOIW6D7LrtIDSEt2nUDfLOVqiKU1TLTk1pRTYlR9uwc0z6YqtJFcI0Mb55jEL7O2mHTd13bGbQP6uLrAL8gGEn0wmmXBPx4OEtsx0YP6dq+XopxX4hAhyn72hN9ul4QW46jO4m3gGGgZ+5HkN5IJSk/t9WbXvsA4DfZ0KVyZkg4Pp6YT0jz3MtSpD1qO9+4DUurwdl1L543hv/BveL x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4534165)(4627221)(201703031133081)(201702281549075)(48565401081)(2017052603328)(7153060)(7193020); SRVR:DB7PR05MB4444; x-ms-traffictypediagnostic: DB7PR05MB4444: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(189930954265078)(45079756050767); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3002001)(10201501046)(93006095)(93001095)(3231232)(944501327)(52105095)(6055026)(6041310)(20161123562045)(20161123558120)(20161123560045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:DB7PR05MB4444; BCL:0; PCL:0; RULEID:; SRVR:DB7PR05MB4444; x-forefront-prvs: 0644578634 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(396003)(366004)(376002)(346002)(39380400002)(39860400002)(189003)(199004)(478600001)(54906003)(316002)(45080400002)(106356001)(99286004)(76176011)(966005)(186003)(7696005)(486006)(446003)(476003)(11346002)(6116002)(3846002)(105586002)(55016002)(6306002)(3660700001)(9686003)(6246003)(107886003)(5250100002)(33656002)(2906002)(305945005)(6436002)(68736007)(53936002)(74316002)(4326008)(5660300001)(25786009)(229853002)(7736002)(66066001)(14454004)(97736004)(3280700002)(8676002)(81166006)(81156014)(8936002)(6916009)(2900100001)(6506007)(86362001)(102836004)(59450400001)(93886005)(26005); DIR:OUT; SFP:1101; SCL:1; SRVR:DB7PR05MB4444; H:DB7PR05MB4426.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-microsoft-antispam-message-info: gHD6OTYIsAs2VixR/OA2iQrAkcuoiFE6WzQlGyVBabnqIZudshP5TW/h8Obm8LDWnomzhouOLLS1e+S6GA/Gwlajzct5Chke5Zas15x2rQs2Fj6EIPK3qwVeVmD/4vVvtYHfH39Mn+RV7K+6h79yGcRc+y3Y8M6ra81KitAHFbnM/ErLr8WMfWxwQMMJR45L spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: e1fe5107-bcce-4c55-674a-08d5a377f6d2 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: e1fe5107-bcce-4c55-674a-08d5a377f6d2 X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Apr 2018 08:56:37.8338 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR05MB4444 Subject: Re: [dpdk-dev] [PATCH v3 3/4] ethdev: add TTL change actions in flow API 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, 16 Apr 2018 08:56:41 -0000 Monday, April 16, 2018 11:12 AM, Adrien Mazarguil: > Subject: Re: [dpdk-dev] [PATCH v3 3/4] ethdev: add TTL change actions in > flow API >=20 > Hi Shahaf, >=20 > On Mon, Apr 16, 2018 at 05:48:19AM +0000, Shahaf Shuler wrote: > > Hi Qi, > > > > Am wondering if we can make the below more generic and not tailored for > specific use cases. >=20 > Regarding this, please see my previous answer [1] where I asked Qi to mak= e > his changes more focused on the use case at hand when it became clear all > this work was targeting OpenFlow. OK, I missed that. Sorry for jumping in late. >=20 > The OF specification [2] defines the behavior associated with each action= , for > instance when a TTL is 0 or decrementing it would yield 0, the packet mus= t be > dropped. Translating this to a generic decrement action for any packet fi= eld is > not so easy and not convenient. I am not sure I understand why. It is to set -1 in the TTL field of the gen= eric action.=20 We can define the corner cases more carefully as part of the actions. For e= xample - no wrap around.=20 I did not understood the drop if TTL is 0 is part of the action (it is not = described the action description[1]). Is this the case?=20 I think it is wrong approach to introduce a "combo" actions (both decrement= s and drops if value) in rte_flow.=20 I would model such operation by a set of (pseudo code) 1. ACTION_FIELD_DEC_INC , ACTION_GO_TO_GROUP 2. (in next group) matching on the TTL , ACTION_DROP=20 >=20 > Therefore my opinion is that if OF actions as defined by this specificati= on are > supported as hardware capabilities, it makes sense to define dedicated > rte_flow actions for each of them (although "OF" should be part of their > name for clarity). I still think we may need in the future to support copy/increment/decrement= of fields not specifically related to OF.=20 It is better to have APIs which will not change or have double meaning.=20 [1] [1] +Action: ``IP_TTL_DEC`` +^^^^^^^^^^^^^^^^^^^^^^ + +Decrement IPv4 TTL or IPv6 hop limit field and update the IP checksum,=20 +only applies to packets that contain specific MPLS headers. + +.. _table_rte_flow_action_ip_ttl_dec: + +.. table:: IP_TTL_DEC >=20 > I'll comment the patch proper in a separate message. >=20 > [1] > https://emea01.safelinks.protection.outlook.com/?url=3Dhttp%3A%2F%2Fdpd > k.org%2Fml%2Farchives%2Fdev%2F2018- > April%2F096857.html&data=3D02%7C01%7Cshahafs%40mellanox.com%7C6d2b > 747ae47841bc55e508d5a371d2f4%7Ca652971c7d2e4d9ba6a4d149256f461b%7 > C0%7C0%7C636594631626247567&sdata=3D3oTbKT6QwS1WiAIrkF885dEU76ep4 > xreuHoHiwDA2Ec%3D&reserved=3D0 > [2] > https://emea01.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fw > ww.opennetworking.org%2Fimages%2Fstories%2Fdownloads%2Fsdn- > resources%2Fonf-specifications%2Fopenflow%2Fopenflow-spec- > v1.3.0.pdf&data=3D02%7C01%7Cshahafs%40mellanox.com%7C6d2b747ae4784 > 1bc55e508d5a371d2f4%7Ca652971c7d2e4d9ba6a4d149256f461b%7C0%7C1% > 7C636594631626247567&sdata=3De6uelVwIu1poE2uIvEJELuIzela8H%2B8HclQE5 > EdKEaM%3D&reserved=3D0 >=20 > -- > Adrien Mazarguil > 6WIND