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 7BD6645CA1; Thu, 7 Nov 2024 00:26:16 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6F11C402AC; Thu, 7 Nov 2024 00:26:16 +0100 (CET) Received: from mail-pf1-f179.google.com (mail-pf1-f179.google.com [209.85.210.179]) by mails.dpdk.org (Postfix) with ESMTP id DE7BD40280 for ; Thu, 7 Nov 2024 00:26:14 +0100 (CET) Received: by mail-pf1-f179.google.com with SMTP id d2e1a72fcca58-71e4c2e36daso957068b3a.0 for ; Wed, 06 Nov 2024 15:26:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1730935574; x=1731540374; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=G4F24LOxcZL/yl2U6mZjZDmgDo6tudDtscwvpb8egj8=; b=oQ083nRwL8nGau7V30r+UM4ikjBYYvsUD7vsvByif+WXISIzQzc1jvFcLYxdtb8zLi o86bdEGJB6JwSBTYgMvoEvqhStwfy1R/NgokLn8/FWX7E2TKEFgeYQ1+atCLrJhzsbPV vefr/AroCxed7oEvIWBvPBPXoG2YdnfnqAZ7wi2QCvP46kz0hpDd2HkxuCAA/ArkuOsZ tTv/ZHJiYceQVprUGawpVcUpd4N3IKpBKUqPRICIYIu11Fc2P73G9HUeXQJVKZjNvvfH yhJlxEkLjAnPvqjrDt9cEPS0SJjQzf3wes4IWHxEk7I0vhJBTIvrllc9zygFlI8/+vGr HUQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730935574; x=1731540374; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=G4F24LOxcZL/yl2U6mZjZDmgDo6tudDtscwvpb8egj8=; b=ZGKBtbiKGnfNOgTX8uwwVzl9hVnUfIpUXa0kYz375bDBsYZyk40/SWcq4uQhnxkJ2C KWPD+AzK4YOn9/i45r52CBT3lfpDuVtFws2jF6uYOZ0hJYZjzRQ+S/eL0/CzSazphS+g KsYxMhrrd75OePXH1LQaFHR2gVKJrpHiQYHcwu0U06YREfWDEK9CYbaHEjlbZFHafJEy FiNKig3+odRO+J6IM2giIOEUZfM/nAPjPJQfQu0dM2h8JyYfkKcor2s+UAFpYKtmCXhm lC0Q4DtOrlBuZlYZ+2LTnGxlqsHqRgd5hE9QvetxqA0NHWxL3dYhcP6qW5b3fVnmjv/Z th+w== X-Gm-Message-State: AOJu0Yz2jsgzM+GiqpOsEUI3t0MAPEcMnFmGJvrRO0Iz+PaSZXdVVSD8 WozSNYaospcxZSsTuTaFQWv+VtRc9rsuy07pul+ts0aAKdC1uy5tbfqTROQMEQ9yBY8iscDjMQG I X-Google-Smtp-Source: AGHT+IE+z6juzk37FUGNwr6XT5JNNGTV6tZdmvQ/izVxZXNK3P6rWObtCaukSYfmXrQDVaDPGPSEew== X-Received: by 2002:a05:6a00:23ca:b0:71e:6fcb:7693 with SMTP id d2e1a72fcca58-7240432729bmr1411283b3a.12.1730935573880; Wed, 06 Nov 2024 15:26:13 -0800 (PST) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-72407a571eesm88965b3a.178.2024.11.06.15.26.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Nov 2024 15:26:13 -0800 (PST) Date: Wed, 6 Nov 2024 15:25:42 -0800 From: Stephen Hemminger To: Morten =?UTF-8?B?QnLDuHJ1cA==?= Cc: dev@dpdk.org Subject: Re: [TEST v10] ethdev: support single queue per port Message-ID: <20241106152542.71d572e3@hermes.local> In-Reply-To: <20241106220216.1505231-1-mb@smartsharesystems.com> References: <20241024102253.785037-1-mb@smartsharesystems.com> <20241106220216.1505231-1-mb@smartsharesystems.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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, 6 Nov 2024 22:02:16 +0000 Morten Br=C3=B8rup wrote: > iff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vm= xnet3_ethdev.c > index 78fac63ab6..1752c58069 100644 > --- a/drivers/net/vmxnet3/vmxnet3_ethdev.c > +++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c > @@ -1470,42 +1470,52 @@ vmxnet3_dev_stats_get(struct rte_eth_dev *dev, st= ruct rte_eth_stats *stats) > struct vmxnet3_hw *hw =3D dev->data->dev_private; > struct UPT1_TxStats txStats; > struct UPT1_RxStats rxStats; > + uint64_t packets, bytes; > =20 > VMXNET3_WRITE_BAR1_REG(hw, VMXNET3_REG_CMD, VMXNET3_CMD_GET_STATS); > =20 > for (i =3D 0; i < hw->num_tx_queues; i++) { > vmxnet3_tx_stats_get(hw, i, &txStats); > =20 > - stats->q_opackets[i] =3D txStats.ucastPktsTxOK + > + packets =3D txStats.ucastPktsTxOK + > txStats.mcastPktsTxOK + > txStats.bcastPktsTxOK; > =20 > - stats->q_obytes[i] =3D txStats.ucastBytesTxOK + > + bytes =3D txStats.ucastBytesTxOK + > txStats.mcastBytesTxOK + > txStats.bcastBytesTxOK; > =20 > - stats->opackets +=3D stats->q_opackets[i]; > - stats->obytes +=3D stats->q_obytes[i]; > + stats->opackets +=3D packets; > + stats->obytes +=3D bytes; > stats->oerrors +=3D txStats.pktsTxError + txStats.pktsTxDiscard; > + > + if (i < RTE_ETHDEV_QUEUE_STAT_CNTRS) { > + stats->q_opackets[i] =3D packets; > + stats->q_obytes[i] =3D bytes; > + } > } > =20 > for (i =3D 0; i < hw->num_rx_queues; i++) { > vmxnet3_rx_stats_get(hw, i, &rxStats); > =20 > - stats->q_ipackets[i] =3D rxStats.ucastPktsRxOK + > + packets =3D rxStats.ucastPktsRxOK + > rxStats.mcastPktsRxOK + > rxStats.bcastPktsRxOK; > =20 > - stats->q_ibytes[i] =3D rxStats.ucastBytesRxOK + > + bytes =3D rxStats.ucastBytesRxOK + > rxStats.mcastBytesRxOK + > rxStats.bcastBytesRxOK; > =20 > - stats->ipackets +=3D stats->q_ipackets[i]; > - stats->ibytes +=3D stats->q_ibytes[i]; > - > - stats->q_errors[i] =3D rxStats.pktsRxError; > + stats->ipackets +=3D packets; > + stats->ibytes +=3D bytes; > stats->ierrors +=3D rxStats.pktsRxError; > stats->imissed +=3D rxStats.pktsRxOutOfBuf; > + > + if (i < RTE_ETHDEV_QUEUE_STAT_CNTRS) { > + stats->q_ipackets[i] =3D packets; > + stats->q_ibytes[i] =3D bytes; > + stats->q_errors[i] =3D rxStats.pktsRxError; > + } > } > =20 > return 0; This fixes a bug in existing code of RTE_ETHDEV_QUEUE_STAT_CNTRS < num queu= es. Probably deserves its own patch with Fixes