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 9EC46A04BC for ; Sat, 10 Oct 2020 00:03:48 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 15D131D6A5; Sat, 10 Oct 2020 00:03:19 +0200 (CEST) Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by dpdk.org (Postfix) with ESMTP id C9A5D1D66F for ; Sat, 10 Oct 2020 00:03:09 +0200 (CEST) Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20201009220259euoutp02e0b6d94036c89ec03f45e100b6f2a0a4~8cg-OIDad1685816858euoutp02t for ; Fri, 9 Oct 2020 22:02:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20201009220259euoutp02e0b6d94036c89ec03f45e100b6f2a0a4~8cg-OIDad1685816858euoutp02t DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1602280979; bh=1Px3vlBp24aI4tqkdpolnyQ52wyBpb+Nn7D22MHq1OM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=P6vbOMwg4Y5aSUgVY4fGzMfDftE8wYNZHM8toKo5SdguoosfUf3lriOrclSRH76Ic 3uwPiFYCSUMintIt6jZg5SzoU24zVj6AS0sU4mivESeSszGaUlR/BOl0P3fCb4IBKu zTEAVMf8sxJdDrmY+PWqeo71O10T4/QsmpzEQeTo= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20201009220253eucas1p2201e6b8e48adf9c28731069640bafc44~8cg5qwIMI1628316283eucas1p2L; Fri, 9 Oct 2020 22:02:53 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id 74.88.05997.D0ED08F5; Fri, 9 Oct 2020 23:02:53 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20201009220253eucas1p14078ab159186d2c26e787b3b2ed68062~8cg5MLI7p1072710727eucas1p1o; Fri, 9 Oct 2020 22:02:53 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20201009220253eusmtrp22cce8f06f25b70cbb7d8c49f5b8e259d~8cg5LpjSh1642116421eusmtrp2k; Fri, 9 Oct 2020 22:02:53 +0000 (GMT) X-AuditID: cbfec7f4-65dff7000000176d-0a-5f80de0d8e6e Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id B4.5F.06017.D0ED08F5; Fri, 9 Oct 2020 23:02:53 +0100 (BST) Received: from Padamandas.fritz.box (unknown [106.210.88.70]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20201009220252eusmtip1e33b15bf3bede05e0242bc829324b4cb~8cg4j7CSJ1990219902eusmtip1K; Fri, 9 Oct 2020 22:02:51 +0000 (GMT) From: Lukasz Wojciechowski To: David Hunt , Bruce Richardson Cc: dev@dpdk.org, l.wojciechow@partner.samsung.com, stable@dpdk.org Date: Sat, 10 Oct 2020 00:01:59 +0200 Message-Id: <20201009220202.20834-13-l.wojciechow@partner.samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201009220202.20834-1-l.wojciechow@partner.samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrKIsWRmVeSWpSXmKPExsWy7djP87q89xriDV6dVrO4screom/SRyaL d5+2M1k861nHaPGv4w+7A6vHrwVLWT0W73nJ5HHw3R6mAOYoLpuU1JzMstQifbsEroztq2cw Fqzgqthy9zxbA+Mqji5GTg4JAROJm9cbmEBsIYEVjBLPJhV2MXIB2V8YJebv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gAVs8JEt+1jAXinEZGiS0HXjJPYORbwMiwilEktbQ4Nz232EivODG3uDQvXS85 P3cTIzAQtx37uWUHY9e74EOMAhyMSjy8GokN8UKsiWXFlbmHGCU4mJVEeJ3Ono4T4k1JrKxK LcqPLyrNSS0+xGgKdNVEZinR5HxglOSVxBuaGppbWBqaG5sbm1koifN2CByMERJITyxJzU5N LUgtgulj4uCUamBMP3aNtcDXplJo2rHDsuuUF8Yc6bm//Gj9n6NrJ9Q/3Xrn3yyL9mL73N+n jON0kl7IebXsubxPVPuU1/WUiJ5/k5kSVb7JBkYf13GYE//Oq2yBK+9VD6OnQcVVnvkSN5O9 vVh+6HY0V0e2c83R3M+lP9/hks+BdWHrT+9ZHMGepio1b7Hq+39KLMUZiYZazEXFiQC6U9NZ WgIAAA== X-CMS-MailID: 20201009220253eucas1p14078ab159186d2c26e787b3b2ed68062 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20201009220253eucas1p14078ab159186d2c26e787b3b2ed68062 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20201009220253eucas1p14078ab159186d2c26e787b3b2ed68062 References: <20201008052323.11547-1-l.wojciechow@partner.samsung.com> <20201009220202.20834-1-l.wojciechow@partner.samsung.com> Subject: [dpdk-stable] [PATCH v6 12/15] distributor: fix scalar matching 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" Fix improper indexes while comparing tags. In the find_match_scalar() function: * j iterates over flow tags of following packets; * w iterates over backlog or in flight tags positions. Fixes: 775003ad2f96 ("distributor: add new burst-capable library") Cc: david.hunt@intel.com Cc: stable@dpdk.org Signed-off-by: Lukasz Wojciechowski Acked-by: David Hunt --- lib/librte_distributor/rte_distributor.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/librte_distributor/rte_distributor.c b/lib/librte_distributor/rte_distributor.c index 9fd7dcab7..4bd23a990 100644 --- a/lib/librte_distributor/rte_distributor.c +++ b/lib/librte_distributor/rte_distributor.c @@ -261,13 +261,13 @@ find_match_scalar(struct rte_distributor *d, for (j = 0; j < RTE_DIST_BURST_SIZE ; j++) for (w = 0; w < RTE_DIST_BURST_SIZE; w++) - if (d->in_flight_tags[i][j] == data_ptr[w]) { + if (d->in_flight_tags[i][w] == data_ptr[j]) { output_ptr[j] = i+1; break; } for (j = 0; j < RTE_DIST_BURST_SIZE; j++) for (w = 0; w < RTE_DIST_BURST_SIZE; w++) - if (bl->tags[j] == data_ptr[w]) { + if (bl->tags[w] == data_ptr[j]) { output_ptr[j] = i+1; break; } -- 2.17.1