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 D9DA0A04C1 for ; Thu, 21 Nov 2019 10:41:51 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9C80223D; Thu, 21 Nov 2019 10:41:51 +0100 (CET) Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-eopbgr30074.outbound.protection.outlook.com [40.107.3.74]) by dpdk.org (Postfix) with ESMTP id 339B323D; Thu, 21 Nov 2019 10:41:50 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KPQw+rAsCXbAyMm/mDv7PM8P0bbRVSa2YA87xHr6yt4VnOBJ2V30Bu8ZLU9ZLANBsbqQOauONpIcrRL0Nc1sOALxOZtv7Cpd+38sL6xRW6GRHRf9PIVfqAgAgNjUsrTtNxt/rAw4IK7lD5PNZbURSgvcDN6fFAMYCl4M5hLd1kwooRoMOgknE2FLSmwM/OfshawdEXmfObx+quQZirYYHxvp/nM5ez3zwGz5tK0tIufdJfch+4EYLxRDu2w1Th4h19ZqlGilUHZOyqsYrdsG1kJZEFG0CINcHDv4tMS5J05JEUsf6LuTJfKXnYMuieQ4xQRctmAt3tnZOfA2iZ30UA== 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=usL+cQFr1RAF/b/GUkCkwZDzZa4mqWp9KANG5sLeBEY=; b=JVR4bY+5xYT6vlWuE8Eq4ZtZNDK95B4dNNMCR8s7oJykI8EGWm5lkosgAxX5ItCbBZs9K5WHO6KxAa8QFd9vzPbNffMPXBUj6Y4yXMw3C00n9aV1hnkv2GzNNDoTPnKimJqJpCAbkazDaMLWtSqBdNahA3xzgKzR3IfQZvHxFmr3CvwPpnqpALGofBVyLhoMJhfergv25VlpeGqSQLxXbqnnv2RbmIZHya7amXtImkxPlWdszUp86sPPhhQr9xwaU0AQUBqFRRtSmy1OZY0eBUIPRxrX+q5+d7nfv62e4k7PRT6mqgQ/WUfhBPAHVd2lLjG451kii16zJyZrcfrPsQ== 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=usL+cQFr1RAF/b/GUkCkwZDzZa4mqWp9KANG5sLeBEY=; b=IdL2UGf2/qKJumtzKV1rf7H3dRjXcs5IBUSL4Te2AWVNa0gn0irwvnOAn1GcONxNBIzaxuJWNO+VaZIrtoQgqwoRJFai6ijOj5QAbBwexyMhO6xFhQzAQp52JtHSf50B9uR5IIu0LqROeI7XT7h2dN7Bf6M4OpVUSjrrM8dRhEw= Received: from HE1PR05MB3484.eurprd05.prod.outlook.com (10.170.246.12) by HE1PR05MB3449.eurprd05.prod.outlook.com (10.170.248.28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2451.30; Thu, 21 Nov 2019 09:41:48 +0000 Received: from HE1PR05MB3484.eurprd05.prod.outlook.com ([fe80::a9be:aeac:1af4:cfe]) by HE1PR05MB3484.eurprd05.prod.outlook.com ([fe80::a9be:aeac:1af4:cfe%5]) with mapi id 15.20.2451.031; Thu, 21 Nov 2019 09:41:48 +0000 From: Suanming Mou To: Matan Azrad , Slava Ovsiienko CC: "dev@dpdk.org" , "stable@dpdk.org" , Dekel Peled Thread-Topic: [PATCH] net/mlx5: fix incorrect L3 layer chosen in TTL action Thread-Index: AQHVoBwm3OEJv1fZD0Cg3ko1NgNMx6eVPP8AgAAhe5A= Date: Thu, 21 Nov 2019 09:41:47 +0000 Message-ID: References: <1574307071-152513-1-git-send-email-suanmingm@mellanox.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=suanmingm@mellanox.com; x-originating-ip: [60.176.162.220] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 578e496e-ab92-4371-f970-08d76e670764 x-ms-traffictypediagnostic: HE1PR05MB3449:|HE1PR05MB3449: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8273; x-forefront-prvs: 0228DDDDD7 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(396003)(376002)(39860400002)(346002)(136003)(366004)(13464003)(189003)(199004)(55016002)(25786009)(7696005)(107886003)(229853002)(66446008)(66556008)(64756008)(66476007)(66946007)(4326008)(26005)(53546011)(76176011)(76116006)(6506007)(450100002)(86362001)(110136005)(54906003)(8936002)(2906002)(5660300002)(102836004)(14444005)(52536014)(256004)(99286004)(7736002)(446003)(71200400001)(33656002)(11346002)(8676002)(14454004)(71190400001)(186003)(6636002)(81166006)(6436002)(9686003)(6246003)(6116002)(3846002)(316002)(478600001)(74316002)(66066001)(305945005)(81156014); DIR:OUT; SFP:1101; SCL:1; SRVR:HE1PR05MB3449; H:HE1PR05MB3484.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: ukTewSvc3eDL/9KNJRqwRX8V0IKplVFQWbagtSrMrXUHkEl81I852NYqMtGGGmxHFA+Z4xt+NgHuhhqkX6mUVywIuhaQ1OcoLpGJtFoWaqQLr6O5j2eWAc0smXUt2EvnaQBuv0YJaIpD6lmslHSOSsVsX+kEWXhOarYjEniof0E8O6ecnGpaonM6FPjqkjel8hPuRgVkIYZrMZpPsuRto+dMwOhAQG1Q56Vv9sJwKUAGFk13vXwModUivxbHraKZEEgA+fu/9X65LdZn0ClocxTT+nLifkxccQ866sFVN9prLaoEXyTKuZpKZX5HeCFGvxUq/1swRahobnyMe6QxJku5NxByuFR1q/TZHEaGxzOHsDOr+OM2g3WkHcpg27nMvB6bhR81eJUputyhfO/HIu1TqkCfTnEyMbAGoPllrWl3T5HG3Jv6NpKDcQwlf+4H 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: 578e496e-ab92-4371-f970-08d76e670764 X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Nov 2019 09:41:47.8041 (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: /Ncp/TovuLnYlnkcgW1qERjE4AMUu2vpUTOoQTn4pyYKNp5YVh19TbaavjKufaKWG3gsjIIEE+uUM7PCHsj7ng== X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR05MB3449 Subject: Re: [dpdk-stable] [PATCH] net/mlx5: fix incorrect L3 layer chosen in TTL action X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" > -----Original Message----- > From: Matan Azrad > Sent: Thursday, November 21, 2019 3:40 PM > To: Suanming Mou ; Slava Ovsiienko > > Cc: dev@dpdk.org; stable@dpdk.org; Dekel Peled > Subject: RE: [PATCH] net/mlx5: fix incorrect L3 layer chosen in TTL actio= n >=20 >=20 > Hi Mou >=20 > From: Suanming Mou > > For IPINIP flow, there are two L3 layer match pattern items, the inner > > layer follows the outer layer as the latter L3 layer item, the TTL > > action handles the outer layer. > > > > Current the outer and inner L3 layers are both regared as the outer L3 > > layer, it caueses TTL action uses the incorrect latter inner protocal > > in > > flow_dv_convert_action_modify_ttl() for header modifier. > > > > Check former L3 outer layer existence avoid set the incorrect inner > > layer to the flow attr. > > > > Fixes: 4bb14c83df95 ("net/mlx5: support modify header using Direct > > Verbs") > > Cc: dekelp@mellanox.com > > Cc: stable@dpdk.org > > > > Signed-off-by: Suanming Mou > > --- > > drivers/net/mlx5/mlx5_flow_dv.c | 12 ++++++++++-- > > 1 file changed, 10 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/net/mlx5/mlx5_flow_dv.c > > b/drivers/net/mlx5/mlx5_flow_dv.c index c402a8d..7cef5d3 100644 > > --- a/drivers/net/mlx5/mlx5_flow_dv.c > > +++ b/drivers/net/mlx5/mlx5_flow_dv.c > > @@ -84,10 +84,18 @@ > > for (; item->type !=3D RTE_FLOW_ITEM_TYPE_END; item++) { > > switch (item->type) { > > case RTE_FLOW_ITEM_TYPE_IPV4: > > - attr->ipv4 =3D 1; > > + /* > > + * flow_dv_validate() avoids multiple L3 layers case > > + * other than IPINIP. If attr->ipv6 set, ipv4 should > > + * be the IPINIP inner layer. > > + */ > > + if (!attr->ipv6) > > + attr->ipv4 =3D 1; > > break; > > case RTE_FLOW_ITEM_TYPE_IPV6: > > - attr->ipv6 =3D 1; > > + /* If ipv4 set, ipv6 is the IPINIP inner layer. */ > > + if (!attr->ipv4) > > + attr->ipv6 =3D 1; > > break; > > case RTE_FLOW_ITEM_TYPE_UDP: > > attr->udp =3D 1; >=20 > What are about udp\tcp? >=20 > They both can be in outer and inner..... Good catch. Per the command below, the udp tcp should also need to be taken= care in vxlan mode. flow create 0 group 2 ingress pattern ipv4 src is 192.168.1.1 / udp src is= 250 / vxlan vni is 125 / ipv4 src is 192.168.1.2 / tcp src is 135 / end a= ctions set_tp_src port 125 / jump group 3 / end Maybe we need a new patch named "net/mlx5: fix incorrect L3/L4 layer chosen= in tunnel mode". >=20