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 AB8B5A034E; Wed, 22 Dec 2021 18:02:23 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9613340040; Wed, 22 Dec 2021 18:02:23 +0100 (CET) Received: from mail-pg1-f169.google.com (mail-pg1-f169.google.com [209.85.215.169]) by mails.dpdk.org (Postfix) with ESMTP id C362F4003C for ; Wed, 22 Dec 2021 18:02:22 +0100 (CET) Received: by mail-pg1-f169.google.com with SMTP id v25so2618216pge.2 for ; Wed, 22 Dec 2021 09:02:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=t+ShBd01mElsaoCBe0AZgNa1rh5tA88qi2Z8e2fnI6s=; b=ZW7dvYGBb5eCFPCdcvo6fgkBQVKcTDs53wiTXnbQOgCmgL4DIu9jsoVuzlvI/YHKh5 JQEgt3vtzFrqV0NUYTQ/iqGtbyfRJGSH6haXuVfq8qbY+CgmfxY3iDQr5ceXZpmAVQDD oib+qCoD0BFy/a5a9iKP5fx4T65UVg+EKwKGh0iEle9ZlSx2CP6Tosh1jiV4vsQBeSBN 1+44LGu4prrty6DN0oJ6+Ex5o/gz4A+GAfvvUW7rbz7PCNoR0N9FvZkjZQdNreuojPuh POmm0S9DC8k3HXaD7LPOMKD68qdBgCuRU0udm33i38ugN9fxdEWopzQEZnencUs1kBfH VchQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=t+ShBd01mElsaoCBe0AZgNa1rh5tA88qi2Z8e2fnI6s=; b=ReMPlKpshn5MtcYorqMHkCQInzGcm9ZUfj9UVEvoWkwkw9L1S6b0OtclCxc+2+TiQ1 LHFHBFLdAHBaZatIBYCBPFby1zxSA7k99PsyTl/ZPaIT5z+KTScJFMimm7h0yWvuevL3 CuOSzpnKj4O1P8EZs9tLp6UiIYBgAGrZEtJF5tfefx5sCE83dYtf/r2vjFN0zWyVbg+d cOhIQAg5RCzFl672jdOXn1xXitnBr7CXMAigOwqNnOK+25f2aQenYu9+7d3z1/vtTD20 h3mwtBkpQbjWXvG5aeJSfKDNh8HAojTrRjGZgSAuB6fEJGUV2yOKEPVZXTg18aCY4P+D cQjw== X-Gm-Message-State: AOAM531fsxU9eoD7zBGGS03J951AmwKw3CTXv0ojxdSdsPMD/zfz2Us2 3SrGkafQu1p9gBq8pH8ylr6FWw== X-Google-Smtp-Source: ABdhPJycm0qoo7xX2kAHItlqHUjuKSYn9NWGE5dxnBJDV1eT1/W74EoymAyJj8iAL/Bgvt4oFWKsgg== X-Received: by 2002:a63:5906:: with SMTP id n6mr3472065pgb.586.1640192541941; Wed, 22 Dec 2021 09:02:21 -0800 (PST) Received: from hermes.local (204-195-112-199.wavecable.com. [204.195.112.199]) by smtp.gmail.com with ESMTPSA id s14sm3132823pfk.171.2021.12.22.09.02.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Dec 2021 09:02:21 -0800 (PST) Date: Wed, 22 Dec 2021 09:02:17 -0800 From: Stephen Hemminger To: Ruitao Gong Cc: "vpp-dev@lists.fd.io" , " dev@dpdk.org" , "gong790802715@163.com" Subject: Re: VPP main thread blocked by DPDK APIs Message-ID: <20211222090217.2ce6c420@hermes.local> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 On Wed, 22 Dec 2021 08:25:49 +0000 Ruitao Gong wrote: > hi DEVers, > > Send this mail for some help about VPP and DPDK. > rte_eth_stats_get (xd->port_id, &xd->stats) > rte_eth_xstats_get (xd->port_id, xd->xstats, len) > APIs in dpdk_update_counters() node "dpdk_process" will cost about 140ms each physical interface every 10s (DPDK_STATS_POLL_INTERVAL). > main_thread will blocked N*140 ms when N physical interface in up state. > if govpp send heartbeat message to VPP, main_thread will have chance delay to read msg and reply, when main_thread blocked by doing update_counters. > link between GoVPP and VPP will turn down when delay time more than 250ms. It is easy to reproduce the scenario. > is there any plan to fix it or some suggestion to avoid it? Many thanks! > > env details: > GoVPP:v0.3.5 > DPDK version: 20.05 > VPP version:20.09 > centos7 + Intel X710 > expansion-rom-version: > bus-info: 0000:19:00.0 > supports-statistics: yes > supports-test: yes > supports-eeprom-access: yes > supports-register-dump: yes > supports-priv-flags: yes > > startup.conf dpdk uio-driver vfio_pci > driver: i40evf version: 3.2.2-k > > B&R, > Ruitao Polling for statistics may be expensive based on the hardware, it requires the device driver to query the hardware for each queue. These requests may involve setting a flag and polling for completion of the request. We had similar issues, with bnxt; ended up doing small changes to driver to avoid polling for queue information for unused queues and that helped. But getting statistics can be still be too expensive. > ________________________________ > This e-mail message may contain confidential or proprietary information of Mavenir Systems, Inc. or its affiliates and is intended solely for the use of the intended recipient(s). If you are not the intended recipient of this message, you are hereby notified that any review, use or distribution of this information is absolutely prohibited and we request that you delete all copies in your control and contact us by e-mailing to security@mavenir.com. This message contains the views of its author and may not necessarily reflect the views of Mavenir Systems, Inc. or its affiliates, who employ systems to monitor email messages, but make no representation that such messages are authorized, secure, uncompromised, or free from computer viruses, malware, or other defects. Thank You Please lose the header or suppress it. Either your main should never be on mailing list because it violates that clause, or the clause is irrelevant.