From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (xvm-189-124.dc0.ghst.net [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id A32FAA0524; Fri, 8 Jan 2021 09:31:28 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 47FCC140E58; Fri, 8 Jan 2021 09:31:28 +0100 (CET) Received: from hqnvemgate24.nvidia.com (hqnvemgate24.nvidia.com [216.228.121.143]) by mails.dpdk.org (Postfix) with ESMTP id F3582140E55 for ; Fri, 8 Jan 2021 09:31:26 +0100 (CET) Received: from hqmail.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate24.nvidia.com (using TLS: TLSv1.2, AES256-SHA) id ; Fri, 08 Jan 2021 00:31:26 -0800 Received: from HQMAIL111.nvidia.com (172.20.187.18) by HQMAIL109.nvidia.com (172.20.187.15) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Fri, 8 Jan 2021 08:31:24 +0000 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.103) by HQMAIL111.nvidia.com (172.20.187.18) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Fri, 8 Jan 2021 08:31:24 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fc8LGpfmqhVc9ecnyE0PB0iULSXunBoXKgWrybfgrRAISoryONvYy9vAzxsKf8ObQhoGGJHvD0c5fk+tc/10P0DhsoYP8/M57UsIkBvKuu1Yt9umZFByd8joBCzSk4ubaPRtBf9Cq4SLR6W6lgDwAp4N3PcVR/vVXzDUNAr8ZO5wUa9+JjJNyWf/Et1mRJvzNDHmXgMe8pou7mlH+m8S+rH7ON6DPkTINHjgJ1ndgm6w02KvrLSkDy1XPmTV8C1/KsnuYy5jttmuHb/XVxQsfm65ZyzdKiVxKpJrUYC50BswcisXdOD3m3PZhsVmBhtdqmLnjBe0ZgOVvmrm7UNiSw== 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=7KLrWIZhh3H7YTSFQBoYJTJsROUjmG0eRijLsHNgZHY=; b=gDzc56yjFmZQSAdwSvrtxGGSQy8q5Rb2njg2qwi7YO/ynA0kV9sAv9MufFemTiEkkYKlvNstbZ4UcCZwOUAITpeTS1aQps4JRwDFXnpkJSA/pkvJGmgHtD2kpeRoF1AsQnb7emEVKWtz1NkPw6Ho0FSlwE7uoZ0soW2nWyZefeX0EnnyBn+qd9q8sPN+gi3Cv7VsgIpMw5ONng+vidM4FEKczmnieuNUAfN8ySbU9+O+QKjHBV2KfeIi+Zn4/wg2PXwmbL0iEE/YeZep0UyDnwOlpYJ76OlF697PlK0dBxV/WHNXV5nMNl2x/qJY5H2Bf6WaVlJo7BXmEF3wNNAmig== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none Received: from BL0PR12MB2419.namprd12.prod.outlook.com (2603:10b6:207:44::27) by BL0PR12MB4963.namprd12.prod.outlook.com (2603:10b6:208:17d::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3742.6; Fri, 8 Jan 2021 08:31:19 +0000 Received: from BL0PR12MB2419.namprd12.prod.outlook.com ([fe80::9de8:500a:666f:4312]) by BL0PR12MB2419.namprd12.prod.outlook.com ([fe80::9de8:500a:666f:4312%6]) with mapi id 15.20.3742.006; Fri, 8 Jan 2021 08:31:19 +0000 From: "Jiawei(Jonny) Wang" To: Stephen Hemminger CC: "ferruh.yigit@intel.com" , "wenzhuo.lu@intel.com" , "beilei.xing@intel.com" , "bernard.iremonger@intel.com" , Ori Kam , Slava Ovsiienko , NBU-Contact-Thomas Monjalon , Raslan Darawsheh , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v6] app/testpmd: fix testpmd packets dump overlapping Thread-Index: AQHW5DYqn/Jr8cirhEWP2p20YpKsnKoawBeAgAKnNUA= Date: Fri, 8 Jan 2021 08:31:19 +0000 Message-ID: References: <1606129239-379967-1-git-send-email-jiaweiw@nvidia.com> <1609942417-259610-1-git-send-email-jiaweiw@nvidia.com> <20210106075447.4c57e3b9@hermes.local> In-Reply-To: <20210106075447.4c57e3b9@hermes.local> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: networkplumber.org; dkim=none (message not signed) header.d=none;networkplumber.org; dmarc=none action=none header.from=nvidia.com; x-originating-ip: [163.125.176.202] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 497ce1b2-e1ae-4720-576f-08d8b3afc5f3 x-ms-traffictypediagnostic: BL0PR12MB4963: x-ld-processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7691; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: MVGgLSm3Uu70L90rJux63sVIdOwIbUBSCcmYvvPbVGyWjewo4DBaraQc7sB3o8GMRr8ZlHMqmFTIbEREDh+I8hT+MTYrnlBSID1wy7CT4PLTnUIi9VkEnB3QaP8sxJe/vRNw+uNVBDsZZf0H7edikHYppgk/KYosG9vQAaAYtx/Hy6zQpkSmVXelOcshaXky0HZHYYkFRb8mDN7WBc0E9ikQyM0KriZF72Vz/QZgE1tnlSNG2SKy/6ksVHUrvK2kac2vTRYpcPh6i3I3daERE5r3vK/YYcxyO3yoxvEJ3tY00xzF9TH8A4O8F8UwAkKqZ/XprNrKgjq2BDA0SZdspTyPzdKYL3vrziKkp6qHH67mhmLVelBBzvildo6D9kUXe6u9wtFGABExVVo3DcgWPA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BL0PR12MB2419.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(346002)(396003)(366004)(136003)(376002)(39860400002)(26005)(83380400001)(7696005)(86362001)(316002)(33656002)(9686003)(186003)(53546011)(6506007)(71200400001)(2906002)(8676002)(8936002)(6916009)(66476007)(54906003)(76116006)(64756008)(66446008)(66556008)(55016002)(52536014)(5660300002)(4326008)(478600001)(66946007)(4744005); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?iDMfDFHqmsu/MiUjpRlazeGzxQnGMaOszttGlITZbd0c6i8V/nZOTWHD78Wk?= =?us-ascii?Q?oKDdrbI14Iy2w6gUMqtcHhjYdD7L+blgF+E/XbUIP0xCO/AG9HkqHKKJasBQ?= =?us-ascii?Q?/4zzff+0QJTUto216bRt7dnjkLVi5Qbx/ilH0kbKKMn8gpsJwmScTLr+s5iQ?= =?us-ascii?Q?VY8frbD1XTcDniRppG54iv0cau9mqekG3F80+w1+u3LE0NavYjPx7+bT1kGL?= =?us-ascii?Q?mnsINDYzKmuIw6aizxEH5DG6UrY0G3KIYMCyhSE7lhbf//JOE9vnAOh/E2MI?= =?us-ascii?Q?L7CLDJGjOpOgsIT88Yf3JW7XN0+cOKxx0Z7/QbaAfyYB9cYfd4YFhi1k/EEl?= =?us-ascii?Q?RA0BhO3veRzQQ51rqsB3ZxAmHBblNeIZ0RL+nVLVt8USTRB036Em4t4anNdX?= =?us-ascii?Q?RHruJfMP8Y/jZbVWg0gLzdP2yhs2mSdwVV6qEq1l6RivbFN49JrAoO1UTBFL?= =?us-ascii?Q?6VGjdPp07aCHRU0tPjQeNKQOj3TiH+Pv+RRMljf3Sqac0fUUrBZk2WuBuXPR?= =?us-ascii?Q?LWLlJYju3OrB5DQPoyYsZlWDwkvFAz0uz9YMvr4u/b9zZlN/VDknO2wvxNSN?= =?us-ascii?Q?e/jr5vn5uYAtsuUqEJm0p1ADYyEhh7F6itUgNfIaZOi2FZdaxUkzIJhgVQOV?= =?us-ascii?Q?d3WwpnedorfRXhOTwc6JovcSfCGODVHEfnIGYsjxrafVG2laGbTR97GIxOTW?= =?us-ascii?Q?qVr+k6ZpqkuY5H/1bOe4Jii7MgvAiud+7mpjg5z5j3S6+hDP5t80UBQoCEIa?= =?us-ascii?Q?vXxSsKk8lCbFGTvcdKlH9rY8DbehNxLyru6w2VheAkkiyj8agAACVeU9e35N?= =?us-ascii?Q?Q7JccGefcuO7cq5CLJopPaFW9fQa9+kdt3B6gARJOH3S1FWNNfEWuqviSQRG?= =?us-ascii?Q?G+x1NY88ZGrhWAIBnWLzLQJ1m8rDJu4qWiujR6flWod7Va8fY8GRtXAIatf4?= =?us-ascii?Q?uKrBrkdXz3yNIdk25FAZR/lQwFjI2JjyeX2PzVU2nU0n99JHHPNUww+U0U6q?= =?us-ascii?Q?aQZ/?= 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: BL0PR12MB2419.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 497ce1b2-e1ae-4720-576f-08d8b3afc5f3 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Jan 2021 08:31:19.3813 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: DlWMS3tZttrCMvVY0KIbXYXlCEbqtyVRqHi5e/q+RrccZJl95zGAEEyp68KU9QygXxCGJRcvOYjBTSVw1OJraw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR12MB4963 X-OriginatorOrg: Nvidia.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1610094686; bh=7KLrWIZhh3H7YTSFQBoYJTJsROUjmG0eRijLsHNgZHY=; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:From:To: CC:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References: In-Reply-To:Accept-Language:Content-Language:X-MS-Has-Attach: X-MS-TNEF-Correlator:authentication-results:x-originating-ip: x-ms-publictraffictype:x-ms-office365-filtering-correlation-id: x-ms-traffictypediagnostic:x-ld-processed: x-ms-exchange-transport-forked:x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers:x-ms-exchange-senderadcheck: x-microsoft-antispam:x-microsoft-antispam-message-info: x-forefront-antispam-report:x-ms-exchange-antispam-messagedata: Content-Type:Content-Transfer-Encoding:MIME-Version: X-MS-Exchange-CrossTenant-AuthAs: X-MS-Exchange-CrossTenant-AuthSource: X-MS-Exchange-CrossTenant-Network-Message-Id: X-MS-Exchange-CrossTenant-originalarrivaltime: X-MS-Exchange-CrossTenant-fromentityheader: X-MS-Exchange-CrossTenant-id:X-MS-Exchange-CrossTenant-mailboxtype: X-MS-Exchange-CrossTenant-userprincipalname: X-MS-Exchange-Transport-CrossTenantHeadersStamped:X-OriginatorOrg; b=joVofpg6Fh3mePrQArbNJH6otEjJ0u2mXNjU1xQkMShRvhwbXDaxKB1oJpX1LUX4X r+P1CneHY5x5ODgqfgOV0iK6huNZs66oW2yUmrwC1Vkl5R+vt3sXBkazLHWCuL3pzi S1vZX9/sQbkPigLk3T9seEbPwPPdgwQaCmkc3BkF6jc0SxZ+2elJlaiAmGitRp0x0r ruuoOfObzK5X2ihWI5xY0/skzDdLZhiEhgMiPl4hNFjjbCHGzQUQ9LryAEqM7FDyYv 9VCfUfBaPGU5iGmToEjwBbSKTVlMUt9CsVS4LK2NRVTUWfpFtlPLlIyF3DBs9qPPDK clvmaW7oPQ2eQ== Subject: Re: [dpdk-dev] [PATCH v6] app/testpmd: fix testpmd packets dump overlapping 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: Stephen Hemminger > Sent: Wednesday, January 6, 2021 11:55 PM > To: Jiawei(Jonny) Wang > Cc: ferruh.yigit@intel.com; wenzhuo.lu@intel.com; beilei.xing@intel.com; > bernard.iremonger@intel.com; Ori Kam ; Slava > Ovsiienko ; NBU-Contact-Thomas Monjalon > ; Raslan Darawsheh ; > dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH v6] app/testpmd: fix testpmd packets dump > overlapping >=20 > On Wed, 6 Jan 2021 16:13:37 +0200 > Jiawei Wang wrote: >=20 > > +print_ether_addr(const char *what, const struct rte_ether_addr > *eth_addr, > > + char print_buf[], int buf_size, int *cur_len) >=20 > Use size_t instead of int for sizes? > The length can never be negative? The buf_size and cur_len always >0, buf_size means that the total size of s= tring buffer, default is 8K, the cur_len means that the current location of putting the new dump output,= start from 0. Thanks.=20