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 D9B99A0524; Thu, 4 Feb 2021 16:47:42 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AA41E240678; Thu, 4 Feb 2021 16:47:42 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id E62E524064C; Thu, 4 Feb 2021 16:47:40 +0100 (CET) IronPort-SDR: uiXtQcZ4TqwECLVdjDEWYLdIF8WiWUlXRaeqGGZE80Ec9QvgRQ03/HbsYiY48fl520PxptW99k Xhs0qmZN0VEw== X-IronPort-AV: E=McAfee;i="6000,8403,9885"; a="181415085" X-IronPort-AV: E=Sophos;i="5.79,401,1602572400"; d="scan'208";a="181415085" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Feb 2021 07:47:39 -0800 IronPort-SDR: eibcAJOa4Kmk9QQEyt+Fa61HwpdLm8IVPhBpZSqQ6WYCW5vPlj2aIHDJBCTeAEZwHdrAVBmPVM 6S6QQ0Fn802Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.79,401,1602572400"; d="scan'208";a="433996412" Received: from fmsmsx604.amr.corp.intel.com ([10.18.126.84]) by orsmga001.jf.intel.com with ESMTP; 04 Feb 2021 07:47:39 -0800 Received: from fmsmsx609.amr.corp.intel.com (10.18.126.89) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Thu, 4 Feb 2021 07:47:38 -0800 Received: from fmsmsx608.amr.corp.intel.com (10.18.126.88) by fmsmsx609.amr.corp.intel.com (10.18.126.89) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Thu, 4 Feb 2021 07:47:38 -0800 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx608.amr.corp.intel.com (10.18.126.88) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2 via Frontend Transport; Thu, 4 Feb 2021 07:47:38 -0800 Received: from NAM02-SN1-obe.outbound.protection.outlook.com (104.47.36.50) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.1713.5; Thu, 4 Feb 2021 07:47:36 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bvWZMrPR02nnlA+PeLZo6yRLUdgYHepZvJGDpbLRCy40KpvRn682q1I086KYaLjNOJPKFI2/Qo3wZ92gv1I85kV5mGZhqfCIsDV05wtW/f0SnzT5BMhCVkBQafSlmYSAsG2sxuI2VnRZTBPlgs1xx0wqEFmsRS9ElGB6qP4PZWPEQRQkdcdm42WitiIlJQpPEJ82b8nfaoDZIrccI+2Yz/3c+YZswVovfrxjQXMnoAU7YrMbyraVMb6mFwrqNv0ZvQ0A1yHVQAxMCImmLS6jmXLgivxviVPPd+jry3W73yCd7Xi4k7gbGW/W2B4qUZ6Ylq3KRYJfw5hWUv+sZQNgkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=VaE7pVyNxZ76+YCO3WNoyfDxSyhSYd3nCqPu6ZAP8Ig=; b=kc3wdCRnDy1XE3YUI4B9X/MnWFu7WNHCfMd2WdqJscjVdbVmA5g4ar2G2B+KF3hYqpFpnr79jNq14LvPDz6iS5hGBedc843e4Kw7QSFOkKZzHHoxBtXI+d4C+ox7eYiWkgHaS6u1HEcG+jrYWo4qXsIvdC7O3nZpfI5KWvIG2cQFtYWalFvaYkzCUAskeJmWSa+s21ZYa6/LnaahbVxf6fETyk5N2xIBG3RuVrPIb7pD2jinM0W3g2g7v+ompuilQWfZgyYnS68WOpfD8mKnaeHEXQ3Vahdsgo3PF6myu+SB5X5Ul5YYevWuJuo+WirqpfLH5fbqvwwYh968JyKZtg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=VaE7pVyNxZ76+YCO3WNoyfDxSyhSYd3nCqPu6ZAP8Ig=; b=J0RB0DBX3LYRphRQEjPcbgEpUXozhjhaTU7CR67Mjk2v3zCR+T4AgDnJ/gl4U7WaeRLnRgYflPBW5PwRTn6UVTssrwMEZYwlRNDWC+eo1FLFiAGcbw2iZ0/vho75Y78iIqLyG0pASvlLXJ1v0gN+Lmv6jgTYXrlu8cSx/nCgHMY= Received: from BYAPR11MB3751.namprd11.prod.outlook.com (2603:10b6:a03:f8::31) by BYAPR11MB2647.namprd11.prod.outlook.com (2603:10b6:a02:be::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3805.24; Thu, 4 Feb 2021 15:47:34 +0000 Received: from BYAPR11MB3751.namprd11.prod.outlook.com ([fe80::31bb:895e:6e93:7e9d]) by BYAPR11MB3751.namprd11.prod.outlook.com ([fe80::31bb:895e:6e93:7e9d%7]) with mapi id 15.20.3805.026; Thu, 4 Feb 2021 15:47:34 +0000 From: "Ferriter, Cian" To: "Yigit, Ferruh" CC: "dev@dpdk.org" , "stable@dpdk.org" Thread-Topic: [PATCH] net/pcap: fix byte stats for drop Tx Thread-Index: AQHW+lJYluPJvgQ8xEmotezr1v4pdapIJOjA Date: Thu, 4 Feb 2021 15:47:34 +0000 Message-ID: References: <20210203173025.2786063-1-ferruh.yigit@intel.com> In-Reply-To: <20210203173025.2786063-1-ferruh.yigit@intel.com> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.5.1.3 dlp-product: dlpe-windows dlp-reaction: no-action authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [37.228.234.38] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 952fd02d-eb8b-438f-cf6e-08d8c92430b4 x-ms-traffictypediagnostic: BYAPR11MB2647: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:6430; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: jH0UK5RqTOFguufXxV+/nz7Q0GlY5U0ZSxRbRFPR5NoIkEIY2J78Jwjg4y3+ZKpJgAL0FRv9n0pjop2daGRqVOcI2JgOwli1tsMhpeN/66c9QFxnuWqZbyuaDX8kF1+QJ2Al6SigiG+vZy2qB4JpNEXRMLe6RXClFp/PekNBzSj2brGo6OvOXvVDlKUvWpKouv1+fo0TqQxWQIcBqU6+JaMnoMqKXzAvwADybDZXCnn4Bg3YFQTcdS5LYiOgK46HgCvEWYqDBIWzhaGEFSt1aV867TpoEByZ/eW7tE8m+Gw49BDsdn9Y7knnfC/hZIiK2N1xWeWVuc8tbtrXPqx3wm3pGtwyH1O85Gi3BLyMz8i7bHHEYWFqJG3FHVXAKYcAbYBHo9X9KvVo8n2QV5zWBGRZ80E3nbT6MZn/kvlJNhAImpjHWrzDPh9zR4CSgtPEmXRA0bTHKxlznAjD9Q2trO7/MAU+OQq5Kr1yVQV2/hXPx9GykktmYW0SkeXovqr/PFl0+nd9yNVP81JsdhMxSg== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB3751.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(376002)(39860400002)(136003)(396003)(366004)(346002)(8936002)(450100002)(4326008)(66476007)(316002)(8676002)(66556008)(54906003)(83380400001)(9686003)(6636002)(7696005)(64756008)(186003)(33656002)(66946007)(2906002)(6862004)(86362001)(66446008)(53546011)(71200400001)(478600001)(76116006)(26005)(55016002)(52536014)(5660300002)(6506007); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?jNEAtcEeoipqRi9i1WH1S7MXCGyKKtkvMOHhrqJHDbuHFzcmsto3cVF0FuRE?= =?us-ascii?Q?Z+5TmYagtBkhEZs5Xd0M5gQlXDWyegPOXdtZQQxnGEo08qBKVE2NbigdBwLz?= =?us-ascii?Q?0DbH8JxrWYyqmWmIksgyEkQaJ3J6niqOgbZeGZsqAy57zQEbLf0yb9a73fEj?= =?us-ascii?Q?ba6Y+YJS3bT8iX/reJu0if4fToMP6ogI+v9RIUQUC/vrhwgTtCobqR+LVASw?= =?us-ascii?Q?leIBBtnVUoQCWpLzfBK6GIvCjANZAgSaCsRVHeUGolWaXNYehGMdfxorn6ZT?= =?us-ascii?Q?p1+c70JBrHlHd5UzJqXIFQvylKua+Eh3OtKR37boXDLdjrB4G4WWkVOnbTPB?= =?us-ascii?Q?TKyz7JNeT4JRfT2J0CFmJUoA2KAgaMOwpuD74woR5jbOb3tZKzWOWHlfbprj?= =?us-ascii?Q?ApNsqe9F67/VWWPjheXpEyy8N2VqpjDcoAXBtQeMxWRt9PprjJh5JODqj9NY?= =?us-ascii?Q?Zd04eku+ft7csJ7lyhx3X+IqsJhQ66auTXlnyl8G9fyKeeLkwEBP+t+KUWWn?= =?us-ascii?Q?4FDHFt0cKhbrHgY5tqXmkrwZxhkHmG9hsJxB8W1eDOsCOKIWXN27NwDoHbmg?= =?us-ascii?Q?Bpyq+a35BNYw3IwHOMbgU/oe9lq1NFcngcWxG829vX/S0J4ROS/Cm3VAffs+?= =?us-ascii?Q?R3Z/wKlbdtocHUtGO0YGRmjswSCsgUJc2UNata35ARz3b0u4XXbD//2n+I4O?= =?us-ascii?Q?e8VnYPfhhtVjXPixsmjxjq74vl8sR4yWprVuLpGGbR3+VYNDyAzM8QYooXzM?= =?us-ascii?Q?+Qgxp4EexqzuSmqb0tUCzws2Er9679iI5ooFk9Cpmuuvkv1Bsgin79QEsRu+?= =?us-ascii?Q?evwll5NBuNufGlQnIhx82buWNY9TmRyzH2nzHsqHdhUP2DGBNyZOrVSyGhqE?= =?us-ascii?Q?TFjTE1M3evCP+8VPfFP+B6a1LRzAEiqvqaKiaTRKwTjr70Dx6yZeWZFAmWgu?= =?us-ascii?Q?Hj1z564AMkQq08LjMa6vDWVkmFwGbCOi1TpNNQzovjNFgaBuaoKt0uj0WcXc?= =?us-ascii?Q?RUBoN6mnG0J4j9Pwu5zojscNV8qaB1g1w00WmEtM5u5CSsUrtkQHH5+MdbCY?= =?us-ascii?Q?XOkkt1Tu?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB3751.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 952fd02d-eb8b-438f-cf6e-08d8c92430b4 X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Feb 2021 15:47:34.3858 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: I1A2u1I9ayyhWBHjwTxMFRWPlrTNJIfWvXsPyl+W0TliqOvW422ZWRd82BHOoquUxkhW6dKq05RsIVEVKBoebQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR11MB2647 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH] net/pcap: fix byte stats for drop Tx 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 Sender: "dev" > -----Original Message----- > From: Yigit, Ferruh > Sent: Wednesday 3 February 2021 17:30 > To: Ferriter, Cian > Cc: Yigit, Ferruh ; dev@dpdk.org; stable@dpdk.org > Subject: [PATCH] net/pcap: fix byte stats for drop Tx >=20 > Drop Tx path in pcap is Tx that just drops the packets, which is used > for the case only Rx from a pcap file is requested/matters. >=20 > The byte stats was calculated using first mbuf segment, which gives > wrong values for multi segmented mbufs, updated to use packet length > instead. >=20 > Bugzilla ID: 597 > Fixes: a3f5252e5cbd ("net/pcap: enable infinitely Rx a pcap file") > Cc: stable@dpdk.org >=20 > Reported-by: Cian Ferriter > Signed-off-by: Ferruh Yigit > --- Acked-by: Cian Ferriter Tested this with 2 large PCAPs and it works as expected: testpmd> show port stats all ######################## NIC statistics for port 0 #####################= ### RX-packets: 2 RX-missed: 0 RX-bytes: 131070 RX-errors: 0 RX-nombuf: 0 TX-packets: 2 TX-errors: 0 TX-bytes: 131070 Throughput (since last show) Rx-pps: 0 Rx-bps: 0 Tx-pps: 0 Tx-bps: 0 #########################################################################= ###