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 3E0BFA054F; Tue, 16 Mar 2021 07:34:44 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0A8094069F; Tue, 16 Mar 2021 07:34:44 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id C4E8940042 for ; Tue, 16 Mar 2021 07:34:42 +0100 (CET) IronPort-SDR: t8McgKINVXNC17w4w67JVvfiViYOCEDUaSjseTzDFgB/4ZYkZ0n8JXMoNHkvE7iPFkSieTNfSQ JwIUiIRTq9rg== X-IronPort-AV: E=McAfee;i="6000,8403,9924"; a="176804765" X-IronPort-AV: E=Sophos;i="5.81,251,1610438400"; d="scan'208";a="176804765" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Mar 2021 23:34:41 -0700 IronPort-SDR: 3/yBxwp1amGHYb7RE5LyHTj6hpV0EuqLP5nqUQeu89gR32NGPbhn+B8lEbVdGqdlTTAd661DsI NB4jEPiwAhgw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,251,1610438400"; d="scan'208";a="371879238" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orsmga003.jf.intel.com with ESMTP; 15 Mar 2021 23:34:41 -0700 Received: from fmsmsx607.amr.corp.intel.com (10.18.126.87) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Mon, 15 Mar 2021 23:34:41 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx607.amr.corp.intel.com (10.18.126.87) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2 via Frontend Transport; Mon, 15 Mar 2021 23:34:41 -0700 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.41) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2106.2; Mon, 15 Mar 2021 23:34:40 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Zeu2g2mE9dP41gwDaXRpNw48CFTbkIuzKo/vRjNRyjypUP7pGEwGEax1yrkiJQuVtd0N2m72YfUy5+GwDMB3Zkl8PvsoVdGD3/RxfwXtKRdGUAcuv/qB1tSh0I1hTgq+RAfHpIWejqSNXWNjWPfHybfPUwg1XJ1QB2Uihjd/X/ftoIreH5uPrEyJfwvmjU6wXxD+iuZJqqgD6wQ9rmEBjvKh5uN7Dx9TLYbhgJ2pbTWtr5b1CX9gVf++n1BXqUu0ygPh7ip0bOPTB6B5rnAmEMC/nk7GQ8aGUbe+ZM/Qzuqv2zEOSvcFTPmN0b71ZsUwj46NBcqn8Tpt3ls7t+rECA== 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=C9BiNmhKSlm5rT2lFwfyYR1HJOriTp8hFwwvRfCnpPk=; b=FSxLkcz+Ob6a1CT0I2c71MSAOWHcUBHZ17FhcdpAFdODPuTazrfqfEKfFdTqTAfNbvAv2LxN4HNY4ujeFpP6jzxS4IbJnF4U1ByuIWLnUNhCAqQS0MrwrQScJ/w0B+zbfIgDiPh3f8JcNg7YcMShKgCh1lFe5xv/olkCXP2W1yVEj9dX01GsnatqiZ+5XK2vozXRgVonqSHHvlAAn3nywnZStx1F5bWgCmjIhXNyprjXDLgOA1NGUWUqBMv9aiS2s+ke0NFPHwxSXBfsS4bq2k7jktHIk68SkpKWsuU96BalpZHR2sCitLkGV/5APV1TaO/PSnzazU5O7Y0TuizNuw== 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=C9BiNmhKSlm5rT2lFwfyYR1HJOriTp8hFwwvRfCnpPk=; b=rlvR1vKvq7dMsbMXshpIHm3TgACzJaWawDkA3bNTIjodysHzBM7zUj6DkM1Hg+7oFrofQ9gOo27ehLH1E6pE+CWEz6SSopGuJbgDZ76ZGKE2JYVtzFiDCD8gTKIfsWat8riCT1ZnI8KZLwtQXI52b6Lb3vpJTjsVcSdOiZkpnJ0= Received: from MWHPR11MB1757.namprd11.prod.outlook.com (2603:10b6:300:109::17) by CO1PR11MB4836.namprd11.prod.outlook.com (2603:10b6:303:9d::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3933.31; Tue, 16 Mar 2021 06:34:39 +0000 Received: from MWHPR11MB1757.namprd11.prod.outlook.com ([fe80::50:348e:ff31:d301]) by MWHPR11MB1757.namprd11.prod.outlook.com ([fe80::50:348e:ff31:d301%6]) with mapi id 15.20.3933.032; Tue, 16 Mar 2021 06:34:38 +0000 From: "Li, Xiaoyun" To: Kalesh A P , "dev@dpdk.org" CC: "Yigit, Ferruh" Thread-Topic: [dpdk-dev] [PATCH] app/testpmd: fix unchecked return value Thread-Index: AQHXGh17M7jM7LV6aE+I0H8+fAMBFqqGLWIA///7B8A= Date: Tue, 16 Mar 2021 06:34:38 +0000 Message-ID: References: <20210316045518.20234-1-kalesh-anakkur.purayil@broadcom.com> <20210316065136.2907-1-kalesh-anakkur.purayil@broadcom.com> In-Reply-To: <20210316065136.2907-1-kalesh-anakkur.purayil@broadcom.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: broadcom.com; dkim=none (message not signed) header.d=none;broadcom.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.55.46.54] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 4950b7e4-f29f-4acf-cc57-08d8e84592fb x-ms-traffictypediagnostic: CO1PR11MB4836: 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:475; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: cwAyJKUWJa9USQ1cfOtGRqfVBj5+Ly4YvRmT6anxslG+r0V1OYXeVHIxYS7vESl0Ve+qz+0/VtU2i4mpkFThJFZQGshmfOl6zGW/LNXBQ1ltRbyJNTtCifGJAAKhmvgy06yPw85oGInZa6FbT+/ujQW4/6H/3qw4+Vd/WTM/vUxlfLMwWzIQOXU4tozWpaxFu3DGFqn0Sf+oGMfW6c09rP+klp/J9NXUHNM1Exhe5wdKlnAGHYZ286w5HW9Rt0oGTDyepYqrGAmSPGQUrr1bFE8S8yJmVrweFA8sviZY2hb4BKU4+X/hFiwhMVksr8M7XEMMAfasKkswiuqDkkMPi9dfNwA9zkMtDYUhKyO9WyZYHiSw6DQmNqiYX84NXWipv12lXbUMpHYBR59qM1LiaLMT/uQVGUvWVdulypmuAlmxeLqgWiIYuMNAISiU6pzxoML2UWWbiVsrKLUkmx7104+UIWRWzbRb8JFAqBDeRRfpd5E0QjoJAYDMa6JBAiCLi878MJQsK0eWjH/ftpwkE6gtll8X0dkOQI1N8/OWHooNnlVHy0IGYzB5lwClI2rA x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MWHPR11MB1757.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(346002)(136003)(39860400002)(376002)(396003)(366004)(83380400001)(186003)(53546011)(55016002)(66446008)(110136005)(66946007)(2906002)(64756008)(9686003)(26005)(316002)(107886003)(33656002)(6506007)(76116006)(52536014)(71200400001)(4326008)(8676002)(7696005)(5660300002)(478600001)(66476007)(86362001)(66556008)(8936002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?BAn7lsFV5PXawsnPyRToO5W7+7pIt8zMZOV9ApH+lw4URhnWp5JqtAyxMAzd?= =?us-ascii?Q?BE/4FF3ynIYa9R8VqcYdkIZjhKrbicdBOarR00Sre+cPMXG0sOg99BHV+KqH?= =?us-ascii?Q?g16gORieGsb6uO5/L8gmbuEgodLZq60hEoqj6aCYYcHr+8NGv5QoxzWRIz3Q?= =?us-ascii?Q?DEEm4AjZmTw+LMEwu8lHPgKIYbzbuzVCDhmjkasN3mcESnAppOMvBRq1cytn?= =?us-ascii?Q?aLXF0W9LItqTGr6AJ/OejoW0N2goJDLTDzID4SgEgzoD6WsekXYdSRDHYeBd?= =?us-ascii?Q?pXrE4vTaZixFMQVK6tgoJIBwS785iRA7G1UdEXlabEX4QeLIbnEUeVxWdKFx?= =?us-ascii?Q?RD3PwOEYfel4CiUinepiVooTINofurWg2uqYMxI46JWSOQ0/omQFfJM5juvZ?= =?us-ascii?Q?XZt5ETwNYdzqzoK4qYy+jP+53NMmdKpNJfsYdR1qhjmckVl6o98POL/nt8j4?= =?us-ascii?Q?dmIK4hvHosea837kMEmtA6NmZvzMMuM43klHiruw1oDhlIuS/x1yVho3db1h?= =?us-ascii?Q?50ZU5F4ojx/P94DHLbHF4/VfqID9DmnL9D09A03SLjbERAtDro4iUe06lubL?= =?us-ascii?Q?88Z5+2hn3qWVic8bi1XMtyY3c6/g9L9yRwfHqULZmIQ4hP8R37cvApV4ACNG?= =?us-ascii?Q?m+n9wq8ZvbfyorYGu4rjfrSd0LHUD+dUZjL7GFEWcNyVizwQzoLB/s51g6Kc?= =?us-ascii?Q?lBPhg3/K3kZnCl8AvvGgeN0HgZg75id2+mxHdFyPBPtxt+if8avEPy9T1WXW?= =?us-ascii?Q?MurzvpmRftWSPHSzQZUXPidy0wdTtUs7Zo8Fq94BJ8OfJ2a0oYAhvLSNSK2C?= =?us-ascii?Q?izxO1Nc3oQj7b6dKtpdwXhN5bTCOWNGZxgjJU5dYk3Ha3QQHA921VUbCg+IA?= =?us-ascii?Q?6Vl4QktJHZcqbXDMIIQ8H8XIA9xEqsOeCJ/+5JIS8vFfB4kZZ0O2pLThwoDz?= =?us-ascii?Q?3Lo4FVHF30aOHwe/LtBScz7pVZDkyJwVXd993cw7fDJHdVTPQxdgp4Yo6Jxx?= =?us-ascii?Q?x6ahjf2SQqGt/oCo1eKQa33mFnrZg1Kx98851MlvUSysZNficrc/AaW2BEC0?= =?us-ascii?Q?GyS5MGv1xyKuZdHdWfOaeCDm6BrFFYsOFODYlmo0MiVLjWoRBe4rcBATV7Yq?= =?us-ascii?Q?ESSiwEGv8JzPpXWmcHDvZ4tWtRb8tBQiE3MUMDZW2Cxig/sw+PdwxjAiNyic?= =?us-ascii?Q?wjNGoHorD5K0qNalf6g7+8Sbf7dSPu85euxBjX6v6hbJTDYLNCCa4jc1L+yK?= =?us-ascii?Q?lv27eaY6v4ZUMRz2MnV1cjsoGvcypg+X+ZWq6C1M73RinBza4TC+A8V8nUX1?= =?us-ascii?Q?kwE=3D?= 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: MWHPR11MB1757.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4950b7e4-f29f-4acf-cc57-08d8e84592fb X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Mar 2021 06:34:38.8438 (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: t1QcTxjit7cuA6dcc7hjuI2Zg51LyduKaq9NzwYfHvotKktHfNaUSgb1fby94kB9SWTP9+XALtBP23kJMAXDGQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR11MB4836 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH] app/testpmd: fix unchecked return value 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: Kalesh A P > Sent: Tuesday, March 16, 2021 14:52 > To: dev@dpdk.org > Cc: Li, Xiaoyun ; Yigit, Ferruh > Subject: [dpdk-dev] [PATCH] app/testpmd: fix unchecked return value >=20 > From: Kalesh AP >=20 > This patch checks return value for rte_eth_dev_info_get() in show_macs(). >=20 > Coverity issue: 353629 > Fixes: e1d44d0ad623 ("app/testpmd: show MAC addresses added to a port") > Cc: stable@dpdk.org >=20 > Signed-off-by: Kalesh AP > --- > app/test-pmd/config.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) >=20 > diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index > 576d5ac..4ce75a8 100644 > --- a/app/test-pmd/config.c > +++ b/app/test-pmd/config.c > @@ -4930,7 +4930,8 @@ show_macs(portid_t port_id) >=20 > dev =3D &rte_eth_devices[port_id]; >=20 > - rte_eth_dev_info_get(port_id, &dev_info); > + if (eth_dev_info_get_print_err(port_id, &dev_info)) > + return; >=20 > for (i =3D 0; i < dev_info.max_mac_addrs; i++) { > addr =3D &dev->data->mac_addrs[i]; > -- > 2.10.1 Acked-by: Xiaoyun Li