Message ID | 20201008052323.11547-13-l.wojciechow@partner.samsung.com (mailing list archive) |
---|---|
State | Superseded, archived |
Delegated to: | David Marchand |
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id A29ADA04BC; Thu, 8 Oct 2020 07:28:10 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3371A1BBD7; Thu, 8 Oct 2020 07:24:07 +0200 (CEST) Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by dpdk.org (Postfix) with ESMTP id 09E7D1B70A for <dev@dpdk.org>; Thu, 8 Oct 2020 07:23:48 +0200 (CEST) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20201008052346euoutp01dce646f905ebc012273c99959199c2e2~77PRZHOKv2268722687euoutp01i for <dev@dpdk.org>; Thu, 8 Oct 2020 05:23:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20201008052346euoutp01dce646f905ebc012273c99959199c2e2~77PRZHOKv2268722687euoutp01i DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1602134626; bh=b8I//1LDMElaJ1YT0yZPEEVEetWTit5yqncv7yYfAnU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=S+qxeki7CrVK/8zhZWqVJMtUzOxZjMcB2KaXoarwLD0j/3H37oLq9rXQZSBYieG95 50aYTg/xA1ZUC5cuB4wc6bwWF9WODcLAyomosfNMwj6W4HxVODLdH8g+X5hef4yi9J lFlOgH6qZZ1aNlWKQa9kgiNkKn9sEqa0RcQ/FcMg= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20201008052346eucas1p1939d67066616615b6425731edad6d848~77PREBi9Y0288802888eucas1p10; Thu, 8 Oct 2020 05:23:46 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id C2.93.06456.262AE7F5; Thu, 8 Oct 2020 06:23:46 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20201008052345eucas1p17a05f99986032885a0316d3419cdea2d~77PQtSacs0288802888eucas1p1z; Thu, 8 Oct 2020 05:23:45 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20201008052345eusmtrp1cd3825364cd3fe258158e106218db7c4~77PQstZUF2941629416eusmtrp1Y; Thu, 8 Oct 2020 05:23:45 +0000 (GMT) X-AuditID: cbfec7f2-7efff70000001938-4b-5f7ea26272f3 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 0E.F0.06017.162AE7F5; Thu, 8 Oct 2020 06:23:45 +0100 (BST) Received: from Padamandas.fritz.box (unknown [106.210.88.70]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20201008052345eusmtip12cd01deee4606fbe9f196eaace361931~77PQDdjyI2964029640eusmtip1j; Thu, 8 Oct 2020 05:23:45 +0000 (GMT) From: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com> To: David Hunt <david.hunt@intel.com>, Bruce Richardson <bruce.richardson@intel.com> Cc: dev@dpdk.org, l.wojciechow@partner.samsung.com, stable@dpdk.org Date: Thu, 8 Oct 2020 07:23:20 +0200 Message-Id: <20201008052323.11547-13-l.wojciechow@partner.samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201008052323.11547-1-l.wojciechow@partner.samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrOIsWRmVeSWpSXmKPExsWy7djPc7p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x7f06JhBbSGApo8TmI55djBxAcRmJD5cEIEqEJf5c62LrYuQCKvnAKNHw9RcrSIJNwFbi yMyvrCD1IgJhEidW+oOEmQXcJbYsnsoMYgsLWEn0f/jNCGKzCKhK3Fn3EqyVV8BN4tnecywQ 8+UlVm84AFbPCRQ/+/8uK8SuRkaJm+dnsk1g5FvAyLCKUSS1tDg3PbfYSK84Mbe4NC9dLzk/ dxMjMBC3Hfu5ZQdj17vgQ4wCHIxKPLwGR2vjhVgTy4orcw8xSnAwK4nwOp09HSfEm5JYWZVa lB9fVJqTWnyI0RToqonMUqLJ+cAoySuJNzQ1NLewNDQ3Njc2s1AS5+0QOBgjJJCeWJKanZpa kFoE08fEwSnVwLhxc5dA1opF07Ycb3t6ZLZNyfMFmxXbT1i6CjE/5c+5wckv0t0t0ebG4sNi u5O5Mth6fso9i9Cbff0H11bM7rksEH70bPwyg6PbrPYcdLwgzWLV+HhZSdNz5q63aauVAm39 wvfEM0s4uSU2NJ/uenb14dadKnc/f2rdUzr98rMM7eAVnrNFlJVYijMSDbWYi4oTAcXULAZa AgAA X-CMS-MailID: 20201008052345eucas1p17a05f99986032885a0316d3419cdea2d X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20201008052345eucas1p17a05f99986032885a0316d3419cdea2d X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20201008052345eucas1p17a05f99986032885a0316d3419cdea2d References: <20200925224209.12173-1-l.wojciechow@partner.samsung.com> <20201008052323.11547-1-l.wojciechow@partner.samsung.com> <CGME20201008052345eucas1p17a05f99986032885a0316d3419cdea2d@eucas1p1.samsung.com> Subject: [dpdk-dev] [PATCH v5 12/15] distributor: fix scalar matching X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions <dev.dpdk.org> List-Unsubscribe: <https://mails.dpdk.org/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://mails.dpdk.org/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <https://mails.dpdk.org/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org Sender: "dev" <dev-bounces@dpdk.org> |
Series |
fix distributor synchronization issues
|
|
Checks
Context | Check | Description |
---|---|---|
ci/checkpatch | success | coding style OK |
Commit Message
Lukasz Wojciechowski
Oct. 8, 2020, 5:23 a.m. UTC
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 <l.wojciechow@partner.samsung.com>
---
lib/librte_distributor/rte_distributor.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Comments
On 8/10/2020 6:23 AM, Lukasz Wojciechowski wrote: > 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 <l.wojciechow@partner.samsung.com> > --- > 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; > } Hi Lukasz, Could you give a bit more information on the problem that this is fixing? Were you finding that flows were not being assigned to workers correctly in the scalar code? Thanks, Dave.
Hi Lukasz, On 9/10/2020 1:31 PM, David Hunt wrote: > > On 8/10/2020 6:23 AM, Lukasz Wojciechowski wrote: >> 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 <l.wojciechow@partner.samsung.com> >> --- >> 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; >> } > > Hi Lukasz, > > Could you give a bit more information on the problem that this is fixing? > > Were you finding that flows were not being assigned to workers > correctly in the scalar code? > > You answer this question in the next patch in the series, as you are adding a test to check the flows go to the correct workers, etc. You can igonore this question, and: Acked-by: David Hunt <david.hunt@intel.com>
W dniu 09.10.2020 o 14:35, David Hunt pisze: > Hi Lukasz, > > On 9/10/2020 1:31 PM, David Hunt wrote: >> >> On 8/10/2020 6:23 AM, Lukasz Wojciechowski wrote: >>> 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 <l.wojciechow@partner.samsung.com> >>> --- >>> 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; >>> } >> >> Hi Lukasz, >> >> Could you give a bit more information on the problem that this is >> fixing? >> >> Were you finding that flows were not being assigned to workers >> correctly in the scalar code? >> >> > > You answer this question in the next patch in the series, as you are > adding a test to check the flows go to the correct workers, etc. You > can igonore this question, and: > > Acked-by: David Hunt <david.hunt@intel.com> > Thanks for the ack. And you already probably know the answer about flows, but let me show an example: worker 0 tags: 3 5 7 0 0 0 0 0 incoming flow: 1 2 3 4 5 6 7 8 expected result: 0 0 1 0 1 0 1 0 unfixed result: 1 1 1 0 0 0 0 0 The tags were iterated with "j" variable same that indexed the result table Best regards Lukasz > >
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; }