From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 03EB7A0540 for ; Tue, 14 Jul 2020 16:58:14 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A30321D52D; Tue, 14 Jul 2020 16:58:14 +0200 (CEST) Received: from mail-pl1-f170.google.com (mail-pl1-f170.google.com [209.85.214.170]) by dpdk.org (Postfix) with ESMTP id 23C001D529 for ; Tue, 14 Jul 2020 16:58:12 +0200 (CEST) Received: by mail-pl1-f170.google.com with SMTP id b9so7131264plx.6 for ; Tue, 14 Jul 2020 07:58:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=JCOSszviLpcqibnYdC41exQiILbHdZ5nKjTWQBXy7fo=; b=YGjhJxFIGySyXCAeTAIKsw5XFXvUk1dIUK6iSMIGDu3vaJKFSEmcYKk4y2Lfw+l7dj z1T3eiCUEs2M4IwggzrQXoyyy+0YVhl4OnEq5ghrcFDucJSEd5cALN2cT+txFYqlmBP2 +4EATh/4L+srRDCvVODandoHUaT9WhRLegUGsBLvVn0dt5GL4ce9t0eYXxHXQ30U/GCM l1e5RJNCNb5YskcPLqy8PaI/g2zzC6MuQlgHzKoMBhxp3ckYHA6UpCk4+HIC3uV1ikn0 bO2Vz93RMOgrgcnA0bWFWEsMJvDxEHf+EOHS4bKUmeujeuOprimwy+qg+C6eRmnM9Px5 wv3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=JCOSszviLpcqibnYdC41exQiILbHdZ5nKjTWQBXy7fo=; b=d31L2HzYigblLUG0u8vlqZrkBXOs1plD1nr32iyMYMwXyTE2713BfnoAu+EtLKVSgX sJJ+Q9cjJiU2m7d/og2M3hT7gP15EoppP144jxRUM1oU3Oik+HpgLCihPRTEb554VzWM Kff532Ay5nFGfa8xnJCL+z2b6KigxNovnWYNV3NFAF/xozlkdUPZyQyZquCiz9lZX6CN XyQgMJm/vD32PB/PCy1Ph1G2pIe2K1l+d31eT2Q/Vq3GnfgZ2+7/O2WWgNrh0Hm97jtQ FB1jhxIQi7v4HIZ31mj2JWWj0hPHH6hso2/qc+75Y52VEGZcJQ3K9UdzLO8qELPZ2ACC nTyw== X-Gm-Message-State: AOAM531OXiUVoEKJvmF9w0XxxI6BYO8q3ZXpePvEtlahd/iNdlaxIJga NxFCjR/+s0n4qHLyjvI2X6HOYw== X-Google-Smtp-Source: ABdhPJzx5lLh46DJ96G+Lw10sRt/ybR3lBOpDuiJS0dxIxJCK0PL4C+re7nBfje4NIFO9fvcbuZY5A== X-Received: by 2002:a17:90a:b891:: with SMTP id o17mr4921242pjr.202.1594738692090; Tue, 14 Jul 2020 07:58:12 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id g7sm17024089pfh.210.2020.07.14.07.58.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Jul 2020 07:58:11 -0700 (PDT) Date: Tue, 14 Jul 2020 07:40:36 -0700 From: Stephen Hemminger To: =?UTF-8?B?VG9tw6HFoSBKw6Fuc2vDvQ==?= Cc: users@dpdk.org Message-ID: <20200714074036.231dc2c6@hermes.lan> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-users] Mellanox MLX5 - RX Missed Errors Counter Overflow X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org Sender: "users" On Tue, 14 Jul 2020 10:35:25 +0200 Tom=C3=A1=C5=A1 J=C3=A1nsk=C3=BD wrote: > Hi, >=20 > I am using the Mellanox MLX5 driver and I noticed nonsense values in > *rx_missed_errors* counter. >=20 > Configuration: >=20 > - DPDK version 20.02 > - CentOS Linux release 7.7.1908 (Core) > - Mellanox OFED version: MLNX_OFED_LINUX-4.7-3.2.9.0-rhel7.7-x86_64 >=20 >=20 > I have a function which periodically retrieves xstats counters. >=20 > char *field_names[7] =3D {"rx_packets_phy", "rx_discards_phy", > "rx_missed_errors", "rx_errors", "rx_bytes_phy", "tx_packets_phy", > "tx_bytes_phy"}; > uint64_t ids[7], values[7]; > int i; >=20 > for (i =3D 0; i < 7; i++) { > rte_eth_xstats_get_id_by_name(port_id, field_names[i], &ids[i]); > } > rte_eth_xstats_get_by_id(port_id, ids, values, 7); >=20 > It works perfectly fine until the value in *rx_missed_errors* counter > reaches around 3721692877 (maximum observed value, but probably not the > actual maximum value) which is 0xDDD486CD hex. > After that, the next measurement reports the value 18446744073150886746 > which is obviously wrong. > Then, after some time, the value starts again from zero. >=20 > The documentation says that the counter is supposed to be 64-byte > unsigned integer: https://doc.dpdk.org/api/structrte__eth__xstat.html >=20 > Is anybody else experiencing this issue? It might not be related only to > the MLX5 driver because we had a similar issue with Intel X710 cards. >=20 > Thanks. >=20 > Tomas Xstats are often created by the driver from hardware registers. Investigate which hardware register that counter is coming from and see what the width of the register is. You may have to use the 32 bit counter detection logic (like snmpd) to workaround.