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 39195A09E4; Thu, 22 Apr 2021 13:23:51 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B5D9041A53; Thu, 22 Apr 2021 13:23:50 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 87061406A3 for ; Thu, 22 Apr 2021 13:23:48 +0200 (CEST) IronPort-SDR: bHRbGGRrWpDu+sDR7asnyhZVIRvAig5osz06shiA9MZSMFYF79e+Xj2c9txZTEjEnj9ZGN8950 Orvkt73596Tw== X-IronPort-AV: E=McAfee;i="6200,9189,9961"; a="182999859" X-IronPort-AV: E=Sophos;i="5.82,242,1613462400"; d="scan'208";a="182999859" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Apr 2021 04:23:47 -0700 IronPort-SDR: 4W7Kc51ojiCY586isJ2xWXJSkpeZ+IouX14uopuc/SD/3iSJ8Nb01Q+v1J5bcAzEu5sxfx9De+ wHIL1LIG72Hw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,242,1613462400"; d="scan'208";a="524616104" Received: from fmsmsx604.amr.corp.intel.com ([10.18.126.84]) by fmsmga001.fm.intel.com with ESMTP; 22 Apr 2021 04:23:46 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) 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, 22 Apr 2021 04:23:45 -0700 Received: from fmsmsx607.amr.corp.intel.com (10.18.126.87) 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.2106.2; Thu, 22 Apr 2021 04:23:45 -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; Thu, 22 Apr 2021 04:23:45 -0700 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.103) 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; Thu, 22 Apr 2021 04:23:45 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=I4Xmu1YbEzNSoJairCfoKJZXXfqU5FnQmW9LyWb6aqn+pUj7clZ3Y0xH42fuxon9pcxwQIDnnOY1WUEufIJRx2p6DTxNdW4pLY/F3DS3YdLZaOd/cw+LpyO6MUtjObHjYTv7LHmskMDg5OYyHiC5y049XM305dGJu2WNTiqohNLl0WmuT3lOPPmL50HXvqdd8qriGHyXdM7QElMZgBgy2u2y2Y5SBpepEdsgSMj+aGtsdEQq63nHyWzkq9XmN9vnD8sGdCERHReUSK8AT5MoPVIacKOvJe1TUpxdjL5bnq5Dj7yXU/mm5X73WnztAHLsS/UYjGXK/usnWOULBJ14kw== 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=/P1DWCb0pIzeiLFCiGf9tVb1zlQ04ZpqCjP1VegR9qQ=; b=HOUF5ut31R9FxfU11nEbGHm+yIx+exzZZdwbITRqjPDrN1vPSRpg6sz+KyzaaPWCt7vJJ0TkG+UMIXcLRDNVy5fRONhAC4DTpepi/YHqw2Si2YOixlRoeM4zov2BCfXVwhtyPl6udK1C6fUfyep15VCl3qmCvpjirdGr97tGcs/KKDwQ+A2u5rZb9k2If19lOrMW6aiTxDUhC4LESRZYMkTb3vTzTQ9ZuRhzal7GIovYm0G04lNlx+rEYzhrC3lWEwliAN1iyZs1Cht3Mu7KmLBM2zVUGlzsiwnTBmVJzCMyDhPSm0SNIUw0hPb0s0OxeFyPU7XJCfxTlIrqf5xQ1w== 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=/P1DWCb0pIzeiLFCiGf9tVb1zlQ04ZpqCjP1VegR9qQ=; b=eGzh9aEHM9lD5xeNmWIIAjlEhxUQ4gCCwjN9AU4aiTo5SAo3TJycij7OtoJviX+H+3OZYUvHeBoAfg/GSNJgXauG8Rvam6CZLagBRg2EYCWf/AHal3TgA7UEXjsaJxsZvhOWHwktaaOQ8qWiZB58s7a8IXS9gMO7Zf5QXECFj7s= Received: from DM6PR11MB4491.namprd11.prod.outlook.com (2603:10b6:5:204::19) by DM6PR11MB2955.namprd11.prod.outlook.com (2603:10b6:5:65::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4042.19; Thu, 22 Apr 2021 11:23:42 +0000 Received: from DM6PR11MB4491.namprd11.prod.outlook.com ([fe80::15ed:b4f4:540e:ea0c]) by DM6PR11MB4491.namprd11.prod.outlook.com ([fe80::15ed:b4f4:540e:ea0c%7]) with mapi id 15.20.4065.022; Thu, 22 Apr 2021 11:23:42 +0000 From: "Ananyev, Konstantin" To: "Min Hu (Connor)" , "dev@dpdk.org" CC: "Yigit, Ferruh" , "Ananyev, Konstantin" Thread-Topic: [PATCH] bpf: fix unreachable statement Thread-Index: AQHXN0lhbfx6LtY56EOp/Scc9mfoh6rAZR9A Date: Thu, 22 Apr 2021 11:23:42 +0000 Message-ID: References: <1619076601-30228-1-git-send-email-humin29@huawei.com> In-Reply-To: <1619076601-30228-1-git-send-email-humin29@huawei.com> 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.5.1.3 authentication-results: huawei.com; dkim=none (message not signed) header.d=none;huawei.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [109.255.184.192] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: bebc14c2-425c-418a-6a77-08d9058115f6 x-ms-traffictypediagnostic: DM6PR11MB2955: 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:4502; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: fKTx3lCHOGyg4XRbyPvyw4UaKpKGozlYTamKS43lgIcRLTNygNA5nM//Ysrf0TrYPPiykzvIDS5UnjeFt/Z3ZbeqUL2dj6QOlToQvbwYFsFuT7PG1hcMvomOJT6x8YzBgHIQ3YiumsTWAJ7KRGze+Z3lBKz76iGclPAGIcpmSwiyK3+f08hW3OC2DsvVQT4TiKo7ujK+bgOU4Pkawvygz+IlTsmpkl8jXG+X6SLfnfuB0IsN79sGy9KvT3EjbB5POUMm/RL+HIbQl6vkxbsIsW27weDjbIMPvdcuGvuEpFrbL7XOl4ZLeAV+lS8OJbwC7g1AYeId91NTW6FOlX273m/mLjKeJLWbSAo8ctD6B/vMDNi+WLy4fQinkm+3hAUoaOqgqTdofQ+4/qiZJaLGBaaIyzhghRVWu7o0dyxMh09zFp5CcxV7CNEMAlmVHC9sHqCyNdLq6xcxP7CcQK6AoA+3pDK7NwLSvA9dztkBbNueBVTEkLVSu12HLZJ7kg4PD+03YEkj+Xpg6sTrOu7jJat5gzaz0M6XXzZprbMJjH4S4oV9YuI4F01FF1fJtk8xDU7HvjECJYDCIGonCw+Mjin7oloA+8difRg1jeEPUjA= 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:(39860400002)(376002)(396003)(366004)(346002)(136003)(38100700002)(7696005)(26005)(9686003)(52536014)(55016002)(33656002)(122000001)(186003)(4326008)(8936002)(71200400001)(2906002)(8676002)(83380400001)(86362001)(5660300002)(6506007)(478600001)(110136005)(66556008)(64756008)(66446008)(55236004)(316002)(54906003)(76116006)(107886003)(66946007)(66476007); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?Dx0oP8qSeuvVZ5RVcsWCjhI6JnAE2eLzLO2shmAkoMrZFSv/m9UPyUpfxGYE?= =?us-ascii?Q?aWJsoumhOZ2m5fDnU7KMrhxYY5MwBsda7UbWOZ9a+3EfuyWV03HVOcZHWZY/?= =?us-ascii?Q?85YyBokE2Z1l/n1prlE8cXBkGp860hYoE2E0PVhvRQOk1mgGdkiykAqIqlg1?= =?us-ascii?Q?yvVS0hDg/gaB85rrF9ABeYh/KsFryXDSY5cLLxAbB5CF0yqBc8RObG4dOlsA?= =?us-ascii?Q?gERPJTkuEwZSRsvA9sB1ETiVrGIj/jR090MMIG5CjnwrI5UFOLjZGypU0/GK?= =?us-ascii?Q?UzrR8ufezjfM+gpYh54LFh80J2MtLIt7jwa+hGnmo4+DGrNAuLuKwK1ciilG?= =?us-ascii?Q?xa/DuedMWtk5hVGrtkwpbWsc91neXcjF/pOYXTNR/9fvzV1pZCtKxFy7i11z?= =?us-ascii?Q?tOHzfcwCgtQYLhU/5zEPYRmP5Io6POP1/11PpmI8tPQb0nF8apkwLnpAg4Jx?= =?us-ascii?Q?NzeeVap/7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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: bebc14c2-425c-418a-6a77-08d9058115f6 X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Apr 2021 11:23:42.6007 (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: aY1dXNqkkPy7PxxxFMmHUyslvXGv1cMYt9m3krEVm54MjtHtuvYKeWQY6e+LXTNIWaQNXokUQoo7pmqqQ6m020MT0d6hLrlwpkwqI46gwFA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB2955 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH] bpf: fix unreachable statement 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" > From: HongBo Zheng >=20 > In function 'eval_jcc', judgment 'op =3D=3D EBPF_JLT' occurs > twice, as a result, the corresponding second statement > cannot be accessed. >=20 > This patch fix this problem. >=20 > Fixes: 8021917293d0 ("bpf: add extra validation for input BPF program") > Cc: stable@dpdk.org >=20 > Signed-off-by: HongBo Zheng > Signed-off-by: Min Hu (Connor) > --- > lib/librte_bpf/bpf_validate.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/lib/librte_bpf/bpf_validate.c b/lib/librte_bpf/bpf_validate.= c > index 9214f15..7b1291b 100644 > --- a/lib/librte_bpf/bpf_validate.c > +++ b/lib/librte_bpf/bpf_validate.c > @@ -1115,7 +1115,7 @@ eval_jcc(struct bpf_verifier *bvf, const struct ebp= f_insn *ins) > eval_jsgt_jsle(trd, trs, frd, frs); > else if (op =3D=3D EBPF_JSLE) > eval_jsgt_jsle(frd, frs, trd, trs); > - else if (op =3D=3D EBPF_JLT) > + else if (op =3D=3D EBPF_JSLT) > eval_jslt_jsge(trd, trs, frd, frs); > else if (op =3D=3D EBPF_JSGE) > eval_jslt_jsge(frd, frs, trd, trs); > -- Acked-by: Konstantin Ananyev > 2.7.4