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 D12EEA0521; Mon, 20 Jan 2020 14:08:27 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 963941252; Mon, 20 Jan 2020 14:08:27 +0100 (CET) Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-eopbgr80041.outbound.protection.outlook.com [40.107.8.41]) by dpdk.org (Postfix) with ESMTP id DEF7D11A4; Mon, 20 Jan 2020 14:08:25 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HTLDMCOg+xCWwg4whMrmwvXgXSwo1b8rO/bHsSnQdUP2n1r/Ne69eSKIXt/wfN2HnLKj1p4WK3WZEQ6oYkH3VuMyEz7eW+usR1gd7do5LFaHQe48d15PoMNfHKy3Plqy+wh2cJhi6uML9UkMMwtqTqO7POgiyY5usuT99jWSEjzPpVeXugFFIFzZ46E84NHxziC8LChgwsjFBxgiwkR/dK9pf+BNJMcaWhNJOMf8nDzYdwHADnuSn5QicqdD/aGbD/hTOcN6PnBQu//p0/toLbkb00cr7ysAPk8d+ilQeGUSIfhUd2jkHWObo6aBQshmj/eOB2HWRdMTRtAjjh8xiw== 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=voG7EG0D6Qzmnk3+QKbV9GvjfBytJ3HzQ9b0gRk/IBU=; b=Q4xs7NVeTFl7qx6QKrbRd+XtJObOtaM6rrobT3Cyu0cXnvKgzFI7T1/qxdy6lgzjxOlHggC/3P0nTkaTeMkGGFZxWSHvIzdVcNsSXGTaEecpgGUgqYP8lVLE8jNPtjuZ2gppcEORNmRUq18ARFuEhhrVwhc5j187WPa8n0rL43rEcm0/6mtlOwyh3kUP+DbtyNqJc/gDwJb2I+2qzFXqd8HJGMKkYYdjMe9Tox3BqXsJVZrUDf0pj5qdr1HaVtAshvA+wecmRmg3tv8bnHnS8+4pQMjO4n6bxHgwL7ysO6lkAtKR0q6eJGnkIHBaV0oXEjBYhxbEhxVvCagJEckCpA== 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=voG7EG0D6Qzmnk3+QKbV9GvjfBytJ3HzQ9b0gRk/IBU=; b=o4WhHkp+YSDUWI686f+1gad0uY/9ZtewMOPIAvZNcmMPWa3f5+87x1pK9+qle3ATCIZfBVtnf5oKwAxlmtsIdJiEUkE5P3XtjyxdRqjc5HraDleXlO/lnVM0uqFeC+TnEYG74JlT3obB6FZy5eSjPYPtQwZWAPv5mNLxhFILrH0= Received: from AM4PR05MB3265.eurprd05.prod.outlook.com (10.171.188.154) by AM4PR05MB3316.eurprd05.prod.outlook.com (10.171.187.13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2644.20; Mon, 20 Jan 2020 13:08:25 +0000 Received: from AM4PR05MB3265.eurprd05.prod.outlook.com ([fe80::68eb:ad79:71f4:110f]) by AM4PR05MB3265.eurprd05.prod.outlook.com ([fe80::68eb:ad79:71f4:110f%3]) with mapi id 15.20.2644.024; Mon, 20 Jan 2020 13:08:25 +0000 From: Slava Ovsiienko To: Suanming Mou , Matan Azrad , Shahaf Shuler CC: "dev@dpdk.org" , "xiangxia.m.yue@gmail.com" , Raslan Darawsheh , "stable@dpdk.org" Thread-Topic: [PATCH v2] net/mlx5: fix incorrect pointer operation in meter Thread-Index: AQHVxhApNFD613a8rkOsHt7rUymd36fzmTAg Date: Mon, 20 Jan 2020 13:08:24 +0000 Message-ID: References: <1578387392-114282-1-git-send-email-suanmingm@mellanox.com> <1578480070-160606-1-git-send-email-suanmingm@mellanox.com> In-Reply-To: <1578480070-160606-1-git-send-email-suanmingm@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=viacheslavo@mellanox.com; x-originating-ip: [77.75.144.194] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: a661dd3b-7d99-45b1-2b86-08d79da9d550 x-ms-traffictypediagnostic: AM4PR05MB3316:|AM4PR05MB3316: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtFwd x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:628; x-forefront-prvs: 0288CD37D9 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(376002)(39860400002)(346002)(136003)(396003)(366004)(199004)(189003)(53546011)(6506007)(66946007)(64756008)(66556008)(52536014)(54906003)(55016002)(66476007)(110136005)(71200400001)(86362001)(66446008)(7696005)(33656002)(76116006)(8676002)(81156014)(5660300002)(186003)(478600001)(8936002)(81166006)(2906002)(26005)(6636002)(9686003)(4326008)(316002); DIR:OUT; SFP:1101; SCL:1; SRVR:AM4PR05MB3316; H:AM4PR05MB3265.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX: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: 0JP06MljcOknrPMCvAs9lzUMyBSwXZUH5XEfxTPkgdgk+njG7JbTjamAOr9BnXi7S7QkaSPePvsFpSEm/D/PEeVlMvefnap2QIeQTTfrqBkoLtAlQ/unEqNeLMm1xxBURJWal7PBkfimzsmQcisTZAsNvXUhmmZ4mwTvyIKbIE5oSEwjP3ZgdH3PQXxPQ7I47lO0FXzHvrAoyXjjNBA6T6IeWXDVowWpWoXF8fc3RJX4nJNGtWAx1tiRj53JIFaAM29v9oEBIrWoF1LsUXrHS0UbB77vCPeRgKkng+ukXRUQ2E043cxHxwTFcwGqqkOlcxv1/Q6EUqgArRrKn4ARtrV6qyzUUmpJ479m2K1H015YtjP/Ct4YLKnZFOILf6613xGffwaAldv9NN4YXmHbGGhs03nm39+IaxuGY9kLOr/t14EO6E1b/4fRnvPXDqk1 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: a661dd3b-7d99-45b1-2b86-08d79da9d550 X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Jan 2020 13:08:24.9069 (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: swixiV+3ARSrbD1epe3cjnhELbGdadk0/nd499guAneOynzKWBLtZIptqNgCNt7bhR8xtMYfUmh5pwfL8jN+E8Yjh/G8gESmuPuxy+g7xdE= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR05MB3316 Subject: Re: [dpdk-dev] [PATCH v2] net/mlx5: fix incorrect pointer operation in meter 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" > -----Original Message----- > From: Suanming Mou > Sent: Wednesday, January 8, 2020 12:41 > To: Matan Azrad ; Shahaf Shuler > ; Slava Ovsiienko > Cc: dev@dpdk.org; xiangxia.m.yue@gmail.com; Raslan Darawsheh > ; stable@dpdk.org > Subject: [PATCH v2] net/mlx5: fix incorrect pointer operation in meter >=20 > The meter suffix flow item pointer restore is not correct to decrease a f= ixed > value. The incorrect operation will cause incorrect match to the meter su= ffix > flow, the flow create will fail once the magic number in the wrong offset > memory start with RTE_FLOW_ITEM_TYPE_END. > The pointer should decrease the real offset it increases. >=20 > Set the decrease value to the real offset the pointer increases to fix th= e issue. >=20 > Fixes: 9ea9b049a960 ("net/mlx5: split meter flow") > Cc: stable@dpdk.org >=20 > Signed-off-by: Suanming Mou > Reported-by: Tonghao Zhang Acked-by: Viacheslav Ovsiienko > --- >=20 > v2: commit message adjust. >=20 > --- > drivers/net/mlx5/mlx5_flow.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c > index cb9d265..52ffcb2 100644 > --- a/drivers/net/mlx5/mlx5_flow.c > +++ b/drivers/net/mlx5/mlx5_flow.c > @@ -4037,7 +4037,7 @@ uint32_t mlx5_flow_adjust_priority(struct > rte_eth_dev *dev, int32_t priority, > sfx_items++; > } > sfx_items->type =3D RTE_FLOW_ITEM_TYPE_END; > - sfx_items -=3D METER_SUFFIX_ITEM; > + sfx_items -=3D sfx_port_id_item ? 2 : 1; > /* Setting the sfx group atrr. */ > sfx_attr.group =3D sfx_attr.transfer ? > (MLX5_FLOW_TABLE_LEVEL_SUFFIX - 1) : > -- > 1.8.3.1