From patchwork Wed Aug 3 08:57:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Jarry X-Patchwork-Id: 1663252 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=V6A6TxmY; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=2605:bc80:3010::138; helo=smtp1.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4LyQkB1VVqz9s5W for ; Wed, 3 Aug 2022 18:58:09 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id B6B4181B9D; Wed, 3 Aug 2022 08:58:07 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org B6B4181B9D Authentication-Results: smtp1.osuosl.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=V6A6TxmY X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id AwQ9pMJmrza6; Wed, 3 Aug 2022 08:58:06 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp1.osuosl.org (Postfix) with ESMTPS id D7D51814C9; Wed, 3 Aug 2022 08:58:05 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org D7D51814C9 Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 97BE0C0033; Wed, 3 Aug 2022 08:58:05 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by lists.linuxfoundation.org (Postfix) with ESMTP id 94CABC002D for ; Wed, 3 Aug 2022 08:58:03 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 61E23814C9 for ; Wed, 3 Aug 2022 08:58:03 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 61E23814C9 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id eJKqxq8itgxn for ; Wed, 3 Aug 2022 08:58:02 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 7DABC81497 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by smtp1.osuosl.org (Postfix) with ESMTPS id 7DABC81497 for ; Wed, 3 Aug 2022 08:58:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1659517081; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1d4JTR79XkQck0ln+DMgOEL0ySOMRDeDw7Hfxn/20G4=; b=V6A6TxmYM1gHoNNTyYNPdJLLTrSWtqJ1LM/d6PIJRwqZhQxuais0NCRPH/4baij5DXxmvX L04C0ucG3dnamdNcQndzUPdlboBMrcHz5Vq58Ub0A4P3N5fYFcybT2y9hJTKUVgEhuZJzt A9TXqVcS4r1yJyLHS6WdzhSGWwyOePg= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-400-sTUv4MSYPUORHy9ukffghg-1; Wed, 03 Aug 2022 04:58:00 -0400 X-MC-Unique: sTUv4MSYPUORHy9ukffghg-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id DA04F3C0CD59 for ; Wed, 3 Aug 2022 08:57:59 +0000 (UTC) Received: from marty.home (unknown [10.39.208.30]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1B5341121314; Wed, 3 Aug 2022 08:57:58 +0000 (UTC) From: Robin Jarry To: dev@openvswitch.org Date: Wed, 3 Aug 2022 10:57:54 +0200 Message-Id: <20220803085754.185730-1-rjarry@redhat.com> In-Reply-To: <20220802153134.95776-1-rjarry@redhat.com> References: <20220802153134.95776-1-rjarry@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [ovs-dev] [PATCH v2] netdev-dpdk: fix tx_dropped counters value X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" Packets that could not be transmitted because the TXQ are full should be taken into account in the global ovs_tx_failure_drops as it was the case before commit 29b94e12d57d ("netdev-dpdk: Refactor the DPDK transmit path."). Also, the global tx_dropped should take all ovs_*_tx_drops counters into account. Fixes: 29b94e12d57d ("netdev-dpdk: Refactor the DPDK transmit path.") Signed-off-by: Robin Jarry --- v1 -> v2: fixed build error (last minute copy paste without testing...) lib/netdev-dpdk.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c index 0dd655507b50..84f0fbf24355 100644 --- a/lib/netdev-dpdk.c +++ b/lib/netdev-dpdk.c @@ -2883,8 +2883,12 @@ netdev_dpdk_eth_send(struct netdev *netdev, int qid, cnt = netdev_dpdk_common_send(netdev, batch, &stats); dropped = batch_cnt - cnt; - dropped += netdev_dpdk_eth_tx_burst(dev, qid, pkts, cnt); + stats.tx_failure_drops += dropped; + dropped = stats.tx_mtu_exceeded_drops + + stats.tx_qos_drops + + stats.tx_failure_drops + + stats.tx_invalid_hwol_drops; if (OVS_UNLIKELY(dropped)) { struct netdev_dpdk_sw_stats *sw_stats = dev->sw_stats;