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 039D8A0528; Mon, 20 Jan 2020 15:03:24 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9F64B3576; Mon, 20 Jan 2020 15:03:23 +0100 (CET) Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70079.outbound.protection.outlook.com [40.107.7.79]) by dpdk.org (Postfix) with ESMTP id 746F0343C; Mon, 20 Jan 2020 15:03:22 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=T8P7763sbMhgDTUf6cIM/MYHzBI5UtT08ZazEcratvoRUGxTIiwIem2gHNlKx4S3b+VtuAWdfokLPjvojD7U86JDk+Qmm9X4qHToyUfU24Jkn3+TwTNbh4IINfxa7b2wbicPrw7WzY2VS7BkgZNw+sYOEuGs8gAWFf9h6vV9jO/+QFNcY+A8pV25tmjB3gSHpUyk3jexxHaP6csE+ss7SSlMzB1IErKhp3SOtBMa8dqNhcju3c/54f74mtcFXFeaLvR7Ybeveie0TOjo8N9ONVB0NpM1VKO5QOcfwR7oj1tpQohRQ7KIvvZg2FHeTPo4L3mXihoAczfh/y2KVElmUw== 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=Xlp0XkxAQ8+d9OoSKW0umuGlyTp+GSHi6qYNdtqrgdQ=; b=NLGhFmeGgIcUfFAPfkE74EpmNbmdsw/IO8j5cn58vhLTHvvrzZEnDmpWZc7TFJLGYVjdKWGEMbQda8byReEZqhmdiQw3J0IZHTbWPsjI4c+UNU+96V2aAydhmKeh82xYfbQsvoALeijaMVozTuzkZfA1roOk/DvFruZ0jJaIR02+LeYc34sILhjg08M8bU+CSFV+Czh6XbNFnoGwyJZ1RsjBfudWOjgHwM11T5mgt/Qv5ig7ZE1fqOHVjxNaAJsugkJUDkRKkzN/h6/VaKCgri1pypmjWxXih/x6ImtL22TkpHlG2Z/Sub40X6c9CY57NN6s0KrLMq5lppk/qWO1eA== 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=Xlp0XkxAQ8+d9OoSKW0umuGlyTp+GSHi6qYNdtqrgdQ=; b=YSpN/MAedJHviLDCvpkMYbdWcJPiNo/Bms0z/tejFP5FRiMjNiJZ+dNbcBqZlL/CEmq22ydbUpy7N1Y6P8cWQBcGBvIz5xCz07r8pu52xizJbiq8+R3VcUBu3usKjyz1IJuVhqDXoSVG3LXWJ2pr1qmhcQNZKMKYij5WBxS/EPA= Received: from AM0PR05MB6707.eurprd05.prod.outlook.com (10.186.174.145) by AM0PR05MB5618.eurprd05.prod.outlook.com (20.178.112.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2644.22; Mon, 20 Jan 2020 14:03:21 +0000 Received: from AM0PR05MB6707.eurprd05.prod.outlook.com ([fe80::f0b7:a92b:aeb5:5761]) by AM0PR05MB6707.eurprd05.prod.outlook.com ([fe80::f0b7:a92b:aeb5:5761%5]) with mapi id 15.20.2644.026; Mon, 20 Jan 2020 14:03:21 +0000 From: Raslan Darawsheh To: Suanming Mou , Matan Azrad , Shahaf Shuler , Slava Ovsiienko CC: "dev@dpdk.org" , "xiangxia.m.yue@gmail.com" , "stable@dpdk.org" Thread-Topic: [PATCH v2] net/mlx5: fix incorrect pointer operation in meter Thread-Index: AQHVxhApMBV0IJTWPEOwSDVrhNrU8KfzqIMg Date: Mon, 20 Jan 2020 14:03:21 +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=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: 72712d1b-930d-4087-92f0-08d79db1823c x-ms-traffictypediagnostic: AM0PR05MB5618:|AM0PR05MB5618: 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)(39860400002)(366004)(376002)(346002)(136003)(396003)(199004)(189003)(64756008)(66556008)(316002)(2906002)(4326008)(6636002)(76116006)(66946007)(66476007)(186003)(5660300002)(66446008)(478600001)(7696005)(52536014)(110136005)(9686003)(81156014)(86362001)(53546011)(6506007)(8936002)(8676002)(71200400001)(26005)(55016002)(81166006)(33656002)(54906003); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR05MB5618; H:AM0PR05MB6707.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: yUaoaM0hTyDRCsBYNvQe5qGwX9IHkpj5SCgHlXpBmm8ZJIQuMQdK9DAQqxLgqdzCS534xVba/pVvG63I2pA1v2qoNNzW9Etjx8z1GqG1zT340GPh07ebfag20zqghYp7qg1AVahmcGXvNGtm+pCWfkSWivZ06ElB2X1uIkjYnNbKbbR723tELm9+LkVwH5NBuH9KKx4XEQYQzsU71K3t2VrbJuuAmC2e3XagLaUpsEn81V00JccK6Sxzy6XE5ehy4LmTDmmNKCh3FWMmof6LXsRLmPGN77YqhYgM05Ut41jV27pxihi4SCPrk2xrV3FHlum3mQ6PkMhFmTLYJtnEsr/9K6x2FxqaQRwqd7i+4SG6NhKYbtl2dcSRK6zeiDgb5ADuO3YCqcsMSmGIsT86x2WSEKVyyrYpE7AIvNaqSVmYFxwdiUJnsK2Cn+Mv75XY 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: 72712d1b-930d-4087-92f0-08d79db1823c X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Jan 2020 14:03:21.4381 (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: HnqIbqIRkJCSrACgm3Lyo7TJGq8nh805bHdRHAs4QBIZjdK1GrrYpAiA9EhGEwHoFghmnucLsQ3mycGpWirP/Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR05MB5618 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" Hi, > -----Original Message----- > From: Suanming Mou > Sent: Wednesday, January 8, 2020 12:41 PM > 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 fixed value. The incorrect operation will cause incorrect match to > the meter suffix 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 > the issue. >=20 > Fixes: 9ea9b049a960 ("net/mlx5: split meter flow") > Cc: stable@dpdk.org >=20 > Signed-off-by: Suanming Mou > Reported-by: Tonghao Zhang > --- >=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 Patch applied to next-net-mlx, Kindest regards, Raslan Darawsheh