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 C3F48A00BE; Fri, 11 Feb 2022 12:03:01 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5B1F641144; Fri, 11 Feb 2022 12:03:01 +0100 (CET) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 8AAC740150 for ; Fri, 11 Feb 2022 12:02:59 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1644577379; x=1676113379; h=from:to:subject:date:message-id:references:in-reply-to: content-transfer-encoding:mime-version; bh=e2/+EBvlmTBi5vBDaFZdtrmZLjmjhcg/gH+kIQCSPHM=; b=KF+1OgaX+5uTCBKJxgbX+VifQJXZ6yn2NFE8ToYPtZg/7REccBjzh2QO 9UnFwnEMcB0nSXNyn+JPByhnJr3MGbHNV/5nE5dLt+bpH2jhUN5JxtTMk bzFFoyOAGgrVaK2o0PR57768pCPiCscc3zsQzfW6mSDWdN4mSMyl82LlA pglvG2mIU0JcuZm+j4y/cindTUSULMiWu/Os1j6MBAEmuELDhUTVlxVHt uCJLlPVZVE8UUHL+jV2Cv3mvTAyTjgydu/l7t9ArhW6lJvFrk9hRLzXqp S0ahh1GJEWmTAbAx0y94zYbJKO/j+WjLBJZb+eyoYd70s0nraypuVLDkj A==; X-IronPort-AV: E=McAfee;i="6200,9189,10254"; a="237116492" X-IronPort-AV: E=Sophos;i="5.88,360,1635231600"; d="scan'208";a="237116492" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Feb 2022 03:02:58 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,360,1635231600"; d="scan'208";a="487428751" Received: from fmsmsx606.amr.corp.intel.com ([10.18.126.86]) by orsmga006.jf.intel.com with ESMTP; 11 Feb 2022 03:02:58 -0800 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Fri, 11 Feb 2022 03:02:58 -0800 Received: from fmsmsx602.amr.corp.intel.com (10.18.126.82) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Fri, 11 Feb 2022 03:02:57 -0800 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20 via Frontend Transport; Fri, 11 Feb 2022 03:02:57 -0800 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.173) 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.2308.20; Fri, 11 Feb 2022 03:02:57 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EEgcmpQShPkFiBLnrGBYlbUaxSDjPnJd/h2DeKRoPRZswA1UXkEvIDD630EH816m0h/l2sUtFzoT0tKO0x1TaLGMemUozm/ZmEfPCqu/SAA0zIccr1OZh1kG/fPfXMzW6HNlPpl7y0L9xL9YAsdZYIrf9vTg5d6mpDZ/c8ogkAfxN0cJaNoEIjSf3NQn5p0g4PVbi009uHahrHkvOBiW5EIzoqgSrEUjhMt1Aldy5u5jaCKdU7VKGLBcFLw56FXOrDEZt1tFuGrgl6m+qQV5j1bVBxG1/1d6iobEZUGD+kvZ9yryQR888Lho+Xu96I4tWCPbKRcJSNszIIKdwDMGkw== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=zE9mP2fg99P1HDy7gdIq0NllLtUapKROZecaNPRXivk=; b=mG1SPZRtxHbJy2pSaqtL8YHm5BqZa0ZlaeDUcYwBN60/oIgrOS1HS5MTEXz1mbU3edUgf0WW0VPiMw1iuq8owmj9BB9FWSXJS3TmJ/56DEjDRA1foXmUhrT9klV6w37ubWPKccQcUFqaI2h7acwK/gBqw33LxBoKTL7KeRr3tADNnf9odCkIK9YIqEPe8E2MAcQZOQ1YHr9ZOVUk8s6cgSi7fxTHrWmqWCqwR3y3LoKJCajQT+8txiAqy356nzwWAqQoTePfLiPW1fKuEgbh6K7yPsGqnG//QDJ3icZjl4qQgJpXcs5wfOgkA3Ex/mIVDlYt/CvU26GuufTrNKl4uA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Received: from DM6PR11MB4491.namprd11.prod.outlook.com (2603:10b6:5:204::19) by SA0PR11MB4557.namprd11.prod.outlook.com (2603:10b6:806:96::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4975.11; Fri, 11 Feb 2022 11:02:55 +0000 Received: from DM6PR11MB4491.namprd11.prod.outlook.com ([fe80::8ccc:ed65:78fa:1b07]) by DM6PR11MB4491.namprd11.prod.outlook.com ([fe80::8ccc:ed65:78fa:1b07%4]) with mapi id 15.20.4951.021; Fri, 11 Feb 2022 11:02:55 +0000 From: "Ananyev, Konstantin" To: Stephen Hemminger , "dev@dpdk.org" Subject: RE: [PATCH 2/3] app/test_bpf: don't print eBPF program if NULL Thread-Topic: [PATCH 2/3] app/test_bpf: don't print eBPF program if NULL Thread-Index: AQHYHtNWi/E0+YLTDkWp4jKACcdNfqyOL+/Q Date: Fri, 11 Feb 2022 11:02:55 +0000 Message-ID: References: <20220210230906.833163-1-stephen@networkplumber.org> <20220210230906.833163-3-stephen@networkplumber.org> In-Reply-To: <20220210230906.833163-3-stephen@networkplumber.org> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.6.200.16 authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 91f86b43-e007-43ab-9c10-08d9ed4e0e93 x-ms-traffictypediagnostic: SA0PR11MB4557:EE_ x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:3383; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 24ZFguUp7fX4c+uOMXm5yKDiRhPu8DGM8VawtRxhJdc2ho1f4PEaCMX+3OnnjPxAAeJiYdttX4x0Req0k3lKOev4ehMocV/w/iQraHo+6hJwy/QMwSmeursv/lHExXi5Mdnpd90PXoHiofCYrNbIxSrlboZOJZOIp86emLB5OAWmAcEiUT5GP9A4QezU7ecxE7O8xHaswu8jlVRnDRa8OYMc+Wi3PlOBDvG8EyUtLg0kEbBbiIBIpLtwJvQA7Z9MujFdizpRDsIzBC3G9YZVQO1ETibm8VVgUPunq26Me6EMhbV055OPUfUyZ5MrJvRDt7mEelWbeSKEJBGhGMcYXnI+ShnF52ZSv8+zGEkYpXvnq5yEJSa/RxCFUCf8OwrVZWvXXhrudXS5QqzCR4Ml5oTGiFKYHBTvOSEVKuGH8ChmfqCW6xrB9Zr5J9ikm/7qJC+8Z/l/zRM0IQB7kDPM84ou2QG4H3KEH+Z7ywZtfAsYHeLJwXyQpboQDsUMmhaYzLib9AR0WuqQlllCWIf1qoysvQiWEvWTPSE4Wdn7I8Qx7XhI/42VRppkHhh+M+pr/tmHKAclXz12yfAABZ0s/EnThmkaTTwvRnHqyoA5ZQKoFsAq0vz6IEyyR3TRhPLfUKuH1qtuO0apqiV4RS1MhY8GRULIB/N5TpkBaCv7IBA5gkdu0Et9+o9eqF9VQ5txMdvwXyoa2UzM/HKqE61pog== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR11MB4491.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(8936002)(5660300002)(122000001)(2906002)(38100700002)(38070700005)(82960400001)(52536014)(4744005)(26005)(186003)(6506007)(508600001)(9686003)(7696005)(71200400001)(66946007)(76116006)(66476007)(66446008)(64756008)(8676002)(66556008)(83380400001)(110136005)(316002)(33656002)(86362001)(55016003); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?ycqiao6T+7nDMZLTrEBJTjDIoabg5G4uSS9EIGG4HRgZGlqJDG3lpEqPlnMC?= =?us-ascii?Q?gxmcVjnTj8Hgh+hScozwButLnzNtJDq8oinkHBYqEex9xAz/K+hAhp1A+VM7?= =?us-ascii?Q?Cc56RGnc6JsBTSsJAzE6rzWy9ZLDTjvI6mGzAyAcORA0HBTml4vx0of/LO87?= =?us-ascii?Q?V4eEk9It8P4+VxxKNn6e0+9rzFvRhqDhSjLQzQAK0U3hyNo8g9Im3U3JiFnL?= =?us-ascii?Q?zGoVzXkL56AMx/wquX4AFEJIrkQskJmsjwipnCz3vBE5sW2WgNopgFXfH3io?= =?us-ascii?Q?PUgCgbaPCpQLZS+RI0+5LhEnqpqBnSSU6S6HX1syOT3sIZWZohzb1V4LzgzL?= =?us-ascii?Q?c3IUwxW7W4jKPIW5wK/vAtUmQJXVSmU2trgGUnfwL/Q0NlpDUPu/hTZERgSS?= =?us-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pVKhk+Mr8UsdPTCafQ+ylold?= =?us-ascii?Q?Kx5drNPpFHQyzr8wrpwMIS2Co5jUe1s+bzG9uTcK+vukHsCbJleDVja3Kj6w?= =?us-ascii?Q?v5/SICQcWN4QqR340t+LPRuQi6zwaoR/xGevaiUd4nsncfWOdzasCyEf87Va?= =?us-ascii?Q?rHn8OaxZLExKWRTEZlKfMD+1kSX60SXiYqYnOThTIcbVh4eBe9eiKd2+vFWb?= =?us-ascii?Q?tJxZX4ER+c2jrXswKe+36Bi42A9DmV5O7vbmDEgWqJud/qtOHx/OLC9XilAj?= =?us-ascii?Q?yyzSsNjMMSNTNiyz5ca1PSkyVD2Zp54RxS3ewUyCwiB/NmDKPRhIOkcpwRkf?= =?us-ascii?Q?XHR5OEMXAWhvlq42RDuamj4CUCmX5gWaKm9kPjFNSm3v8iJgM2mRWtkEHewZ?= =?us-ascii?Q?tnX8+Q=3D=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: DM6PR11MB4491.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 91f86b43-e007-43ab-9c10-08d9ed4e0e93 X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Feb 2022 11:02:55.6953 (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: iJ3vEi7pJJWJDj4fjbOvOFjN/brwgJQgtpsDBZgy4pPdafnVRrXSZyw/l25WT8tyozaAx38f9ZdcQxv+BUxcNX5DhCNBErwF7GrM1/s+uz8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR11MB4557 X-OriginatorOrg: intel.com 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 > If conversion of cBPF to eBPF fails (in rte_bpf_convert) > then the test should not try and print the result. >=20 > Coverity issue: 373661 > Fixes: 2eccf6afbea9 ("bpf: add function to convert classic BPF to DPDK BP= F") > Signed-off-by: Stephen Hemminger > --- > app/test/test_bpf.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) >=20 > diff --git a/app/test/test_bpf.c b/app/test/test_bpf.c > index d1e10adab545..805cce640667 100644 > --- a/app/test/test_bpf.c > +++ b/app/test/test_bpf.c > @@ -3273,8 +3273,10 @@ test_bpf_dump(struct bpf_program *cbf, const struc= t rte_bpf_prm *prm) > printf("cBPF program (%u insns)\n", cbf->bf_len); > bpf_dump(cbf, 1); >=20 > - printf("\neBPF program (%u insns)\n", prm->nb_ins); > - rte_bpf_dump(stdout, prm->ins, prm->nb_ins); > + if (prm !=3D NULL) { > + printf("\neBPF program (%u insns)\n", prm->nb_ins); > + rte_bpf_dump(stdout, prm->ins, prm->nb_ins); > + } > } >=20 > static int > -- Acked-by: Konstantin Ananyev > 2.34.1