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 F20A9A04C1; Thu, 21 Nov 2019 08:39:51 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6263A2BAE; Thu, 21 Nov 2019 08:39:50 +0100 (CET) Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-eopbgr130054.outbound.protection.outlook.com [40.107.13.54]) by dpdk.org (Postfix) with ESMTP id 1D2C7271; Thu, 21 Nov 2019 08:39:48 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TrcxSQs2PcoYR7W0u4fZ1bNzOrSUMyOu7Rj7bpeww0u1mq6Xu5x8mpshVKmPVJkxdvvRFY00kkydCLJa+h4vCgkdf0wQ1YUggI5EiXl1c8j+A7Cp9fsf9Beu2jekPjBZvUIY7GuVcNVGhDNkjIuso+6rTXtRJSq5AbDx4ztucyq7I4tRkhYBV5+gH8+acb1+yMmZpu/Ibl5RERDMclsZiBpUDRZev4gJAwrcxVVOO5ovXObOCIw78fzx5hwWSkSCPoiSxsdm/gDfVlztCtsGtNX9b0x5rQOQwFUxIA3viltbubL1kC8z90eKHWPHmWJnwQjiQlITLZrsdffgr5YMfA== 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=vujFkFmJUW2cx0M7m5jv82ejMwbXFgQPfPbxHrO5Dhw=; b=ZWXJmbZTDS5d8bvZmcEUTeln4s9tct3uyw+KY+7N/JCrLPWYA6yo20wZuwNWacs+cuwKSGHuL8y1ykrFvkHED/f5ue3XsLkUs3iSvFxVYnEK2BA/LX9ZwGGB2Ei0w6bd3CBYnkwfnr3f00WmSVDjo7jUgYUNUUKioG7YlrHEiSP3JV9t20MX/iYaFU4CX32p6hGFzgaQ+RSSms3RxXwB+zpXu4ZIs/z8ec5wCYMbDFEinmjHFo3+Zb4DpqNCG+YMjqUfj+HiULV9gWl+66bVEFq1/lu9S0GrL+eAZOIN3QqUraM6TDB1/XIv1OWYctK50iHZNfcjc4ANapiqp6ESeQ== 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=vujFkFmJUW2cx0M7m5jv82ejMwbXFgQPfPbxHrO5Dhw=; b=cpgrc3jDdxFcRyMuaqZ8V6wK6iDoxMTUbmbKZu9orJdrj6n+c6vLE5L9ywshwquRa4xSZbzGCZw6YjcoKg6SXek0w4hWyVN8ymxlZnqfyeYVnDsRqVhlDez1hbtPZUvioM4cb6PklnrZgK2eKeovVuGbu2boYao/dyFdmwB+FZ4= Received: from DB3PR0502MB4028.eurprd05.prod.outlook.com (52.134.68.143) by DB3PR0502MB4043.eurprd05.prod.outlook.com (52.134.68.12) 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 07:39:47 +0000 Received: from DB3PR0502MB4028.eurprd05.prod.outlook.com ([fe80::7962:469c:60d5:ffd0]) by DB3PR0502MB4028.eurprd05.prod.outlook.com ([fe80::7962:469c:60d5:ffd0%6]) with mapi id 15.20.2451.031; Thu, 21 Nov 2019 07:39:47 +0000 From: Matan Azrad To: Suanming Mou , 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: AQHVoBwm3OEJv1fZD0Cg3ko1NgNMx6eVPP8A Date: Thu, 21 Nov 2019 07:39:47 +0000 Message-ID: References: <1574307071-152513-1-git-send-email-suanmingm@mellanox.com> In-Reply-To: <1574307071-152513-1-git-send-email-suanmingm@mellanox.com> Accept-Language: en-US, he-IL Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=matan@mellanox.com; x-originating-ip: [193.47.165.251] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: b84dabae-0c4d-4f93-87f0-08d76e55fbc6 x-ms-traffictypediagnostic: DB3PR0502MB4043:|DB3PR0502MB4043: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7219; x-forefront-prvs: 0228DDDDD7 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(376002)(346002)(39860400002)(136003)(396003)(366004)(189003)(199004)(81166006)(81156014)(107886003)(8936002)(2906002)(8676002)(450100002)(66476007)(66946007)(71190400001)(66446008)(66066001)(6636002)(76116006)(4326008)(71200400001)(66556008)(6246003)(74316002)(478600001)(33656002)(64756008)(5660300002)(6506007)(9686003)(52536014)(25786009)(102836004)(99286004)(14454004)(86362001)(76176011)(55016002)(446003)(11346002)(7696005)(256004)(6436002)(14444005)(6116002)(3846002)(7736002)(305945005)(26005)(186003)(54906003)(110136005)(229853002)(316002); DIR:OUT; SFP:1101; SCL:1; SRVR:DB3PR0502MB4043; H:DB3PR0502MB4028.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: NjPkDopuI9AXNkiH9klIPkJ10/wtLinw2GTJbQTQI15YehcBjuA4crnBj0k6caHspFntt31Yz46hkVu7p6828X39HhAnO9/U2ol+fGNxxbiRC8GebSKliQiFl5GfsgT69dhR8AOhFBqSrTZf9CrHw5gPpilyLnUHKA2FMWV1t9/fv2L60E3vzI3Jc2RLePu2bevucXPOyI9DIeezZLG8EggWUQcy9Xt9MrD1Hg3BeDkQWH7d5JUS4fEL1ej4/bhDWXs72hkd6DC90rHsuRaR7Ds1kUlVAjocWOpsrjzv0hgS6EBhlx9WIoiqf1B/9AyfBNwpbgACj0BckcpZXiemQYM7WDsRx2FtlI6IgMeTS7U/w4TsLYbpvjohecEOJaC9TO/bQJRkNTGv83uXikbBRibz/Z4JFpJWsO0gwIzNruJcOXaD71eFs3JcEiQn3xl4 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: b84dabae-0c4d-4f93-87f0-08d76e55fbc6 X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Nov 2019 07:39:47.1262 (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: qCAFhBOQHmhmlnwARW0tZLbMcjrTrgBwjCiOmdn08vbJhR5l792GkykJJoJuVLhxQW6biNIaiW9ul87OFm4sUw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB3PR0502MB4043 Subject: Re: [dpdk-dev] [PATCH] net/mlx5: fix incorrect L3 layer chosen in TTL action 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 Mou From: Suanming Mou > For IPINIP flow, there are two L3 layer match pattern items, the inner la= yer > follows the outer layer as the latter L3 layer item, the TTL action handl= es the > outer layer. >=20 > Current the outer and inner L3 layers are both regared as the outer L3 la= yer, > it caueses TTL action uses the incorrect latter inner protocal in > flow_dv_convert_action_modify_ttl() for header modifier. >=20 > Check former L3 outer layer existence avoid set the incorrect inner layer= to > the flow attr. >=20 > Fixes: 4bb14c83df95 ("net/mlx5: support modify header using Direct Verbs"= ) > Cc: dekelp@mellanox.com > Cc: stable@dpdk.org >=20 > Signed-off-by: Suanming Mou > --- > drivers/net/mlx5/mlx5_flow_dv.c | 12 ++++++++++-- > 1 file changed, 10 insertions(+), 2 deletions(-) >=20 > 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; What are about udp\tcp? They both can be in outer and inner.....