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 35691A04F6; Wed, 11 Dec 2019 14:30:18 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id ED2DB34EF; Wed, 11 Dec 2019 14:30:17 +0100 (CET) Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-eopbgr20054.outbound.protection.outlook.com [40.107.2.54]) by dpdk.org (Postfix) with ESMTP id 8F53434EF for ; Wed, 11 Dec 2019 14:30:16 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Np95gukQ46mKkiag24FPRC/lFBCHxfRnw95X3jFkwU1ovxYfRtJ2EG+YKQzXEC3glv7CbEdFyjdPEwY/3v0aG2t2WdPJ027jetrRCNZ+v9jiGwsbfCbocwxmeYjoINM+Y7UTZminrQhMatzCVvUb1q6DYgpxvifmo+ZTW00C2tFmkZRhLPbrAznKQIF4B5A/EzhcYoG7Y0s4BY0hZhnRasmVUO+Q904TnIUl5mW+YyPAs4giykNCN1BpCGDb11bWubtiCS6EpUKI6z86En7nUfXOndJWaVTlIq5ZAMvVUPJS6wGJPaPvYVbh6T5ZAov3ooIiMK7iiixZaFynLat4Wg== 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=CXXo1K+mYxMZenamrnjkCTrPkcCf5DUpLjmG4ogKksc=; b=jkXjhqRlUr+L9ix5RjeN4Yd0SdhMNALT/28P3wQqy8x9aKPJFj2JPQOI/ZaHvL8b3xK8rSk+Vd+h9JYgV4RIDu61c/RQ1gLUeCQUps65k9V4KAplEuHjuG3q9syfDpOLsGjixvln5/+q6m64lxVxTtCwUVtR/WpNvk2e9Q0jGQ28WWfccHVLTkQLLCJTqMkqz1ktjXsgOc/ndAIisUSqnXte05oG8RdtBUXbvcDekFWN3g/06NwPbhJY5IPtj+vuLBg1hj0PV974WGY3OJLfMW/CwwSLjzYmG+IT+13QjTkeLEjIlUPk8JZwmtEHIgsw3ST27chGK4iptN7WalgjLg== 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=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=CXXo1K+mYxMZenamrnjkCTrPkcCf5DUpLjmG4ogKksc=; b=oHbY0lZ+qMvZQZm5sdjJcLdEC4GB2CpkQ44/nfEi977eZ5Zi1Oa2uYlJOUO8deMQoccPssjW4zzKkVA57RYjoH6rFVUulBJluukvvlI/rK/KYUQ5CXZOltfE0hhFlKb8xeSYToLykwR30LnDhAj9LJoIOZUnUZn2hektH9V674M= Received: from AM4PR05MB3425.eurprd05.prod.outlook.com (10.171.190.15) by AM4PR05MB3201.eurprd05.prod.outlook.com (10.171.188.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2538.15; Wed, 11 Dec 2019 13:30:15 +0000 Received: from AM4PR05MB3425.eurprd05.prod.outlook.com ([fe80::d877:95ed:5f94:a4a]) by AM4PR05MB3425.eurprd05.prod.outlook.com ([fe80::d877:95ed:5f94:a4a%3]) with mapi id 15.20.2516.018; Wed, 11 Dec 2019 13:30:15 +0000 From: Ori Kam To: "Sexton, Rory" , "dev@dpdk.org" CC: "Zhang, Qi Z" , "Xing, Beilei" , Adrien Mazarguil , "Jagus, DariuszX" Thread-Topic: [dpdk-dev] [PATCH] ethdev: add L2TPv3 header to flow API Thread-Index: AQHVqq0+rDvHUb8LykqFESCNqlVVt6ezLT2ggABQSgCAAFNDwIABCEwAgAAcV1A= Date: Wed, 11 Dec 2019 13:30:15 +0000 Message-ID: References: <20191204141055.3647-1-rory.sexton@intel.com> In-Reply-To: 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-ht: Tenant x-ms-office365-filtering-correlation-id: 7c657c28-7034-4e76-6e38-08d77e3e4218 x-ms-traffictypediagnostic: AM4PR05MB3201: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-forefront-prvs: 024847EE92 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(39860400002)(366004)(396003)(346002)(136003)(376002)(189003)(199004)(51444003)(13464003)(81156014)(55016002)(316002)(2906002)(81166006)(26005)(53546011)(5660300002)(6506007)(8936002)(7696005)(186003)(8676002)(9686003)(71200400001)(33656002)(86362001)(110136005)(76116006)(66946007)(66556008)(66446008)(66476007)(64756008)(52536014)(4326008)(478600001)(54906003); DIR:OUT; SFP:1101; SCL:1; SRVR:AM4PR05MB3201; 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: BCL:0; x-microsoft-antispam-message-info: TaCBjgXwJawjTUVcmk/n0aqK5K4X1QplHrr6fGQONxWb1eI029YAY5VjJC1Fudf6r7gai3prJ9NKyV1BuKo82HsO4G42v8fJvq8CUOA3IL9QWhq7LQWVEykbC4m3/14LmKaFQd8q5Ad6JU0IrsgnrlUdtwM8x/OJ/9ne0S6/hzpzGbbcKzr5cr48hDBVTgnS/w3OJuGit43sSFVSnPatySYHOzU8Wf2gqQSQCQJ1Aks1zTS+q3tLX3JtoIeX8p4u0S74d/NWcwP/VdpOvoCIjCBQikJphPCClzjvMJyYWhdNzgDpmE1QKQYx14FIu9EJ2P0pkrx0qdKptexQsHFh9ItORINpyKs1t8uz6G+SNHnA1XytjAkBQY1GSBptHZalKpgnxI2bWxAdpczKvpTskfsivtV8N16CBYNwNf8Z77gnt6F0F4ZdcYRP8oMY08RnrNlw1skUNBMnaqTN322Ku/J4FnAqCXBgqHkfntg3mOFPUuhLffFfGsDNTktcoJhfW7/tj98Q56LhqTjRQxgtog== x-ms-exchange-transport-forked: True 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: 7c657c28-7034-4e76-6e38-08d77e3e4218 X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Dec 2019 13:30:15.7354 (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: xuYiZdQIekrMTu2UjLucvKVxkaeGt1DeHGtlcz+XRDK9ozyD5u74pnt7rE1hw0zciNFvoiWggBBptKq+9Ik20A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR05MB3201 Subject: Re: [dpdk-dev] [PATCH] ethdev: add L2TPv3 header to 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi Rory, PSB > -----Original Message----- > From: Sexton, Rory > Sent: Wednesday, December 11, 2019 1:36 PM > To: Ori Kam ; dev@dpdk.org > Cc: Zhang, Qi Z ; Xing, Beilei ; > Adrien Mazarguil ; Jagus, DariuszX > > Subject: RE: [dpdk-dev] [PATCH] ethdev: add L2TPv3 header to flow API >=20 > Hi Ori, >=20 > See my comments below. >=20 > Regards, > Rory >=20 > >> > >>> One general question why do we want to support only v3 and not also > v2? > >> l2tpv3 is more widely used as a tunneling protocol hence it's inclusio= n. > >> A specific example is the cable industry where DOCSIS cable traffic is > >> encapsulated using depi and uepi protocols which both make use of > >> l2tpv3 session ids. > >> Directing flows based on l2tpv3 can be very useful in these cases. > >> > > > >I'm not saying that v3 is not used more, I just thought from looking at = the > spec that both can be supported and the only difference is the version, s= o > matching on the version we will be able to support both versions. > >Your decision. > > >=20 > There is more difference between l2tpv2 and l2tpv3 than just the version > number. > In L2TPv2 there exists a 16 bit Tunnel ID and 16 bit Session ID. This is = changed > to a 32 bit Session ID in L2TPv3 > Please see difference in headers below for v2 and v3. > Due to the differences between v2 and v3 I don't think both can be > supported with same flow item. >=20 > L2TPv2 > 0...............................................15, 16...............= .......................31 > +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ > |T|L|x|x|S|x|O|P|x|x|x|x| Ver | Length (opt) = | > +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ > | Tunnel ID | Sessio= n ID | > +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ > | Ns (opt) | Nr = (opt) | > +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ > | Offset Size (opt) | Offset pad... (op= t) | > +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ >=20 > L2TPv3 > 0...............................................15, 16...............= .......................31 > +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ > | Session ID = | > +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ > | Cookie (optional, maximum 64 bits)... > +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ > = | > +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ >=20 Since we have the version, they can by using union, But like I said your call. > >> >> +/** > >> >> + * RTE_FLOW_ITEM_TYPE_L2TPV3. > >> >> + * > >> >> + * Matches a L2TPv3 header. > >> >> + */ > >> >> +struct rte_flow_item_l2tpv3 { > >> >> + rte_be32_t session_id; /**< Session ID. */ }; > >> > > >> >Does it make sense that in future we will want to match on the T / L > >> >/ ver / > >> Ns / Nr? > >> > > >> >Please also consider that any change will be ABI / API breakage, > >> >which will > >> be allowed only next year. > >> > > >> > >> I don't foresee us wanting to match on any of the other fields, T / L > >> / ver / Ns/ Nr. > >> The session id would typically be the only field of interest in the > >> l2tpv3 header. > > > > I think that adding all fields to the structure will solve the possible= issue > with adding matching later. > > Also and even more important you will be able to use it for creating th= e > raw_encap / raw_decap buffers. > > > >What do you think? >=20 > Based on the differences between v2 and v3 the only field of interest in > l2tpv3 over IP is the Session ID. > I agree it would make sense to add all fields if we were implementing l2t= pv2 > however v2 would require a different implementation to v3 due to the > differences between both Protocols. Even if we just support v3, I think that it is a good idea to add all field= s of v3. This will allow the use of the raw_encap / raw_decap actions. Please also note that you didn't add the new item to cmd_set_raw_parsed fu= nction. this function is used in order to create raw_encap/ raw_decap encapsulation= s. Best, Ori