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 032C6A09E4 for ; Thu, 28 Jan 2021 15:10:24 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C59B94067A; Thu, 28 Jan 2021 15:10:24 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mails.dpdk.org (Postfix) with ESMTP id 4B71A4067A 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-f70.google.com (mail-ua1-f70.google.com [209.85.222.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-324-fx_2SsPMOSmJ5lgnfxFRzg-1; Thu, 28 Jan 2021 09:10:20 -0500 X-MC-Unique: fx_2SsPMOSmJ5lgnfxFRzg-1 Received: by mail-ua1-f70.google.com with SMTP id r13so1569945uao.5 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=LqLAyKQwl899l7aNEVK2EvQrHBgyMqMig9onB63XQk/g+3g6hrUn7kFzoBX4n0ltvr lTCC0f2CD4erL8IcnEsIMdymAlG56Kc7DS2/adNVfPjAL8kENzRbZGDfhoKsibGKJvhi /94QBXuiqDCg6wVHZYSkDKcWUaJqgXalpzXebPIX2/7zlMPNUFsRL53Zj/ical3Urmn8 Pn7vrq4kkc/Y4uxjLKOLoXT3pDWsqKz3erSuCxu2ISlnivJ4kLzuRNU6r2G1J4t3BT6t zImixDFjZIrUyR8Qy1GwZDmPvZLYBsX/liDuQjWWpS83zpnqKjtZYKrOvhDC++CTGK+v 4wUQ== X-Gm-Message-State: AOAM530nb0DOvidfoTA3QuGWtlcXbfDWtX2Sv9hSi50k4kjXc/awtnR9 nG8fx0NB17if5/ggVKKtosCvHdru1ziJEH6/TeyIeGEHT+QmFbR8i/jjX7sh7liPE8nq6SrL7Sq /HiNMlDKIqJDReJb5aFn7/cM= X-Received: by 2002:a67:3093:: with SMTP id w141mr11145919vsw.27.1611843020308; 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-stable] [PATCH v1 1/1] test/distributor: prevent return buffer overload X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 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" 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