From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id B6873A09E4; Thu, 28 Jan 2021 15:10:25 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E94664068E; Thu, 28 Jan 2021 15:10:24 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mails.dpdk.org (Postfix) with ESMTP id 9B7ED40683 for ; Thu, 28 Jan 2021 15:10:23 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1611843022; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=iUuMzsE/Goo9DsvzdfyDRpCnGkDNZLWahgVAFJNzopc=; b=NcA2UwgIPSsrm0Z/fP4Xa+lxSKRnvVI60AC6FhyQmWWuNe+BVMCBkmxvcnICJ+UXryHwXs JuH7GWTk8gFhMolk6DW6DQTIxt47Fd9hVjHCpD6ZYi6P1xvBrc+FBvWYAnVutMh6U3RO/l p776GXWRpE9cVbswBon4CK5cVNF+jd8= Received: from mail-ua1-f69.google.com (mail-ua1-f69.google.com [209.85.222.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-441-lKHwUX5hOwa32JCns6DiVg-1; Thu, 28 Jan 2021 09:10:21 -0500 X-MC-Unique: lKHwUX5hOwa32JCns6DiVg-1 Received: by mail-ua1-f69.google.com with SMTP id m21so1574019uap.23 for ; Thu, 28 Jan 2021 06:10:20 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=iUuMzsE/Goo9DsvzdfyDRpCnGkDNZLWahgVAFJNzopc=; b=S7TdnBpO7FdtsbngCZV9JlxyPYOE84SZPUb6AGlKJxJiWF97Cf3XIy2suTj6GCIT+U zIV1G09SO3F/o7GL2MJx/wmVaeO7YTGjFZmS5VcK5MyMx9r7LH0Ddp/FPeQIoGyRR9ew 3tzbl/zUsi+tIqzeIApT1KUSFR9peYIoEOZ9aFfdvpEIhqOnSp1xAKLrW+NHLFXokPFL fkgeJN8DzBjkzDbvbFEgmGZ3pGUxUcfL1WrH9p+wmzwzuJ1lm8tLRVufgeA1BsfmAjwd 9jZisyL16dWM/EBdvL4McX3YpGdHVPR7KWGr6DtIrZF6Qzv5wH++r6B0C4CDBF1pYYZ2 /C6g== X-Gm-Message-State: AOAM533IV+t+wRc8V56136q7I/knVxaaza3iTgTvNkf25XvPJ+zC/1B8 jgbWTXizT9Z0ksLiicCLU+7qLyHHIJDIExFjvaR8Ou2ZS8GOHpcenYxuyuSehvdBX7GLPs7hwzo q6gugMcArY6hwfjAP9yQ= X-Received: by 2002:a67:3093:: with SMTP id w141mr11145920vsw.27.1611843020309; Thu, 28 Jan 2021 06:10:20 -0800 (PST) X-Google-Smtp-Source: ABdhPJwEhAG4dAg0MNJc8nqYdhtjHBVc4B/cxVEKseU+R0Exu88qnFoPDHuLkCOjxtzXegq582PBKuQ8NGoA4LxiNJo= X-Received: by 2002:a67:3093:: with SMTP id w141mr11145889vsw.27.1611843020025; Thu, 28 Jan 2021 06:10:20 -0800 (PST) MIME-Version: 1.0 References: <20210119035910.8324-1-l.wojciechow@partner.samsung.com> <20210119035910.8324-2-l.wojciechow@partner.samsung.com> In-Reply-To: <20210119035910.8324-2-l.wojciechow@partner.samsung.com> From: David Marchand Date: Thu, 28 Jan 2021 15:10:08 +0100 Message-ID: To: Lukasz Wojciechowski , David Hunt , Bruce Richardson Cc: dev , dpdk stable Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [dpdk-stable] [PATCH v1 1/1] test/distributor: prevent return buffer overload X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" On Tue, Jan 19, 2021 at 4:59 AM Lukasz Wojciechowski wrote: > > The distributor library implementation uses a cyclic queue to store > packets returned from workers. These packets can be later collected > with rte_distributor_returned_pkts() call. > However the queue has limited capacity. It is able to contain only > 127 packets (RTE_DISTRIB_RETURNS_MASK). > > Big burst tests sent 1024 packets in 32 packets bursts without waiting > until they are processed by the distributor. In case when tests were > run with big number of worker threads, it happened that more than > 127 packets were returned from workers and put into cyclic queue. > This caused packets to be dropped by the queue, making them impossible > to be collected later with rte_distributor_returned_pkts() calls. > However the test waited for all packets to be returned infinitely. > > This patch fixes the big burst test by not allowing more than > queue capacity packets to be processed at the same time, making > impossible to drop any packets. > It also cleans up duplicated code in the same test. > > Bugzilla ID: 612 > Fixes: c0de0eb82e40 ("distributor: switch over to new API") > Cc: david.hunt@intel.com > Cc: stable@dpdk.org > > Signed-off-by: Lukasz Wojciechowski Pasting from my reply to the cover letter: > I reproduced the issue with starting a testpmd on the same cores in this system. > I usually reproduce it after 1-2 minutes of continuously running the > distributor_autotest unit test. > > I've applied your fix in my tree and I will let this loop run for a while. This has been running fine for more than 30 minutes on my x86 28 cores system. Tested-by: David Marchand -- David Marchand