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 C0038A04B1 for ; Sat, 10 Oct 2020 18:06:40 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 309DE1D978; Sat, 10 Oct 2020 18:06:07 +0200 (CEST) Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by dpdk.org (Postfix) with ESMTP id CFD0C1D955 for ; Sat, 10 Oct 2020 18:06:05 +0200 (CEST) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20201010160554euoutp02a610d0ddcbbb00c9d8f72e7dcb91b0ae~8rSf7_ZqW1807318073euoutp02d for ; Sat, 10 Oct 2020 16:05:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20201010160554euoutp02a610d0ddcbbb00c9d8f72e7dcb91b0ae~8rSf7_ZqW1807318073euoutp02d DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1602345954; bh=1Px3vlBp24aI4tqkdpolnyQ52wyBpb+Nn7D22MHq1OM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IiILemNr8Clr1RGh2X9RkpsZKcOj4rzTvPLWXlawqBullonAgLzFXlML8NL5g6y9N M0GyhCLYSjD+h74lIf1SY9EFghMk+tiMWktht3Udly64im8on09y5ZMJ66I80u82ip z0L1MuoihJhX259XV/2c500p6sUNJtgobeqyQJk4= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20201010160549eucas1p15a1e63cdb2be4b8244f292771a2aa95b~8rSa9GhZ62245522455eucas1p1z; Sat, 10 Oct 2020 16:05:49 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id 09.58.05997.DDBD18F5; Sat, 10 Oct 2020 17:05:49 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20201010160548eucas1p193e4f234da1005b91f22a8e7cb1d3226~8rSZ2Uys82447124471eucas1p1w; Sat, 10 Oct 2020 16:05:48 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20201010160548eusmtrp259b02094948d8c231ed32cbafee7532b~8rSZ11IyE1692616926eusmtrp2K; Sat, 10 Oct 2020 16:05:48 +0000 (GMT) X-AuditID: cbfec7f4-677ff7000000176d-85-5f81dbddbca4 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 16.5A.06314.CDBD18F5; Sat, 10 Oct 2020 17:05:48 +0100 (BST) Received: from Padamandas.fritz.box (unknown [106.210.88.70]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20201010160543eusmtip15ff2281e22eca8b72926e1d9f4832f8d~8rSVvhZG72442224422eusmtip16; Sat, 10 Oct 2020 16:05:42 +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 18:05:03 +0200 Message-Id: <20201010160508.19709-13-l.wojciechow@partner.samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201010160508.19709-1-l.wojciechow@partner.samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrGIsWRmVeSWpSXmKPExsWy7djP87p3bzfGG7yby2dxY5W9Rd+kj0wW 7z5tZ7J41rOO0eJfxx92B1aPXwuWsnos3vOSyePguz1MAcxRXDYpqTmZZalF+nYJXBnbV89g LFjBVbHl7nm2BsZVHF2MnBwSAiYSt3u3sYLYQgIrGCV6FvF3MXIB2V8YJQ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ACvnBAqf7ToItaqRUeLE7ZtsExj5FjAyrGIUSS0tzk3PLTbUK07MLS7NS9dLzs/d xAgMxG3Hfm7ewXhpY/AhRgEORiUeXolTjfFCrIllxZW5hxglOJiVRHidzp6OE+JNSaysSi3K jy8qzUktPsRoCnTURGYp0eR8YJTklcQbmhqaW1gamhubG5tZKInzdggcjBESSE8sSc1OTS1I LYLpY+LglGpgNPJv+XS0TfBxwYnyuJd+XNLy1/Zz99w3cWhdJZi+RnvG26/c6wyuPV63cNG2 eRd2Tmb/GfRjRs+u3j8h8T+Xa903DDC7HBDtdnHmF9a9K6Y1Kv9rnaRVIrIpTu9s2WHjWfFi UxO9+pbOlZKQ+ffvQ3iGzCfFyraZRfaxQku2NvNM2LmOY4GksRJLcUaioRZzUXEiAOyty1Ja AgAA X-CMS-MailID: 20201010160548eucas1p193e4f234da1005b91f22a8e7cb1d3226 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20201010160548eucas1p193e4f234da1005b91f22a8e7cb1d3226 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20201010160548eucas1p193e4f234da1005b91f22a8e7cb1d3226 References: <20201009220202.20834-1-l.wojciechow@partner.samsung.com> <20201010160508.19709-1-l.wojciechow@partner.samsung.com> Subject: [dpdk-stable] [PATCH v7 12/16] 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