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 DA3E2A054F; Tue, 18 Feb 2020 13:01:52 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 113C11D513; Tue, 18 Feb 2020 13:01:52 +0100 (CET) Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-eopbgr80080.outbound.protection.outlook.com [40.107.8.80]) by dpdk.org (Postfix) with ESMTP id 6E9691C2EA; Tue, 18 Feb 2020 13:01:50 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cpZHAnqOc5wkzzoxk8KZhai8LgEuXaYo2L7loeyMCJwcxsmZRhlt54qWBPoK9sQcAcVhoTWDf2XPbR3zk62t014RA7bwnzJEwqzy74bvOpq2qwarjwuH/4Zz3BEZRcR6zhraTEbnzytP+tbKOkPWYPKIj2N7FSioS+HycWbBhtGeR6xa8NOjFjrG8UdmTriDha3iDkmMJIiKbNyQhqppQNLMPghjx/atrXYdleWh6qpch7Vcaz5LwaWAc19lNRnLsw9nnwXc6iEeWF5qGjvLrQqDo2+Z6LyXuGPIieVoDsnLz+m/nqjj0bjcKUUjxJ3BiRMkLFHcLGNhBh++fKxc4A== 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=rcxDIV3z9anNrWSqCmZohxaOPSrBD1NFkuKyQKOeq3U=; b=oVC3WluCDCo0BsfGBsFY7pTZX+mirXD5A82Nt84vA+7iMnlXo+CLfIPJ7+d0x4VnAzkG7eSmeEeR23uts0rwt6mfQUtrzGz3iXrrlCvX8/xdGQxS/3Pmnju42Je63VBYaAlVtGzC1YpOS2pDHDWYVDjFaFOGSvyAKXuK2AxYptkV9iJn+EfOHT3ThgR4RDGoKmbtovNWC8ljLNFlzsfwgYzSeUKqj0j0lfuELKHvwkmmscUcsThklGcExnkhq9N5r1UV27u10jAoVia5TrlHWj4Dt3a/oxQ4Eb9gThIHfeDo5iDkBHHfMUl4ERuK5BnPR54WGzYz3Rw/Wiq2w9vDBQ== 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=rcxDIV3z9anNrWSqCmZohxaOPSrBD1NFkuKyQKOeq3U=; b=Piq+LsmLPtee/8gMs6/IaEl1WwYja/6vfoQZERtRpuuIXw8HFxQHUo88kyFR2sNbrmiF71B2d14bSZ0x5UEIvHDer2X5zKJ1vGmBOQVhpur4zv8jYheKwyj4FKFH4U63UjuwjNFSt9j5MsgS55fwtYyUI1Z2V/lbih6woj9/H6Q= Received: from AM0PR05MB6707.eurprd05.prod.outlook.com (10.186.174.145) by AM0PR05MB5330.eurprd05.prod.outlook.com (20.178.18.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2729.24; Tue, 18 Feb 2020 12:01:49 +0000 Received: from AM0PR05MB6707.eurprd05.prod.outlook.com ([fe80::adbd:45ca:54:bba9]) by AM0PR05MB6707.eurprd05.prod.outlook.com ([fe80::adbd:45ca:54:bba9%7]) with mapi id 15.20.2750.016; Tue, 18 Feb 2020 12:01:49 +0000 From: Raslan Darawsheh To: Matan Azrad , "dev@dpdk.org" CC: Slava Ovsiienko , "stable@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] net/mlx5: fix tunnel flow priority Thread-Index: AQHV4m4DQVFHSxv4X0WFafcwYdDiEqgg4QFQ Date: Tue, 18 Feb 2020 12:01:49 +0000 Message-ID: References: <1581599005-3577-1-git-send-email-matan@mellanox.com> In-Reply-To: <1581599005-3577-1-git-send-email-matan@mellanox.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=rasland@mellanox.com; x-originating-ip: [212.29.221.74] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: e6565719-eb1a-4354-abcc-08d7b46a55ad x-ms-traffictypediagnostic: AM0PR05MB5330:|AM0PR05MB5330: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7219; x-forefront-prvs: 031763BCAF x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(366004)(396003)(136003)(39860400002)(346002)(376002)(189003)(199004)(8936002)(33656002)(71200400001)(478600001)(81166006)(81156014)(2906002)(53546011)(8676002)(6506007)(26005)(186003)(54906003)(110136005)(316002)(76116006)(9686003)(5660300002)(52536014)(66946007)(66556008)(64756008)(66446008)(66476007)(7696005)(4326008)(55016002)(450100002)(86362001); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR05MB5330; H:AM0PR05MB6707.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: Apubpuz9UE+xF4RiBlduMp5TglRth0Cczl8Zgvx+bsr1d9bVIWDsGwj7LiO21ovIWTk9E80NZGk1R3uFQn1aJGAEh9VjetMSRY4yf3Cz9DlqEl+rYXE5IlaXdolb9TwOJxhS63WMTkzjSysdkY2m5Ndqkri27N+rWnvmR96mPyXPI0R2AbNYLgwoWQWZ5Nc5c7CfeFRhZDe/N7WmZDWL92lZpa4cc/D3lxzxLtoX/YuA4lsmu/gfCLQvcCmyF45agS5XKf97/XRVRUpuDUTyu17agukzxQQAFEQnBj7GuCDCaTSp1wwH5eIZ9IZN3QcSEYOMC0ycLHfhRXeqp9O92967h2dOIRGz7VPFEL6AUi0BVLBeTebFgLkviwDINzC18aE7HenvQPZDCoZl+FXWhm2VE9Eqf4hxLlaBajVJOY5DeMDIa/5sqLn3k55CcHZN x-ms-exchange-antispam-messagedata: 0ZAYjnFSefyOHBUXnPuqIh8A5a33JYfyzEKUYCP6NYpK2Rm058kTZyDm+aiAplO+Cizfy+OMTJhIuFmkdiL333FlckenEVoY4CLKd4HPur8JsCwegLGFumX3ZXML4wg5afSkVYpc7BtnL1KxJ9wpTg== 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: e6565719-eb1a-4354-abcc-08d7b46a55ad X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Feb 2020 12:01:49.2376 (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: mnRWRleGkz9gIbyg+ufDF9DGPKTHeOEyDLgcwpAXTKfpJSZbTgFmJ8mGzemWh+H+DWh7m7ztFBOfT3Rm/HCIsQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR05MB5330 Subject: Re: [dpdk-dev] [PATCH] net/mlx5: fix tunnel flow priority 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, > -----Original Message----- > From: dev On Behalf Of Matan Azrad > Sent: Thursday, February 13, 2020 3:03 PM > To: dev@dpdk.org > Cc: Slava Ovsiienko ; stable@dpdk.org > Subject: [dpdk-dev] [PATCH] net/mlx5: fix tunnel flow priority >=20 > The PMD manages internally the priority of the flows in addition to the > user configured priority. >=20 > So, 2 flows with the same user priority may get different priority. >=20 > The method: > As much as the flow is more specific it gets higher priority > (higher means first to be matched). >=20 > In addition, When the user creates a RSS flow the PMD splits the flows > according to the flow RSS layers as the HW requests for RSS TIR. > The internal priority for each flow is decided by the flow last layer. > L2, L3 and L4 (L2 low and L4 high). >=20 > The tunnel layer was wrongly decided to be L4 all the time, even when > the flow is configured with inner-RSS. >=20 > Hence, the first RSS split which takes the tunnel layer priority all the > time will be matched before the more specific splits. >=20 > Change the priority of tunnel layer to be L2 when inner-RSS is > configured. >=20 > Fixes: d4a405186b73 ("net/mlx5: support tunnel RSS level") > Cc: stable@dpdk.org >=20 > Signed-off-by: Matan Azrad > Acked-by: Ori Kam > --- > drivers/net/mlx5/mlx5_flow_dv.c | 14 ++++++++++++++ > 1 file changed, 14 insertions(+) >=20 > diff --git a/drivers/net/mlx5/mlx5_flow_dv.c > b/drivers/net/mlx5/mlx5_flow_dv.c > index a9bb0b4..a8c8a58 100644 > --- a/drivers/net/mlx5/mlx5_flow_dv.c > +++ b/drivers/net/mlx5/mlx5_flow_dv.c > @@ -7620,6 +7620,8 @@ struct field_modify_info modify_tcp[] =3D { > case RTE_FLOW_ITEM_TYPE_GRE: > flow_dv_translate_item_gre(match_mask, > match_value, > items, tunnel); > + matcher.priority =3D flow->rss.level >=3D 2 ? > + MLX5_PRIORITY_MAP_L2 : > MLX5_PRIORITY_MAP_L4; > last_item =3D MLX5_FLOW_LAYER_GRE; > break; > case RTE_FLOW_ITEM_TYPE_GRE_KEY: > @@ -7630,27 +7632,37 @@ struct field_modify_info modify_tcp[] =3D { > case RTE_FLOW_ITEM_TYPE_NVGRE: > flow_dv_translate_item_nvgre(match_mask, > match_value, > items, tunnel); > + matcher.priority =3D flow->rss.level >=3D 2 ? > + MLX5_PRIORITY_MAP_L2 : > MLX5_PRIORITY_MAP_L4; > last_item =3D MLX5_FLOW_LAYER_GRE; > break; > case RTE_FLOW_ITEM_TYPE_VXLAN: > flow_dv_translate_item_vxlan(match_mask, > match_value, > items, tunnel); > + matcher.priority =3D flow->rss.level >=3D 2 ? > + MLX5_PRIORITY_MAP_L2 : > MLX5_PRIORITY_MAP_L4; > last_item =3D MLX5_FLOW_LAYER_VXLAN; > break; > case RTE_FLOW_ITEM_TYPE_VXLAN_GPE: > flow_dv_translate_item_vxlan_gpe(match_mask, > match_value, items, > tunnel); > + matcher.priority =3D flow->rss.level >=3D 2 ? > + MLX5_PRIORITY_MAP_L2 : > MLX5_PRIORITY_MAP_L4; > last_item =3D MLX5_FLOW_LAYER_VXLAN_GPE; > break; > case RTE_FLOW_ITEM_TYPE_GENEVE: > flow_dv_translate_item_geneve(match_mask, > match_value, > items, tunnel); > + matcher.priority =3D flow->rss.level >=3D 2 ? > + MLX5_PRIORITY_MAP_L2 : > MLX5_PRIORITY_MAP_L4; > last_item =3D MLX5_FLOW_LAYER_GENEVE; > break; > case RTE_FLOW_ITEM_TYPE_MPLS: > flow_dv_translate_item_mpls(match_mask, > match_value, > items, last_item, tunnel); > + matcher.priority =3D flow->rss.level >=3D 2 ? > + MLX5_PRIORITY_MAP_L2 : > MLX5_PRIORITY_MAP_L4; > last_item =3D MLX5_FLOW_LAYER_MPLS; > break; > case RTE_FLOW_ITEM_TYPE_MARK: > @@ -7692,6 +7704,8 @@ struct field_modify_info modify_tcp[] =3D { > case RTE_FLOW_ITEM_TYPE_GTP: > flow_dv_translate_item_gtp(match_mask, > match_value, > items, tunnel); > + matcher.priority =3D flow->rss.level >=3D 2 ? > + MLX5_PRIORITY_MAP_L2 : > MLX5_PRIORITY_MAP_L4; > last_item =3D MLX5_FLOW_LAYER_GTP; > break; > default: > -- > 1.8.3.1 Patch applied to next-net-mlx, Kindest regards, Raslan Darawsheh